當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Customer::formAdd方法代碼示例

本文整理匯總了PHP中Customer::formAdd方法的典型用法代碼示例。如果您正苦於以下問題:PHP Customer::formAdd方法的具體用法?PHP Customer::formAdd怎麽用?PHP Customer::formAdd使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Customer的用法示例。


在下文中一共展示了Customer::formAdd方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: add

/**
*  generate account add form HTML code
*  @return	html		string		account add HTML code
*/
function add()
{
    // Edit zone
    global $locate;
    $objResponse = new xajaxResponse();
    $html = Table::Top($locate->Translate("adding_agents"), "formDiv");
    // <-- Set the title for your form.
    $html .= Customer::formAdd();
    // <-- Change by your method
    // End edit zone
    $html .= Table::Footer();
    $objResponse->addAssign("formDiv", "style.visibility", "visible");
    $objResponse->addAssign("formDiv", "innerHTML", $html);
    return $objResponse->getXML();
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:19,代碼來源:agent.server.php

示例2: getContact

function getContact($callerid, $customer_id = 0, $campaignid = 0, $diallistid = 0, $srcname = null)
{
    global $db, $locate, $config;
    $mycallerid = $callerid;
    $objResponse = new xajaxResponse();
    if ($callerid == '') {
        $objResponse->addALert($locate->Translate('Caller number cannot be empty'));
        return $objResponse;
    }
    $objResponse->addAssign("iptCallerid", "value", $callerid);
    if ($config['system']['trim_prefix'] != '') {
        $prefix = split(",", $config['system']['trim_prefix']);
        foreach ($prefix as $myprefix) {
            if (substr($mycallerid, 0, 1) == $myprefix) {
                $mycallerid = substr($mycallerid, 1);
                break;
            }
        }
    }
    //check contact table first
    if ($config['system']['enable_contact'] == '0' && $customer_id == '') {
        if ($config['system']['detail_level'] == 'all') {
            $row = astercrm::getContactByCallerid($mycallerid);
        } else {
            $row = astercrm::getContactByCallerid($mycallerid, $_SESSION['curuser']['groupid']);
        }
    }
    if ($row['id'] == '' || $config['system']['enable_contact'] == '0') {
        //no match
        //	print 'no match in contact list';
        //try get customer
        if ($config['system']['detail_level'] == 'all') {
            $customerid = astercrm::getCustomerByCallerid($mycallerid);
        } else {
            $customerid = astercrm::getCustomerByCallerid($mycallerid, $_SESSION['curuser']['groupid']);
        }
        if ($customerid == '') {
            //$objResponse->addScript('xajax_add(\'' . $callerid . '\');');
            if ($config['system']['enable_formadd_popup']) {
                $html = Table::Top($locate->Translate("add_record"), "formDiv");
                // <-- Set the
                $html .= Customer::formAdd($callerid, 0, 0, $campaignid, $diallistid, '', $srcname);
                $html .= Table::Footer();
                $objResponse->addAssign("formDiv", "style.visibility", "visible");
                $objResponse->addAssign("formDiv", "innerHTML", $html);
            }
            // callerid smart match
            if ($config['system']['smart_match_remove']) {
                if ($config['system']['detail_level'] == 'all') {
                    $contact_res = astercrm::getContactSmartMatch($mycallerid);
                    $customer_res = astercrm::getCustomerSmartMatch($mycallerid);
                } else {
                    $contact_res = astercrm::getContactSmartMatch($mycallerid, $_SESSION['curuser']['groupid']);
                    $customer_res = astercrm::getCustomerSmartMatch($mycallerid, $_SESSION['curuser']['groupid']);
                }
                $smartcount = 0;
                while ($customer_res->fetchInto($row)) {
                    $smartcount++;
                    $smartmatch_html .= '<a href="###" onclick="xajax_showCustomer(\'' . $row['id'] . '\',\'customer\',' . $callerid . ');showMsgBySmartMatch(\'customer\',\'' . $row['customer'] . '\');">' . $locate->Translate("customer") . ':&nbsp;' . $row['customer'] . '<br>' . $locate->Translate("phone") . ':' . $row['phone'] . '</a><hr>';
                }
                while ($contact_res->fetchInto($row)) {
                    $smartcount++;
                    $smartmatch_html .= '<a href="###" onclick="xajax_showContact(\'' . $row['id'] . '\');showMsgBySmartMatch(\'contact\',\'' . $row['contact'] . '\');">' . $locate->Translate("contact") . ':&nbsp;' . $row['contact'] . '<br>' . $locate->Translate("phone") . ':' . $row['phone'] . '&nbsp;&nbsp;' . $row['phone1'] . '&nbsp;&nbsp;' . $row['phone2'] . '</a><hr>';
                }
                if ($smartcount < 3) {
                    $objResponse->addAssign("smartMsgDiv", "style.height", '');
                    $objResponse->addAssign("SmartMatchDiv", "style.height", '');
                } else {
                    $objResponse->addAssign("smartMsgDiv", "style.height", '160px');
                    $objResponse->addAssign("SmartMatchDiv", "style.height", '240px');
                }
                if ($smartcount) {
                    $objResponse->addAssign("smartMsgDiv", "innerHTML", $smartmatch_html);
                    $objResponse->addScript('getSmartMatchMsg();');
                }
            }
        } else {
            if ($config['system']['enable_formadd_popup']) {
                $html = Table::Top($locate->Translate("add_record"), "formDiv");
                // <-- Set the title for your form.
                $html .= Customer::formAdd($callerid, $customerid, 0, $campaignid, $diallistid, '', $srcname);
                // <-- Change by your method
                $html .= Table::Footer();
                $objResponse->addAssign("formDiv", "style.visibility", "visible");
                $objResponse->addAssign("formDiv", "innerHTML", $html);
            }
            $objResponse->addScript('xajax_showCustomer(\'' . $customerid . '\',\'customer\',' . $callerid . ');');
            if ($config['system']['auto_note_popup']) {
                $objResponse->addScript('xajax_showNote(\'' . $customerid . '\',\'customer\');');
            }
        }
    } else {
        // one match
        if ($customer_id == '') {
            $customerid = $row['customerid'];
        } else {
            $customerid = $customer_id;
        }
        $contactid = $row['id'];
        if ($config['system']['enable_formadd_popup']) {
//.........這裏部分代碼省略.........
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:101,代碼來源:portal.server.php

示例3: add

function add()
{
    global $locate;
    $objResponse = new xajaxResponse();
    $html = Table::Top($locate->Translate("add_diallist"), "formDiv");
    $html .= Customer::formAdd();
    $html .= Table::Footer();
    $objResponse->addAssign("formDiv", "style.visibility", "visible");
    $objResponse->addAssign("formDiv", "innerHTML", $html);
    //增加讀取campaign的js函數
    $objResponse->addScript("setCampaign();");
    return $objResponse->getXML();
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:13,代碼來源:diallist.server.php

示例4: add

function add($surveyid = 0)
{
    global $locate;
    $objResponse = new xajaxResponse();
    $html = Table::Top($locate->Translate("add_survey"), "formDiv");
    $html .= Customer::formAdd($surveyid);
    $html .= Table::Footer();
    $objResponse->addAssign("formDiv", "style.visibility", "visible");
    $objResponse->addAssign("formDiv", "innerHTML", $html);
    if ($surveyid == 0) {
        $objResponse->addScript("xajax.\$('surveyname').focus();");
    } else {
        $objResponse->addScript("xajax.\$('surveyoption').focus();");
    }
    return $objResponse->getXML();
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:16,代碼來源:survey.server.php

示例5: add

function add($callerid = null, $customerid = null, $contactid = null, $campaignid = 0, $note = '')
{
    global $locate;
    $objResponse = new xajaxResponse();
    //	return $objResponse;
    $html = Table::Top($locate->Translate("add_record"), "formDiv");
    // <-- Set the title for your form.
    //	$html .= Customer::formAdd($callerid,$customerid,$contactid);  // <-- Change by your method
    $html .= Customer::formAdd($callerid, $customerid, $contactid, $campaignid, $dialedid, $note);
    //	$objResponse->addAlert($callerid);
    // End edit zone
    $html .= Table::Footer();
    $objResponse->addAssign("formDiv", "style.visibility", "visible");
    $objResponse->addAssign("formDiv", "innerHTML", $html);
    return $objResponse->getXML();
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:16,代碼來源:astercrm.server.common.php

示例6: add

function add()
{
    global $locate;
    $objResponse = new xajaxResponse();
    $html = Table::Top($locate->Translate("adding_ticketdetails"), "formDiv");
    // <-- Set the title for your form.
    $html .= Customer::formAdd();
    // <-- Change by your method
    $html .= Table::Footer();
    $objResponse->addAssign("formDiv", "style.visibility", "visible");
    $objResponse->addAssign("formDiv", "innerHTML", $html);
    $objResponse->addScript("relateBycategoryID(document.getElementById('ticketcategoryid').value)");
    return $objResponse->getXML();
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:14,代碼來源:ticket_details.server.php


注:本文中的Customer::formAdd方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。