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


PHP getLocalPath函数代码示例

本文整理汇总了PHP中getLocalPath函数的典型用法代码示例。如果您正苦于以下问题:PHP getLocalPath函数的具体用法?PHP getLocalPath怎么用?PHP getLocalPath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getVersion

 public static function getVersion($moduleName)
 {
     $moduleName = preg_replace("/[^a-zA-Z0-9_.]+/i", "", trim($moduleName));
     if ($moduleName == '') {
         return false;
     }
     if (!self::isModuleInstalled($moduleName)) {
         return false;
     }
     $version = false;
     if ($moduleName == 'main') {
         if (!defined("SM_VERSION")) {
             include_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/version.php";
         }
         $version = SM_VERSION;
     } else {
         $modulePath = getLocalPath("modules/" . $moduleName . "/install/version.php");
         if ($modulePath === false) {
             return false;
         }
         include $_SERVER["DOCUMENT_ROOT"] . $modulePath;
         $version = array_key_exists("VERSION", $arModuleVersion) ? $arModuleVersion["VERSION"] : false;
     }
     return $version;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:25,代码来源:modulemanager.php

示例2: print_admin_panel

function print_admin_panel($page)
{
    global $domain;
    if (!isset($_SESSION['username'])) {
        $username = "";
    } else {
        $username = $_SESSION['username'];
    }
    echo '<script src="http://' . getLocalPath() . '/admin.js"></script>';
    echo "<h1>Admin Panel</h1>\n      Welcome " . htmlspecialchars($username) . "<br>";
    echo "Your balance is: \$" . get_fed_balance();
    //<li><a href=\"".$domain."admin/panel.php?page=transfer_internal_funds\">Transfer Internal User Funds</a></li>
    echo "<h2>Welcome to the Admin Panel</h2>\n      Add the twitter feed here to see user feedback.<br />\n      <ul>\n        <li><a href=\"" . $domain . "admin/panel.php?page=add_user\">Add User</a></li>\n        <li><a href=\"" . $domain . "admin/panel.php?page=change_fed_password\">Change Fed Password</a></li>\n        <li><a href=\"" . $domain . "admin/panel.php?page=change_fed_pin\">Change Fed PIN</a></li>\n        <li><a href=\"" . $domain . "admin/panel.php?page=transfer_to_bank\">Transfer Money to Other Bank</a></li>\n        Transfers to external accounts must not exceed the bank's balance in the fed.\n        Transfers to other banks must not exceed \$5000 within a 30 minute period.\n        <li><a href=\"" . $domain . "admin/panel.php?page=view_account_funds\">View Internal User Funds</a></li>\n        <li><a href=\"" . $domain . "admin/panel.php?page=view_transactions\">View Transaction List</a></li>\n        <li><a href=\"" . $domain . "admin/panel.php?page=pay_bill\">Pay Bill</a></li>\n        <li><a href=\"" . $domain . "admin/panel.php?page=change_page\">Modify Page</a></li>\n        <li><a href=\"" . $domain . "admin/panel.php?page=change_local_password\">Change My Local Password</a></li>\n      </ul>\n      <div id=\"admin_content\">";
    get_content($page);
    echo "</div>\n";
}
开发者ID:bjh7242,项目名称:ISTS14-Stuff,代码行数:16,代码来源:content.php

示例3: str_replace

require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/prolog.php";
if (!$USER->CanDoOperation('edit_other_settings') && !$USER->CanDoOperation('view_other_settings') || !check_bitrix_sessid()) {
    $APPLICATION->AuthForm(GetMessage("ACCESS_DENIED"));
}
$ID = str_replace("\\", "", $_REQUEST["ID"]);
$ID = str_replace("/", "", $ID);
$bUseCompression = True;
if (!extension_loaded('zlib') || !function_exists("gzcompress")) {
    $bUseCompression = False;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/tar_gz.php";
CheckDirPath($_SERVER['DOCUMENT_ROOT'] . BX_PERSONAL_ROOT . "/tmp/templates/");
$tmpfname = $_SERVER['DOCUMENT_ROOT'] . BX_PERSONAL_ROOT . "/tmp/templates/" . md5(uniqid(rand(), true) . ".tar.gz");
$HTTP_ACCEPT_ENCODING = "";
$strError = "";
$path = getLocalPath("templates/" . $ID, BX_PERSONAL_ROOT);
if (is_dir($_SERVER["DOCUMENT_ROOT"] . $path)) {
    $oArchiver = new CArchiver($tmpfname, $bUseCompression);
    $tres = $oArchiver->add("\"" . $_SERVER["DOCUMENT_ROOT"] . $path . "\"", false, $_SERVER["DOCUMENT_ROOT"] . $path);
    if (!$tres) {
        $strError = "Archiver error";
        $arErrors =& $oArchiver->GetErrors();
        if (count($arErrors) > 0) {
            $strError .= ":<br>";
            foreach ($arErrors as $value) {
                $strError .= "[" . $value[0] . "] " . $value[1] . "<br>";
            }
        } else {
            $strError .= ".<br>";
        }
    }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:template_export.php

示例4: GetIcons

 public function GetIcons()
 {
     /** @global CMain $APPLICATION */
     global $USER, $APPLICATION;
     $arIcons = array();
     $arPanelParams = array();
     $arComponentDescription = CComponentUtil::GetComponentDescr($this->componentName);
     $bComponentAccess = $USER->CanDoOperation('edit_php') || $this->bSrcFound && $USER->CanDoFileOperation('fm_lpa', array(SITE_ID, $this->sSrcFile));
     if ($bComponentAccess && !$this->parentComponent && $this->bSrcFound) {
         $url = $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/component_props.php?" . "component_name=" . urlencode(CUtil::addslashes($this->componentName)) . "&component_template=" . urlencode(CUtil::addslashes($this->componentTemplate)) . "&template_id=" . urlencode(CUtil::addslashes(SITE_TEMPLATE_ID)) . "&lang=" . urlencode(CUtil::addslashes(LANGUAGE_ID)) . "&src_path=" . urlencode(CUtil::addslashes($this->sSrcFile)) . "&src_line=" . $this->iSrcLine . "&src_page=" . urlencode(CUtil::addslashes($APPLICATION->GetCurPage())) . "&src_site=" . urlencode(CUtil::addslashes(SITE_ID)), "PARAMS" => array("min_width" => 450)));
         $arIcons[] = array('URL' => 'javascript:' . $url, 'TYPE' => 'components2_props', 'ICON' => "bx-context-toolbar-settings-icon", 'TITLE' => GetMessage("main_incl_file_comp_param"), 'DEFAULT' => true);
         $aMenuItem = array("TEXT" => $arComponentDescription["NAME"], "TITLE" => GetMessage("main_comp_button_menu_title") . ' ' . $this->componentName, "ICON" => "parameters-2", "ACTION" => $url);
         $APPLICATION->AddPanelButtonMenu("components", $aMenuItem);
     }
     if ($bComponentAccess) {
         $template = $this->component->GetTemplate();
         if (is_null($template)) {
             if ($this->component->InitComponentTemplate()) {
                 $template = $this->component->GetTemplate();
             }
         }
         if (!is_null($template)) {
             $urlCopy = '';
             if ($this->bSrcFound && $template->IsInTheme() == false) {
                 //copy template dialog
                 $urlCopy = "/freetrix/admin/template_copy.php?" . "lang=" . urlencode(CUtil::addslashes(LANGUAGE_ID)) . "&component_name=" . urlencode(CUtil::addslashes($this->componentName)) . "&component_template=" . urlencode(CUtil::addslashes($this->componentTemplate)) . "&template_id=" . urlencode(CUtil::addslashes(SITE_TEMPLATE_ID)) . "&template_site_template=" . urlencode(CUtil::addslashes($template->GetSiteTemplate())) . "&src_path=" . urlencode(CUtil::addslashes($this->sSrcFile)) . "&src_line=" . $this->iSrcLine . "&src_site=" . urlencode(CUtil::addslashes(SITE_ID)) . "&edit_file=" . urlencode($template->GetPageName()) . "&back_path=" . urlencode($_SERVER["REQUEST_URI"]);
                 $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => $urlCopy, "PARAMS" => array("min_width" => 450))), 'ICON' => "copy-2", 'TITLE' => GetMessage("main_comp_copy_templ"), 'IN_MENU' => true);
             }
             if ($USER->CanDoOperation('edit_php') && strlen($template->GetSiteTemplate()) > 0) {
                 //edit template copied to site template
                 $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/public_file_edit_src.php?site=" . SITE_ID . "&" . 'path=' . urlencode($template->GetFile()) . "&back_url=" . urlencode($_SERVER["REQUEST_URI"]) . "&lang=" . LANGUAGE_ID, 'PARAMS' => array('width' => 770, 'height' => 470, 'resize' => true, "dialog_type" => 'EDITOR'))), 'ICON' => 'edit-2', 'TITLE' => GetMessage("main_comp_edit_templ"), 'IN_MENU' => true);
                 if (strlen($template->GetFolder()) > 0) {
                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . $template->GetFolder() . "/style.css")) {
                         //edit template CSS copied to site template
                         $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/public_file_edit_src.php?site=" . SITE_ID . "&" . 'path=' . urlencode($template->GetFolder() . "/style.css") . "&back_url=" . urlencode($_SERVER["REQUEST_URI"]) . "&lang=" . LANGUAGE_ID, 'PARAMS' => array('width' => 770, 'height' => 470, 'resize' => true, "dialog_type" => 'EDITOR'))), 'ICON' => 'edit-css', 'TITLE' => GetMessage("main_comp_edit_css"), 'IN_MENU' => true);
                     }
                     $bWasSep = false;
                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . $template->GetFolder() . "/result_modifier.php")) {
                         $bWasSep = true;
                         $arIcons[] = array('SEPARATOR' => true);
                         $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/public_file_edit_src.php?site=" . SITE_ID . "&" . 'path=' . urlencode($template->GetFolder() . "/result_modifier.php") . "&back_url=" . urlencode($_SERVER["REQUEST_URI"]) . "&lang=" . LANGUAGE_ID, 'PARAMS' => array('width' => 770, 'height' => 470, 'resize' => true, "dialog_type" => 'EDITOR'))), 'TITLE' => GetMessage("main_comp_edit_res_mod"), 'IN_MENU' => true);
                     }
                     if (file_exists($_SERVER["DOCUMENT_ROOT"] . $template->GetFolder() . "/component_epilog.php")) {
                         if (!$bWasSep) {
                             $arIcons[] = array('SEPARATOR' => true);
                         }
                         $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => "/freetrix/admin/public_file_edit_src.php?site=" . SITE_ID . "&" . 'path=' . urlencode($template->GetFolder() . "/component_epilog.php") . "&back_url=" . urlencode($_SERVER["REQUEST_URI"]) . "&lang=" . LANGUAGE_ID, 'PARAMS' => array('width' => 770, 'height' => 470, 'resize' => true, "dialog_type" => 'EDITOR'))), 'TITLE' => GetMessage("main_comp_edit_epilog"), 'IN_MENU' => true);
                     }
                 }
             } elseif ($urlCopy != '') {
                 //copy template for future editing
                 $urlCopy .= '&system_template=Y';
                 $arIcons[] = array('URL' => 'javascript:' . $APPLICATION->GetPopupLink(array('URL' => $urlCopy, "PARAMS" => array("min_width" => 450))), 'ICON' => "edit-2", 'TITLE' => GetMessage("main_comp_edit_templ"), 'ALT' => GetMessage("main_comp_copy_title"), 'IN_MENU' => true);
             }
         }
     }
     $aAddIcons = array();
     $arPanelParams['COMPONENT'] = $this->componentName;
     if ($arComponentDescription && is_array($arComponentDescription)) {
         $arPanelParams['COMPONENT_DESCRIPTION'] = $arComponentDescription;
         //component bar tooltip
         $arPanelParams['TOOLTIP'] = array('TITLE' => $arComponentDescription["NAME"], 'TEXT' => '(' . GetMessage('main_incl_comp_component') . ' ' . $this->componentName . ')' . (isset($arComponentDescription["DESCRIPTION"]) && $arComponentDescription["DESCRIPTION"] != "" ? '<br />' . $arComponentDescription["DESCRIPTION"] : ''));
         //clear cache
         if (array_key_exists("CACHE_PATH", $arComponentDescription) && $USER->CanDoOperation('cache_control')) {
             if (strlen($arComponentDescription["CACHE_PATH"]) > 0) {
                 $arIcons[] = array("URL" => "javascript:jsComponentUtils.ClearCache('component_name=" . urlencode(CUtil::addslashes($this->componentName)) . "&site_id=" . SITE_ID . "&" . freetrix_sessid_get() . "');", "ICON" => "del-cache", "TITLE" => GetMessage("MAIN_FX_COMPONENT_CACHE_CLEAR"), 'IN_MENU' => true);
                 $APPLICATION->aCachedComponents[] = $this->componentName;
             }
         }
         //additional buttons from component description
         if (array_key_exists("AREA_BUTTONS", $arComponentDescription)) {
             $componentRelativePath = CComponentEngine::MakeComponentPath($this->componentName);
             $localPath = getLocalPath("components" . $componentRelativePath);
             foreach ($arComponentDescription["AREA_BUTTONS"] as $value) {
                 if (array_key_exists("SRC", $value)) {
                     $value["SRC"] = $localPath . $value["SRC"];
                 }
                 $aAddIcons[] = $value;
             }
         }
     }
     if (!empty($arIcons) && !empty($aAddIcons)) {
         $arIcons[] = array("SEPARATOR" => true);
     }
     $arIcons = array_merge($arIcons, $aAddIcons);
     $aAddIcons = $this->component->GetIncludeAreaIcons();
     if (!empty($arIcons) && !empty($aAddIcons)) {
         $arIcons[] = array("SEPARATOR" => true);
     }
     $arIcons = array_merge($arIcons, $aAddIcons);
     // enable/disable menu item
     if ($bComponentAccess && !$this->parentComponent && $this->bSrcFound) {
         if (!empty($arIcons)) {
             $arIcons[] = array("SEPARATOR" => true);
         }
         $arIcons[] = array("URL" => "javascript:jsComponentUtils.EnableComponent('component_name=" . urlencode(CUtil::addslashes($this->componentName)) . "&lang=" . urlencode(CUtil::addslashes(LANGUAGE_ID)) . "&src_path=" . urlencode(CUtil::addslashes($this->sSrcFile)) . "&src_line=" . $this->iSrcLine . "&src_site=" . urlencode(CUtil::addslashes(SITE_ID)) . '&active=' . ($this->bComponentEnabled ? 'N' : 'Y') . '&' . freetrix_sessid_get() . "');", "TITLE" => $this->bComponentEnabled ? GetMessage("main_comp_disable") : GetMessage("main_comp_enable"), "ALT" => $this->bComponentEnabled ? GetMessage("main_comp_disable_title") : GetMessage("main_comp_enable_title"), 'IN_MENU' => true);
     }
     if ($this->bSrcFound) {
         $arPanelParams['COMPONENT_ID'] = md5($arPanelParams['COMPONENT'] . '|' . $this->sSrcFile . ':' . $this->iSrcLine);
     }
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:open_bx,代码行数:101,代码来源:edit_area.php

