18 $oSecurity->encodeHTML(
'is_keyword',
'search_keyword',
'search_target',
'order_target',
'order_type');
20 $template_path = $oModule->getTemplatePath();
22 if(!is_dir($template_path))
24 if($oModule->module_info->module == $oModule->module)
26 $skin = $oModule->origin_module_info->skin;
30 $skin = $oModule->module_config->skin;
35 if($skin && is_string($skin))
37 $theme_skin = explode(
'|@|', $skin);
38 $template_path = $oModule->getTemplatePath();
39 if(count($theme_skin) == 2)
41 $theme_path = sprintf(
'./themes/%s', $theme_skin[0]);
43 if(substr($theme_path, 0, strlen($theme_path)) != $theme_path)
45 $template_path = sprintf(
'%s/modules/%s/', $theme_path, $theme_skin[1]);
51 $template_path = $oModule->getTemplatePath();
56 $template_path = $oModule->getTemplatePath();
60 $tpl_file = $oModule->getTemplateFile();
61 $output = $oTemplate->compile($template_path, $tpl_file);
80 $layout_path = $oModule->getLayoutPath();
81 $layout_file = $oModule->getLayoutFile();
83 $edited_layout_file = $oModule->getEditedLayoutFile();
95 if($layout_info && $layout_info->type ==
'faceoff')
97 $oLayoutModel->doActivateFaceOff($layout_info);
102 $edited_layout_css = $oLayoutModel->getUserLayoutCss(
$layout_srl);
111 $layout_path =
'./common/tpl';
115 $layout_file =
'default_layout';
117 $output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file);
121 if(substr_compare($realLayoutPath,
'/', -1) !== 0)
123 $realLayoutPath .=
'/';
126 $pathInfo = pathinfo($layout_file);
127 $onlyLayoutFile = $pathInfo[
'filename'];
134 if(stripos($_SERVER[
'HTTP_USER_AGENT'],
'MSIE') !== FALSE && (
Context::get(
'_use_ssl') ==
'optional' ||
Context::get(
'_use_ssl') ==
'always'))
136 Context::addHtmlFooter(
'<iframe id="xeTmpIframe" name="xeTmpIframe" style="width:1px;height:1px;position:absolute;top:-2px;left:-2px;"></iframe>');
161 $output = preg_replace_callback(
'!<style(.*?)>(.*?)<\/style>!is', array($this,
'_moveStyleToHeader'),
$output);
164 $output = preg_replace_callback(
'!<link(.*?)/?>!is', array($this,
'_moveLinkToHeader'),
$output);
167 $output = preg_replace_callback(
'!<meta(.*?)(?:\/|)>!is', array($this,
'_moveMetaToHeader'),
$output);
170 $output = preg_replace_callback(
'/<!--(#)?Meta:([a-z0-9\_\-\/\.\@\:]+)-->/is', array($this,
'_transMeta'),
$output);
176 $real_path = $url[
'path'];
178 $pattern =
'/src=("|\'){1}(?:\.\/)?((?:files\/(?:attach|cache|faceOff|member_extra_info|thumbnails)|addons|common|(?:m\.)?layouts|modules|widgets|widgetstyle)\/[^"\']+)("|\'){1}/s';
179 $output = preg_replace($pattern,
'src=$1' . $real_path .
'$2$3',
$output);
181 $pattern =
'/href=("|\'){1}(\?[^"\']+)/s';
182 $output = preg_replace($pattern,
'href=$1' . $real_path .
'$2',
$output);
186 $pattern =
'/\/' .
Context::get(
'vid') .
'\?([^=]+)=/is';
192 $output = preg_replace(
'/url\((["\']?)none(["\']?)\)/is',
'none',
$output);
197 $keys = array_keys($INPUT_ERROR);
198 $keys =
'(' . implode(
'|', $keys) .
')';
200 $output = preg_replace_callback(
'@(<input)([^>]*?)\sname="' . $keys .
'"([^>]*?)/?>@is', array(&$this,
'_preserveValue'),
$output);
201 $output = preg_replace_callback(
'@<select[^>]*\sname="' . $keys .
'".+</select>@isU', array(&$this,
'_preserveSelectValue'),
$output);
202 $output = preg_replace_callback(
'@<textarea[^>]*\sname="' . $keys .
'".+</textarea>@isU', array(&$this,
'_preserveTextAreaValue'),
$output);
211 $output = preg_replace(
'/member\_\-([0-9]+)/s',
'member_0',
$output);
215 $favicon_url = $oAdminModel->getFaviconUrl(
false);
216 $mobicon_url = $oAdminModel->getMobileIconUrl(
false);
225 $this->_loadMobileJSCSS();
226 $output = $oTemplate->compile(
'./common/tpl',
'mobile_layout');
231 $output = $oTemplate->compile(
'./common/tpl',
'common_layout');
248 $str = $match[1] . $match[2] .
' name="' . $match[3] .
'"' . $match[4];
252 if(preg_match(
'/\stype="([a-z]+)"/i', $str, $m))
254 $type = strtolower($m[1]);
271 case 'datetime-local':
275 $str = preg_replace(
'@\svalue="[^"]*?"@',
' ', $str) .
' value="' . htmlspecialchars($INPUT_ERROR[$match[3]], ENT_COMPAT | ENT_HTML401,
'UTF-8',
false) .
'"';
278 $str = preg_replace(
'@\svalue="[^"]*?"@',
' ', $str);
282 $str = preg_replace(
'@\schecked(="[^"]*?")?@',
' ', $str);
283 if(@preg_match(
'@\s(?i:value)="' . $INPUT_ERROR[$match[3]] .
'"@', $str))
285 $str .=
' checked="checked"';
301 preg_replace(
'@\sselected(="[^"]*?")?@',
' ', $matches[0]);
302 preg_match(
'@<select.*?>@is', $matches[0], $mm);
304 preg_match_all(
'@<option[^>]*\svalue="([^"]*)".+</option>@isU', $matches[0], $m);
306 $key = array_search($INPUT_ERROR[$matches[1]], $m[1]);
312 $m[0][$key] = preg_replace(
'@(\svalue=".*?")@is',
'$1 selected="selected"', $m[0][$key]);
314 return $mm[0] . implode(
'', $m[0]) .
'</select>';
325 preg_match(
'@<textarea.*?>@is', $matches[0], $mm);
326 return $mm[0] . $INPUT_ERROR[$matches[1]] .
'</textarea>';
337 if(isset($matches[1]) && stristr($matches[1],
'scoped'))
392 $oContext->loadFile(array(
'./common/js/jquery-1.x.js',
'head',
'lt IE 9', -1110000),
true);
393 $oContext->loadFile(array(
'./common/js/jquery.js',
'head',
'gte IE 9', -1100000),
true);
394 $oContext->loadFile(array(
'./common/js/modernizr.js',
'head',
'', -1000000),
true);
395 $oContext->loadFile(array(
'./common/js/x.js',
'head',
'', -1000000),
true);
396 $oContext->loadFile(array(
'./common/js/URI.js',
'head',
'', -1000000),
true);
397 $oContext->loadFile(array(
'./common/js/blankshield.min.js',
'head',
'', -1000000),
true);
398 $oContext->loadFile(array(
'./common/js/common.js',
'head',
'', -1000000),
true);
399 $oContext->loadFile(array(
'./common/js/js_app.js',
'head',
'', -1000000),
true);
400 $oContext->loadFile(array(
'./common/js/xml2json.js',
'head',
'', -1000000),
true);
401 $oContext->loadFile(array(
'./common/js/xml_handler.js',
'head',
'', -1000000),
true);
402 $oContext->loadFile(array(
'./common/js/xml_js_filter.js',
'head',
'', -1000000),
true);
403 if(!__DISABLE_DEFAULT_CSS__)
405 $oContext->loadFile(array(
'./common/css/xe.css',
'',
'', -10000000),
true);
409 $oContext->unloadFile(array(
'./common/css/xe.css',
'',
'', -10000000),
true);
414 $oContext->loadFile(array(
'./common/js/jquery-1.x.min.js',
'head',
'lt IE 9', -1110000),
true);
415 $oContext->loadFile(array(
'./common/js/jquery.min.js',
'head',
'gte IE 9', -1100000),
true);
416 $oContext->loadFile(array(
'./common/js/x.min.js',
'head',
'', -1000000),
true);
417 $oContext->loadFile(array(
'./common/js/xe.min.js',
'head',
'', -1000000),
true);
418 if(!__DISABLE_DEFAULT_CSS__)
420 $oContext->loadFile(array(
'./common/css/xe.min.css',
'',
'', -10000000),
true);
424 $oContext->unloadFile(array(
'./common/css/xe.min.css',
'',
'', -10000000),
true);
433 $oContext->loadFile(array(
'./modules/admin/tpl/css/admin.css',
'',
'', 10),
true);
434 $oContext->loadFile(array(
"./modules/admin/tpl/css/admin_{$lang_type}.css",
'',
'', 10),
true);
435 $oContext->loadFile(array(
"./modules/admin/tpl/css/admin.iefix.css",
'',
'ie', 10),
true);
436 $oContext->loadFile(
'./modules/admin/tpl/js/admin.js',
true);
437 $oContext->loadFile(array(
'./modules/admin/tpl/css/admin.bootstrap.css',
'',
'', 1),
true);
438 $oContext->loadFile(array(
'./modules/admin/tpl/js/jquery.tmpl.js',
'',
'', 1),
true);
439 $oContext->loadFile(array(
'./modules/admin/tpl/js/jquery.jstree.js',
'',
'', 1),
true);
443 $oContext->loadFile(array(
'./modules/admin/tpl/css/admin.min.css',
'',
'', 10),
true);
444 $oContext->loadFile(array(
"./modules/admin/tpl/css/admin_{$lang_type}.css",
'',
'', 10),
true);
445 $oContext->loadFile(array(
"./modules/admin/tpl/css/admin.iefix.css",
'',
'ie', 10),
true);
446 $oContext->loadFile(
'./modules/admin/tpl/js/admin.min.js',
true);
447 $oContext->loadFile(array(
'./modules/admin/tpl/css/admin.bootstrap.min.css',
'',
'', 1),
true);
448 $oContext->loadFile(array(
'./modules/admin/tpl/js/jquery.tmpl.js',
'',
'', 1),
true);
449 $oContext->loadFile(array(
'./modules/admin/tpl/js/jquery.jstree.js',
'',
'', 1),
true);
457 private function _loadMobileJSCSS()
465 $oContext->loadFile(array(
'./common/js/jquery.js',
'head',
'', -1100000),
true);
466 $oContext->loadFile(array(
'./common/js/modernizr.js',
'head',
'', -1000000),
true);
467 $oContext->loadFile(array(
'./common/js/x.js',
'head',
'', -1000000),
true);
468 $oContext->loadFile(array(
'./common/js/URI.js',
'head',
'', -1000000),
true);
469 $oContext->loadFile(array(
'./common/js/blankshield.min.js',
'head',
'', -1000000),
true);
470 $oContext->loadFile(array(
'./common/js/common.js',
'head',
'', -1000000),
true);
471 $oContext->loadFile(array(
'./common/js/js_app.js',
'head',
'', -1000000),
true);
472 $oContext->loadFile(array(
'./common/js/xml2json.js',
'head',
'', -1000000),
true);
473 $oContext->loadFile(array(
'./common/js/xml_handler.js',
'head',
'', -1000000),
true);
474 $oContext->loadFile(array(
'./common/js/xml_js_filter.js',
'head',
'', -1000000),
true);
475 if(!__DISABLE_DEFAULT_CSS__)
477 $oContext->loadFile(array(
'./common/css/xe.css',
'',
'', -10000000),
true);
478 $oContext->loadFile(array(
'./common/css/mobile.css',
'',
'', -10000000),
true);
482 $oContext->unloadFile(array(
'./common/css/xe.css',
'',
'', -10000000),
true);
483 $oContext->unloadFile(array(
'./common/css/mobile.css',
'',
'', -10000000),
true);
488 $oContext->loadFile(array(
'./common/js/jquery.min.js',
'head',
'', -1100000),
true);
489 $oContext->loadFile(array(
'./common/js/x.min.js',
'head',
'', -1000000),
true);
490 $oContext->loadFile(array(
'./common/js/xe.min.js',
'head',
'', -1000000),
true);
491 if(!__DISABLE_DEFAULT_CSS__)
493 $oContext->loadFile(array(
'./common/css/xe.min.css',
'',
'', -10000000),
true);
494 $oContext->loadFile(array(
'./common/css/mobile.min.css',
'',
'', -10000000),
true);
498 $oContext->unloadFile(array(
'./common/css/xe.min.css',
'',
'', -10000000),
true);
499 $oContext->unloadFile(array(
'./common/css/mobile.min.css',
'',
'', -10000000),
true);
getController($module_name)
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']
const __XE_VERSION_STABLE__
set($key, $val, $set_to_get_vars=0)
$oContext
Include the necessary configuration files.
getAdminModel($module_name)
_moveMetaToHeader($matches)
_preserveTextAreaValue($matches)
_moveLinkToHeader($matches)
getRequestUri($ssl_mode=FOLLOW_REQUEST_SSL, $domain=null)
_preserveSelectValue($matches)
_moveStyleToHeader($matches)