当前位置: 首页>>代码示例>>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;未经允许,请勿转载。