Exemple #1
0
<?php

##############################################
# Bitrix Site Manager                        #
# Copyright (c) 2002-2007 Bitrix             #
# http://www.bitrixsoft.com                  #
# mailto:admin@bitrixsoft.com                #
##############################################
// define("NO_KEEP_STATISTIC", true);
// define("NO_AGENT_STATISTIC", true);
// define("NOT_CHECK_PERMISSIONS", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
if ($USER->IsAuthorized() && check_bitrix_sessid()) {
    if ($_GET["action"] == "delete" && $_GET["c"] != "" && $_GET["n"] != "") {
        CUserOptions::DeleteOption($_GET["c"], $_GET["n"], $_GET["common"] == "Y" && $GLOBALS["USER"]->CanDoOperation('edit_other_settings'));
    }
    if (is_array($_REQUEST["p"])) {
        $arOptions = $_REQUEST["p"];
        CUtil::decodeURIComponent($arOptions);
        CUserOptions::SetOptionsFromArray($arOptions);
    }
}
echo "OK";
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin_after.php";
Exemple #2
0
 public static function SetCookieOptions($cookieName)
 {
     //last user setting
     $varCookie = array();
     parse_str($_COOKIE[$cookieName], $varCookie);
     setcookie($cookieName, false, false, "/");
     if (is_array($varCookie["p"]) && $varCookie["sessid"] == bitrix_sessid()) {
         $arOptions = $varCookie["p"];
         CUtil::decodeURIComponent($arOptions);
         CUserOptions::SetOptionsFromArray($arOptions);
     }
 }
Exemple #3
0
 private function InstallIblockSectionSettings()
 {
     //Iblock Section Edit form, simplify
     $arIBSFormEditSetting = array(array("c" => "form", "n" => "form_section_" . $this->arResult["INSTALLATION"]["IBLOCK_ID"], "d" => "Y", "v" => array("tabs" => "edit1--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_TAB_TITLE") . "--,--ID--#--ID--,--ACTIVE--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_ACTIVE") . "--,--NAME--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_NAME") . "--,--CODE--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_CODE") . "--,--IBLOCK_SECTION_ID--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_IBLOCK_SECTION_ID") . "--,--SORT--#--" . GetMessage("IDEA_CATEGORY_EDIT_FORM_P_SORT") . "--;--")));
     CUserOptions::SetOptionsFromArray($arIBSFormEditSetting);
 }
Exemple #4
0
 public static function ImportFormsFromXML($BID, $xmlPath, $arOldNewID)
 {
     if (file_exists($xmlPath) && $BID && CModule::IncludeModule('iblock')) {
         require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/classes/general/xml.php';
         $xml = new CDataXML();
         if ($xml->Load($xmlPath)) {
             if ($node = $xml->SelectNodes('/asd_iblock_props/form_element/')) {
                 $tabs = $node->textContent();
                 foreach ($arOldNewID as $old => $new) {
                     $tabs = str_replace('--PROPERTY_' . $old . '--', '--PROPERTY_' . $new . '--', $tabs);
                 }
                 $arOptions = array(array('d' => 'Y', 'c' => 'form', 'n' => 'form_element_' . $BID, 'v' => array('tabs' => $tabs)));
                 CUserOptions::SetOptionsFromArray($arOptions);
             }
             if ($node = $xml->SelectNodes('/asd_iblock_props/form_section/')) {
                 $tabs = $node->textContent();
                 $arOptions = array(array('d' => 'Y', 'c' => 'form', 'n' => 'form_section_' . $BID, 'v' => array('tabs' => $tabs)));
                 CUserOptions::SetOptionsFromArray($arOptions);
             }
         }
     }
 }