Ejemplo n.º 1
0
if ($bAdmin == "Y" && ($arID = $lAdmin->GroupAction())) {
    if ($_REQUEST['action_target'] == 'selected') {
        $rsData = CTicketDictionary::GetList($by, $order, $arFilter);
        while ($arRes = $rsData->Fetch()) {
            $arID[] = $arRes['ID'];
        }
    }
    foreach ($arID as $ID) {
        if (strlen($ID) <= 0) {
            continue;
        }
        $ID = intval($ID);
        switch ($_REQUEST['action']) {
            case "delete":
                @set_time_limit(0);
                CTicketDictionary::Delete($ID);
                break;
        }
    }
}
// если была нажата кнопка "Сохранить изменения"
if ($find_type == "C" || $find_type == "K" || $find_type == "SR" || $find_type == "NOT_REF" || strlen($find_type) <= 0) {
    $show_responsible_column = "Y";
}
$rsData = CTicketDictionary::GetList($by, $order, $arFilter, $is_filtered);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
// установка строки навигации
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("SUP_PAGES")));
//$tdic = CTicketDictionary::GetList($by, $order, $arFilter, $is_filtered);
$APPLICATION->SetTitle(GetMessage("SUP_TICKETS_DIC_TITLE"));
Ejemplo n.º 2
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
//if (WIZARD_IS_RERUN)
//return;
if (!CModule::IncludeModule("support")) {
    return;
}
WizardServices::CopyFile(WIZARD_SERVICE_RELATIVE_PATH . "/public/" . LANGUAGE_ID . "/support.php", WIZARD_SITE_DIR . "services/support.php");
$arCategories = array(array('NAME' => GetMessage('CATEGORY_CORP_QUESTION'), 'arrSITE' => array(WIZARD_SITE_ID), 'C_TYPE' => 'C', 'C_SORT' => 100, 'EVENT1' => 'ticket'), array('NAME' => GetMessage('CATEGORY_COMPUTER_QUESTION'), 'arrSITE' => array(WIZARD_SITE_ID), 'C_TYPE' => 'C', 'C_SORT' => 100, 'EVENT1' => 'ticket'));
$newCategoryID = array();
foreach ($arCategories as $arCategory) {
    $categoryID = (int) CTicketDictionary::Add($arCategory);
    $newCategoryID[] = $categoryID;
}
$dbCategory = CTicketDictionary::GetList($by = "s_id", $order = "asc", array("TYPE" => "C", "TYPE_EXACT_MATCH" => "Y"), $is_filtered);
while ($arCategory = $dbCategory->Fetch()) {
    if (!in_array($arCategory["ID"], $newCategoryID)) {
        CTicketDictionary::Delete($arCategory["ID"]);
    }
}
$APPLICATION->SetGroupRight("support", WIZARD_EMPLOYEES_GROUP, "R");
$APPLICATION->SetGroupRight("support", WIZARD_SUPPORT_GROUP, "W");
COption::SetOptionString("support", "SUPPORT_MAX_FILESIZE", "10000");