亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? template.class.php

?? 投稿 文章管理 員文章評論回復無限引用簡易留言功能簡易RSS功...
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
		}else{
			$this->_resource_type = $_resource_name[0];
			$file = substr($file, strlen($this->_resource_type) + 1);
			$exists = isset($this->_plugins['resource'][$this->_resource_type]) && call_user_func_array($this->_plugins['resource'][$this->_resource_type][1], array($file, &$resource_timestamp, &$this));

			if (!$exists){
				$this->trigger_error("file '$file' does not exist", E_USER_ERROR);
			}
			$this->_resource_time = $resource_timestamp;
		}
		return $file;
	}

	function display($file, $cache_id = null){
		$this->fetch($file, $cache_id, true);
	}

	function fetch($file, $cache_id = null, $display = false){
		$file = $this->_get_resource($file);

		if ($this->debugging){
			$this->_templatelite_debug_info[] = array('type'	  => 'template',
												'filename'  => $file,
												'depth'	 => 0,
												'exec_time' => array_sum(explode(' ', microtime())) );
			$included_tpls_idx = count($this->_templatelite_debug_info) - 1;
		}

		$this->_cache_id = $cache_id;
		$this->template_dir = $this->_get_dir($this->template_dir);
		$this->compile_dir = $this->_get_dir($this->compile_dir);
		if ($this->cache){
			$this->_cache_dir = $this->_build_dir($this->cache_dir, $this->_cache_id);
		}

		$name = ($this->encode_file_name) ? md5((($this->_resource_type == 1) ? $this->template_dir.$file : $this->_resource_type . "_" . $file)).'.php' : str_replace(".", "_", str_replace("/", "_", $this->_resource_type . "_" . $file)).'.php';

		$this->_error_level = $this->debugging ? error_reporting() : error_reporting(error_reporting() & ~E_NOTICE);
//		$this->_error_level = error_reporting(E_ALL);

		if (!$this->force_compile && $this->cache && $this->_is_cached($file, $cache_id)){
			ob_start();
			include($this->_cache_dir.$name);
			$output = ob_get_contents();
			ob_end_clean();
			$output = substr($output, strpos($output, "\n") + 1);
		}else{
			$output = $this->_fetch_compile($file, $cache_id, true);

			if ($this->cache){
				$f = fopen($this->_cache_dir.$name, "w");
				fwrite($f, serialize($this->_cache_info) . "\n$output");
				fclose($f);
			}
		}

		if (strpos($output, $this->_sl_md5) !== false){
			preg_match_all('!' . $this->_sl_md5 . '{_run_DreamCMS (.*)}' . $this->_sl_md5 . '!U',$output,$_match);
			foreach($_match[1] as $value){
				$arguments = unserialize($value);
				$output = str_replace($this->_sl_md5 . '{_run_DreamCMS ' . $value . '}' . $this->_sl_md5, call_user_func_array('DreamCMS_' . $arguments['module'], array((array)$arguments, $this)), $output);
			}
		}

		foreach ($this->_plugins['outputfilter'] as $function){
			$output = $function($output, $this);
		}

		error_reporting($this->_error_level);

		if ($this->debugging){
			$this->_templatelite_debug_info[$included_tpls_idx]['exec_time'] = array_sum(explode(' ', microtime())) - $this->_templatelite_debug_info[$included_tpls_idx]['exec_time'];
		}
//		2007-11-27 ADD mod_rewrite url BY 枯木
		$this->error && $output = str_replace("<?php error_reporting(0);!defined('DCPATH') && exit('What are you doing?');?>",'',$output);
		if($this->rewrite){
			$output = preg_replace("/\<a(\s*[^\>]+\s*)href\=([\"|\'|\s]?)([^\"\'>\s]+\.php\?[^\"\'>\s]+)\\2/ies","rewrite('\\3','<a\\1href=\\2','\\2')",$output);
			$output = preg_replace("/\<iframe(\s*[^\>]+\s*)src\=([\"|\'|\s]?)([^\"\'>\s]+\.php\?[^\"\'>\s]+)\\2/ies","rewrite('\\3','<iframe\\1src=\\2','\\2')",$output);
		}
		$output = $this->_replace_path($output,$file);
		if ($display){
			echo $output;
			if($this->debugging && !$this->_templatelite_debug_loop){
				$this->debugging = false;
				if(!function_exists("template_generate_debug_output")){
					require_once(TEMPLATE_LITE_DIR . "internal/template.generate_debug_output.php");
				}
				$debug_output = template_generate_debug_output($this);
				$this->debugging = true;
				echo $debug_output;
			}
		}else{
			return $output;
		}
	}
