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


PHP CTask::UpdateModuleRights方法代码示例

本文整理汇总了PHP中CTask::UpdateModuleRights方法的典型用法代码示例。如果您正苦于以下问题:PHP CTask::UpdateModuleRights方法的具体用法?PHP CTask::UpdateModuleRights怎么用?PHP CTask::UpdateModuleRights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CTask的用法示例。


在下文中一共展示了CTask::UpdateModuleRights方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: intval

Handling GET | POST
****************************************************************************/
$ID = intval($_REQUEST["ID"]);
$COPY_ID = intval($_REQUEST["COPY_ID"]);
if ($COPY_ID > 0) {
    $ID = $COPY_ID;
}
$message = null;
$aTabs = array(array("DIV" => "edit1", "TAB" => GetMessage("TAB_1"), "ICON" => "", "TITLE" => GetMessage("TAB_1_TITLE")), array("DIV" => "edit2", "TAB" => GetMessage("TAB_2"), "ICON" => "", "TITLE" => GetMessage('TAB_2_TITLE')));
$tabControl = new CAdminTabControl("tabControl", $aTabs);
if ($_SERVER["REQUEST_METHOD"] == "POST" && ($_POST["save"] != '' || $_POST["apply"] != '') && $USER->CanDoOperation('edit_tasks') && check_bitrix_sessid()) {
    $aMsg = array();
    $LETTER = strtoupper($_POST["LETTER"]);
    $arFields = array("NAME" => $_POST["NAME"], "DESCRIPTION" => $_POST["DESCRIPTION"], "LETTER" => $LETTER, "BINDING" => $_POST["BINDING"], "MODULE_ID" => $_POST["MODULE_ID"]);
    if ($ID > 0 && $COPY_ID <= 0) {
        CTask::UpdateModuleRights($ID, $_POST["MODULE_ID"], $LETTER);
        CTask::Update($arFields, $ID);
    } else {
        $ID = CTask::Add($arFields);
    }
    /** @var CAdminException $e */
    if ($e = $APPLICATION->GetException()) {
        $aMsg = $e->messages;
    }
    if (empty($aMsg)) {
        if (!isset($_POST['OPERATION_ID'])) {
            $arOperationIds = array();
        } else {
            $arOperationIds = $_POST['OPERATION_ID'];
        }
        $old_arOperationIds = CTask::GetOperations($ID);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:task_edit.php

示例2: intval

Handling GET | POST
****************************************************************************/
$ID = intval($ID);
$COPY_ID = intval($COPY_ID);
if ($COPY_ID > 0) {
    $ID = $COPY_ID;
}
$message = null;
$aTabs = array(array("DIV" => "edit1", "TAB" => GetMessage("TAB_1"), "ICON" => "", "TITLE" => GetMessage("TAB_1_TITLE")), array("DIV" => "edit2", "TAB" => GetMessage("TAB_2"), "ICON" => "", "TITLE" => GetMessage('TAB_2_TITLE')));
$tabControl = new CAdminTabControl("tabControl", $aTabs);
if ($_SERVER["REQUEST_METHOD"] == "POST" && ($_POST["save"] != '' || $_POST["apply"] != '') && $USER->CanDoOperation('edit_tasks') && check_bitrix_sessid()) {
    $aMsg = array();
    $LETTER = strtoupper($LETTER);
    $arFields = array("NAME" => $NAME, "DESCRIPTION" => $DESCRIPTION, "LETTER" => $LETTER, "BINDING" => $BINDING, "MODULE_ID" => $MODULE_ID);
    if ($ID > 0 && $COPY_ID <= 0) {
        CTask::UpdateModuleRights($ID, $MODULE_ID, $LETTER);
        CTask::Update($arFields, $ID);
    } else {
        $ID = CTask::Add($arFields);
    }
    if ($e = $APPLICATION->GetException()) {
        $aMsg = $e->messages;
    }
    if (empty($aMsg)) {
        if (!isset($_POST['OPERATION_ID'])) {
            $arOperationIds = array();
        } else {
            $arOperationIds = $_POST['OPERATION_ID'];
        }
        $old_arOperationIds = CTask::GetOperations($ID);
        if (count(array_diff($old_arOperationIds, $arOperationIds)) > 0 || count(array_diff($arOperationIds, $old_arOperationIds)) > 0) {
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:task_edit.php


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