本文整理汇总了PHP中Customers::customerHasContacts方法的典型用法代码示例。如果您正苦于以下问题:PHP Customers::customerHasContacts方法的具体用法?PHP Customers::customerHasContacts怎么用?PHP Customers::customerHasContacts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customers
的用法示例。
在下文中一共展示了Customers::customerHasContacts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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();
//.........这里部分代码省略.........
示例3: customers_viewcontent_BeforeShow
function customers_viewcontent_BeforeShow(&$sender)
{
$customers_viewcontent_BeforeShow = true;
$Component =& $sender;
$Container =& CCGetParentContainer($sender);
global $customers_viewcontent;
//Compatibility
//End customers_viewcontent_BeforeShow
//Custom Code @159-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("tab2_active", "active");
break;
case "addcontact":
$Tpl->setvar("tab3_active", "active");
break;
}
//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");
}
// -------------------------
//End Custom Code
//Close customers_viewcontent_BeforeShow @1-6903B239
return $customers_viewcontent_BeforeShow;
}