//	12:42 2008-8-10
	function _replace_path($output,$file){
		$template_path=$this->dir.'templates/'.substr($file,0,strrpos($file,'/')).'/';
		$pattern='([^\'|^\"|^\/|^http|^http\s|^ftp|^rt\sp|^mm\s|^#|^\.\.][A-Za-z0-9\.\/=\?%\-&_~`@[\]\':+!]+)';
		//src
		$output = preg_replace("/src=([\"|\'|\s]?){$pattern}\\1/", "src=\"{$template_path}\\2\"", $output);
		//href
		$output = preg_replace("/\<a(\s*[^\>]+\s*)href\=([\"|\'|\s]?){$pattern}\\2/","<a\\1href=\\2{$this->dir}\\3\\2",$output);
		$output = preg_replace("/\<iframe(\s*[^\>]+\s*)src\=([\"|\'|\s]?){$pattern}\\2/","<iframe\\1src=\"{$this->dir}\\3\"",$output);
		
		$output = preg_replace("/href=([\"|\'|\s]?){$pattern}\\1/", "href=\"{$template_path}\\2\"", $output);
		//url()
		$output = preg_replace("/url[\(]([^\/|^http|^http\s|^ftp|^rt\sp|^mm\s|^#|^\'|^\.|\.][A-Za-z0-9\.\/\=\?%\-&_~`@[\]\':+!]+)[\)]/", "url({$template_path}\\1)", $output);
		//background
		$output = preg_replace("/background=([\"|\'|\s]?){$pattern}\\1/", "background=\"{$template_path}\\2\"", $output);
		return $output;
	}
	function _is_cached($file, $cache_id){
		$this->_cache_dir = $this->_get_dir($this->cache_dir, $cache_id);
		$this->template_dir = $this->_get_dir($this->template_dir);

		$file = $this->_get_resource($file);

		$name = ($this->encode_file_name) ? md5((($this->_resource_type == 1) ? $this->template_dir.$file : $this->_resource_type . "_" . $file)).'.php' : str_replace(".", "_", str_replace("/", "_", $this->_resource_type . "_" . $file)).'.php';

		if (file_exists($this->_cache_dir.$name) && (((time() - filemtime($this->_cache_dir.$name)) < $this->cache_lifetime) || $this->cache_lifetime == -1) && (filemtime($this->_cache_dir.$name) > $this->_resource_time)){
			$fh = fopen($this->_cache_dir.$name, "r");
			if (!feof($fh) && ($line = fgets($fh, filesize($this->_cache_dir.$name)))){
				$includes = unserialize($line);
				if (isset($includes['template'])){
					foreach($includes['template'] as $value){
						if (!(file_exists($this->template_dir.$value) && (filemtime($this->_cache_dir.$name) > filemtime($this->template_dir.$value)))){
							return false;
						}
					}
				}
			}
			fclose($fh);
		}else{
			return false;
		}
		return true;
	}

	function _fetch_compile_include($_templatelite_include_file, $_templatelite_include_vars){
		if(!function_exists("template_fetch_compile_include")){
			require_once(TEMPLATE_LITE_DIR . "internal/template.fetch_compile_include.php");
		}
		return template_fetch_compile_include($_templatelite_include_file, $_templatelite_include_vars, $this);
	}

	function _fetch_compile($file, $cacheId = 0, $eval = false){
		$this->template_dir = $this->_get_dir($this->template_dir);

		$name = ($this->encode_file_name) ? md5((($this->_resource_type == 1) ? $this->template_dir.$file : $this->_resource_type . "_" . $file)).'.php' : str_replace(".", "_", str_replace("/", "_", $this->_resource_type . "_" . $file)).'.php';
		$cacheFilename = $this->compile_dir.$this->reserved_template_varname."_".$name;

		if ($this->cache){
			array_push($this->_cache_info['template'], $file);
		}

		if (!$this->force_compile && file_exists($cacheFilename) && (filemtime($cacheFilename) > $this->_resource_time) && (filemtime($cacheFilename) > $this->_version_date)){
			if ($eval) {
				ob_start();
				include($cacheFilename);
				$output = ob_get_contents();
				ob_end_clean();
				error_reporting($this->_error_level);
				return $output;
			}
			return file_get_contents($cacheFilename);
		}

		$file_contents = "";
		if($this->_resource_type == 1){
			$file_contents = file_get_contents($this->template_dir . $file);
		}elseif($this->_resource_type == "file"){
			$file_contents = file_get_contents($file);
		}else{
			call_user_func_array($this->_plugins['resource'][$this->_resource_type][0], array($file, &$file_contents, &$this));
		}

		$this->_file = $file;

		if (!is_object($this->_compile_obj)){
			if (file_exists(TEMPLATE_LITE_DIR . $this->compiler_file)) {
				require_once(TEMPLATE_LITE_DIR . $this->compiler_file);
			} else {
				require_once($this->compiler_file);
			}
			$this->_compile_obj = new $this->compiler_class;
		}
		$this->_compile_obj->left_delimiter = $this->left_delimiter;
		$this->_compile_obj->right_delimiter = $this->right_delimiter;
		$this->_compile_obj->plugins_dir = &$this->plugins_dir;
		$this->_compile_obj->template_dir = &$this->template_dir;
		$this->_compile_obj->compile_dir = $this->compile_dir;
		$this->_compile_obj->encode_file_name = $this->encode_file_name;
		$this->_compile_obj->_vars = &$this->_vars;
		$this->_compile_obj->_confs = &$this->_confs;
		$this->_compile_obj->_plugins = &$this->_plugins;
		$this->_compile_obj->_linenum = &$this->_linenum;
		$this->_compile_obj->_file = &$this->_file;
		$this->_compile_obj->php_extract_vars = &$this->php_extract_vars;
		$this->_compile_obj->reserved_template_varname = &$this->reserved_template_varname;
		$this->_compile_obj->default_modifiers = $this->default_modifiers;

		$output = $this->_compile_obj->_compile_file($file_contents);

		$f = fopen($cacheFilename, "w");
		fwrite($f, $output);
		fclose($f);

		if (!$eval) { return $output; }

		ob_start();
		include($cacheFilename);
		$output = ob_get_contents();
		ob_end_clean();
		error_reporting($this->_error_level);
		return $output;
	}

	function _run_modifier(){
		$arguments = func_get_args();
		list($variable, $modifier, $php_function, $_map_array) = array_splice($arguments, 0, 4);
		array_unshift($arguments, $variable);
		if ($_map_array && is_array($variable)){
			foreach($variable as $key => $value){
				if($php_function == "PHP"){
					$variable[$key] = call_user_func_array($modifier, $arguments);
				}else{
					$variable[$key] = call_user_func_array($this->_plugins["modifier"][$modifier], $arguments);
				}
			}
		}else{
			if($php_function == "PHP"){
				$variable = call_user_func_array($modifier, $arguments);
			}else{
				$variable = call_user_func_array($this->_plugins["modifier"][$modifier], $arguments);
			}
		}
		return $variable;
	}

	function _run_DreamCMS($arguments){
		if ($this->cache){
			return $this->_sl_md5 . '{_run_DreamCMS ' . serialize((array)$arguments) . '}' . $this->_sl_md5;
		}else{
			if (function_exists('DreamCMS_' . $arguments['module'])){
			//	$arguments['module']=="plugins" && $arguments['alias']=$arguments['name'];
				$this->assign(isset($arguments['alias'])?$arguments['alias']:$arguments['module'], call_user_func_array('DreamCMS_' . $arguments['module'], array((array)$arguments, $this)));
			}else{
				$this->trigger_error("function 'DreamCMS_" . $arguments['module'] . "' does not exist in 'DreamCMS'", E_USER_ERROR);
			}
		}
	}

	function _get_dir($dir, $id = null){
		if (empty($dir)){
			$dir = '.';
		}
		if (substr($dir, -1) != DIRECTORY_SEPARATOR){
			$dir .= DIRECTORY_SEPARATOR;
		}
		if (!empty($id)){
			$_args = explode('|', $id);
			if (count($_args) == 1 && empty($_args[0])){
				return $dir;
			}
			foreach($_args as $value){
				$dir .= $value.DIRECTORY_SEPARATOR;
			}
		}
		return $dir;
	}

	function _get_plugin_dir($plugin_name){
		static $_path_array = null;

		$plugin_dir_path = "";
		$_plugin_dir_list = is_array($this->plugins_dir) ? $this->plugins_dir : (array)$this->plugins_dir;
		foreach ($_plugin_dir_list as $_plugin_dir){
			if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)){
				// path is relative
				if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . $_plugin_dir . DIRECTORY_SEPARATOR . $plugin_name)){
					$plugin_dir_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $_plugin_dir . DIRECTORY_SEPARATOR;
					break;
				}
			}else{
				// path is absolute
				if(!isset($_path_array)){
					$_ini_include_path = ini_get('include_path');

					if(strstr($_ini_include_path,';')){
						// windows pathnames
						$_path_array = explode(';',$_ini_include_path);
					}else{
						$_path_array = explode(':',$_ini_include_path);
					}
				}

				if(!in_array($_plugin_dir,$_path_array)){
					array_unshift($_path_array,$_plugin_dir);
				}

				foreach ($_path_array as $_include_path){
					if (file_exists($_include_path . DIRECTORY_SEPARATOR . $plugin_name)){
						$plugin_dir_path = $_include_path . DIRECTORY_SEPARATOR;
						break 2;
					}
				}
			}
		}
		return $plugin_dir_path;
	}

