當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。