当前位置: 首页>>代码示例>>PHP>>正文


PHP astercrm::deleteRecordToHistory方法代码示例

本文整理汇总了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();
}
开发者ID:ljhcj,项目名称:IRISCC,代码行数:79,代码来源:rate.server.php


注:本文中的astercrm::deleteRecordToHistory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。