本文整理汇总了PHP中astercrm::updateAddedSchedulerDial方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::updateAddedSchedulerDial方法的具体用法?PHP astercrm::updateAddedSchedulerDial怎么用?PHP astercrm::updateAddedSchedulerDial使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astercrm
的用法示例。
在下文中一共展示了astercrm::updateAddedSchedulerDial方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
//.........这里部分代码省略.........
}
} else {
$respOk = $f['customerid'];
}
$customerID = $respOk;
}
if (empty($f['contact'])) {
$contactID = 0;
} else {
if ($f['contactid'] == '') {
if ($config['system']['allow_same_data'] == false) {
//检查是否有完全匹配的contact记录
$contact = Customer::checkValues("contact", "contact", $f['contact'], "string", "customerid", $customerID, "int");
} else {
$contact = '';
}
//有完全匹配的话就取这个contactid
if ($contact != '') {
$respOk = $contact;
$objResponse->addAlert($locate->Translate("found_contact_replaced"));
} else {
$respOk = Customer::insertNewContact($f, $customerID);
// insert a new contact record
if (!$respOk) {
$objResponse->addAlert($locate->Translate("contact_add_error"));
return $objResponse;
}
$objResponse->addAlert($locate->Translate("a_new_contact_added"));
}
} else {
$respOk = $f['contactid'];
$res =& Customer::getContactByID($respOk);
if ($res) {
$contactCustomerID = $res['customerid'];
if ($contactCustomerID == 0 && $customerID == 0) {
} else {
$res =& Customer::updateField('contact', 'customerid', $customerID, $f['contactid']);
if ($res) {
$objResponse->addAlert($locate->Translate("a_contact_binding"));
}
}
}
}
$contactID = $respOk;
}
if ($f['surveyoption'] != '' || $f['surveynote'] != '') {
$respOk = Customer::insertNewSurveyResult($f['surveyid'], $f['surveyoption'], $f['surveynote'], $customerID, $contactID);
$objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("survey_added"));
}
$saveNote = '';
if (!empty($f['note']) || !empty($f['note_code'])) {
$saveNote = true;
$respOk = Customer::insertNewNote($f, $customerID, $contactID);
// add a new Note
if ($respOk) {
$html = createGrid(0, ROWSXPAGE);
$objResponse->addAssign("grid", "innerHTML", $html);
$objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("a_new_note_added"));
} else {
$objResponse->addAlert($locate->Translate("note_add_error"));
return $objResponse;
}
} else {
$saveNote = false;
}
// 查看是否有scheduler call
if ($f['addedSchedulerDialId'] != '') {
$res = astercrm::updateAddedSchedulerDial($customerID, $f['addedSchedulerDialId']);
$objResponse->addAssign("formdAddSechedualaraDiv", "style.visibility", "hidden");
$objResponse->addAssign("formdAddSechedualaraDiv", "innerHTML", '');
}
/*if(empty($f['sDialNum'])) {
} else{
$f['customerid'] = $customerID;
$res = astercrm::insertNewSchedulerDial($f);
if ($res){
$objResponse->addAlert($locate->Translate("Scheduler Call added"));
}
}*/
if ($f['customer_leads_check'] == 'on') {
if ($customerID != '' && $customerID != 0) {
astercrm::insertNewCustomerLead($customerID, $config['system']['customer_leads'], $saveNote);
}
}
$objResponse->addAssign("formDiv", "style.visibility", "hidden");
$objResponse->addAssign("formCustomerInfo", "style.visibility", "hidden");
$objResponse->addAssign("formContactInfo", "style.visibility", "hidden");
$objResponse->addAssign("formNoteInfo", "style.visibility", "hidden");
$objResponse->addClear("formDiv", "innerHTML");
$objResponse->addClear("formCustomerInfo", "innerHTML");
$objResponse->addClear("formContactInfo", "innerHTML");
$objResponse->addClear("formNoteInfo", "innerHTML");
$objResponse->addScript("xajax_showGrid(0," . ROWSXPAGE . ",'','','')");
if ($chtml != '') {
$objResponse->addAssign("formCustomerInfo", "style.visibility", "visible");
$objResponse->addAssign("formCustomerInfo", "innerHTML", $chtml);
}
return $objResponse->getXML();
}