//	function _parse_resource_link($resource_link){
//		$stuffing = "file:/this/is/the/time_5-23.tpl";
//		$stuffing_data = explode(":", $stuffing);
//		preg_match_all('/(?:([0-9a-z._-]+))/i', $stuffing, $stuff);
//		print_r($stuff);
//		echo "<br>Path: " . str_replace($stuff[0][count($stuff[0]) - 1], "", $stuffing);
//		echo "<br>Filename: " . $stuff[0][count($stuff[0]) - 1];
//	}

	function _build_dir($dir, $id){
		if(!function_exists("template_build_dir")){
			require_once(TEMPLATE_LITE_DIR . "internal/template.build_dir.php");
		}
		return template_build_dir($dir, $id, $this);
	}

	function _destroy_dir($file, $id, $dir){
		if(!function_exists("template_destroy_dir")){
			require_once(TEMPLATE_LITE_DIR . "internal/template.destroy_dir.php");
		}
		return template_destroy_dir($file, $id, $dir, $this);
	}

	function trigger_error($error_msg, $error_type = E_USER_ERROR, $file = null, $line = null){
		if(isset($file) && isset($line)){
			$info = ' ('.basename($file).", line $line)";
		}else{
			$info = null;
		}
		trigger_error('TPL: [in ' . $this->_file . ' line ' . $this->_linenum . "]: syntax error: $error_msg$info", $error_type);
	}
}
?>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影在线免费| 欧美日韩国产一级二级| 久久久国产精品麻豆| 国产精品一区二区三区网站| 久久亚洲免费视频| 久久er99精品| 国产午夜精品福利| 99国产精品久| 亚洲一区自拍偷拍| 欧美成人福利视频| 99久久精品国产麻豆演员表| 一区二区三区成人| 欧美一区二区三区小说| 久久国产成人午夜av影院| 国产喂奶挤奶一区二区三区| 99久久婷婷国产综合精品电影| 亚洲欧美一区二区久久 | 韩国欧美国产1区| 国产亚洲人成网站| 欧美人与禽zozo性伦| 国产福利精品一区| 日韩精品国产欧美| 国产精品久久久久影院亚瑟| 69av一区二区三区| 成人在线视频一区二区| 日韩精品免费视频人成| 国产精品激情偷乱一区二区∴| 在线播放中文一区| 成人夜色视频网站在线观看| 首页亚洲欧美制服丝腿| 亚洲理论在线观看| 久久久噜噜噜久久中文字幕色伊伊| 在线一区二区观看| 成人看片黄a免费看在线| 精品亚洲成av人在线观看| 偷拍一区二区三区| 日韩制服丝袜先锋影音| 一区二区三区国产精华| 樱花影视一区二区| 综合久久综合久久| 国产精品国产成人国产三级| 久久久91精品国产一区二区三区| 欧美一区二区三区在线观看视频| 色婷婷亚洲一区二区三区| 99国产精品视频免费观看| 久久99蜜桃精品| 成人免费看黄yyy456| 成人午夜碰碰视频| 久久国产尿小便嘘嘘尿| 国产欧美日韩中文久久| 日韩美女主播在线视频一区二区三区| 天堂蜜桃91精品| 国产欧美日韩另类一区| 欧美年轻男男videosbes| 制服丝袜亚洲色图| 美日韩一级片在线观看| 日韩欧美一级在线播放| 国产一本一道久久香蕉| 天天操天天综合网| 亚洲日本在线看| 日韩欧美国产电影| 成人av在线网| 色婷婷综合久久久中文一区二区| 国产精品一二一区| 美国av一区二区| 最好看的中文字幕久久| 91精品国产综合久久久蜜臀粉嫩| 免费的成人av| 国产精品系列在线观看| 99视频精品免费视频| 欧美日韩精品福利| 欧美xxxxx裸体时装秀| 欧美无乱码久久久免费午夜一区| 日韩1区2区日韩1区2区| 日本不卡一区二区| 国产69精品久久久久777| 欧美日韩国产区一| 久久综合资源网| 麻豆精品视频在线| www.av精品| 欧美成人激情免费网| 亚洲人成网站精品片在线观看| 一区二区三区在线视频播放| 久久电影网电视剧免费观看| 在线观看亚洲精品视频| 久久色.com| 日韩av高清在线观看| 欧洲一区二区av| 亚洲丝袜另类动漫二区| 欧美午夜在线观看| 日本欧美大码aⅴ在线播放| 亚洲v中文字幕| 不卡视频在线观看| 国产精品久99| a美女胸又www黄视频久久| 国产精品久久午夜| 成人免费观看视频| 国产精品国产三级国产aⅴ入口| 亚洲黄色尤物视频| 一区二区三区在线看| 99综合电影在线视频| 中文字幕成人av| 不卡影院免费观看| 亚洲最新在线观看| 制服丝袜亚洲色图| 激情小说欧美图片| 亚洲色图丝袜美腿| 欧美人与z0zoxxxx视频| 国产伦精品一区二区三区视频青涩 | 日韩不卡在线观看日韩不卡视频| 91麻豆免费在线观看| 99精品国产99久久久久久白柏| 国产+成+人+亚洲欧洲自线| 国产亚洲一区字幕| 色婷婷久久一区二区三区麻豆| 日韩精品一级中文字幕精品视频免费观看 | 久久成人免费电影| 国产欧美日韩亚州综合| 在线精品视频一区二区三四| 天堂在线亚洲视频| 日本一区二区综合亚洲| 欧美情侣在线播放| 成人国产精品免费观看视频| 日韩精品成人一区二区三区| 日本一区二区三区久久久久久久久不 | 又紧又大又爽精品一区二区| 精品日韩欧美一区二区| 91浏览器打开| 国产·精品毛片| 国产一区二区三区高清播放| 三级影片在线观看欧美日韩一区二区 | 亚洲精品精品亚洲| 国产欧美精品在线观看| 欧美一级片免费看| 色综合久久久久综合| 成人精品高清在线| 97成人超碰视| 色综合久久99| 麻豆国产91在线播放| 亚洲在线观看免费| 亚洲美女一区二区三区| 中文字幕在线一区| 欧美激情中文字幕一区二区| 亚洲精品一区二区在线观看| 欧美一区二区久久| 日韩欧美视频在线| 日韩美女在线视频| 日韩精品专区在线| 久久综合色天天久久综合图片| 日韩美女天天操| 久久久www成人免费毛片麻豆| 国产视频在线观看一区二区三区| 欧美精品一区二区三区高清aⅴ | 日韩专区欧美专区| 天堂影院一区二区| 九九视频精品免费| 国产精品一区二区三区四区| 国产91精品久久久久久久网曝门 | 欧美亚洲国产bt| 欧美一区二区免费观在线| 日韩一级精品视频在线观看| 精品卡一卡二卡三卡四在线| 精品成人在线观看| 国产精品久久久久婷婷| 亚洲电影在线播放| 高潮精品一区videoshd| 在线视频国内一区二区| 日韩欧美一级精品久久| 中文字幕 久热精品 视频在线| 在线成人免费视频| 久久久777精品电影网影网 | 欧美日韩一区高清| 国产调教视频一区| 午夜精品一区二区三区免费视频| 国产ts人妖一区二区| 91精品久久久久久久99蜜桃| 亚洲图片你懂的| 国产成人亚洲精品狼色在线| 欧美老肥妇做.爰bbww视频| 欧美激情中文字幕| 国产精品中文字幕日韩精品 | 国产亚洲女人久久久久毛片| 午夜精品影院在线观看| 一本一道综合狠狠老| 久久婷婷成人综合色| 蜜桃精品在线观看| 欧美二区在线观看| 亚洲国产精品欧美一二99| 成人小视频在线| 久久久综合激的五月天| 国产精一品亚洲二区在线视频| 欧美一区二区三区在线| 老司机午夜精品| 久久久综合激的五月天| 久久99久久精品| 久久先锋影音av| 粉嫩蜜臀av国产精品网站| 国产精品水嫩水嫩| 成a人片亚洲日本久久| 亚洲人精品午夜|