本文整理匯總了PHP中astercrm::deleteRecordToHistory方法的典型用法代碼示例。如果您正苦於以下問題:PHP astercrm::deleteRecordToHistory方法的具體用法?PHP astercrm::deleteRecordToHistory怎麽用?PHP astercrm::deleteRecordToHistory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類astercrm
的用法示例。
在下文中一共展示了astercrm::deleteRecordToHistory方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: searchFormSubmit
function searchFormSubmit($searchFormValue, $numRows, $limit, $id, $type)
{
global $locate, $db, $config;
$objResponse = new xajaxResponse();
$searchField = array();
$searchContent = array();
$optionFlag = $searchFormValue['optionFlag'];
$deleteFlag = $searchFormValue['deleteFlag'];
$exportFlag = $searchFormValue['exportFlag'];
$searchContent = $searchFormValue['searchContent'];
//搜索內容 數組
$searchField = $searchFormValue['searchField'];
//搜索條件 數組
$searchType = $searchFormValue['searchType'];
//搜索方式 數組
$divName = "grid";
if ($optionFlag == "export") {
$sql = astercrm::getSql($searchContent, $searchField, $searchType, 'myrate');
//得到要導出的sql語句
$_SESSION['export_sql'] = $sql;
$objResponse->addAssign("hidSql", "value", $sql);
//賦值隱含域
$objResponse->addScript("document.getElementById('exportForm').submit();");
} elseif ($optionFlag == "delete") {
if (empty($_SESSION['curuser']['usertype'])) {
$objResponse->addAlert($locate->Translate("Session time out,please try again"));
return $objResponse->getXML();
}
if ($_SESSION['curuser']['usertype'] == 'groupadmin') {
$searchContent[] = $_SESSION['curuser']['groupid'];
$searchField[] = 'groupid';
$searchType[] = 'equal';
} elseif ($_SESSION['curuser']['usertype'] == 'reseller') {
$searchContent[] = $_SESSION['curuser']['resellerid'];
$searchField[] = 'resellerid';
$searchType[] = 'equal';
}
if ($config['synchronize']['delete_by_use_history']) {
astercrm::deleteToHistoryFromSearch($searchContent, $searchField, $searchType, 'myrate');
} else {
astercrm::deletefromsearch($searchContent, $searchField, $searchType, 'myrate');
}
$html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], '', '', '', $divName, "", 1, 1, '');
$objResponse->addClear("msgZone", "innerHTML");
$objResponse->addAssign($divName, "innerHTML", $html);
} elseif ($optionFlag == "multiEdit") {
$html = createGrid($numRows, $limit, $searchField, $searchContent, $searchField, $divName, "", 1, 1, $searchType);
$showMutiEdit = Table::Top($locate->Translate("Multi Edit"), "formDiv");
$showMutiEdit .= astercrm::formMutiEdit($searchContent, $searchField, $searchType, 'myrate');
$showMutiEdit .= Table::Footer();
$objResponse->addClear("msgZone", "innerHTML");
$objResponse->addAssign($divName, "innerHTML", $html);
$objResponse->addAssign('formDiv', "innerHTML", $showMutiEdit);
$objResponse->addAssign('formDiv', "style.visibility", 'visible');
} else {
if ($type == "delete") {
if (empty($_SESSION['curuser']['usertype'])) {
$objResponse->addAlert($locate->Translate("Session time out,please try again"));
return $objResponse->getXML();
}
if ($config['synchronize']['delete_by_use_history']) {
$res = astercrm::deleteRecordToHistory('id', $id, 'myrate');
} else {
$res = Customer::deleteRecord($id, 'myrate');
}
if ($res) {
$html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], $searchField, $searchContent, $searchField, $divName, "", 1, 1, $searchType);
$objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("record deleted"));
} else {
$objResponse->addAssign("msgZone", "innerHTML", $locate->Translate("record cannot be deleted"));
}
} else {
$html = createGrid($numRows, $limit, $searchField, $searchContent, $searchField, $divName, "", 1, 1, $searchType);
}
$objResponse->addClear("msgZone", "innerHTML");
$objResponse->addAssign($divName, "innerHTML", $html);
}
return $objResponse->getXML();
}