当前位置: 首页>>代码示例>>PHP>>正文


PHP Customers::customerHasContacts方法代码示例

本文整理汇总了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;
}
开发者ID:wangshipeng,项目名称:license_manager,代码行数:61,代码来源:customers_maintcontent_events.php

示例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();
//.........这里部分代码省略.........
开发者ID:wangshipeng,项目名称:license_manager,代码行数:101,代码来源:licensing_customerscontent_events.php

示例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;
}
开发者ID:wangshipeng,项目名称:license_manager,代码行数:48,代码来源:customers_viewcontent_events.php


注:本文中的Customers::customerHasContacts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。