本文整理汇总了PHP中astercrm::formMutiEdit方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::formMutiEdit方法的具体用法?PHP astercrm::formMutiEdit怎么用?PHP astercrm::formMutiEdit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astercrm
的用法示例。
在下文中一共展示了astercrm::formMutiEdit方法的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 ($exportFlag == "1" || $optionFlag == "export") {
$sql = astercrm::getSql($searchContent, $searchField, $searchType, 'callshoprate');
//,$searchFormValue['displaymode'] //得到要导出的sql语句
$_SESSION['export_sql'] = $sql;
$objResponse->addAssign("hidSql", "value", $sql);
//赋值隐含域
$objResponse->addScript("document.getElementById('exportForm').submit();");
} elseif ($deleteFlag == "1" || $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, 'callshoprate', $searchFormValue['displaymode']);
} else {
astercrm::deletefromsearch($searchContent, $searchField, $searchType, 'callshoprate', $searchFormValue['displaymode']);
}
$html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], '', '', '', $divName, "", 1, $searchType, $searchFormValue['displaymode']);
$objResponse->addClear("msgZone", "innerHTML");
$objResponse->addAssign($divName, "innerHTML", $html);
} elseif ($optionFlag == "multiEdit") {
$html = createGrid($numRows, $limit, $searchField, $searchContent, $searchField, $divName, "", 1, 1, $searchType, $searchFormValue['displaymode']);
$showMutiEdit = Table::Top($locate->Translate("Multi Edit"), "formDiv");
$showMutiEdit .= astercrm::formMutiEdit($searchContent, $searchField, $searchType, 'callshoprate');
$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 = Customer::deleteRecordToHistory('id', $id, 'callshoprate');
} else {
$res = Customer::deleteRecord($id, 'callshoprate');
}
if ($res) {
$html = createGrid($searchFormValue['numRows'], $searchFormValue['limit'], $searchField, $searchContent, $searchField, $divName, "", 1, $searchType, $searchFormValue['displaymode']);
$objResponse = new xajaxResponse();
$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, $searchType, $searchFormValue['displaymode']);
}
$objResponse->addClear("msgZone", "innerHTML");
$objResponse->addAssign($divName, "innerHTML", $html);
}
return $objResponse->getXML();
}