$arMark[] = $ar; } $rs = CTicketSLA::GetByID($ID); if (!$rs || !$rs->ExtractFields()) { $ID = 0; $str_PRIORITY = 100; for ($i = 0; $i <= 6; $i++) { $arSHEDULE[$i]["OPEN_TIME"] = "24H"; } } else { $arGROUPS = CTicketSLA::GetGroupArray($ID); $arSHEDULE = CTicketSLA::GetSheduleArray($ID); $arSITES = CTicketSLA::GetSiteArray($ID); $arCATEGORIES = CTicketSLA::GetCategoryArray($ID); $arCRITICALITIES = CTicketSLA::GetCriticalityArray($ID); $arMARKS = CTicketSLA::GetMarkArray($ID); } if ($message) { $DB->InitTableVarsForEdit($TABLE_NAME, "", "str_"); } $APPLICATION->SetTitle($ID > 0 ? GetMessage("SUP_PAGE_TITLE_EDIT_RECORD", array("#ID#" => $ID)) : GetMessage("SUP_PAGE_TITLE_NEW_RECORD")); /*************************************************************************** HTML форма ****************************************************************************/ require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php"; $aMenu = array(array("ICON" => "btn_list", "TEXT" => GetMessage("SUP_RECORD_LIST"), "LINK" => $LIST_URL . "?lang=" . LANGUAGE_ID)); if (intval($ID) > 0) { $aMenu[] = array("SEPARATOR" => "Y"); $aMenu[] = array("ICON" => "btn_new", "TEXT" => GetMessage("SUP_NEW_RECORD"), "LINK" => $EDIT_URL . "?lang=" . LANGUAGE_ID); if ($ID > 1 && $bAdmin == "Y") { $aMenu[] = array("ICON" => "btn_delete", "TEXT" => GetMessage("SUP_DELETE_RECORD"), "LINK" => "javascript:if(confirm('" . GetMessage("SUP_DELETE_RECORD_CONFIRM") . "'))window.location='" . $LIST_URL . "?action=delete&ID=" . $ID . "&lang=" . LANGUAGE_ID . "&" . bitrix_sessid_get() . "';");