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


PHP erLhcoreClassDesign::baseurlsite方法代码示例

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


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

示例1: fetch

 /**
  * Open, parse, and return the template file.
  *
  * @param $file string the template file name
  */
 function fetch($fileTemplate = null)
 {
     $instance = erLhcoreClassSystem::instance();
     $port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : 80;
     if (!$fileTemplate) {
         $fileTemplate = $this->file;
     }
     if ($this->cacheEnabled == true && key_exists(md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port), $this->cacheTemplates)) {
         try {
             return $this->fetchExecute($this->cacheTemplates[md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port)]);
         } catch (Exception $e) {
         }
     }
     $cfg = erConfigClassLhConfig::getInstance();
     $file = erLhcoreClassDesign::designtpl($fileTemplate);
     if ($this->templatecompile == true) {
         $contentFile = php_strip_whitespace($file);
         // Compile templates - 3 level of inclusions
         for ($i = 0; $i < 9; $i++) {
             $Matches = array();
             preg_match_all('/<\\?php(\\s*)include_once\\(erLhcoreClassDesign::designtpl\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
             foreach ($Matches[2] as $key => $Match) {
                 $contentFile = str_replace($Matches[0][$key], php_strip_whitespace(erLhcoreClassDesign::designtpl($Match)), $contentFile);
             }
             //Compile templates inclusions first level.
             $Matches = array();
             preg_match_all('/<\\?php(\\s*)include\\(erLhcoreClassDesign::designtpl\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
             foreach ($Matches[2] as $key => $Match) {
                 $contentFile = str_replace($Matches[0][$key], php_strip_whitespace(erLhcoreClassDesign::designtpl($Match)), $contentFile);
             }
         }
         //Compile image css paths. Etc..
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::design\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $Match) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::design($Match), $contentFile);
         }
         //Compile translations, pure translations
         $Matches = array();
         preg_match_all('/<\\?php echo erTranslationClassLhTranslation::getInstance\\(\\)->getTranslation\\(\'(.*?)\',\'(.*?)\'\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $TranslateContent) {
             $contentFile = str_replace($Matches[0][$key], erTranslationClassLhTranslation::getInstance()->getTranslation($TranslateContent, $Matches[2][$key]), $contentFile);
         }
         //Translations used in logical conditions
         $Matches = array();
         preg_match_all('/erTranslationClassLhTranslation::getInstance\\(\\)->getTranslation\\(\'(.*?)\',\'(.*?)\'\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $TranslateContent) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erTranslationClassLhTranslation::getInstance()->getTranslation($TranslateContent, $Matches[2][$key]) . '\'', $contentFile);
         }
         // Compile url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurl\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurl(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url direct addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurldirect\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurldirect(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url direct addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurlsite\\(\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurlsite(), $contentFile);
         }
         // Compile css url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::designCSS\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::designCSS(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile css url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::designJS\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::designJS(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url addresses in logical operations
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::baseurl\\((.*?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::baseurl(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         // Compile url addresses in logical operations
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::baseurldirect\\((.*?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::baseurldirect(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         // Compile config settings, direct output
         $Matches = array();
         preg_match_all('/<\\?php echo erConfigClassLhConfig::getInstance\\(\\)->getSetting\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?),(\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
//.........这里部分代码省略.........
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:101,代码来源:tpl.php

示例2: json_encode

?>
,'nodejshost':<?php 
echo json_encode(erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value != '' ? erLhcoreClassModelChatConfig::fetch('sharing_nodejs_socket_host')->current_value : $_SERVER['HTTP_HOST']);
?>
,'path':'<?php 
echo erLhcoreClassModelChatConfig::fetch('sharing_nodejs_path')->current_value;
?>
','secure':<?php 
if ((int) erLhcoreClassModelChatConfig::fetch('sharing_nodejs_secure')->current_value == 1) {
    ?>
true<?php 
} else {
    ?>
false<?php 
}
?>
},'nodejsenabled':<?php 
echo (int) erLhcoreClassModelChatConfig::fetch('sharing_nodejs_enabled')->current_value;
?>
,'trans':{'operator_watching':<?php 
echo json_encode(htmlspecialchars_decode(erTranslationClassLhTranslation::getInstance()->getTranslation('chat/getstatus', 'Screen shared, click to finish'), ENT_QUOTES));
?>
},'url':'<?php 
echo erLhcoreClassModelChatConfig::fetch('explicit_http_mode')->current_value;
?>
//<?php 
echo $_SERVER['HTTP_HOST'];
echo erLhcoreClassDesign::baseurlsite();
?>
'+lh_inst.lang+'/cobrowse/storenodemap/(sharemode)/'+inst.sharemode+inst.getAppendCookieArguments()+'/?url='+encodeURIComponent(location.href.match(/^(.*\/)[^\/]*$/)[1])});
this.cobrowser.startMirroring();
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:31,代码来源:userinit.tpl.php


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