当前位置: 首页>>代码示例>>PHP>>正文


PHP CComponentUtil::__IncludeLang方法代码示例

本文整理汇总了PHP中CComponentUtil::__IncludeLang方法的典型用法代码示例。如果您正苦于以下问题:PHP CComponentUtil::__IncludeLang方法的具体用法?PHP CComponentUtil::__IncludeLang怎么用?PHP CComponentUtil::__IncludeLang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CComponentUtil的用法示例。


在下文中一共展示了CComponentUtil::__IncludeLang方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: fetchPropsHelp

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;<?
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:48,代码来源:fileman_load_comp2_params.php

示例2: GetById

 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;
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:82,代码来源:include.php

示例3: htmlspecialcharsbx

            ?>
><?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) {
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:component_props2.php

示例4: require

<?
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"?>
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:player_playlist_edit.php

示例5: define

<?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";
    }
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:ajax.php

示例6: GetTemplatesList

 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;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:64,代码来源:component_util.php

示例7: define

<?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();
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:admin_settings_all.php

示例8: GetTemplatesList

 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"];
                 }
             }
//.........这里部分代码省略.........
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:101,代码来源:component_util.php

示例9: htmlspecialcharsbx

?>
"<?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;
	}
}
开发者ID:nProfessor,项目名称:Mytb,代码行数:30,代码来源:component_props2.php

示例10: __InTaskDeleteTask

<?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") . ".";
        }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:action.php

示例11: define

<?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');
        }
开发者ID:rnsokolov,项目名称:bitrixtemplate_stylish,代码行数:31,代码来源:action.php

示例12: GetLiveFeedData

 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;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:25,代码来源:component.php

示例13: define

<?
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();
}
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:admin_settings.php

示例14: FetchHelp

 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;
 }
开发者ID:spas-viktor,项目名称:books,代码行数:17,代码来源:component_params_manager.php

示例15: array

<?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) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:init.php


注:本文中的CComponentUtil::__IncludeLang方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。