本文整理汇总了PHP中CCGetSession函数的典型用法代码示例。如果您正苦于以下问题:PHP CCGetSession函数的具体用法?PHP CCGetSession怎么用?PHP CCGetSession使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CCGetSession函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: charges_AfterInsert
function charges_AfterInsert()
{
//charges_AfterInsert @4-B46BA208
//Custom Code @13-2A29BDB7
if (CCGetSession("RecentItemNum")) {
$ItemNum = CCGetSession("RecentItemNum");
}
startlistingnow($ItemNum, CCGetUserID());
}
示例2: Page_BeforeShow
function Page_BeforeShow()
{
//Page_BeforeShow @1-66DC429C
//Set Tag @4-E60AFC09
global $Tpl;
$userlog = CCGetSession("RecentUserSign");
$userem = CCGetSession("RecentUserEmail");
$Tpl->SetVar("userlogin", $userlog);
$Tpl->SetVar("useremail", $userem);
CCSetSession("RecentUserSign", "");
CCSetSession("RecentUserEmail", "");
//End Set Tag
}
示例3: buynowPayPal
function buynowPayPal($ItemNum)
{
global $Tpl;
global $EP;
$Tpl->SetBlockVar("Confirm_PayPal", "");
$iteminfo = new clsDBNetConnect();
$query = "Select * from items where ItemNum={$ItemNum}";
$iteminfo->query($query);
$iteminfo->next_record();
$sellerid = $iteminfo->f("user_id");
$sellerinfo = new clsDBNetConnect();
$query = "select first_name, last_name, email, user_login from users where user_id={$sellerid}";
$sellerinfo->query($query);
$sellerinfo->next_record();
$userinfo = new clsDBNetConnect();
$from_user_id = CCGetSession("UserID");
$query = "select first_name, last_name, email, user_login from users where user_id={$from_user_id}";
$userinfo->query($query);
$userinfo->next_record();
$shipoption = 1;
while ($iteminfo->f("ship" . $shipoption) != "") {
if ($shipoption == 1) {
$Tpl->setVar("checked", "checked");
} else {
$Tpl->setVar("checked", "");
}
if ($iteminfo->f("shipfee" . $shipoption) == 0 || $iteminfo->f("shipfee" . $shipoption) == "") {
$price = "0.00";
} else {
$price = $iteminfo->f("shipfee" . $shipoption);
}
$Tpl->setVar("method", $iteminfo->f("ship" . $shipoption));
$Tpl->setVar("option", $shipoption);
$Tpl->setVar("price", "\$" . $price);
$Tpl->Parse("Row", True);
$shipoption++;
}
if (!$iteminfo->f("ship1")) {
$Tpl->setVar("method", "No Shipping Specified");
$Tpl->setVar("option", "999999");
$Tpl->setVar("price", "\$" . "0.00");
$Tpl->setVar("checked", "checked");
$Tpl->Parse("Row", True);
}
$Tpl->setVar("ItemNum", $ItemNum);
$Tpl->setVar("title", $iteminfo->f("title"));
$Tpl->setVar("asking_price", $iteminfo->f("asking_price"));
$Tpl->Parse("Confirm_PayPal", True);
}
示例4: t_vat_setllementGrid_cetak_sptpd_BeforeShow
function t_vat_setllementGrid_cetak_sptpd_BeforeShow(&$sender)
{
$t_vat_setllementGrid_cetak_sptpd_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $t_vat_setllementGrid;
//Compatibility
//End t_vat_setllementGrid_cetak_sptpd_BeforeShow
// -------------------------
// Write your own code here.
$pajak = $t_vat_setllementGrid->total_vat_amount->GetValue();
$denda = $t_vat_setllementGrid->total_penalty_amount->GetValue();
$totaltotal = $pajak + $denda;
$t_vat_setllementGrid->total_total->SetValue($totaltotal);
$nilai = $t_vat_setllementGrid->t_vat_setllement_id->GetValue();
$nilai2 = $t_vat_setllementGrid->p_vat_type_id->GetValue();
$t_vat_setllementGrid->cetak_sptpd->SetValue("<input type='button' style='display:none;' value='CETAK' style='WIDTH: 57px; HEIGHT: 22px' class='Button' onclick=\"" . "cetakSptpd(" . $nilai . "," . $nilai2 . ")\">");
$action_button = CCGetFromGet("action_button", "");
$action_button2 = CCGetFromGet("action_button2", "");
if ($action_button == 'flag_payment' && $action_button2 != 'cetak_register') {
$dbConn = new clsDBConnSIKP();
$sql = "select sikp.f_payment_manual(" . CCGetFromGet('t_customer_order_id') . ",'" . CCGetSession('UserLogin') . "')";
$dbConn->query($sql);
$dbConn->next_record();
echo "\r\n \t\t<script>\r\n \t\talert('" . $dbConn->f('f_payment_manual') . "');\r\n \t\t</script>\r\n \t\t";
$dbConn->close();
} else {
if ($action_button2 == 'cetak_register') {
$dbConn = new clsDBConnSIKP();
$sql = "select sikp.f_print_register(" . CCGetFromGet('t_customer_order_id') . ",'" . CCGetSession('UserLogin') . "')";
$dbConn->query($sql);
$dbConn->next_record();
print_laporan($dbConn->f('f_print_register'));
/*echo "
<script>
window.open('../services/print_string.php?input_number=".$dbConn->f('f_print_register')."', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');
</script>
";*/
$dbConn->close();
exit;
}
}
// -------------------------
//Close t_vat_setllementGrid_cetak_sptpd_BeforeShow @300-BF0BB7F2
return $t_vat_setllementGrid_cetak_sptpd_BeforeShow;
}
示例5: MasterPage_llMenu_BeforeShow
function MasterPage_llMenu_BeforeShow(&$sender)
{
$MasterPage_llMenu_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $llMenu;
//Compatibility
//End MasterPage_llMenu_BeforeShow
//Custom Code @12-2A29BDB7
// -------------------------
// Write your own code here.
$Component->Text = CCGetSession("lmenu");
// -------------------------
//End Custom Code
//Close MasterPage_llMenu_BeforeShow @10-0267086D
return $MasterPage_llMenu_BeforeShow;
}
示例6: t_vat_setllementForm_Button1_OnClick
function t_vat_setllementForm_Button1_OnClick(&$sender)
{
$t_vat_setllementForm_Button1_OnClick = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $t_vat_setllementForm;
//Compatibility
//End t_vat_setllementForm_Button1_OnClick
//Custom Code @165-2A29BDB7
// -------------------------
// Write your own code here.
// -------------------------
//End Custom Code
// -------------------------
// Write your own code here.
$dbConn = new clsDBConnSIKP();
$User = CCGetUserLogin();
$t_bphtb_registration_id = $t_vat_setllementForm->t_bphtb_registration_id->GetValue();
$alasan = $t_vat_setllementForm->alasan->GetValue();
$njop_pbb = $t_vat_setllementForm->njop_pbb->GetValue();
$bphtb_amt_final = $t_vat_setllementForm->bphtb_amt_final->GetValue();
$bphtb_amt_final_keberatan = $t_vat_setllementForm->bphtb_amt_final_keberatan->GetValue();
$errorMsg = '';
$sql = "select * from f_insert_bphtb_keberatan(" . $t_bphtb_registration_id . ",19," . $bphtb_amt_final_keberatan . "," . $bphtb_amt_final . ",'" . $alasan . "','" . $User . "')";
//echo $sql;
//die($sql);
$dbConn->query($sql);
$dbConn->next_record();
$t_bphtb_keberatan_id = $dbConn->f("o_t_bphtb_keberatan_id");
$t_customer_order_id = $dbConn->f("o_t_customer_order_id");
$mess = $dbConn->f("o_mess");
$sql = "select sikp.f_first_submit_engine(511," . $t_customer_order_id . ",'" . CCGetSession('UserLogin') . "')";
$dbConn->query($sql);
//modified by wiliam
echo "<script> \r\n\t\talert('" . $mess . "');\r\n\t\twindow.opener.location.reload();\r\n\t\twindow.close();\r\n\t</script>";
// -------------------------
//Close t_vat_setllementForm_Button1_OnClick @164-6DBB2532
//return $t_vat_setllementForm_Button1_OnClick;
}
示例7: roleForm_Button_Insert_OnClick
function roleForm_Button_Insert_OnClick(&$sender)
{
$roleForm_Button_Insert_OnClick = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $roleForm;
//Compatibility
//End roleForm_Button_Insert_OnClick
//Custom Code @73-2A29BDB7
// -------------------------
global $CCSLocales;
global $Redirect;
//CCLogoutUser();
$db = new clsDBhrcon();
$SQL = "select * from f_changeuserpwd(" . $db->ToSQL($Container->user_name->Value, ccsText) . "," . $db->ToSQL(CCGetSession("is_new_user"), ccsText) . "," . $db->ToSQL($Container->old_password->Value, ccsText) . "," . $db->ToSQL($Container->new_password->Value, ccsText) . "," . $db->ToSQL($Container->new_password2->Value, ccsText) . ")";
$db->query($SQL);
$Result = $db->next_record();
if (!$Result) {
return;
}
//
if ($db->f('o_result_int') != 1) {
//print_r("test");exit;
$Container->Errors->addError($db->f('o_result_msg'));
$db->close();
} else {
CCLogoutUser();
$db->close();
print_r("<script language='JavaScript'>alert('Sukses');top.location.href='../';</script>");
}
//header('location:'.ServerURL . "main/login.php");
//exit;
// -------------------------
//End Custom Code
//Close roleForm_Button_Insert_OnClick @5-CEA01FFE
return;
//$roleForm_Button_Insert_OnClick;
}
示例8: t_executive_summary_form_AfterInsert
function t_executive_summary_form_AfterInsert(&$sender)
{
$t_executive_summary_form_AfterInsert = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $t_executive_summary_form;
//Compatibility
//End t_executive_summary_form_AfterInsert
//Custom Code @132-2A29BDB7
// -------------------------
// Write your own code here.
$t_executive_summary_form->DataSource->next_record();
$records = $t_executive_summary_form->DataSource->Record;
if ($t_executive_summary_form->DataSource->Errors->ErrorsCount == 0) {
$dbConn = new clsDBConnSIKP();
$sql = "select sikp.f_first_submit_engine(508," . $records['o_t_customer_order_id'] . ",'" . CCGetSession('UserLogin') . "')";
$dbConn->query($sql);
}
// -------------------------
//End Custom Code
//Close t_executive_summary_form_AfterInsert @25-96DE34DB
return $t_executive_summary_form_AfterInsert;
}
示例9: Show
function Show()
{
global $Tpl;
if (!$this->Visible) {
return;
}
$ShownRecords = 0;
$this->ds->Parameters["sesUserID"] = CCGetSession("UserID");
$this->ds->Prepare();
$this->ds->Open();
$GridBlock = "Grid " . $this->ComponentName;
$Tpl->block_path = $GridBlock;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow");
$is_next_record = $this->ds->next_record();
if ($is_next_record && $ShownRecords < $this->PageSize) {
do {
$this->ds->SetValues();
$Tpl->block_path = $GridBlock . "/Row";
$this->ItemNum->SetValue($this->ds->ItemNum->GetValue());
$this->title->SetValue($this->ds->title->GetValue());
$twodays = $this->ds->started->GetValue();
$theday = getdate($twodays);
$lastofyear = substr($theday["year"], -2);
$enddate = $theday["mon"] . "/" . $theday["mday"] . "/" . $lastofyear;
$this->started->SetValue($enddate);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow");
$this->ItemNum->Show();
$this->title->Show();
$this->started->Show();
$Tpl->block_path = $GridBlock;
$Tpl->parse("Row", true);
$ShownRecords++;
$is_next_record = $this->ds->next_record();
} while ($is_next_record && $ShownRecords < $this->PageSize);
} else {
$Tpl->parse("NoRecords", false);
}
$this->Navigator->TotalPages = $this->ds->PageCount();
$this->Sorter_ItemNum->Show();
$this->Sorter_title->Show();
$this->Sorter_started->Show();
$this->Navigator->Show();
$Tpl->parse("", false);
$Tpl->block_path = "";
}
示例10: users_reassignuser_content_BeforeShow
function users_reassignuser_content_BeforeShow(&$sender)
{
$users_reassignuser_content_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $users_reassignuser_content;
//Compatibility
//End users_reassignuser_content_BeforeShow
//Custom Code @53-2A29BDB7
// -------------------------
// Write your own code here.
//Settingup saved message popup
$sourceuser = (int) CCGetFromPost("lbsourceuser", 0);
$targetuser = (int) CCGetFromPost("lbtargetuser", 0);
$companies = CCGetFromPost("companies", array());
$o = trim(CCGetFromPost("o", ""));
if ($o == "reassignuser") {
if ($sourceuser != $targetuser) {
if (count($companies) > 0) {
global $FileName;
$params = array();
$params["sourceuser"] = $sourceuser;
$params["targetuser"] = $targetuser;
$params["companies"] = $companies;
$customers = new Customers();
$reassigned = $customers->reassignUser($params);
$total_updated = $reassigned["result"]["total_updated"];
if ($total_updated > 0) {
CCSetSession("showalert", "show");
//$users_reassignuser_content->lbsourceuser->setvalue($targetuser);
}
}
}
} else {
//Default param value
$sourceuserid = (int) CCGetFromGet("sourceuserid", "0");
if ($sourceuserid <= 0) {
$users_reassignuser_content->lbsourceuser->setvalue("1");
} else {
$users_reassignuser_content->lbsourceuser->setvalue($sourceuserid);
}
}
global $MainPage;
$showalert = CCGetSession("showalert", "hide");
$MainPage->Attributes->SetValue("showalert", $showalert);
if ($showalert == "show") {
CCSetSession("showalert", "hide");
}
// -------------------------
//End Custom Code
//Close users_reassignuser_content_BeforeShow @1-90D76575
return $users_reassignuser_content_BeforeShow;
}
示例11: Show
function Show()
{
global $Tpl;
if (!$this->Visible) {
return;
}
$ShownRecords = 0;
$this->ds->Parameters["sesUserID"] = CCGetSession("UserID");
$this->ds->Prepare();
$this->ds->Open();
$GridBlock = "Grid " . $this->ComponentName;
$Tpl->block_path = $GridBlock;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow");
$is_next_record = $this->ds->next_record();
if ($is_next_record && $ShownRecords < $this->PageSize) {
do {
$this->ds->SetValues();
$Tpl->block_path = $GridBlock . "/Row";
$this->value->SetValue($this->ds->value->GetValue());
$this->results->SetValue($this->ds->results->GetValue());
$this->id->SetValue($this->ds->id->GetValue());
$this->date->SetValue(date("F j, Y, g:i a", $this->ds->date->GetValue()));
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow");
$this->value->Show();
$this->results->Show();
$this->id->Show();
$this->date->Show();
$array = explode(" :!:!:: ", $this->ds->value->GetValue());
$i = 0;
$output = "";
while ($array[$i]) {
$temp = explode(" ::!:!: ", $array[$i]);
if ($temp[1] != "") {
$output .= "<b>" . $temp[0] . "</b> = <i>\"" . $temp[1] . "\"</i><hr width=\"25\" align=\"left\">";
}
$i++;
}
$Tpl->SetVar("summery", $output);
$array = explode(" :!:!:: ", $this->ds->results->GetValue());
$i = 0;
$output = "";
while ($array[$i]) {
$temp = explode(" ::!:!: ", $array[$i]);
if ($temp[1] != "") {
$output .= "<a href=\"ViewItem.php?ItemNum=" . $temp[0] . "\"><b>" . $temp[1] . "</b>: <i>ItemNumber-" . $temp[0] . "</i><hr width=\"25\" align=\"left\">";
}
$i++;
}
$Tpl->SetVar("results", $output);
$Tpl->SetVar("count", $i);
$Tpl->block_path = $GridBlock;
$Tpl->parse("Row", true);
$ShownRecords++;
$is_next_record = $this->ds->next_record();
} while ($is_next_record && $ShownRecords < $this->PageSize);
}
$this->Navigator->TotalPages = $this->ds->PageCount();
$this->Sorter_value->Show();
$this->Sorter_results->Show();
$this->Sorter_date->Show();
$this->Navigator->Show();
$Tpl->parse("", false);
$Tpl->block_path = "";
}
示例12: customers_assessment_maintcontent_BeforeShow
function customers_assessment_maintcontent_BeforeShow(&$sender)
{
$customers_assessment_maintcontent_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $customers_assessment_maintcontent;
//Compatibility
//End customers_assessment_maintcontent_BeforeShow
//Custom Code @9-2A29BDB7
// -------------------------
// Write your own code here.
global $MainPage;
$params = array();
$customers = new Customers();
$tab = CCGetFromGet("tab", "tab_9");
$guid = CCGetFromGet("guid", "");
$o_post = CCGetFromPost("o", "");
switch ($o_post) {
case "insert":
$typeid_post = (int) CCGetFromPost("hidtype_id", "0");
$option_title = trim(CCGetFromPost("title", ""));
$tab = trim(CCGetFromPost("hidtab", ""));
$params["type_id"] = $typeid_post;
$params["title"] = $option_title;
$newOption = $customers->addAssessmentType($params);
$newOption = $newOption["options"];
$guid = $newOption["guid"];
//Will show saved pop and disable button
CCSetSession("showalert", "show");
//Redirect after submit
header("Location: customers_assessment.php?tab={$tab}");
break;
case "update":
$typeid_post = (int) CCGetFromPost("hidtype_id", "0");
$option_title = trim(CCGetFromPost("title", ""));
$tab = trim(CCGetFromPost("hidtab", ""));
$guid = trim(CCGetFromPost("hidguid", ""));
$params["type_id"] = $typeid_post;
$params["title"] = $option_title;
$params["guid"] = $guid;
$customers->editAssessmentType($params);
//Will show saved pop and disable button
CCSetSession("showalert", "show");
//Redirect after submit
header("Location: customers_assessment.php?tab={$tab}");
break;
}
$guid = trim($guid, "guid=");
$type_id = trim($tab, "tab_");
if (strlen($guid) > 0) {
$params["guid"] = $guid;
$option = $customers->getAssessmentOptionsByGuid($params);
$option = $option["options"][0];
$customers_assessment_maintcontent->hidguid->SetValue($option["guid"]);
$customers_assessment_maintcontent->title->SetValue($option["title"]);
$customers_assessment_maintcontent->o->SetValue("update");
}
$customers_assessment_maintcontent->hidtype_id->SetValue($type_id);
$customers_assessment_maintcontent->hidtab->SetValue($tab);
$params["type_id"] = $type_id;
$type_detail = $customers->getAssessmentTypeByID($params);
$type_detail = $type_detail["types"][0];
$typeid_title = $type_detail["type"];
$customers_assessment_maintcontent->lbtype->setvalue($typeid_title);
//Settingup saved message popup
$showalert = CCGetSession("showalert", "hide");
$MainPage->Attributes->SetValue("showalert", $showalert);
if ($showalert == "show") {
CCSetSession("showalert", "hide");
}
// -------------------------
//End Custom Code
//Close customers_assessment_maintcontent_BeforeShow @1-BC8E08EE
return $customers_assessment_maintcontent_BeforeShow;
}
示例13: Update
function Update()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->CmdExecution = true;
$this->cp["updated_by"] = new clsSQLParameter("sesUserLogin", ccsText, "", "", CCGetSession("UserLogin", NULL), NULL, false, $this->ErrorBlock);
$this->cp["updated_date"] = new clsSQLParameter("expr739", ccsText, "", "", date("Y-m-d H:i:s"), NULL, false, $this->ErrorBlock);
$this->cp["wp_p_region_id"] = new clsSQLParameter("ctrlwp_p_region_id", ccsFloat, "", "", $this->wp_p_region_id->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["wp_p_region_id_kel"] = new clsSQLParameter("ctrlwp_p_region_id_kel", ccsFloat, "", "", $this->wp_p_region_id_kel->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["wp_name"] = new clsSQLParameter("ctrlwp_name", ccsText, "", "", $this->wp_name->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["wp_address_name"] = new clsSQLParameter("ctrlwp_address_name", ccsText, "", "", $this->wp_address_name->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["npwp"] = new clsSQLParameter("ctrlnpwp", ccsText, "", "", $this->npwp->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["object_p_region_id_kec"] = new clsSQLParameter("ctrlobject_p_region_id_kec", ccsText, "", "", $this->object_p_region_id_kec->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["object_p_region_id"] = new clsSQLParameter("ctrlobject_p_region_id", ccsText, "", "", $this->object_p_region_id->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["land_area"] = new clsSQLParameter("ctrlland_area", ccsFloat, "", "", $this->land_area->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["land_price_per_m"] = new clsSQLParameter("ctrlland_price_per_m", ccsFloat, "", "", $this->land_price_per_m->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["land_total_price"] = new clsSQLParameter("ctrlland_total_price", ccsFloat, "", "", $this->land_total_price->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["building_area"] = new clsSQLParameter("ctrlbuilding_area", ccsFloat, "", "", $this->building_area->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["building_price_per_m"] = new clsSQLParameter("ctrlbuilding_price_per_m", ccsFloat, "", "", $this->building_price_per_m->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["building_total_price"] = new clsSQLParameter("ctrlbuilding_total_price", ccsFloat, "", "", $this->building_total_price->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["wp_rt"] = new clsSQLParameter("ctrlwp_rt", ccsText, "", "", $this->wp_rt->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["wp_rw"] = new clsSQLParameter("ctrlwp_rw", ccsText, "", "", $this->wp_rw->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["object_rt"] = new clsSQLParameter("ctrlobject_rt", ccsText, "", "", $this->object_rt->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["object_rw"] = new clsSQLParameter("ctrlobject_rw", ccsText, "", "", $this->object_rw->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["njop_pbb"] = new clsSQLParameter("ctrlnjop_pbb", ccsText, "", "", $this->njop_pbb->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["object_address_name"] = new clsSQLParameter("ctrlobject_address_name", ccsText, "", "", $this->object_address_name->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["p_bphtb_legal_doc_type_id"] = new clsSQLParameter("ctrlp_bphtb_legal_doc_type_id", ccsText, "", "", $this->p_bphtb_legal_doc_type_id->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["npop"] = new clsSQLParameter("ctrlnpop", ccsFloat, "", "", $this->npop->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["npop_tkp"] = new clsSQLParameter("ctrlnpop_tkp", ccsFloat, "", "", $this->npop_tkp->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["npop_kp"] = new clsSQLParameter("ctrlnpop_kp", ccsFloat, "", "", $this->npop_kp->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["bphtb_amt"] = new clsSQLParameter("ctrlbphtb_amt", ccsFloat, "", "", $this->bphtb_amt->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["bphtb_amt_final"] = new clsSQLParameter("ctrlbphtb_amt_final", ccsFloat, "", "", $this->bphtb_amt_final->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["bphtb_discount"] = new clsSQLParameter("ctrlbphtb_discount", ccsFloat, "", "", $this->bphtb_discount->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["description"] = new clsSQLParameter("ctrldescription", ccsText, "", "", $this->description->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["market_price"] = new clsSQLParameter("ctrlmarket_price", ccsFloat, "", "", $this->market_price->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["mobile_phone_no"] = new clsSQLParameter("ctrlmobile_phone_no", ccsText, "", "", $this->mobile_phone_no->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["wp_p_region_id_kec"] = new clsSQLParameter("ctrlwp_p_region_id_kec", ccsFloat, "", "", $this->wp_p_region_id_kec->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["object_p_region_id_kel"] = new clsSQLParameter("ctrlobject_p_region_id_kel", ccsFloat, "", "", $this->object_p_region_id_kel->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["jenis_harga_bphtb"] = new clsSQLParameter("ctrljenis_harga_bphtb", ccsText, "", "", $this->jenis_harga_bphtb->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["jenis_harga_bphtb"] = new clsSQLParameter("ctrljenis_harga_bphtb", ccsText, "", "", $this->jenis_harga_bphtb->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["bphtb_legal_doc_description"] = new clsSQLParameter("ctrlbphtb_legal_doc_description", ccsText, "", "", $this->bphtb_legal_doc_description->GetValue(true), NULL, false, $this->ErrorBlock);
$this->cp["add_disc_percent"] = new clsSQLParameter("ctrladd_disc_percent", ccsSingle, "", "", $this->add_disc_percent->GetValue(true), NULL, false, $this->ErrorBlock);
$wp = new clsSQLParameters($this->ErrorBlock);
$wp->AddParameter("1", "ctrlt_bphtb_registration_id", ccsFloat, "", "", $this->t_bphtb_registration_id->GetValue(true), "", false);
if (!$wp->AllParamsSet()) {
$this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
}
$wp->AddParameter("2", "urlt_bphtb_registration_id", ccsFloat, "", "", CCGetFromGet("t_bphtb_registration_id", NULL), "", false);
if (!$wp->AllParamsSet()) {
$this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
}
$wp->AddParameter("3", "urlt_bphtb_registration_id", ccsFloat, "", "", CCGetFromGet("t_bphtb_registration_id", NULL), "", false);
if (!$wp->AllParamsSet()) {
$this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
}
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate", $this->Parent);
if (!is_null($this->cp["updated_by"]->GetValue()) and !strlen($this->cp["updated_by"]->GetText()) and !is_bool($this->cp["updated_by"]->GetValue())) {
$this->cp["updated_by"]->SetValue(CCGetSession("UserLogin", NULL));
}
if (!is_null($this->cp["updated_date"]->GetValue()) and !strlen($this->cp["updated_date"]->GetText()) and !is_bool($this->cp["updated_date"]->GetValue())) {
$this->cp["updated_date"]->SetValue(date("Y-m-d H:i:s"));
}
if (!is_null($this->cp["wp_p_region_id"]->GetValue()) and !strlen($this->cp["wp_p_region_id"]->GetText()) and !is_bool($this->cp["wp_p_region_id"]->GetValue())) {
$this->cp["wp_p_region_id"]->SetValue($this->wp_p_region_id->GetValue(true));
}
if (!is_null($this->cp["wp_p_region_id_kel"]->GetValue()) and !strlen($this->cp["wp_p_region_id_kel"]->GetText()) and !is_bool($this->cp["wp_p_region_id_kel"]->GetValue())) {
$this->cp["wp_p_region_id_kel"]->SetValue($this->wp_p_region_id_kel->GetValue(true));
}
if (!is_null($this->cp["wp_name"]->GetValue()) and !strlen($this->cp["wp_name"]->GetText()) and !is_bool($this->cp["wp_name"]->GetValue())) {
$this->cp["wp_name"]->SetValue($this->wp_name->GetValue(true));
}
if (!is_null($this->cp["wp_address_name"]->GetValue()) and !strlen($this->cp["wp_address_name"]->GetText()) and !is_bool($this->cp["wp_address_name"]->GetValue())) {
$this->cp["wp_address_name"]->SetValue($this->wp_address_name->GetValue(true));
}
if (!is_null($this->cp["npwp"]->GetValue()) and !strlen($this->cp["npwp"]->GetText()) and !is_bool($this->cp["npwp"]->GetValue())) {
$this->cp["npwp"]->SetValue($this->npwp->GetValue(true));
}
if (!is_null($this->cp["object_p_region_id_kec"]->GetValue()) and !strlen($this->cp["object_p_region_id_kec"]->GetText()) and !is_bool($this->cp["object_p_region_id_kec"]->GetValue())) {
$this->cp["object_p_region_id_kec"]->SetValue($this->object_p_region_id_kec->GetValue(true));
}
if (!is_null($this->cp["object_p_region_id"]->GetValue()) and !strlen($this->cp["object_p_region_id"]->GetText()) and !is_bool($this->cp["object_p_region_id"]->GetValue())) {
$this->cp["object_p_region_id"]->SetValue($this->object_p_region_id->GetValue(true));
}
if (!is_null($this->cp["land_area"]->GetValue()) and !strlen($this->cp["land_area"]->GetText()) and !is_bool($this->cp["land_area"]->GetValue())) {
$this->cp["land_area"]->SetValue($this->land_area->GetValue(true));
}
if (!is_null($this->cp["land_price_per_m"]->GetValue()) and !strlen($this->cp["land_price_per_m"]->GetText()) and !is_bool($this->cp["land_price_per_m"]->GetValue())) {
$this->cp["land_price_per_m"]->SetValue($this->land_price_per_m->GetValue(true));
}
if (!is_null($this->cp["land_total_price"]->GetValue()) and !strlen($this->cp["land_total_price"]->GetText()) and !is_bool($this->cp["land_total_price"]->GetValue())) {
$this->cp["land_total_price"]->SetValue($this->land_total_price->GetValue(true));
}
if (!is_null($this->cp["building_area"]->GetValue()) and !strlen($this->cp["building_area"]->GetText()) and !is_bool($this->cp["building_area"]->GetValue())) {
$this->cp["building_area"]->SetValue($this->building_area->GetValue(true));
}
if (!is_null($this->cp["building_price_per_m"]->GetValue()) and !strlen($this->cp["building_price_per_m"]->GetText()) and !is_bool($this->cp["building_price_per_m"]->GetValue())) {
$this->cp["building_price_per_m"]->SetValue($this->building_price_per_m->GetValue(true));
}
if (!is_null($this->cp["building_total_price"]->GetValue()) and !strlen($this->cp["building_total_price"]->GetText()) and !is_bool($this->cp["building_total_price"]->GetValue())) {
$this->cp["building_total_price"]->SetValue($this->building_total_price->GetValue(true));
//.........这里部分代码省略.........
示例14: Initialize
function Initialize()
{
if (!$this->Visible) {
return;
}
$this->ds->Parameters["sesUserID"] = CCGetSession("UserID");
}
示例15: licensing_customerscontent_BeforeShow
function licensing_customerscontent_BeforeShow(&$sender)
{
$licensing_customerscontent_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $licensing_customerscontent;
//Compatibility
//End licensing_customerscontent_BeforeShow
//Custom Code @152-2A29BDB7
// -------------------------
// Write your own code here.
global $Tpl;
$tab = CCGetFromGet("tab", "tab1_active");
switch ($tab) {
default:
case "details":
$Tpl->setvar("tab1_active", "active");
break;
case "licensing":
$Tpl->setvar("tab2_active", "active");
break;
case "licenselist":
$Tpl->setvar("tab3_active", "active");
break;
case "licensearchive":
$Tpl->setvar("tab4_active", "active");
break;
case "competitor_renewals":
$Tpl->setvar("tab5_active", "active");
break;
case "product_displacement":
$Tpl->setvar("tab6_active", "active");
break;
}
//Setting the active tab for licensing when the cssForm is present and has licensing as the form submitted
$cssForm = trim(CCGetFromGet("ccsForm", ""));
if ($cssForm == "licensing") {
//Whichever tab set will be reset to avoid more than 1 tab active
$Tpl->setvar("tab1_active", "");
$Tpl->setvar("tab2_active", "active");
$Tpl->setvar("tab3_active", "");
$Tpl->setvar("tab4_active", "");
$Tpl->setvar("tab5_active", "");
$Tpl->setvar("tab6_active", "");
}
//Settingup saved message popup
global $MainPage;
$showalert = CCGetSession("showalert", "hide");
$MainPage->Attributes->SetValue("showalert", $showalert);
if ($showalert == "show") {
CCSetSession("showalert", "hide");
}
//Setting up alerts to let user know the customer has not contacts yet
$customers = new Customers();
$customer_guid = CCGetFromGet("guid", "");
$params = array();
$params["customer_guid"] = $customer_guid;
$hasContacts = $customers->customerHasContacts($params);
if ($hasContacts["hasContacts"] == "1") {
$MainPage->Attributes->SetValue("showalert_contacterror", "hide");
} else {
$MainPage->Attributes->SetValue("showalert_contacterror", "show");
}
//Setting up alerts to let user know the license may need support
$license_guid = trim(CCGetFromGet("license_guid", ""));
if (strlen($license_guid) > 0) {
$products = new Alm\Products();
$params = array();
$params["license_guid"] = $license_guid;
$hasSupport = $products->licenseHasSupport($params);
if ($hasSupport["hasSupport"] == "1") {
$MainPage->Attributes->SetValue("showalert_addsupport", "hide");
} else {
$MainPage->Attributes->SetValue("showalert_addsupport", "show");
}
} else {
$MainPage->Attributes->SetValue("showalert_addsupport", "hide");
}
//Check if session variable showalert_addsupport has a show value
$showalert_addsupport = CCGetSession("showalert_addsupport", "");
if ($showalert_addsupport == "show") {
CCSetSession("showalert_addsupport", "hide");
$MainPage->Attributes->SetValue("showalert_addsupport", $showalert);
}
//Procesing file uploading
$hidlicense_guid = trim(CCGetFromPost("hidlicense_guid", ""));
if (!empty($_FILES) && strlen($hidlicense_guid) > 0) {
$params = array();
$params["license_guid"] = $hidlicense_guid;
$products = new \Alm\Products();
$products->uploadLicenseFile($_FILES, $params);
//Finishing script execution for file uploads because its asyncronous
exit;
}
$license_guid = trim(CCGetFromGet("license_guid", ""));
$licensefile_guid = trim(CCGetFromGet("licensefile_guid", ""));
$o = trim(CCGetFromGet("o", ""));
//Delete licensing operation
if (strlen($licensefile_guid) > 0 && $o == "dellicense") {
$params = array();
//.........这里部分代码省略.........