示例5: GetMessage

                 if (getLocalPath("modules/" . $module . "/install/index.php") === false || getLocalPath("modules/" . $module . "/options.php") === false) {
                     continue;
                 }
                 $info = CModule::CreateModuleObject($module);
                 $name = $info->MODULE_NAME;
                 $sort = $info->MODULE_SORT;
             } else {
                 if (!$USER->CanDoOperation('view_other_settings')) {
                     continue;
                 }
                 $name = GetMessage("MAIN_MENU_MAIN_MODULE");
                 $sort = -1;
             }
             $aModule = array("text" => $name, "url" => "settings.php?lang=" . LANGUAGE_ID . "&amp;mid=" . $module . "&amp;mid_menu=1", "more_url" => array("settings.php?lang=" . LANGUAGE_ID . "&mid=" . $module . "&mid_menu=1"), "title" => GetMessage("MAIN_MENU_MODULE_SETT") . " &quot;" . $name . "&quot;", "sort" => $sort);
             if (BX_SEARCH_ADMIN === true) {
                 $lfile = getLocalPath("modules/" . $module . "/lang/" . LANGUAGE_ID . "/options.php");
                 if ($lfile !== false) {
                     $aModule["keywords"] = implode(' ', __IncludeLang($_SERVER["DOCUMENT_ROOT"] . $lfile, true));
                 }
             }
             $aModuleItems[] = $aModule;
         }
         usort($aModuleItems, create_function('$a, $b', 'if($a["sort"] == $b["sort"]) return strcasecmp($a["text"], $b["text"]); return ($a["sort"] < $b["sort"])? -1 : 1;'));
     }
 }
 $aItems = array();
 $aItems[] = array("text" => GetMessage("MAIN_MENU_SITES"), "title" => GetMessage("MAIN_MENU_SITES_TITLE"), "items_id" => "menu_site", "items" => array(array("text" => GetMessage("MAIN_MENU_SITES_LIST"), "url" => "site_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("site_edit.php"), "title" => GetMessage("MAIN_MENU_SITES_ALT")), array("text" => GetMessage("MAIN_MENU_TEMPLATE"), "title" => GetMessage("MAIN_MENU_TEMPL_TITLE"), "url" => "template_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("template_edit.php", "template_load.php"))));
 $aItems[] = array("text" => GetMessage("main_menu_lang_param"), "title" => GetMessage("main_menu_lang_param_title"), "items_id" => "menu_lang", "items" => array(array("text" => GetMessage("MAIN_MENU_LANG"), "url" => "lang_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("lang_edit.php"), "title" => GetMessage("MAIN_MENU_LANGS_ALT")), array("text" => GetMessage("main_menu_reg_sett"), "url" => "culture_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("culture_edit.php"), "title" => GetMessage("main_menu_reg_sett_title"))));
 $aItems[] = array("text" => GetMessage("MAIN_MENU_EVENT"), "title" => GetMessage("MAIN_MENU_EVENT_TITLE"), "items_id" => "menu_templates", "items" => array(array("text" => GetMessage("MAIN_MENU_TEMPLATES"), "url" => "message_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("message_edit.php"), "title" => GetMessage("MAIN_MENU_TEMPLATES_ALT")), array("text" => GetMessage("MAIN_MENU_EVENT_TYPES"), "title" => GetMessage("MAIN_MENU_EVENT_TYPES_TITLE"), "url" => "type_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("type_edit.php")), array("text" => GetMessage("MAIN_MENU_EVENT_THEMES"), "title" => GetMessage("MAIN_MENU_EVENT_THEMES_TITLE"), "url" => "message_theme_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("message_theme_edit.php"))));
 $aItems[] = array("text" => GetMessage("MAIN_MENU_MODULES"), "url" => "module_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("module_edit.php"), "title" => GetMessage("MAIN_MENU_MODULES_ALT"));
 $aItems[] = array("text" => GetMessage("MAIN_MENU_MODULE_SETTINGS"), "url" => "settings.php?lang=" . LANGUAGE_ID, "title" => GetMessage("MAIN_MENU_SETTINGS_ALT"), "dynamic" => true, "module_id" => "main", "items_id" => "menu_module_settings", "items" => $aModuleItems);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:menu.php

示例6: frontend

 /**
  * Возвращает инстанс frontend'a
  *
  * @param string|false $pathToFrontend Если не указан ищется в текущем шаблоне (или в .default если не найден)
  *                                      Можно указать имя шаблона в котором будет искаться frontend
  *                                      Либо указывается путь до папки frontend
  * @param array $resolverOptions Опции для PathResolver
  * @return \TAO\Frontend
  */
 public static function frontend($pathToFrontend = false, $resolverOptions = array())
 {
     if (!$pathToFrontend) {
         $pathToFrontend = rtrim($_SERVER['DOCUMENT_ROOT'], '/') . self::app()->GetTemplatePath('frontend');
     } elseif (!file_exists($pathToFrontend)) {
         if ($path = getLocalPath("templates/{$pathToFrontend}/frontend")) {
             $pathToFrontend = '.' . $path;
         }
     }
     $resolver = new \Techart\Frontend\PathResolver($pathToFrontend, array_merge(array('twigCachePath' => dirname($pathToFrontend) . '/twig'), $resolverOptions));
     return self::$frontends[$pathToFrontend] ?: (self::$frontends[$pathToFrontend] = new \TAO\Frontend(self::env(), $resolver));
 }
开发者ID:techart,项目名称:bitrix.tao,代码行数:21,代码来源:tao.php

示例7: GetCurTemplate

 public static function GetCurTemplate()
 {
     /** @noinspection PhpUnusedLocalVariableInspection */
     global $DB, $APPLICATION, $USER, $CACHE_MANAGER;
     if (CACHED_b_site_template === false) {
         $strSql = "\n\t\t\t\tSELECT\n\t\t\t\t\t" . CMain::__GetConditionFName() . ",\n\t\t\t\t\tTEMPLATE\n\t\t\t\tFROM\n\t\t\t\t\tb_site_template\n\t\t\t\tWHERE\n\t\t\t\t\tSITE_ID = '" . SITE_ID . "'\n\t\t\t\tORDER BY\n\t\t\t\t\tif(length(" . CMain::__GetConditionFName() . ")>0, 1, 2), SORT\n\t\t\t\t";
         $dbr = $DB->Query($strSql);
         while ($ar = $dbr->Fetch()) {
             $strCondition = trim($ar["CONDITION"]);
             if (strlen($strCondition) > 0 && !@eval("return " . $strCondition . ";")) {
                 continue;
             }
             if (($path = getLocalPath("templates/" . $ar["TEMPLATE"], BX_PERSONAL_ROOT)) !== false && is_dir($_SERVER["DOCUMENT_ROOT"] . $path)) {
                 return $ar["TEMPLATE"];
             }
         }
     } else {
         if ($CACHE_MANAGER->Read(CACHED_b_site_template, "b_site_template")) {
             $arSiteTemplateBySite = $CACHE_MANAGER->Get("b_site_template");
         } else {
             $dbr = $DB->Query("\n\t\t\t\t\tSELECT\n\t\t\t\t\t\t" . CMain::__GetConditionFName() . ",\n\t\t\t\t\t\tTEMPLATE,\n\t\t\t\t\t\tSITE_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tb_site_template\n\t\t\t\t\tORDER BY\n\t\t\t\t\t\tSITE_ID, if(length(" . CMain::__GetConditionFName() . ")>0, 1, 2), SORT\n\t\t\t\t");
             $arSiteTemplateBySite = array();
             while ($ar = $dbr->Fetch()) {
                 $arSiteTemplateBySite[$ar['SITE_ID']][] = $ar;
             }
             $CACHE_MANAGER->Set("b_site_template", $arSiteTemplateBySite);
         }
         if (is_array($arSiteTemplateBySite[SITE_ID])) {
             foreach ($arSiteTemplateBySite[SITE_ID] as $ar) {
                 $strCondition = trim($ar["CONDITION"]);
                 if (strlen($strCondition) > 0 && !@eval("return " . $strCondition . ";")) {
                     continue;
                 }
                 if (($path = getLocalPath("templates/" . $ar["TEMPLATE"], BX_PERSONAL_ROOT)) !== false && is_dir($_SERVER["DOCUMENT_ROOT"] . $path)) {
                     return $ar["TEMPLATE"];
                 }
             }
         }
     }
     return ".default";
 }
开发者ID:rasuldev,项目名称:torino,代码行数:41,代码来源:main.php

示例8: GetMessage

    ?>
</head>
<body id="bx-admin-prefix">
<!--[if lte IE 7]>
<style type="text/css">
#bx-panel {display:none !important;}
.adm-main-wrap { display:none !important; }
</style>
<div id="bx-panel-error">
<?php 
    echo GetMessage("admin_panel_browser");
    ?>
</div><![endif]-->
<?php 
}
if (($adminHeader = getLocalPath("php_interface/admin_header.php", BX_PERSONAL_ROOT)) !== false) {
    include $_SERVER["DOCUMENT_ROOT"] . $adminHeader;
}
?>
	<table class="adm-main-wrap">
		<tr>
			<td class="adm-header-wrap" colspan="2">
<?php 
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/interface/top_panel.php";
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/interface/favorite_menu.php";
?>
			</td>
		</tr>
		<tr>
<?php 
CJSCore::Init(array('admin_interface'));
开发者ID:gitkv,项目名称:bash,代码行数:31,代码来源:prolog_main_admin.php

示例9: str_replace

$sVer = $GLOBALS['USER']->CanDoOperation('view_other_settings') ? " " . SM_VERSION : "";
$sCopyright = str_replace("#VERSION#", $sVer, $sCopyright);
if (isset($bxProductConfig["admin"]["links"])) {
    $sLinks = $bxProductConfig["admin"]["links"];
} else {
    $sLinks = '<a href="' . GetMessage("EPILOG_ADMIN_URL_MAIN_" . $vendor) . '">' . GetMessage("EPILOG_ADMIN_URL_MAIN_TEXT_" . $vendor) . '</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="' . GetMessage("EPILOG_ADMIN_URL_SUPPORT_" . $vendor) . '" class="adm-main-support-link">' . GetMessage("epilog_support_link") . '</a>';
}
?>
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td><?php 
echo $sCopyright;
?>
</td>
					<td align="right"><?php 
if (($siteSupport = getLocalPath("php_interface/this_site_support.php", BX_PERSONAL_ROOT)) !== false) {
    include $_SERVER["DOCUMENT_ROOT"] . $siteSupport;
} else {
    echo $sLinks;
}
?>
</td>
				</tr>
			</table>
<?php 
//End of Footer
?>
			</td>
		</tr>
	</table>
	<div id="fav_cont_item" class="adm-favorites-main" style="display:none;">
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:epilog_main_admin.php

示例10: getLocalPath

        CHTTP::SetStatus(___1901741453(485));
        die;
    }
}
if (!$GLOBALS['____1514955144'][89](___1901741453(486)) || ADMIN_SECTION !== true) {
    if (isset($_REQUEST[___1901741453(487)]) && $_REQUEST[___1901741453(488)] != ___1901741453(489) && $GLOBALS[___1901741453(490)]->{$GLOBALS}['_____967299403'][35](___1901741453(491))) {
        $_1002116244 = CSiteTemplate::$GLOBALS['_____967299403'][36]($_REQUEST[___1901741453(492)]);
        if ($_2011309894 = $_1002116244->{$GLOBALS}['_____967299403'][37]()) {
            $GLOBALS['____1514955144'][90](___1901741453(493), $_2011309894[___1901741453(494)]);
        } else {
            $GLOBALS['____1514955144'][91](___1901741453(495), CSite::GetCurTemplate());
        }
    } else {
        $GLOBALS['____1514955144'][92](___1901741453(496), CSite::GetCurTemplate());
    }
    $GLOBALS['____1514955144'][93](___1901741453(497), getLocalPath(___1901741453(498) . SITE_TEMPLATE_ID, BX_PERSONAL_ROOT));
}
if (isset($_GET[___1901741453(499)])) {
    if ($_GET[___1901741453(500)] == ___1901741453(501) || $_GET[___1901741453(502)] == ___1901741453(503)) {
        $_SESSION[___1901741453(504)] = $_GET[___1901741453(505)];
    }
}
if (isset($_GET[___1901741453(506)])) {
    if ($_GET[___1901741453(507)] == ___1901741453(508) || $_GET[___1901741453(509)] == ___1901741453(510)) {
        $_SESSION[___1901741453(511)] = $_GET[___1901741453(512)];
    }
}
if (isset($_GET[___1901741453(513)]) && $_GET[___1901741453(514)] != ___1901741453(515)) {
    $GLOBALS[___1901741453(516)]->SetShowIncludeAreas($_GET[___1901741453(517)] == ___1901741453(518));
}
if ($GLOBALS[___1901741453(519)]->{$GLOBALS}['_____967299403'][38]()) {
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:include.php

示例11: GetMessage

			OnModuleInstalledEvent($id, 'Y', $Module);
			if($Module->DoInstall() !== false)
			{
				LocalRedirect($APPLICATION->GetCurPage()."?lang=".LANGUAGE_ID."&mod=".$id."&result=OK");
			}
			else
			{
				$errorMessage = GetMessage("MOD_INSTALL_ERROR", Array("#CODE#" => $id));
				if($e = $APPLICATION->GetException())
					$errorMessageFull = $e->GetString();
			}

		}
		elseif(!$Module->IsInstalled() && strlen($_REQUEST["clear"]) > 0)
		{
			if(strlen($Module->MODULE_ID) > 0 && ($mdir = getLocalPath("modules/".$Module->MODULE_ID)) !== false)
			{
				DeleteDirFilesEx($mdir."/");
				LocalRedirect($APPLICATION->GetCurPage()."?lang=".LANGUAGE_ID."&mod=".$id."&result=CLEAROK");
			}
		}
	}
}

