本文整理匯總了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"]);