本文整理汇总了PHP中CLangAdmin::GetByID方法的典型用法代码示例。如果您正苦于以下问题:PHP CLangAdmin::GetByID方法的具体用法?PHP CLangAdmin::GetByID怎么用?PHP CLangAdmin::GetByID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLangAdmin
的用法示例。
在下文中一共展示了CLangAdmin::GetByID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: substr
* @package bitrix
* @subpackage main
* @copyright 2001-2013 Bitrix
*/
require_once substr(__FILE__, 0, strlen(__FILE__) - strlen("/include.php")) . "/bx_root.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/start.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/virtual_io.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/virtual_file.php";
//define global application object
$GLOBALS["APPLICATION"] = new CMain();
if (defined("SITE_ID")) {
define("LANG", SITE_ID);
}
if (defined("LANG")) {
if (defined("ADMIN_SECTION") && ADMIN_SECTION === true) {
$db_lang = CLangAdmin::GetByID(LANG);
} else {
$db_lang = CLang::GetByID(LANG);
}
$arLang = $db_lang->Fetch();
} else {
$arLang = $GLOBALS["APPLICATION"]->GetLang();
define("LANG", $arLang["LID"]);
}
$lang = $arLang["LID"];
define("SITE_ID", $arLang["LID"]);
define("SITE_DIR", $arLang["DIR"]);
define("SITE_SERVER_NAME", $arLang["SERVER_NAME"]);
define("SITE_CHARSET", $arLang["CHARSET"]);
define("FORMAT_DATE", $arLang["FORMAT_DATE"]);
define("FORMAT_DATETIME", $arLang["FORMAT_DATETIME"]);
示例2: CMain
<?php
require_once $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/main" . "/SetCorePath.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/main/Start.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/main/classes/general/virtual_io.php";
require_once $_SERVER["DOCUMENT_ROOT"] . "/freetrix/modules/main/classes/general/virtual_file.php";
$Application = \Freetrix\Main\Application::getInstance();
$Application->initializeExtendedKernel(array("get" => $_GET, "post" => $_POST, "files" => $_FILES, "cookie" => $_COOKIE, "server" => $_SERVER, "env" => $_ENV));
$GLOBALS["APPLICATION"] = new CMain();
if (defined("SITE_ID")) {
define("LANG", SITE_ID);
}
if (defined("LANG")) {
if (defined("ADMIN_SECTION") && ADMIN_SECTION === true) {
$currentLangGetter = CLangAdmin::GetByID(LANG);
} else {
$currentLangGetter = CLang::GetByID(LANG);
}
$definedLang = $currentLangGetter->Fetch();
} else {
$definedLang = $GLOBALS["APPLICATION"]->GetLang();
define("LANG", $definedLang["LID"]);
}
$_762722495 = $definedLang["LID"];
define("SITE_ID", $definedLang["LID"]);
define("SITE_DIR", $definedLang["DIR"]);
define("SITE_SERVER_NAME", $definedLang["SERVER_NAME"]);
define("SITE_CHARSET", $definedLang["CHARSET"]);
define("FORMAT_DATE", $definedLang["FORMAT_DATE"]);
define("FORMAT_DATETIME", $definedLang["FORMAT_DATETIME"]);
define("LANG_DIR", $definedLang["DIR"]);