25 switch($this->module_info->page_type)
30 $this->interval = (int)($this->module_info->page_caching_interval);
36 $this->interval = (int)($this->module_info->page_caching_interval);
37 $this->path = $this->module_info->path;
51 $page_type_name = strtolower($this->module_info->page_type);
52 $method =
'_get' . ucfirst($page_type_name) .
'Content';
53 if(method_exists($this, $method)) $page_content = $this->{$method}();
54 else return new BaseObject(-1, sprintf(
'%s method is not exists', $method));
66 if(!file_exists($this->cache_file)) $mtime = 0;
67 else $mtime = filemtime($this->cache_file);
69 if($mtime + $this->interval*60 > $_SERVER[
'REQUEST_TIME'])
72 $page_content = preg_replace(
'@<\!--#Meta:@',
'<!--Meta:', $page_content);
77 $page_content = $oWidgetController->transWidgetCode($this->module_info->content);
84 $page_content = $this->module_info->content;
96 if($this->module_info->document_srl)
104 if ($this->module_info->skin)
106 $templatePath = (sprintf($this->module_path.
'skins/%s', $this->module_info->skin));
110 $templatePath = ($this->module_path.
'skins/default');
113 $page_content = $oTemplate->compile($templatePath,
'content');
115 return $page_content;
123 if(preg_match(
"/^([a-z]+):\/\//i",$this->path)) $content = $this->
getHtmlPage($this->path, $this->interval, $this->cache_file);
124 else $content = $this->
executeFile($this->path, $this->interval, $this->cache_file);
136 if($caching_interval > 0 && file_exists(
$cache_file) && filemtime(
$cache_file) + $caching_interval*60 > $_SERVER[
'REQUEST_TIME'])
148 $content = $oPageController->replaceSrc($content,
$path);
151 $buff =
new stdClass;
152 $buff->content = $content;
154 $content = $buff->content;
156 $title = $oPageController->getTitle($content);
159 $head_script = $oPageController->getHeadScript($content);
162 $body_script = $oPageController->getBodyScript($content);
163 if(!$body_script) $body_script = $content;
178 $filename = $tmp_path[count($tmp_path)-1];
179 $filepath = preg_replace(
'/'.$filename.
"$/i",
"",
$cache_file);
182 $level = ob_get_level();
184 if($caching_interval <1 || !file_exists(
$cache_file) || filemtime(
$cache_file) + $caching_interval*60 <= $_SERVER[
'REQUEST_TIME'] || filemtime(
$cache_file)<filemtime($target_file))
191 $content = ob_get_clean();
193 $this->path = str_replace(
'\\',
'/', realpath(dirname($target_file))) .
'/';
194 $content = preg_replace_callback(
'/(target=|src=|href=|url\()("|\')?([^"\'\)]+)("|\'\))?/is',array($this,
'_replacePath'),$content);
195 $content = preg_replace_callback(
'/(<!--%import\()(\")([^"]+)(\")/is',array($this,
'_replacePath'),$content);
202 $script = $oTemplate->compileDirect($filepath, $filename);
207 $__Context = &
$GLOBALS[
'__Context__'];
208 $__Context->tpl_path = $filepath;
214 while (ob_get_level() - $level > 0) {
215 $contents .= ob_get_contents();
223 $val = trim($matches[3]);
226 if(strpos($val,
'.') === FALSE || preg_match(
'@^((?:http|https|ftp|telnet|mms)://|(?:mailto|javascript):|[/#{])@i',$val))
231 else if(strncasecmp(
'..', $val, 2) === 0)
234 return sprintf(
"%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]);
237 if(strncasecmp(
'..', $val, 2) === 0) $val = substr($val,2);
239 $path = sprintf(
"%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]);
setTemplateFile($filename)
getController($module_name)
executeFile($target_file, $caching_interval, $cache_file)
Create a cache file in order to include if it is an internal file.
if(file_exists(_XE_PATH_. 'config/config.user.inc.php')) if(!defined('__DEBUG__')) if(!defined('__DEBUG_OUTPUT__')) if(!defined('__DEBUG_PROTECT__')) if(!defined('__DEBUG_PROTECT_IP__')) if(!defined('__DEBUG_DB_OUTPUT__')) if(!defined('__LOG_SLOW_QUERY__')) if(!defined('__LOG_SLOW_TRIGGER__')) if(!defined('__LOG_SLOW_ADDON__')) if(!defined('__LOG_SLOW_WIDGET__')) if(!defined('__DEBUG_QUERY__')) if(!defined('__OB_GZHANDLER_ENABLE__')) if(!defined('__ENABLE_PHPUNIT_TEST__')) if(!defined('__PROXY_SERVER__')) if(!defined('__ERROR_LOG__')) if(!defined('__DISABLE_DEFAULT_CSS__')) if(!defined('__AUTO_OPCACHE_INVALIDATE__')) if((__DEBUG_OUTPUT__==2)&&version_compare(PHP_VERSION, '6.0.0')===-1) if(version_compare(PHP_VERSION, '5.3.0') >=0) $GLOBALS['__xe_autoload_file_map']
high class of the module page
set($key, $val, $set_to_get_vars=0)
writeFile($filename, $buff, $mode="w")
setBrowserTitle($site_title)
page view class of the module
getRemoteFile($url, $target_filename, $body=null, $timeout=3, $method= 'GET', $content_type=null, $headers=array(), $cookies=array(), $post_data=array(), $request_config=array())
getHtmlPage($path, $caching_interval, $cache_file)
Save the file and return if a file is requested by http.
convertEncoding($source_obj)
dispPageIndex()
General request output.