$sTableID = "upd_partner_modules_all";
$lAdmin = new CAdminList($sTableID);

$sTableID1 = "upd_partner_modules_new";
$lAdmin1 = new CAdminList($sTableID1);

$lAdmin->BeginPrologContent();
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:partner_modules.php

示例12: initComponent

 /**
  * Function initializes the component. Returns true on success.
  *
  * <p>It is absolutly necessery to call this function before any component usage.</p>
  * @param string $componentName
  * @param string|bool $componentTemplate
  * @return bool
  *
  */
 public final function initComponent($componentName, $componentTemplate = false)
 {
     $this->__bInited = false;
     $componentName = trim($componentName);
     if ($componentName == '') {
         $this->__ShowError("Empty component name");
         return false;
     }
     $path2Comp = CComponentEngine::MakeComponentPath($componentName);
     if ($path2Comp == '') {
         $this->__ShowError(sprintf("'%s' is not a valid component name", $componentName));
         return false;
     }
     $componentPath = getLocalPath("components" . $path2Comp);
     $this->classOfComponent = self::__getClassForPath($componentPath);
     if ($this->classOfComponent === "") {
         $componentFile = $_SERVER["DOCUMENT_ROOT"] . $componentPath . "/component.php";
         if (!file_exists($componentFile) || !is_file($componentFile)) {
             $this->__ShowError(sprintf("'%s' is not a component", $componentName));
             return false;
         }
     }
     if (!isset(self::$__componentCounter[$componentName])) {
         self::$__componentCounter[$componentName] = 1;
     } else {
         self::$__componentCounter[$componentName]++;
     }
     $this->__currentCounter = self::$__componentCounter[$componentName];
     $this->__name = $componentName;
     $this->__relativePath = $path2Comp;
     $this->__path = $componentPath;
     $this->arResult = array();
     $this->arParams = array();
     $this->__parent = null;
     $this->__arIncludeAreaIcons = array();
     $this->__cache = null;
     if ($componentTemplate !== false) {
         $this->__templateName = $componentTemplate;
     }
     $this->__bInited = true;
     return true;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:51,代码来源:component.php

示例13: DirsRecursive

 function DirsRecursive($ID, $path = "", $depth = 0, $maxDepth = 1)
 {
     $arRes = array();
     $depth++;
     $templPath = getLocalPath("templates/" . $ID, BX_PERSONAL_ROOT);
     if ($templPath === false) {
         return $arRes;
     }
     GetDirList($templPath . "/" . $path, $arDirsTmp, $arResTmp);
     foreach ($arResTmp as $file) {
         switch ($file["NAME"]) {
             case "chain_template.php":
                 $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_NAV");
                 break;
             case "":
                 $file["DESCRIPTION"] = "";
                 break;
             default:
                 if (($p = strpos($file["NAME"], ".menu_template.php")) !== false) {
                     $file["DESCRIPTION"] = str_replace("#MENU_TYPE#", substr($file["NAME"], 0, $p), GetMessage("MAIN_TEMPLATE_MENU"));
                 } elseif (($p = strpos($file["NAME"], "authorize_registration.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_AUTH_REG");
                 } elseif (($p = strpos($file["NAME"], "forgot_password.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_SEND_PWD");
                 } elseif (($p = strpos($file["NAME"], "change_password.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_CHN_PWD");
                 } elseif (($p = strpos($file["NAME"], "authorize.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_AUTH");
                 } elseif (($p = strpos($file["NAME"], "registration.php")) !== false) {
                     $file["DESCRIPTION"] = GetMessage("MAIN_TEMPLATE_REG");
                 }
         }
         $arRes[] = $file;
     }
     $nTemplateLen = strlen($templPath . "/");
     foreach ($arDirsTmp as $dir) {
         $arDir = $dir;
         $arDir["DEPTH_LEVEL"] = $depth;
         $arRes[] = $arDir;
         if ($depth < $maxDepth) {
             $dirPath = substr($arDir["ABS_PATH"], $nTemplateLen);
             $arRes = array_merge($arRes, CSiteTemplate::DirsRecursive($ID, $dirPath, $depth, $maxDepth));
         }
     }
     return $arRes;
 }
开发者ID:spas-viktor,项目名称:books,代码行数:46,代码来源:site_template.php

示例14: GetCurTemplate

 public static function GetCurTemplate()
 {
     /** @noinspection PhpUnusedLocalVariableInspection */
     global $APPLICATION, $USER, $CACHE_MANAGER;
     $connection = Main\Application::getConnection();
     $helper = $connection->getSqlHelper();
     $conditionQuoted = $helper->quote("CONDITION");
     $siteTemplate = "";
     if (CACHED_b_site_template === false) {
         $strSql = "\n\t\t\t\tSELECT\n\t\t\t\t\t" . $conditionQuoted . ",\n\t\t\t\t\tTEMPLATE\n\t\t\t\tFROM\n\t\t\t\t\tb_site_template\n\t\t\t\tWHERE\n\t\t\t\t\tSITE_ID='" . SITE_ID . "'\n\t\t\t\tORDER BY\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN " . $helper->getIsNullFunction($helper->getLengthFunction($conditionQuoted), 0) . "=0 THEN 2\n\t\t\t\t\t\tELSE 1\n\t\t\t\t\tEND,\n\t\t\t\t\tSORT\n\t\t\t\t";
         $dbr = $connection->query($strSql);
         while ($ar = $dbr->fetch()) {
             $strCondition = trim($ar["CONDITION"]);
             if (strlen($strCondition) > 0 && !@eval("return " . $strCondition . ";")) {
                 continue;
             }
             if (($path = getLocalPath("templates/" . $ar["TEMPLATE"], BX_PERSONAL_ROOT)) !== false && is_dir($_SERVER["DOCUMENT_ROOT"] . $path)) {
                 $siteTemplate = $ar["TEMPLATE"];
                 break;
             }
         }
     } else {
         if ($CACHE_MANAGER->Read(CACHED_b_site_template, "b_site_template")) {
             $arSiteTemplateBySite = $CACHE_MANAGER->Get("b_site_template");
         } else {
             $dbr = $connection->query("\n\t\t\t\t\tSELECT\n\t\t\t\t\t\t" . $conditionQuoted . ",\n\t\t\t\t\t\tTEMPLATE,\n\t\t\t\t\t\tSITE_ID\n\t\t\t\t\tFROM\n\t\t\t\t\t\tb_site_template\n\t\t\t\t\tORDER BY\n\t\t\t\t\t\tSITE_ID,\n\t\t\t\t\t\tCASE\n\t\t\t\t\t\t\tWHEN " . $helper->getIsNullFunction($helper->getLengthFunction($conditionQuoted), 0) . "=0 THEN 2\n\t\t\t\t\t\t\tELSE 1\n\t\t\t\t\t\tEND,\n\t\t\t\t\t\tSORT\n\t\t\t\t");
             $arSiteTemplateBySite = array();
             while ($ar = $dbr->fetch()) {
                 $arSiteTemplateBySite[$ar['SITE_ID']][] = $ar;
             }
             $CACHE_MANAGER->Set("b_site_template", $arSiteTemplateBySite);
         }
         if (is_array($arSiteTemplateBySite[SITE_ID])) {
             foreach ($arSiteTemplateBySite[SITE_ID] as $ar) {
                 $strCondition = trim($ar["CONDITION"]);
                 if (strlen($strCondition) > 0 && !@eval("return " . $strCondition . ";")) {
                     continue;
                 }
                 if (($path = getLocalPath("templates/" . $ar["TEMPLATE"], BX_PERSONAL_ROOT)) !== false && is_dir($_SERVER["DOCUMENT_ROOT"] . $path)) {
                     $siteTemplate = $ar["TEMPLATE"];
                     break;
                 }
             }
         }
     }
     if ($siteTemplate == "") {
         $siteTemplate = ".default";
     }
     $event = new Main\Event("main", "OnGetCurrentSiteTemplate", array("template" => $siteTemplate));
     $event->send();
     foreach ($event->getResults() as $evenResult) {
         if (($result = $evenResult->getParameters()) != '') {
             //only the first result matters
             $siteTemplate = $result;
             break;
         }
     }
     return $siteTemplate;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:59,代码来源:main.php

示例15: ___1676470017

require_once $_SERVER[___1676470017(346)] . BX_ROOT . ___1676470017(347) . $DBType . ___1676470017(348);
require_once $_SERVER[___1676470017(349)] . BX_ROOT . ___1676470017(350) . $DBType . ___1676470017(351);
require_once $_SERVER[___1676470017(352)] . BX_ROOT . ___1676470017(353);
$GLOBALS['_____769810859'][13](___1676470017(354), ___1676470017(355), array(___1676470017(356), ___1676470017(357)));
require_once $_SERVER[___1676470017(358)] . BX_ROOT . ___1676470017(359) . $DBType . ___1676470017(360);
if ($GLOBALS['____450717392'][70]($_1922162857 = $_SERVER[___1676470017(361)] . BX_ROOT . ___1676470017(362))) {
    $US_HOST_PROCESS_MAIN = False;
    include $_1922162857;
}
if ($GLOBALS['____450717392'][71]($_1922162857 = $_SERVER[___1676470017(363)] . ___1676470017(364))) {
    include_once $_1922162857;
}
if (($_1922162857 = getLocalPath(___1676470017(365), BX_PERSONAL_ROOT)) !== false) {
    include_once $_SERVER[___1676470017(366)] . $_1922162857;
}
if (($_1922162857 = getLocalPath(___1676470017(367) . SITE_ID . ___1676470017(368), BX_PERSONAL_ROOT)) !== false) {
    include_once $_SERVER[___1676470017(369)] . $_1922162857;
}
if (!$GLOBALS['____450717392'][72](___1676470017(370))) {
    $GLOBALS['____450717392'][73](___1676470017(371), round(0 + 105 + 105 + 105 + 105));
}
if (!$GLOBALS['____450717392'][74](___1676470017(372))) {
    $GLOBALS['____450717392'][75](___1676470017(373), round(0 + 98.59999999999999 + 98.59999999999999 + 98.59999999999999 + 98.59999999999999 + 98.59999999999999));
}
$GLOBALS[___1676470017(374)] = $GLOBALS[___1676470017(375)]->{$GLOBALS}['_____769810859'][14]();
if (!($GLOBALS['____450717392'][76](___1676470017(376)) && STATISTIC_ONLY && $GLOBALS['____450717392'][77]($GLOBALS[___1676470017(377)]->{$GLOBALS}['_____769810859'][15](), 1208 / 2 - 604, $GLOBALS['____450717392'][78](BX_ROOT . ___1676470017(378))) != BX_ROOT . ___1676470017(379)) && COption::$GLOBALS['_____769810859'][16](___1676470017(380), ___1676470017(381), ___1676470017(382)) == ___1676470017(383) && $GLOBALS['____450717392'][79](LANG_CHARSET) > 1152 / 2 - 576) {
    $GLOBALS['____450717392'][80](___1676470017(384) . LANG_CHARSET);
}
if (COption::$GLOBALS['_____769810859'][17](___1676470017(385), ___1676470017(386), ___1676470017(387)) == ___1676470017(388)) {
    $GLOBALS['____450717392'][81](___1676470017(389));
}
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:include.php


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