本文整理汇总了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();
}
示例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") . ': ' . $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") . ': ' . $row['contact'] . '<br>' . $locate->Translate("phone") . ':' . $row['phone'] . ' ' . $row['phone1'] . ' ' . $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']) {
//.........这里部分代码省略.........
示例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();
}
示例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();
}
示例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();
}
示例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();
}