本文整理匯總了PHP中CCSetSession函數的典型用法代碼示例。如果您正苦於以下問題:PHP CCSetSession函數的具體用法?PHP CCSetSession怎麽用?PHP CCSetSession使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了CCSetSession函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Login_Button_DoLogin_OnClick
function Login_Button_DoLogin_OnClick(&$sender)
{
$Login_Button_DoLogin_OnClick = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $Login;
//Compatibility
//End Login_Button_DoLogin_OnClick
//Login @4-DE10C29C
global $CCSLocales;
global $Redirect;
if (!CCLoginUser($Container->username->Value, $Container->password->Value)) {
$Container->Errors->addError($CCSLocales->GetText("CCS_LoginError"));
$Container->password->SetValue("");
$Login_Button_DoLogin_OnClick = 0;
} else {
global $Redirect;
$seshmenu = "";
$glip = array("glyphicon-cog", "glyphicon-cog", "glyphicon-list", "glyphicon-folder-close", "glyphicon-usd", "glyphicon-gift", "glyphicon-time", "glyphicon-user", "glyphicon-log-in", "glyphicon-align-justify");
$DBhrcon_ = new clsDBhrcon();
$queryMD = "select p_module_id, code, description from p_module " . "where is_active='Y' order by listing_no";
$DBhrcon_->query($queryMD);
while ($DBhrcon_->next_record()) {
$seshmenu = $seshmenu . "<li><a href='../main/modul.php?p_module_id=" . $DBhrcon_->f("p_module_id") . "'" . "title='" . $DBhrcon_->f("code") . " " . $DBhrcon_->f("description") . "' target=''>" . "<i class='glyphicon " . $glip[$DBhrcon_->f("p_module_id")] . "' style='font-size: 32px; border:2px solid #ffffff; padding:3px'></i>";
}
$DBhrcon_->close();
CCSetSession("hmenu", $seshmenu);
$Redirect = CCGetParam("ret_link", $Redirect);
$Login_Button_DoLogin_OnClick = 1;
}
//End Login
//Close Login_Button_DoLogin_OnClick @3-0EB5DCFE
return $Login_Button_DoLogin_OnClick;
}
示例2: users_AfterInsert
function users_AfterInsert()
{
//users_AfterInsert @4-34AA212C
//Custom Code @34-2A29BDB7
global $users;
global $now;
global $NewPass;
global $EP;
global $Give_New_Credit;
global $Give_Amount;
global $Give_Tokens;
global $Give_Cause;
$lookdb = new clsDBNetConnect();
$lookdb->connect();
$lookdb->query("SELECT * FROM users WHERE user_login='" . $users->user_login->Value . "'");
if ($lookdb->next_record()) {
$ld = array("first" => $lookdb->f("first_name"), "ID" => $lookdb->f("user_id"), "user_password" => $lookdb->f("user_password"), "last" => $lookdb->f("last_name"), "email" => $lookdb->f("email"), "address" => $lookdb->f("address1"), "address2" => $lookdb->f("address2"), "state" => $lookdb->f("state_id"), "zip" => $lookdb->f("zip"), "city" => $lookdb->f("city"), "phonedy" => $lookdb->f("phone_day"), "phoneevn" => $lookdb->f("phone_evn"), "fax" => $lookdb->f("fax"), "ip" => $lookdb->f("ip_insert"), "date_created" => $lookdb->f("date_created"));
}
CCSetSession("RecentUserSign", $users->user_login->Value);
CCSetSession("RecentUserEmail", $users->email->Value);
$EP["EMAIL:CURRENT_USERNAME"] = $users->user_login->Value;
$EP["EMAIL:CURRENT_USERID"] = $ld["ID"];
$EP["EMAIL:CURRENT_USER_PASSWORD"] = $ld["user_password"];
$EP["EMAIL:CURRENT_USER_FIRST_NAME"] = $ld["first"];
$EP["EMAIL:CURRENT_USER_LAST_NAME"] = $ld["last"];
$EP["EMAIL:CURRENT_USER_EMAIL"] = $ld["email"];
$EP["EMAIL:CURRENT_USER_ADDRESS"] = $ld["address"];
$EP["EMAIL:CURRENT_USER_ADDRESS2"] = $ld["address2"];
$EP["EMAIL:CURRENT_USER_STATE"] = $ld["state"];
$EP["EMAIL:CURRENT_USER_CITY"] = $ld["city"];
$EP["EMAIL:CURRENT_USER_ZIP"] = $ld["zip"];
$EP["EMAIL:CURRENT_USER_DAY_PHONE"] = $ld["phonedy"];
$EP["EMAIL:CURRENT_USER_EVN_PHONE"] = $ld["phoneevn"];
$EP["EMAIL:CURRENT_USER_FAX"] = $ld["fax"];
$EP["EMAIL:CURRENT_USER_IP"] = getenv("REMOTE_ADDR");
$EP["EMAIL:CURRENT_USER__REGISTERED_IP"] = $ld["ip"];
$EP["EMAIL:CURRENT_USER_DATE_SIGNEDUP"] = date("F j, Y, g:i a", $ld["date_created"]);
mailout("NewRegistration", $now["notify"], $ld["ID"], 1000000000, time(), $EP);
if ($Give_New_Credit == 1) {
$gdb = new clsDBNetConnect();
$gdb->connect();
if ($Give_Amount) {
$SQL = "INSERT INTO charges(user_id, date, cause, charge) VALUES ('" . $ld["ID"] . "', '" . time() . "', '" . $Give_Cause . "', '" . $Give_Amount . "')";
$gdb->query($SQL);
}
if ($Give_Tokens) {
$SQL = "update users set tokens = '" . $Give_Tokens . "' where user_id = '" . $ld["ID"] . "'";
$gdb->query($SQL);
}
}
//End Send Email
//End Custom Code
}
示例3: 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
}
示例4: setUserAttrib
function setUserAttrib($uid)
{
$attr_db = new clsDBhrcon();
$attr_sql = "SELECT\r\n\t\t\t\t\tp_user_attribute.user_attribute_value,p_user_attribute_list.code as list_code,p_user_attribute_list.name as list_name,p_user_attribute_type.code as type_code\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\tp_user_attribute\r\n\t\t\t\t\tLEFT JOIN p_user_attribute_list ON p_user_attribute.p_user_attribute_list_id = p_user_attribute_list.p_user_attribute_list_id\r\n\t\t\t\t\tLEFT JOIN p_user_attribute_type ON p_user_attribute.p_user_attribute_type_id = p_user_attribute_type.p_user_attribute_type_id\r\n\t\t\t\t\tWHERE p_user_attribute.p_user_id =" . $uid;
$attr_db->query($attr_sql);
$attr_db->next_record();
$items_attr = array();
foreach ($attr_db->Provider->Query_ID as $key => $val) {
if (isset($items_attr[$val['type_code']])) {
if (!is_array($items_attr[$val['type_code']])) {
$items_attr_temp = $items_attr[$val['type_code']];
$items_attr[$val['type_code']] = array();
$items_attr[$val['type_code']][] = $items_attr_temp;
$items_attr[$val['type_code']][] = $val['list_code'];
} else {
$items_attr[$val['type_code']][] = $val['list_code'];
}
} else {
$items_attr[$val['type_code']] = $val['list_code'];
}
}
CCSetSession("USER_ATTR", json_encode($items_attr));
}
示例5: 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;
}
示例6: contacts_holidays_maintcontent_BeforeShow
function contacts_holidays_maintcontent_BeforeShow(&$sender)
{
$contacts_holidays_maintcontent_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $contacts_holidays_maintcontent;
//Compatibility
//End contacts_holidays_maintcontent_BeforeShow
//Custom Code @2-2A29BDB7
// -------------------------
// Write your own code here.
global $MainPage;
$showalert = CCGetSession("showalert", "hide");
$MainPage->Attributes->SetValue("showalert", $showalert);
if ($showalert == "show") {
CCSetSession("showalert", "hide");
}
// -------------------------
//End Custom Code
//Close contacts_holidays_maintcontent_BeforeShow @1-60969598
return $contacts_holidays_maintcontent_BeforeShow;
}
示例7: Show
function Show($RowNumber = "")
{
$Tpl = CCGetTemplate($this);
if ($this->Visible) {
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
if (!$this->Visible) {
$Tpl->setblockvar("FileUpload " . $this->Name, "");
return;
}
$this->Attributes->Show();
if (strlen($RowNumber)) {
$ControlName = $this->Name . "_" . $RowNumber;
$FileControl = $this->Name . "_File_" . $RowNumber;
$DeleteControl = $this->Name . "_Delete_" . $RowNumber;
} else {
$ControlName = $this->Name;
$FileControl = $this->Name . "_File";
$DeleteControl = $this->Name . "_Delete";
}
$SessionName = CCGetParam($ControlName);
if (!strlen($SessionName)) {
$random_value = mt_rand(100000, 9999999) . mt_rand(100000, 9999999);
$SessionName = "FileUpload" . $random_value . date("dHis");
$this->State = array($this->Value, "");
}
CCSetSession($SessionName, $this->State);
$Tpl->SetVar("State", $SessionName);
$Tpl->SetVar("ControlName", $ControlName);
$Tpl->SetVar("FileControl", $FileControl);
$Tpl->SetVar("DeleteControl", $DeleteControl);
if (strlen($this->Value)) {
$Tpl->SetVar("ActualFileName", $this->Value);
$Tpl->SetVar("FileName", $this->GetFileName());
$Tpl->SetVar("FileSize", $this->GetFileSize());
$Tpl->parse("FileUpload " . $this->Name . "/Info", false);
if ($this->Required) {
$Tpl->parse("FileUpload " . $this->Name . "/Upload", false);
$Tpl->setblockvar("FileUpload " . $this->Name . "/DeleteControl", "");
} else {
$Tpl->setblockvar("FileUpload " . $this->Name . "/Upload", "");
$Tpl->parse("FileUpload " . $this->Name . "/DeleteControl", false);
}
} else {
$Tpl->parse("FileUpload " . $this->Name . "/Upload", false);
$Tpl->setblockvar("FileUpload " . $this->Name . "/Info", "");
$Tpl->setblockvar("FileUpload " . $this->Name . "/DeleteControl", "");
}
$Tpl->Parse("FileUpload " . $this->Name, false);
} else {
$Tpl->setblockvar("FileUpload " . $this->Name, "");
}
}
示例8: contacts_subhobbies_maintcontent_alm_customers_contacts_su_AfterInsert
function contacts_subhobbies_maintcontent_alm_customers_contacts_su_AfterInsert(&$sender)
{
$contacts_subhobbies_maintcontent_alm_customers_contacts_su_AfterInsert = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $contacts_subhobbies_maintcontent;
//Compatibility
//End contacts_subhobbies_maintcontent_alm_customers_contacts_su_AfterInsert
//Custom Code @16-2A29BDB7
// -------------------------
// Write your own code here.
CCSetSession("showalert", "show");
// -------------------------
//End Custom Code
//Close contacts_subhobbies_maintcontent_alm_customers_contacts_su_AfterInsert @2-B68B9575
return $contacts_subhobbies_maintcontent_alm_customers_contacts_su_AfterInsert;
}
示例9: Init
function Init()
{
$this->SetLocale(CCGetFromGet("locale"));
$this->SetLocale(CCGetSession("locale"));
$this->SetLocale($this->DefaultLocale);
CCSetSession("locale", $this->GetFormatInfo("Name"));
CCSetSession("lang", $this->GetFormatInfo("Language"));
}
示例10: CCLogoutUser
function CCLogoutUser()
{
CCSetSession("UserID", "");
CCSetSession("UserName", "");
CCSetSession("GroupID", "");
CCSetSession("UserAddr", "");
CCSetSession("hmenu", "");
CCSetSession("lmenu", "");
}
示例11: companies_viewcontent_BeforeShow
function companies_viewcontent_BeforeShow(&$sender)
{
$companies_viewcontent_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $companies_viewcontent;
//Compatibility
//End companies_viewcontent_BeforeShow
//Custom Code @32-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 "evaluation":
$Tpl->setvar("tab3_active", "active");
break;
case "addcontact":
$Tpl->setvar("tab2_active", "active");
break;
}
//Settingup saved message popup
global $MainPage;
$showalert = CCGetSession("showalert", "hide");
$MainPage->Attributes->SetValue("showalert", $showalert);
if ($showalert == "show") {
CCSetSession("showalert", "hide");
}
// -------------------------
//End Custom Code
//Close companies_viewcontent_BeforeShow @1-AEB03160
return $companies_viewcontent_BeforeShow;
}
示例12: products_suite_viewcontent_alm_product_suites_AfterInsert
function products_suite_viewcontent_alm_product_suites_AfterInsert(&$sender)
{
$products_suite_viewcontent_alm_product_suites_AfterInsert = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $products_suite_viewcontent;
//Compatibility
//End products_suite_viewcontent_alm_product_suites_AfterInsert
//Custom Code @22-2A29BDB7
// -------------------------
// Write your own code here.
//Show message alert after saving information
CCSetSession("showalert", "show");
global $lastguid;
global $FileName;
global $Redirect;
$Redirect = $FileName . "?guid={$lastguid}";
// -------------------------
//End Custom Code
//Close products_suite_viewcontent_alm_product_suites_AfterInsert @2-E7C4D88F
return $products_suite_viewcontent_alm_product_suites_AfterInsert;
}
示例13: products_suite_maintcontent_BeforeShow
function products_suite_maintcontent_BeforeShow(&$sender)
{
$products_suite_maintcontent_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $products_suite_maintcontent;
//Compatibility
//End products_suite_maintcontent_BeforeShow
//Custom Code @14-2A29BDB7
// -------------------------
// Write your own code here.
//Settingup saved message popup
global $MainPage;
$showalert = CCGetSession("showalert", "hide");
$MainPage->Attributes->SetValue("showalert", $showalert);
if ($showalert == "show") {
CCSetSession("showalert", "hide");
}
// -------------------------
//End Custom Code
//Close products_suite_maintcontent_BeforeShow @1-CA363294
return $products_suite_maintcontent_BeforeShow;
}
示例14: GenerateCaptchaCode
function GenerateCaptchaCode($letters, $sesVariableName, $width, $height, $length, $rot, $br, $w1, $w2, $noise)
{
$restricted = "|cp|cb|ck|c6|c9|rn|rm|mm|co|do|cl|db|qp|qb|dp|";
$res = new clsQuadraticPaths();
$t = "";
$code = "";
$r = "";
for ($i = 0; $i < $length; $i++) {
$r = intval(count($letters) * (mt_rand(0, 99) / 100));
while (strpos("|" . substr($code, -strlen($code), 1) . $letters[$r][0] . "|", $restricted) !== false) {
$r = intval(count($letters) * (mt_rand(0, 99) / 100));
}
$code = $code . $letters[$r][0];
$t = new clsQuadraticPaths();
$t->LoadFromArray($letters[$r]);
$t->Wave(2 * $w2 * (mt_rand(0, 99) / 100) - $w2);
$t->Rotate(2 * $rot * (mt_rand(0, 99) / 100) - $rot);
$t->Normalize(0, 100);
if ($t->MaxX - $t->MinX > 100) {
$t->Normalize(100, 100);
}
$t->Addition(($i - 1) * $t->MaxY, 0);
$res->AddPaths($t);
}
$res->Rotate(90);
$res->Wave(2 * $w1 * (mt_rand(0, 99) / 100) - $w1);
$res->Rotate(-90);
$res->Broke($br, $br);
$res->Normalize($width - 12, $height - 12);
$res->Addition(6, 6);
$res->Mix();
$res->Noises($noise);
CCSetSession($sesVariableName, $code);
return $res->ToString();
}
示例15: customers_maintcontent_BeforeShow
function customers_maintcontent_BeforeShow(&$sender)
{
$customers_maintcontent_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $customers_maintcontent;
//Compatibility
//End customers_maintcontent_BeforeShow
//Custom Code @227-2A29BDB7
// -------------------------
// Write your own code here.
global $Tpl;
$tab = CCGetFromGet("tab", "tab1_active");
$mr = CCGetFromGet("mr", "customers");
switch ($tab) {
default:
case "details":
$Tpl->setvar("tab1_active", "active");
break;
case "evaluation":
$Tpl->setvar("tab3_active", "active");
break;
case "addcontact":
$Tpl->setvar("tab2_active", "active");
break;
}
if ($mr == "contacts") {
$Tpl->setvar("mr_show", "hide");
$Tpl->setvar("contact_show", "show");
} else {
$Tpl->setvar("mr_show", "show");
$Tpl->setvar("contact_show", "hide");
}
//Settingup saved message popup
global $MainPage;
$showalert = CCGetSession("showalert", "hide");
$MainPage->Attributes->SetValue("showalert", $showalert);
if ($showalert == "show") {
CCSetSession("showalert", "hide");
}
//On Edit mode, check if has contacts
$customer_guid = trim(CCGetFromGet("guid", ""));
if (strlen($customer_guid) > 0) {
$customers = new Customers();
$params = array();
$params["customer_guid"] = $customer_guid;
$hasContacts = $customers->customerHasContacts($params);
if ($hasContacts["hasContacts"] == "1") {
CCSetSession("contacterror", "hide");
} else {
CCSetSession("contacterror", "show");
}
}
//Contact warning, shows when no contact has been added to the company
$contacterror = CCGetSession("contacterror", "");
$MainPage->Attributes->SetValue("showalert_contacterror", $contacterror);
// -------------------------
//End Custom Code
//Close customers_maintcontent_BeforeShow @1-CA17A984
return $customers_maintcontent_BeforeShow;
}