function fetchPropsHelp($componentName_)
{
	global $MESS;

	$componentName = str_replace("..", "", $componentName_);
	$componentName = str_replace(":", "/", $componentName);
	$lang = preg_replace("/[^a-zA-Z0-9_]/is", "", $_GET["lang"]);
	CComponentUtil::__IncludeLang("/freetrix/components/".$componentName, "/help/.tooltips.php", $lang);
	$path = $_SERVER["DOCUMENT_ROOT"]."/freetrix/components/".$componentName."/help/.tooltips.php";
	$arTooltips = array();
	if(file_exists($path))
		include($path);

	?>var arTT = {};<?
	if(is_array($arTooltips) && !empty($arTooltips))
	{
		foreach($arTooltips as $propName => $tooltip)
		{
			?>arTT["<?php 
echo CUtil::JSEscape($propName);
?>
"] = '<?php 
echo CUtil::JSEscape($tooltip);
?>
';<?
		}
	}
	elseif(is_array($MESS))
	{
		foreach($MESS as $propName => $tooltip)
		{
			if(substr($propName, -4) == '_TIP')
			{
			?>arTT["<?php 
echo CUtil::JSEscape(substr($propName, 0, -4));
?>
"] = '<?php 
echo CUtil::JSEscape($tooltip);
?>
';<?
			}
		}
	}
	?>window.arComp2Tooltips["<?php 
echo CUtil::JSEscape($componentName_);
?>
"] = arTT;<?
}
Exemple #2
0
 public static function GetById($id, $bWithParameters = false, $arAllCurrentValues = false)
 {
     $id = _normalizePath(strtolower($id));
     $folders = array("/bitrix/gadgets", "/local/gadgets");
     if (($p = strpos($id, "/")) > 0) {
         //specific namespace
         $arGdNS = array(substr($id, 0, $p));
         $id = substr($id, $p + 1);
     } else {
         // Find all namespaces of gadgets
         $arGdNS = array("bitrix");
         foreach ($folders as $folder) {
             $gdDir = $_SERVER["DOCUMENT_ROOT"] . $folder;
             if (is_dir($gdDir) && ($handle = opendir($gdDir))) {
                 while (false !== ($item = readdir($handle))) {
                     if (is_dir($gdDir . "/" . $item) && $item != "." && $item != ".." && $item != "bitrix") {
                         $arGdNS[] = $item;
                     }
                 }
                 closedir($handle);
             }
         }
     }
     // Find all gadgets
     $arGadget = false;
     foreach ($folders as $folder) {
         foreach ($arGdNS as $NS) {
             $gdDir = $_SERVER["DOCUMENT_ROOT"] . $folder . "/" . $NS;
             $gdDirSiteRoot = $folder . "/" . $NS;
             if (is_dir($gdDir . "/" . $id)) {
                 $arDescription = array();
                 CComponentUtil::__IncludeLang($gdDirSiteRoot . "/" . $id, "/.description.php");
                 if (!file_exists($gdDir . "/" . $id . "/.description.php")) {
                     continue;
                 }
                 if (!@(include $gdDir . "/" . $id . "/.description.php")) {
                     $arGadget = false;
                     continue;
                 }
                 if (isset($arDescription["LANG_ONLY"]) && $arDescription["LANG_ONLY"] != LANGUAGE_ID) {
                     $arGadget = false;
                     continue;
                 }
                 if ($bWithParameters) {
                     $arCurrentValues = array();
                     if (is_array($arAllCurrentValues)) {
                         foreach ($arAllCurrentValues as $k => $v) {
                             $pref = "G_" . strtoupper($id) . "_";
                             if (substr($k, 0, strlen($pref)) == $pref) {
                                 $arCurrentValues[substr($k, strlen($pref))] = $v;
                             } else {
                                 $pref = "GU_" . strtoupper($id) . "_";
                                 if (substr($k, 0, strlen($pref)) == $pref) {
                                     $arCurrentValues[substr($k, strlen($pref))] = $v;
                                 }
                             }
                         }
                     }
                     CComponentUtil::__IncludeLang($gdDirSiteRoot . "/" . $id, "/.parameters.php");
                     $arParameters = array();
                     if (file_exists($gdDir . "/" . $id . "/.parameters.php")) {
                         include $gdDir . "/" . $id . "/.parameters.php";
                     }
                     $arDescription["PARAMETERS"] = $arParameters["PARAMETERS"];
                     $arDescription["USER_PARAMETERS"] = array("TITLE_STD" => array("NAME" => GetMessage("CMDESKTOP_UP_TITLE_STD"), "TYPE" => "STRING", "DEFAULT" => ""));
                     if (array_key_exists("USER_PARAMETERS", $arParameters) && is_array($arParameters["USER_PARAMETERS"])) {
                         $arDescription["USER_PARAMETERS"] = array_merge($arDescription["USER_PARAMETERS"], $arParameters["USER_PARAMETERS"]);
                     }
                 }
                 $arDescription["PATH"] = $gdDir . "/" . $id;
                 $arDescription["PATH_SITEROOT"] = $gdDirSiteRoot . "/" . $id;
                 $arDescription["ID"] = strtoupper($id);
                 if ($arDescription["ICON"] && substr($arDescription["ICON"], 0, 1) != "/") {
                     $arDescription["ICON"] = "/bitrix/gadgets/" . $NS . "/" . $id . "/" . $arDescription["ICON"];
                 }
                 unset($arDescription["NOPARAMS"]);
                 $arGadget = $arDescription;
             }
         }
     }
     return $arGadget;
 }
            ?>
><?php 
            echo htmlspecialcharsbx($template["NAME"] . " (" . $showTemplateName . ")");
            ?>
</option>
<?php 
        }
        ?>
			</select>
		</td>
	</tr>
<?php 
    }
    //!empty($arComponentTemplates)
    // Fetch tooltips
    CComponentUtil::__IncludeLang($localPath, "/help/.tooltips.php");
    $tooltips_path = $_SERVER["DOCUMENT_ROOT"] . $localPath . "/help/.tooltips.php";
    $arTooltips = array();
    if (file_exists($tooltips_path)) {
        include $tooltips_path;
    }
    //check whether we have parameters without parent group
    foreach ($arParameters as $prop) {
        if (!array_key_exists("PARENT", $prop) || !array_key_exists($prop["PARENT"], $arParameterGroups)) {
            $arParameterGroups["__additional_params"] = array("NAME" => GetMessage("comp_prop_additional"));
            break;
        }
    }
    $hiddenParamsHTML = '';
    $prevGroupID = "";
    foreach ($arParameterGroups as $groupID => $aGroup) {
<?
require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_before.php");
require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_js.php");

$bFileMan = CModule::IncludeModule('fileman');
if(!$bFileMan)
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));

