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


PHP CTask::Delete方法代码示例

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


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

示例1: RestoreAll

 function RestoreAll()
 {
     $arBackup = CControllerClient::GetBackup();
     if (!is_array($arBackup)) {
         return true;
     }
     if (is_array($arBackup["options"])) {
         foreach ($arBackup["options"] as $module_id => $options) {
             foreach ($options as $option_id => $option_value) {
                 COption::SetOptionString($module_id, $option_id, $option_value);
             }
         }
     }
     CControllerClient::RestoreModules();
     CControllerClient::RestoreSecurity();
     if (is_array($arBackup['security_task'])) {
         foreach ($arBackup['security_task'] as $task_id) {
             CTask::Delete($task_id);
         }
     }
     CControllerClient::SetBackup(array());
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:23,代码来源:controller_member.php

示例2: array

}
// обработка действий групповых и одиночных
if (($arID = $lAdmin->GroupAction()) && $USER->CanDoOperation('edit_tasks')) {
    if ($_REQUEST['action_target'] == 'selected') {
        $arID = array();
        $rsData = CTask::GetList(array($by => $order), $arFilter);
        while ($arRes = $rsData->Fetch()) {
            $arID[] = $arRes['ID'];
        }
    }
    if ($_REQUEST['action'] == "delete") {
        foreach ($arID as $ID) {
            if (strlen($ID) <= 0) {
                continue;
            }
            CTask::Delete($ID);
        }
    }
}
// инициализация списка - выборка данных.
$rsData = CTask::GetList(array($by => $order), $arFilter);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
// установке параметров списка
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("PAGES")));
// заголовок списка
$lAdmin->AddHeaders(array(array("id" => "ID", "content" => "ID", "sort" => "id", "default" => false, "align" => "right"), array("id" => "NAME", "content" => GetMessage("NAME"), "sort" => "", "default" => true), array("id" => "LETTER", "content" => GetMessage("LETTER"), "sort" => "letter", "default" => true), array("id" => "DESCRIPTION", "content" => GetMessage("MAIN_DESCRIPTION"), "sort" => "", "default" => true), array("id" => "MODULE_ID", "content" => GetMessage("MAIN_MODULE_ID"), "sort" => "module_id", "default" => true), array("id" => "SYS", "content" => GetMessage("SYS"), "sort" => "sys", "default" => true), array("id" => "BINDING", "content" => GetMessage("BINDING"), "sort" => "binding", "default" => true)));
// построение списка
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes, "task_edit.php?lang=" . LANGUAGE_ID . "&ID=" . $f_ID, GetMessage("MAIN_EDIT_TITLE"));
    $row->AddViewField("ID", "<a href='task_edit.php?lang=" . LANGUAGE_ID . "&ID=" . $f_ID . "' title='" . GetMessage("MAIN_EDIT_TITLE") . "'>" . $f_ID . "</a>");
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:task_admin.php


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