CUtil::JSPostUnescape();
CComponentUtil::__IncludeLang(FX_PERSONAL_ROOT."/components/freetrix/player", "player_playlist_edit.php");

$strWarning = "";
$menufilename = "";
$path = Rel2Abs("/", $path);
$arPath = Array($site, $path);
$DOC_ROOT = CSite::GetSiteDocRoot($site);
$abs_path = $DOC_ROOT.$path;
$bCreate = !file_exists($abs_path);

if (($bCreate && (!$USER->CanDoFileOperation('fm_create_new_file', $arPath) || !$USER->CanDoOperation('fileman_edit_existent_files'))) ||
(!$bCreate && (!$USER->CanDoFileOperation('fm_edit_existent_file', $arPath) || !$USER->CanDoOperation('fileman_admin_files'))))
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));

$arTracks = Array();
/* * * * * * * * * * * * * * POST * * * * * * * * * * * * * */
if($REQUEST_METHOD=="POST" && $_REQUEST['save'] == 'Y')
{
	require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/classes/general/xml.php");
	$objXML = new CDataXML();

	$xmlsrc = '<?xml version="1.0" encoding="UTF-8"?>
Exemple #5
0
<?php

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';
CComponentUtil::__IncludeLang(dirname($_SERVER["SCRIPT_NAME"]), "/ajax.php");
$arResult = array();
if (!CModule::IncludeModule("bitrixcloud")) {
    $arResult["ERROR"] = GetMessage("BCLMMD_BC_NOT_INSTALLED");
}
if (!$USER->IsAdmin() || !check_bitrix_sessid()) {
    $arResult["ERROR"] = GetMessage("BCLMMD_ACCESS_DENIED");
}
if (!isset($arResult["ERROR"])) {
    $action = isset($_REQUEST['action']) ? trim($_REQUEST['action']) : '';
    $domain = isset($_REQUEST['domain']) ? trim($_REQUEST['domain']) : '';
    $monitoring = CBitrixCloudMonitoring::getInstance();
    switch ($action) {
        case 'delete':
            $strError = $monitoring->stopMonitoring($domain);
            if (strlen($strError) > 0) {
                $arResult["ERROR"] = $strError;
            }
            break;
    }
    if (isset($arResult["ERROR"])) {
        $arResult["RESULT"] = "ERROR";
    } else {
        $arResult["RESULT"] = "OK";
    }
Exemple #6
0
 public static function GetTemplatesList($componentName, $currentTemplate = false)
 {
     $arTemplatesList = array();
     $componentName = trim($componentName);
     if (strlen($componentName) <= 0) {
         return $arTemplatesList;
     }
     $path2Comp = CComponentEngine::MakeComponentPath($componentName);
     if (strlen($path2Comp) <= 0) {
         return $arTemplatesList;
     }
     $componentPath = getLocalPath("components" . $path2Comp);
     if (!CComponentUtil::isComponent($componentPath)) {
         return $arTemplatesList;
     }
     $templateFolders = array();
     $arExists = array();
     $folders = array("/local/templates", BX_PERSONAL_ROOT . "/templates");
     foreach ($folders as $folder) {
         if ($handle = @opendir($_SERVER["DOCUMENT_ROOT"] . $folder)) {
             while (($file = readdir($handle)) !== false) {
                 if ($file == "." || $file == "..") {
                     continue;
                 }
                 if ($currentTemplate !== false && $currentTemplate != $file || $file == ".default") {
                     continue;
                 }
                 if (file_exists($_SERVER["DOCUMENT_ROOT"] . $folder . "/" . $file . "/components" . $path2Comp)) {
                     $templateFolders[] = array("path" => $folder . "/" . $file . "/components" . $path2Comp, "template" => $file);
                 }
             }
             @closedir($handle);
             if (file_exists($_SERVER["DOCUMENT_ROOT"] . $folder . "/.default/components" . $path2Comp)) {
                 $templateFolders[] = array("path" => $folder . "/.default/components" . $path2Comp, "template" => ".default");
             }
         }
     }
     $templateFolders[] = array("path" => $componentPath . "/templates", "template" => "");
     foreach ($templateFolders as $templateFolder) {
         $templateFolderPath = $templateFolder["path"];
         if ($handle1 = @opendir($_SERVER["DOCUMENT_ROOT"] . $templateFolderPath)) {
             while (($file1 = readdir($handle1)) !== false) {
                 if ($file1 == "." || $file1 == "..") {
                     continue;
                 }
                 if (in_array($file1, $arExists)) {
                     continue;
                 }
                 $arTemplate = array("NAME" => $file1, "TEMPLATE" => $templateFolder["template"]);
                 if (file_exists($_SERVER["DOCUMENT_ROOT"] . $templateFolderPath . "/" . $file1 . "/.description.php")) {
                     CComponentUtil::__IncludeLang($templateFolderPath . "/" . $file1, ".description.php");
                     $arTemplateDescription = array();
                     include $_SERVER["DOCUMENT_ROOT"] . $templateFolderPath . "/" . $file1 . "/.description.php";
                     $arTemplate["TITLE"] = $arTemplateDescription["NAME"];
                     $arTemplate["DESCRIPTION"] = $arTemplateDescription["DESCRIPTION"];
                 }
                 $arTemplatesList[] = $arTemplate;
                 $arExists[] = $arTemplate["NAME"];
             }
             @closedir($handle1);
         }
     }
     return $arTemplatesList;
 }
<?php

define("STOP_STATISTICS", true);
define("BX_SECURITY_SHOW_MESSAGE", true);
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php";
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_js.php";
CComponentUtil::__IncludeLang("/bitrix/components/bitrix/desktop/", "/admin_settings_all.php");
if (false == check_bitrix_sessid() || !$GLOBALS["USER"]->IsAuthorized()) {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
    die;
}
$strWarning = "";
$arUserOptions = CUserOptions::GetOption("intranet", "~gadgets_admin_index", array(), false);
if (!is_array($arUserOptions)) {
    $arUserOptions = array();
}
/******* POST **********/
if ($REQUEST_METHOD == "POST" && $_REQUEST['desktop_backurl'] && strpos($_REQUEST['desktop_backurl'], "/") === 0) {
    $desktop_backurl = $_REQUEST['desktop_backurl'];
} else {
    $desktop_backurl = "";
}
if ($REQUEST_METHOD == "POST" && $_REQUEST['save'] == 'Y') {
    CUtil::JSPostUnescape();
    if (!is_array($ids)) {
        $ids = array();
    }
    $arValues = $_POST;
    $arUserOptionsTmp = array();
 function GetTemplatesList($componentName, $currentTemplate = False)
 {
     $arTemplatesList = array();
     $componentName = trim($componentName);
     if (strlen($componentName) <= 0) {
         return $arTemplatesList;
     }
     $path2Comp = CComponentEngine::MakeComponentPath($componentName);
     if (strlen($path2Comp) <= 0) {
         return $arTemplatesList;
     }
     $componentPath = "/bitrix/components" . $path2Comp;
     if (!CComponentUtil::isComponent($componentPath)) {
         return $arTemplatesList;
     }
     $arExists = array();
     if ($handle = @opendir($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates")) {
         while (($file = readdir($handle)) !== false) {
             if ($file == "." || $file == "..") {
                 continue;
             }
             if ($currentTemplate !== False && $currentTemplate != $file || $file == ".default") {
                 continue;
             }
             if (is_dir($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $file)) {
                 if (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $file . "/components")) {
                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $file . "/components" . $path2Comp)) {
                         if ($handle1 = @opendir($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $file . "/components" . $path2Comp)) {
                             while (($file1 = readdir($handle1)) !== false) {
                                 if ($file1 == "." || $file1 == "..") {
                                     continue;
                                 }
                                 $arTemplate = array("NAME" => $file1, "TEMPLATE" => $file);
                                 if (is_dir($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $file . "/components" . $path2Comp . "/" . $file1)) {
                                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $file . "/components" . $path2Comp . "/" . $file1 . "/.description.php")) {
                                         CComponentUtil::__IncludeLang(BX_PERSONAL_ROOT . "/templates/" . $file . "/components" . $path2Comp . "/" . $file1, ".description.php");
                                         $arTemplateDescription = array();
                                         include $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/" . $file . "/components" . $path2Comp . "/" . $file1 . "/.description.php";
                                         $arTemplate["TITLE"] = $arTemplateDescription["NAME"];
                                         $arTemplate["DESCRIPTION"] = $arTemplateDescription["DESCRIPTION"];
                                     }
                                 }
                                 $arTemplatesList[] = $arTemplate;
                                 $arExists[] = $arTemplate["NAME"];
                             }
                             @closedir($handle1);
                         }
                     }
                 }
             }
         }
         @closedir($handle);
     }
     if (is_dir($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default")) {
         if (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/components")) {
             if (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/components" . $path2Comp)) {
                 if ($handle1 = @opendir($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/components" . $path2Comp)) {
                     while (($file1 = readdir($handle1)) !== false) {
                         if ($file1 == "." || $file1 == "..") {
                             continue;
                         }
                         if (in_array($file1, $arExists)) {
                             continue;
                         }
                         $arTemplate = array("NAME" => $file1, "TEMPLATE" => ".default");
                         if (is_dir($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/components" . $path2Comp . "/" . $file1)) {
                             if (file_exists($_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/components" . $path2Comp . "/" . $file1 . "/.description.php")) {
                                 CComponentUtil::__IncludeLang(BX_PERSONAL_ROOT . "/templates/.default/components" . $path2Comp . "/" . $file1, ".description.php");
                                 $arTemplateDescription = array();
                                 include $_SERVER["DOCUMENT_ROOT"] . BX_PERSONAL_ROOT . "/templates/.default/components" . $path2Comp . "/" . $file1 . "/.description.php";
                                 $arTemplate["TITLE"] = $arTemplateDescription["NAME"];
                                 $arTemplate["DESCRIPTION"] = $arTemplateDescription["DESCRIPTION"];
                             }
                         }
                         $arTemplatesList[] = $arTemplate;
                         $arExists[] = $arTemplate["NAME"];
                     }
                     @closedir($handle1);
                 }
             }
         }
     }
     if ($handle1 = @opendir($_SERVER["DOCUMENT_ROOT"] . $componentPath . "/templates")) {
         while (($file1 = readdir($handle1)) !== false) {
             if ($file1 == "." || $file1 == "..") {
                 continue;
             }
             if (in_array($file1, $arExists)) {
                 continue;
             }
             $arTemplate = array("NAME" => $file1, "TEMPLATE" => "");
             if (is_dir($_SERVER["DOCUMENT_ROOT"] . $componentPath . "/templates/" . $file1)) {
                 if (file_exists($_SERVER["DOCUMENT_ROOT"] . $componentPath . "/templates/" . $file1 . "/.description.php")) {
                     CComponentUtil::__IncludeLang($componentPath . "/templates/" . $file1, ".description.php");
                     $arTemplateDescription = array();
                     include $_SERVER["DOCUMENT_ROOT"] . $componentPath . "/templates/" . $file1 . "/.description.php";
                     $arTemplate["TITLE"] = $arTemplateDescription["NAME"];
                     $arTemplate["DESCRIPTION"] = $arTemplateDescription["DESCRIPTION"];
                 }
             }
             $arTemplatesList[] = $arTemplate;
             $arExists[] = $arTemplate["NAME"];
         }
         @closedir($handle1);
     }
     return $arTemplatesList;
 }
Exemple #9
0
?>
"<?if($template["NAME"] == $curTemplate || $curTemplate == '' && $template["NAME"] == ".default") echo " selected";?>><?php 
echo htmlspecialcharsbx($template["NAME"] . " (" . $showTemplateName . ")");
?>
</option>
<?endforeach;?>
			</select>
		</td>
	</tr>
<?
endif; //!empty($arComponentTemplates)

// Fetch tooltips
$cn = CUtil::addslashes($_GET["component_name"]);
$cn = str_replace(array(':', '..'), array('/', ''), $cn);
CComponentUtil::__IncludeLang("/bitrix/components/".$cn, "/help/.tooltips.php");
$tooltips_path = $_SERVER["DOCUMENT_ROOT"]."/bitrix/components/".$cn."/help/.tooltips.php";
$arTooltips = array();
if(file_exists($tooltips_path))
	include($tooltips_path);

//check whether we have parameters without parent group
foreach($arParameters as $prop)
{
	if(!array_key_exists("PARENT", $prop) || !array_key_exists($prop["PARENT"], $arParameterGroups))
	{
		$arParameterGroups["__additional_params"] = array("NAME"=>GetMessage("comp_prop_additional"));
		break;
	}
}
Exemple #10
0
<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!defined("BX_INTASKS_FROM_COMPONENT") || BX_INTASKS_FROM_COMPONENT !== true) {
    die;
}
CModule::IncludeModule("socialnetwork");
CComponentUtil::__IncludeLang(BX_PERSONAL_ROOT . "/components/bitrix/intranet.tasks", "action.php");
function __InTaskDeleteTask($delTaskId, $iblockId, $taskType, $ownerId, $arParams)
{
    $delTaskId = IntVal($delTaskId);
    $iblockId = IntVal($iblockId);
    $ownerId = IntVal($ownerId);
    if ($delTaskId <= 0 || $iblockId <= 0 || $ownerId <= 0) {
        return "";
    }
    $errorMessage = "";
    if (StrLen($errorMessage) <= 0) {
        $sectionId = 0;
        $dbElementSections = CIBlockElement::GetElementGroups($delTaskId);
        while ($arElementSection = $dbElementSections->Fetch()) {
            if ($arElementSection["IBLOCK_ID"] == $iblockId) {
                $sectionId = $arElementSection["ID"];
                break;
            }
        }
        if ($sectionId <= 0) {
            $errorMessage .= GetMessage("INTL_TASK_NOT_FOUND") . ".";
        }
<?php

if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) {
    define('PUBLIC_AJAX_MODE', true);
    if (!defined('SITE_ID') && isset($_POST['site_id'])) {
        define('SITE_ID', htmlspecialchars(trim($_POST['site_id'])));
    }
    require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php';
}
if (!isset($arParams)) {
    $arParams = array('JS_KEY' => md5(LICENSE_KEY));
}
$post = $_POST;
if ($post['asd_subscribe'] == 'Y' && strlen(trim($post['asd_email'])) && $post['asd_key'] == md5($arParams['JS_KEY'] . $post['asd_rubrics'] . (isset($post['asd_show_rubrics']) ? $post['asd_show_rubrics'] : '') . (isset($post['asd_not_confirm']) ? $post['asd_not_confirm'] : '')) && check_bitrix_sessid()) {
    $arReturn = array();
    CComponentUtil::__IncludeLang(substr(__FILE__, strpos(__FILE__, '/bitrix/components'), -strlen(basename(__FILE__))), basename(__FILE__));
    if (CModule::IncludeModule('subscribe')) {
        $arRubrics = strlen($post['asd_rubrics']) ? explode('|', $post['asd_rubrics']) : array();
        $arRubricsUser = isset($post['asd_rub']) && is_array($post['asd_rub']) ? $post['asd_rub'] : array();
        $arRubricsUser = array_intersect($arRubrics, $arRubricsUser);
        $arRubricsUser = empty($arRubricsUser) ? $arRubrics : $arRubricsUser;
        $email = trim($post['asd_email']);
        $charset = $post['charset'];
        $bShowRubrics = $post['asd_show_rubrics'] == 'Y';
        $arFields = array('USER_ID' => $USER->GetID(), 'SEND_CONFIRM' => $post['asd_not_confirm'] == 'Y' ? 'N' : 'Y', 'EMAIL' => $email, 'ACTIVE' => 'Y', 'RUB_ID' => $bShowRubrics ? $arRubricsUser : $arRubrics, 'CONFIRMED' => $post['asd_not_confirm'] == 'Y' ? 'Y' : 'N');
        $subscr = new CSubscription();
        if ($newID = $subscr->Add($arFields)) {
            $arReturn = array('message' => GetMessage('ASD_CMP_SUCCESS' . ($post['asd_not_confirm'] == 'Y' ? '_NC' : '')), 'status' => 'ok');
        } elseif ($ex = $APPLICATION->GetException()) {
            $arReturn = array('message' => $ex->GetString(), 'status' => 'error');
        }
Exemple #12
0
 function GetLiveFeedData($site_id = "", $lang = "en")
 {
     global $MESS;
     if (($r = CStatisticWS::CheckAuth()) !== False) {
         return $r;
     }
     CComponentUtil::__IncludeLang("/bitrix/components/bitrix/webservice.statistic/", "/component_1.php", $lang);
     $arFilter = array();
     $server_name = COption::GetOptionString("main", "server_name", $GLOBALS["SERVER_NAME"]);
     $protocol = CMain::IsHTTPS() ? "https" : "http";
     if (strlen($site_id) > 0) {
         $rsSites = CSite::GetByID($arFields["SITE_ID"]);
         if ($arSite = $rsSites->Fetch()) {
             $arFilter = array("SITE_ID" => $site_id);
             if (strlen($arSite["SERVER_NAME"]) > 0) {
                 $server_name = $arSite["SERVER_NAME"];
             }
         }
     }
     $traffic = CTraffic::GetCommonValues($arFilter, true);
     $strStat = '<table border="0">' . '<tr>' . '<td> </td>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_TODAY") . '</b></td>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_YESTERDAY") . '</b></td>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_B_YESTERDAY") . '</b></td>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_TOTAL") . '</b></td>' . '</tr>' . '<tr>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_HITS") . '</b></td>' . '<td align="center">' . $traffic["TODAY_HITS"] . '</td>' . '<td align="center">' . $traffic["YESTERDAY_HITS"] . '</td>' . '<td align="center">' . $traffic["B_YESTERDAY_HITS"] . '</td>' . '<td align="center">' . $traffic["TOTAL_HITS"] . '</td>' . '</tr>' . '<tr>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_SESSIONS") . '</b></td>' . '<td align="center">' . $traffic["TODAY_SESSIONS"] . '</td>' . '<td align="center">' . $traffic["YESTERDAY_SESSIONS"] . '</td>' . '<td align="center">' . $traffic["B_YESTERDAY_SESSIONS"] . '</td>' . '<td align="center">' . $traffic["TOTAL_SESSIONS"] . '</td>' . '</tr>' . '<tr>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_HOSTS") . '</b></td>' . '<td align="center">' . $traffic["TODAY_HOSTS"] . '</td>' . '<td align="center">' . $traffic["YESTERDAY_HOSTS"] . '</td>' . '<td align="center">' . $traffic["B_YESTERDAY_HOSTS"] . '</td>' . '<td align="center">' . $traffic["TOTAL_HOSTS"] . '</td>' . '</tr>' . '<tr>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_EVENTS") . '</b></td>' . '<td align="center">' . $traffic["TODAY_EVENTS"] . '</td>' . '<td align="center">' . $traffic["YESTERDAY_EVENTS"] . '</td>' . '<td align="center">' . $traffic["B_YESTERDAY_EVENTS"] . '</td>' . '<td align="center">' . $traffic["TOTAL_EVENTS"] . '</td>' . '</tr>' . (!array_key_exists("SITE_ID", $arFilter) ? '<tr>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_GUESTS") . '</b></td>' . '<td align="center">' . $traffic["TODAY_GUESTS"] . '</td>' . '<td align="center">' . $traffic["YESTERDAY_GUESTS"] . '</td>' . '<td align="center">' . $traffic["B_YESTERDAY_GUESTS"] . '</td>' . '<td align="center">' . $traffic["TOTAL_GUESTS"] . '</td>' . '</tr>' . '<tr>' . '<td><b>' . GetMessage("BX_WS_STAT_LF_NEW_GUESTS") . '</b></td>' . '<td align="center">' . $traffic["TODAY_NEW_GUESTS"] . '</td>' . '<td align="center">' . $traffic["YESTERDAY_NEW_GUESTS"] . '</td>' . '<td align="center">' . $traffic["B_YESTERDAY_NEW_GUESTS"] . '</td>' . '<td align="center"> </td>' . '</tr>' : '') . '</table>';
     $strStatText = GetMessage("BX_WS_STAT_LF_HITS") . '#BR#' . GetMessage("BX_WS_STAT_LF_TODAY") . ': ' . $traffic["TODAY_HITS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_YESTERDAY") . ': ' . $traffic["YESTERDAY_HITS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_B_YESTERDAY") . ': ' . $traffic["B_YESTERDAY_HITS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_TOTAL") . ': ' . $traffic["TOTAL_HITS"] . '#BR#' . '#BR#' . GetMessage("BX_WS_STAT_LF_SESSIONS") . '#BR#' . GetMessage("BX_WS_STAT_LF_TODAY") . ': ' . $traffic["TODAY_SESSIONS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_YESTERDAY") . ': ' . $traffic["YESTERDAY_SESSIONS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_B_YESTERDAY") . ': ' . $traffic["B_YESTERDAY_SESSIONS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_TOTAL") . ': ' . $traffic["TOTAL_SESSIONS"] . '#BR#' . '#BR#' . GetMessage("BX_WS_STAT_LF_HOSTS") . '#BR#' . GetMessage("BX_WS_STAT_LF_TODAY") . ': ' . $traffic["TODAY_HOSTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_YESTERDAY") . ': ' . $traffic["YESTERDAY_HOSTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_B_YESTERDAY") . ': ' . $traffic["B_YESTERDAY_HOSTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_TOTAL") . ': ' . $traffic["TOTAL_HOSTS"] . '#BR#' . '#BR#' . GetMessage("BX_WS_STAT_LF_EVENTS") . '#BR#' . GetMessage("BX_WS_STAT_LF_TODAY") . ': ' . $traffic["TODAY_EVENTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_YESTERDAY") . ': ' . $traffic["YESTERDAY_EVENTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_B_YESTERDAY") . ': ' . $traffic["B_YESTERDAY_EVENTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_TOTAL") . ': ' . $traffic["TOTAL_EVENTS"] . '#BR#' . (!array_key_exists("SITE_ID", $arFilter) ? '#BR#' . GetMessage("BX_WS_STAT_LF_GUESTS") . '#BR#' . GetMessage("BX_WS_STAT_LF_TODAY") . ': ' . $traffic["TODAY_GUESTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_YESTERDAY") . ': ' . $traffic["YESTERDAY_GUESTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_B_YESTERDAY") . ': ' . $traffic["B_YESTERDAY_GUESTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_TOTAL") . ': ' . $traffic["TOTAL_GUESTS"] . '#BR#' . '#BR#' . GetMessage("BX_WS_STAT_LF_NEW_GUESTS") . '#BR#' . GetMessage("BX_WS_STAT_LF_TODAY") . ': ' . $traffic["TODAY_NEW_GUESTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_YESTERDAY") . ': ' . $traffic["YESTERDAY_NEW_GUESTS"] . '#BR#' . GetMessage("BX_WS_STAT_LF_B_YESTERDAY") . ': ' . $traffic["B_YESTERDAY_NEW_GUESTS"] . '#BR#' : '');
     $arResult = array("TITLE" => htmlspecialchars(GetMessage("BX_WS_STAT_LF_TITLE")), "MESSAGE" => htmlspecialchars($strStat), "TEXT_MESSAGE" => htmlspecialchars($strStatText), "URL" => htmlspecialchars($protocol . "://" . $server_name . "/bitrix/admin/stat_list.php?lang=" . $lang));
     return $arResult;
 }
Exemple #13
0
<?
define("STOP_STATISTICS", true);
define("FX_SECURITY_SHOW_MESSAGE", true);

require_once($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_before.php");

include_once($_SERVER['DOCUMENT_ROOT'].'/freetrix/components/freetrix/desktop/include.php');

CComponentUtil::__IncludeLang("/freetrix/components/freetrix/desktop/", "/admin_settings.php");

if (
	('POST' == $_SERVER['REQUEST_METHOD'])
	&& (
		false == isset($_REQUEST['save_desktop'])
		&& (false == isset($_REQUEST['save_gadget']) || "Y" == $_REQUEST['refresh'])
	)
)
	CUtil::JSPostUnescape();

global $DB;
global $APPLICATION;
global $USER;

if (false == check_freetrix_sessid() || !$USER->IsAuthorized())
{

	require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/prolog_admin_after.php");
	$APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
	require($_SERVER["DOCUMENT_ROOT"]."/freetrix/modules/main/include/epilog_admin.php");
	die();
}
 public static function FetchHelp($componentName, $lang = false)
 {
     $cName = str_replace("..", "", $componentName);
     $cName = str_replace(":", "/", $cName);
     if (!$lang) {
         $lang = LANGUAGE_ID;
     } else {
         $lang = preg_replace("/[^a-zA-Z0-9_]/is", "", $lang);
     }
     CComponentUtil::__IncludeLang("/bitrix/components/" . $cName, "/help/.tooltips.php", $lang);
     $path = $_SERVER["DOCUMENT_ROOT"] . "/bitrix/components/" . $cName . "/help/.tooltips.php";
     $arTooltips = array();
     if (file_exists($path)) {
         include $path;
     }
     return $arTooltips;
 }
Exemple #15
0
 function GetLiveFeedData($site_id = "", $lang = "en")
 {
     global $MESS;
     if (($r = CSaleWS::CheckAuth()) !== False) {
         return $r;
     }
     $saleRight = $GLOBALS["APPLICATION"]->GetGroupRight("sale");
     CComponentUtil::__IncludeLang("/bitrix/components/bitrix/webservice.sale/", "/component_1.php", $lang);
     $arFilter = array();
     $server_name = COption::GetOptionString("main", "server_name", $GLOBALS["SERVER_NAME"]);
     $protocol = CMain::IsHTTPS() ? "https" : "http";
     if (strlen($site_id) > 0) {
         $rsSites = CSite::GetByID($arFields["SITE_ID"]);
         if ($arSite = $rsSites->Fetch()) {
             $arFilterLID = array("LID" => $site_id);
             if (strlen($arSite["SERVER_NAME"]) > 0) {
                 $server_name = $arSite["SERVER_NAME"];
             }
         }
         $strSiteCurrency = CSaleLang::GetLangCurrency($site_id);
     } else {
         $arFilterLID = array();
         $strSiteCurrency = CCurrency::GetBaseCurrency();
     }
     if ($saleRight != "W") {
         $arFilterPerms = array("STATUS_PERMS_GROUP_ID" => $GLOBALS["USER"]->GetUserGroupArray(), ">=STATUS_PERMS_PERM_VIEW" => "Y");
     } else {
         $arFilterPerms = array();
     }
     $d = date("w");
     if ($d < 1) {
         $d = -6;
     } elseif ($d > 1) {
         $d = $d - 1;
     } else {
         $d = 0;
     }
     $BeforeLastWeek_minDate = ConvertTimeStamp(AddToTimeStamp(array("DD" => "-" . (14 + $d)), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $BeforeLastWeek_maxDate = ConvertTimeStamp(AddToTimeStamp(array("DD" => "-" . (7 + $d), "SS" => -1), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $LastWeek_minDate = ConvertTimeStamp(AddToTimeStamp(array("DD" => "-" . (7 + $d)), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $LastWeek_maxDate = ConvertTimeStamp(AddToTimeStamp(array("DD" => "-" . $d, "SS" => -1), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $ThisWeek_minDate = ConvertTimeStamp(AddToTimeStamp(array("DD" => "-" . $d), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $ThisWeek_maxDate = ConvertTimeStamp(mktime(0, 0, 0, date("n"), date("j") + 1, date("Y")), "FULL");
     $BeforeYesterday_minDate = ConvertTimeStamp(AddToTimeStamp(array("DD" => "-2"), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $BeforeYesterday_maxDate = ConvertTimeStamp(AddToTimeStamp(array("DD" => "-1", "SS" => -1), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $Yesterday_minDate = ConvertTimeStamp(AddToTimeStamp(array("DD" => "-1"), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $Yesterday_maxDate = ConvertTimeStamp(AddToTimeStamp(array("SS" => -1), mktime(0, 0, 0, date("n"), date("j"), date("Y"))), "FULL");
     $Today_minDate = ConvertTimeStamp(mktime(0, 0, 0, date("n"), date("j"), date("Y")), "FULL");
     $Today_maxDate = ConvertTimeStamp(mktime(0, 0, 0, date("n"), date("j") + 1, date("Y")), "FULL");
     $arDatePeriods = array("BEFORE_LAST_WEEK" => array("MIN_DATE" => $BeforeLastWeek_minDate, "MAX_DATE" => $BeforeLastWeek_maxDate), "LAST_WEEK" => array("MIN_DATE" => $LastWeek_minDate, "MAX_DATE" => $LastWeek_maxDate), "THIS_WEEK" => array("MIN_DATE" => $ThisWeek_minDate, "MAX_DATE" => $ThisWeek_maxDate), "BEFORE_YESTERDAY" => array("MIN_DATE" => $BeforeYesterday_minDate, "MAX_DATE" => $BeforeYesterday_maxDate), "YESTERDAY" => array("MIN_DATE" => $Yesterday_minDate, "MAX_DATE" => $Yesterday_maxDate), "TODAY" => array("MIN_DATE" => $Today_minDate, "MAX_DATE" => $Today_maxDate));
     $arStatus1 = array("CREATED" => array("NAME" => GetMessage("BX_WS_SALE_STATUS_1_CREATED"), "DB_FIELD" => "DATE"), "PAID" => array("NAME" => GetMessage("BX_WS_SALE_STATUS_1_PAID"), "DB_FIELD" => "DATE_PAYED"), "CANCELED" => array("NAME" => GetMessage("BX_WS_SALE_STATUS_1_CANCELED"), "DB_FIELD" => "DATE_UPDATE", "Y_FIELD" => "CANCELED"), "ALLOW_DELIVERY" => array("NAME" => GetMessage("BX_WS_SALE_STATUS_1_ALLOW_DELIVERY"), "DB_FIELD" => "DATE_UPDATE", "Y_FIELD" => "ALLOW_DELIVERY"));
     foreach ($arDatePeriods as $key => $arPeriod) {
         foreach ($arStatus1 as $status_code => $arStatus) {
             $arOrderStats[$key][$status_code] = 0;
             $arOrderStats[$key]["PRICE_" . $status_code] = 0;
         }
         foreach ($arStatus1 as $status_code => $arStatus) {
             if (!is_array($arGadgetParams["ORDERS_STATUS_1"]) || in_array($status_code, $arGadgetParams["ORDERS_STATUS_1"])) {
                 if (array_key_exists("Y_FIELD", $arStatus) && strlen($arStatus["Y_FIELD"]) > 0) {
                     $arFilterYField = array($arStatus["Y_FIELD"] => "Y");
                 } else {
                     $arFilterYField = array();
                 }
                 $arFilter = array_merge(array($arStatus["DB_FIELD"] . "_FROM" => $arPeriod["MIN_DATE"], $arStatus["DB_FIELD"] . "_TO" => $arPeriod["MAX_DATE"]), $arFilterLID, $arFilterPerms, $arFilterYField);
                 $dbOrder = CSaleOrder::GetList(array(), $arFilter, array("SUM" => "PRICE", "COUNT" => "ID"));
                 if ($arOrder = $dbOrder->Fetch()) {
                     $arOrderStats[$key][$status_code] = $arOrder["ID"];
                     $arOrderStats[$key]["PRICE_" . $status_code] = $arOrder["PRICE"];
                 }
             }
         }
     }
     $strSaleStat = '<table border="0">';
     $strSaleStat .= '<tr><td>&nbsp;</td>';
     foreach ($arStatus1 as $status_code => $arStatus) {
         $strSaleStat .= '<td><b>' . $arStatus["NAME"] . '</b></td>';
     }
     $strSaleStat .= '</tr>';
     $strSaleStat .= '<tr><td>' . GetMessage("BX_WS_SALE_TODAY") . '</td>';
     foreach ($arStatus1 as $status_code => $arStatus) {
         $strSaleStat .= '<td align="center">' . intval($arOrderStats["TODAY"][$status_code]) . '</td>';
     }
     $strSaleStat .= '</tr>';
     $strSaleStat .= '<tr><td>' . GetMessage("BX_WS_SALE_YESTERDAY") . '</td>';
     foreach ($arStatus1 as $status_code => $arStatus) {
         $strSaleStat .= '<td align="center">' . intval($arOrderStats["YESTERDAY"][$status_code]) . '</td>';
     }
     $strSaleStat .= '</tr>';
     $strSaleStat .= '<tr><td>' . GetMessage("BX_WS_SALE_BEFOREYESTERDAY") . '</td>';
     foreach ($arStatus1 as $status_code => $arStatus) {
         $strSaleStat .= '<td align="center">' . intval($arOrderStats["BEFORE_YESTERDAY"][$status_code]) . '</td>';
     }
     $strSaleStat .= '</tr>';
     $strSaleStat .= '<tr><td>' . GetMessage("BX_WS_SALE_THISWEEK") . '</td>';
     foreach ($arStatus1 as $status_code => $arStatus) {
         $strSaleStat .= '<td align="center">' . intval($arOrderStats["THIS_WEEK"][$status_code]) . '</td>';
     }
     $strSaleStat .= '</tr>';
     $strSaleStat .= '<tr><td>' . GetMessage("BX_WS_SALE_LASTWEEK") . '</td>';
     foreach ($arStatus1 as $status_code => $arStatus) {
         $strSaleStat .= '<td align="center">' . intval($arOrderStats["LAST_WEEK"][$status_code]) . '</td>';
     }
     $strSaleStat .= '</tr>';
     $strSaleStat .= '<tr><td>' . GetMessage("BX_WS_SALE_BEFORELASTWEEK") . '</td>';
     foreach ($arStatus1 as $status_code => $arStatus) {
         $strSaleStat .= '<td align="center">' . intval($arOrderStats["BEFORE_LAST_WEEK"][$status_code]) . '</td>';
     }
     $strSaleStat .= '</tr>';
     $strSaleStat .= '</table>';
     $strSaleStatText = '';
     foreach ($arStatus1 as $status_code => $arStatus) {
         $strSaleStatText .= '#BR#' . $arStatus["NAME"] . '#BR#';
         $strSaleStatText .= GetMessage("BX_WS_SALE_TODAY") . ' ' . intval($arOrderStats["TODAY"][$status_code]) . (intval($arOrderStats["TODAY"][$status_code]) > 0 ? ' (' . CurrencyFormat($arOrderStats["TODAY"]["PRICE_" . $status_code], $strSiteCurrency) . ')' : '') . '#BR#';
         $strSaleStatText .= GetMessage("BX_WS_SALE_YESTERDAY") . ' ' . intval($arOrderStats["YESTERDAY"][$status_code]) . (intval($arOrderStats["YESTERDAY"][$status_code]) > 0 ? ' (' . CurrencyFormat($arOrderStats["YESTERDAY"]["PRICE_" . $status_code], $strSiteCurrency) . ')' : '') . '#BR#';
         $strSaleStatText .= GetMessage("BX_WS_SALE_BEFOREYESTERDAY") . ' ' . intval($arOrderStats["BEFORE_YESTERDAY"][$status_code]) . (intval($arOrderStats["BEFORE_YESTERDAY"][$status_code]) > 0 ? ' (' . CurrencyFormat($arOrderStats["BEFORE_YESTERDAY"]["PRICE_" . $status_code], $strSiteCurrency) . ')' : '') . '#BR#';
         $strSaleStatText .= GetMessage("BX_WS_SALE_THISWEEK") . ' ' . intval($arOrderStats["THIS_WEEK"][$status_code]) . (intval($arOrderStats["THIS_WEEK"][$status_code]) > 0 ? ' (' . CurrencyFormat($arOrderStats["THIS_WEEK"]["PRICE_" . $status_code], $strSiteCurrency) . ')' : '') . '#BR#';
         $strSaleStatText .= GetMessage("BX_WS_SALE_LASTWEEK") . ' ' . intval($arOrderStats["LAST_WEEK"][$status_code]) . (intval($arOrderStats["LAST_WEEK"][$status_code]) > 0 ? ' (' . CurrencyFormat($arOrderStats["LAST_WEEK"]["PRICE_" . $status_code], $strSiteCurrency) . ')' : '') . '#BR#';
         $strSaleStatText .= GetMessage("BX_WS_SALE_BEFORELASTWEEK") . ' ' . intval($arOrderStats["BEFORE_LAST_WEEK"][$status_code]) . (intval($arOrderStats["BEFORE_LAST_WEEK"][$status_code]) > 0 ? ' (' . CurrencyFormat($arOrderStats["BEFORE_LAST_WEEK"]["PRICE_" . $status_code], $strSiteCurrency) . ')' : '') . '#BR#';
     }
     $arResult = array("TITLE" => htmlspecialchars(GetMessage("BX_WS_SALE_LF_TITLE")), "MESSAGE" => htmlspecialchars($strSaleStat), "TEXT_MESSAGE" => htmlspecialchars($strSaleStatText), "URL" => htmlspecialchars($protocol . "://" . $server_name . "/bitrix/admin/sale_stat.php?lang=" . $lang));
     return $arResult;
 }
Exemple #16
0
<?php

if (!Defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if (!Function_Exists("__IRM_InitReservation")) {
    CComponentUtil::__IncludeLang(BX_PERSONAL_ROOT . "/components/bitrix/intranet.reserve_meeting", "init.php");
    function __IRM_InitReservation($iblockId)
    {
        $arResult = array();
        $arResult["ALLOWED_FIELDS"] = array("ID" => array("NAME" => GetMessage("INAF_F_ID"), "ORDERABLE" => true, "FILTERABLE" => true, "TYPE" => "int", "IS_FIELD" => true), "NAME" => array("NAME" => GetMessage("INAF_F_NAME"), "ORDERABLE" => true, "FILTERABLE" => true, "TYPE" => "string", "IS_FIELD" => true), "DESCRIPTION" => array("NAME" => GetMessage("INAF_F_DESCRIPTION"), "ORDERABLE" => false, "FILTERABLE" => false, "TYPE" => "text", "IS_FIELD" => true), "UF_FLOOR" => array("NAME" => GetMessage("INAF_F_FLOOR"), "ORDERABLE" => true, "FILTERABLE" => true, "TYPE" => "integer", "IS_FIELD" => false), "UF_PLACE" => array("NAME" => GetMessage("INAF_F_PLACE"), "ORDERABLE" => true, "FILTERABLE" => true, "TYPE" => "integer", "IS_FIELD" => false), "UF_PHONE" => array("NAME" => GetMessage("INAF_F_PHONE"), "ORDERABLE" => false, "FILTERABLE" => false, "TYPE" => "string", "IS_FIELD" => false));
        $arUserFields = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("IBLOCK_" . $iblockId . "_SECTION", 0, LANGUAGE_ID);
        $arKeys = Array_Keys($arResult["ALLOWED_FIELDS"]);
        foreach ($arKeys as $key) {
            if (!$arResult["ALLOWED_FIELDS"][$key]["IS_FIELD"]) {
                if (!Array_Key_Exists($key, $arUserFields)) {
                    $arFields = array("ENTITY_ID" => "IBLOCK_" . $iblockId . "_SECTION", "FIELD_NAME" => $key, "USER_TYPE_ID" => $arResult["ALLOWED_FIELDS"][$key]["TYPE"]);
                    $obUserField = new CUserTypeEntity();
                    $obUserField->Add($arFields);
                }
            }
        }
        $arResult["ALLOWED_ITEM_PROPERTIES"] = array("UF_PERSONS" => array("NAME" => GetMessage("INTASK_C29_UF_PERSONS"), "ACTIVE" => "Y", "SORT" => 300, "CODE" => "UF_PERSONS", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 5, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "UF_RES_TYPE" => array("NAME" => GetMessage("INTASK_C29_UF_RES_TYPE"), "ACTIVE" => "Y", "SORT" => 200, "CODE" => "UF_RES_TYPE", "PROPERTY_TYPE" => "L", "USER_TYPE" => false, "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "Y", "SEARCHABLE" => "Y", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "Y", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId, "VALUES" => array(array("VALUE" => GetMessage("INTASK_C29_UF_RES_TYPEA"), "DEF" => "Y", "SORT" => 100, "XML_ID" => "A"), array("VALUE" => GetMessage("INTASK_C29_UF_RES_TYPEB"), "DEF" => "N", "SORT" => 200, "XML_ID" => "B"), array("VALUE" => GetMessage("INTASK_C29_UF_RES_TYPEC"), "DEF" => "N", "SORT" => 200, "XML_ID" => "C"), array("VALUE" => GetMessage("INTASK_C29_UF_RES_TYPED"), "DEF" => "N", "SORT" => 300, "XML_ID" => "D"))), "UF_PREPARE_ROOM" => array("NAME" => GetMessage("INTASK_C29_UF_PREPARE_ROOM"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "UF_PREPARE_ROOM", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "DEFAULT_VALUE" => "Y", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "PERIOD_TYPE" => array("NAME" => GetMessage("INTASK_C29_PERIOD_TYPE"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "PERIOD_TYPE", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "DEFAULT_VALUE" => "NONE", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "PERIOD_COUNT" => array("NAME" => GetMessage("INTASK_C29_PERIOD_COUNT"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "PERIOD_COUNT", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "DEFAULT_VALUE" => "", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "EVENT_LENGTH" => array("NAME" => GetMessage("INTASK_C29_EVENT_LENGTH"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "EVENT_LENGTH", "PROPERTY_TYPE" => "N", "USER_TYPE" => false, "DEFAULT_VALUE" => "", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId), "PERIOD_ADDITIONAL" => array("NAME" => GetMessage("INTASK_C29_PERIOD_ADDITIONAL"), "ACTIVE" => "Y", "SORT" => 500, "CODE" => "PERIOD_ADDITIONAL", "PROPERTY_TYPE" => "S", "USER_TYPE" => false, "DEFAULT_VALUE" => "", "ROW_COUNT" => 1, "COL_COUNT" => 30, "LINK_IBLOCK_ID" => 0, "WITH_DESCRIPTION" => "N", "FILTRABLE" => "N", "SEARCHABLE" => "N", "MULTIPLE" => "N", "MULTIPLE_CNT" => 5, "IS_REQUIRED" => "N", "FILE_TYPE" => "jpg, gif, bmp, png, jpeg", "LIST_TYPE" => "L", "IBLOCK_ID" => $iblockId));
        $dbIBlockProps = CIBlock::GetProperties($iblockId);
        while ($arIBlockProps = $dbIBlockProps->Fetch()) {
            if (Array_Key_Exists($arIBlockProps["CODE"], $arResult["ALLOWED_ITEM_PROPERTIES"])) {
                $arResult["ALLOWED_ITEM_PROPERTIES"][$arIBlockProps["CODE"]]["ID"] = $arIBlockProps["ID"];
            }
        }
        $keys = Array_Keys($arResult["ALLOWED_ITEM_PROPERTIES"]);
        foreach ($keys as $key) {