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

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

?? template.php

?? hmj采集器 是一個用PHP語言編寫的基于PHP+MySQL網絡文章采集系統。
?? PHP
?? 第 1 頁 / 共 3 頁
字號:
<?php/* * Session Management for PHP3 * * (C) Copyright 1999-2000 NetUSE GmbH *                    Kristian Koehntopp * * $Id: template.inc,v 1.12 2002/07/11 22:29:51 richardarcher Exp $ * *//* * Change log since version 7.2c * * Bug fixes to version 7.2c compiled by Richard Archer <rha@juggernaut.com.au>: * (credits given to first person to post a diff to phplib mailing list) * * Normalised all comments and whitespace (rha) * replaced "$handle" with "$varname" and "$h" with "$v" throughout (from phplib-devel) * added braces around all one-line if statements in: get_undefined, loadfile and halt (rha) * set_var was missing two sets of braces (rha) * added a couple of "return true" statements (rha) * set_unknowns had "keep" as default instead of "remove" (from phplib-devel) * set_file failed to check for empty strings if passed an array of filenames (phplib-devel) * remove @ from call to preg_replace in subst -- report errors if there are any (NickM) * set_block unnecessarily required a newline in the template file (Marc Tardif) * pparse now calls this->finish to replace undefined vars (Layne Weathers) * get_var now checks for unset varnames (NickM & rha) * get_var when passed an array used the array key instead of the value (rha) * get_vars now uses a call to get_var rather than this->varvals to prevent undefined var warning (rha) * in finish, the replacement string referenced an unset variable (rha) * loadfile would try to load a file if the varval had been set to "" (rha) * in get_undefined, only match non-whitespace in variable tags as in finish (Layne Weathers & rha) * more elegant fix to the problem of subst stripping '$n', '\n' and '\\' strings (rha) * * * Changes in functionality which go beyond bug fixes: * * changed debug handling so set, get and internals can be tracked separately (rha) * added debug statements throughout to track most function calls (rha) * debug output contained raw HTML -- is now escaped with htmlentities (rha) * Alter regex in set_block to remove more whitespace around BEGIN/END tags to improve HTML layout (rha) * Add "append" option to set_var, works just like append in parse (dale at linuxwebpro.com, rha) * Altered parse so that append is honored if passed an array (Brian) * Converted comments and documentation to phpdoc style (rha) * Added clear_var to set the value of variables to "" (rha) * Added unset_var to usset variables (rha) * *//** * The template class allows you to keep your HTML code in some external files * which are completely free of PHP code, but contain replacement fields. * The class provides you with functions which can fill in the replacement fields * with arbitrary strings. These strings can become very large, e.g. entire tables. * * Note: If you think that this is like FastTemplates, read carefully. It isn't. * */class Template{ /**  * Serialization helper, the name of this class.  *  * @var       string  * @access    public  */  var $classname = "Template"; /**  * Determines how much debugging output Template will produce.  * This is a bitwise mask of available debug levels:  * 0 = no debugging  * 1 = debug variable assignments  * 2 = debug calls to get variable  * 4 = debug internals (outputs all function calls with parameters).  *  * Note: setting $this->debug = true will enable debugging of variable  * assignments only which is the same behaviour as versions up to release 7.2d.  *  * @var       int  * @access    public  */  var $debug    = false; /**  * The base directory from which template files are loaded.  *  * @var       string  * @access    private  * @see       set_root  */  var $root     = "."; /**  * A hash of strings forming a translation table which translates variable names  * into names of files containing the variable content.  * $file[varname] = "filename";  *  * @var       array  * @access    private  * @see       set_file  */  var $file     = array(); /**  * A hash of strings forming a translation table which translates variable names  * into regular expressions for themselves.  * $varkeys[varname] = "/varname/"  *  * @var       array  * @access    private  * @see       set_var  */  var $varkeys  = array(); /**  * A hash of strings forming a translation table which translates variable names  * into values for their respective varkeys.  * $varvals[varname] = "value"  *  * @var       array  * @access    private  * @see       set_var  */  var $varvals  = array(); /**  * Determines how to output variable tags with no assigned value in templates.  *  * @var       string  * @access    private  * @see       set_unknowns  */  var $unknowns = "remove"; /**  * Determines how Template handles error conditions.  * "yes"      = the error is reported, then execution is halted  * "report"   = the error is reported, then execution continues by returning "false"  * "no"       = errors are silently ignored, and execution resumes reporting "false"  *  * @var       string  * @access    public  * @see       halt  */  var $halt_on_error  = "yes"; /**  * The last error message is retained in this variable.  *  * @var       string  * @access    public  * @see       halt  */  var $last_error     = ""; /******************************************************************************  * Class constructor. May be called with two optional parameters.  * The first parameter sets the template directory the second parameter  * sets the policy regarding handling of unknown variables.  *  * usage: Template([string $root = "."], [string $unknowns = "remove"])  *  * @param     $root        path to template directory  * @param     $string      what to do with undefined variables  * @see       set_root  * @see       set_unknowns  * @access    public  * @return    void  */  function Template($root = ".", $unknowns = "remove") {    if ($this->debug & 4) {      echo "<p><b>Template:</b> root = $root, unknowns = $unknowns</p>\n";    }    $this->set_root($root);    $this->set_unknowns($unknowns);  } /******************************************************************************  * Checks that $root is a valid directory and if so sets this directory as the  * base directory from which templates are loaded by storing the value in  * $this->root. Relative filenames are prepended with the path in $this->root.  *  * Returns true on success, false on error.  *  * usage: set_root(string $root)  *  * @param     $root         string containing new template directory  * @see       root  * @access    public  * @return    boolean  */  function set_root($root) {    if ($this->debug & 4) {      echo "<p><b>set_root:</b> root = $root</p>\n";    }    if (!is_dir($root)) {      $this->halt("set_root: $root is not a directory.");      return false;    }    $this->root = $root;    return true;  } /******************************************************************************  * Sets the policy for dealing with unresolved variable names.  *  * unknowns defines what to do with undefined template variables  * "remove"   = remove undefined variables  * "comment"  = replace undefined variables with comments  * "keep"     = keep undefined variables  *  * Note: "comment" can cause unexpected results when the variable tag is embedded  * inside an HTML tag, for example a tag which is expected to be replaced with a URL.  *  * usage: set_unknowns(string $unknowns)  *  * @param     $unknowns         new value for unknowns  * @see       unknowns  * @access    public  * @return    void  */  function set_unknowns($unknowns = "remove") {    if ($this->debug & 4) {      echo "<p><b>unknowns:</b> unknowns = $unknowns</p>\n";    }    $this->unknowns = $unknowns;  } /******************************************************************************  * Defines a filename for the initial value of a variable.  *  * It may be passed either a varname and a file name as two strings or  * a hash of strings with the key being the varname and the value  * being the file name.  *  * The new mappings are stored in the array $this->file.  * The files are not loaded yet, but only when needed.  *  * Returns true on success, false on error.  *  * usage: set_file(array $filelist = (string $varname => string $filename))  * or  * usage: set_file(string $varname, string $filename)  *  * @param     $varname      either a string containing a varname or a hash of varname/file name pairs.  * @param     $filename     if varname is a string this is the filename otherwise filename is not required  * @access    public  * @return    boolean  */  function set_file($varname, $filename = "") {    if (!is_array($varname)) {      if ($this->debug & 4) {        echo "<p><b>set_file:</b> (with scalar) varname = $varname, filename = $filename</p>\n";      }      if ($filename == "") {        $this->halt("set_file: For varname $varname filename is empty.");        return false;      }      $this->file[$varname] = $this->filename($filename);    } else {      reset($varname);      while(list($v, $f) = each($varname)) {        if ($this->debug & 4) {          echo "<p><b>set_file:</b> (with array) varname = $v, filename = $f</p>\n";        }        if ($f == "") {          $this->halt("set_file: For varname $v filename is empty.");          return false;        }        $this->file[$v] = $this->filename($f);      }    }    return true;  } /******************************************************************************  * A variable $parent may contain a variable block defined by:  * &lt;!-- BEGIN $varname --&gt; content &lt;!-- END $varname --&gt;. This function removes  * that block from $parent and replaces it with a variable reference named $name.  * The block is inserted into the varkeys and varvals hashes. If $name is  * omitted, it is assumed to be the same as $varname.  *  * Blocks may be nested but care must be taken to extract the blocks in order  * from the innermost block to the outermost block.  *  * Returns true on success, false on error.  *  * usage: set_block(string $parent, string $varname, [string $name = ""])  *  * @param     $parent       a string containing the name of the parent variable  * @param     $varname      a string containing the name of the block to be extracted  * @param     $name         the name of the variable in which to store the block  * @access    public  * @return    boolean  */  function set_block($parent, $varname, $name = "") {    if ($this->debug & 4) {      echo "<p><b>set_block:</b> parent = $parent, varname = $varname, name = $name</p>\n";    }    if (!$this->loadfile($parent)) {      $this->halt("set_block: unable to load $parent.");      return false;    }    if ($name == "") {      $name = $varname;    }    $str = $this->get_var($parent);    $reg = "/[ \t]*<!--\s+BEGIN $varname\s+-->\s*?\n?(\s*.*?\n?)\s*<!--\s+END $varname\s+-->\s*?\n?/sm";    preg_match_all($reg, $str, $m);    $str = preg_replace($reg, "{" . "$name}", $str);    $this->set_var($varname, $m[1][0]);    $this->set_var($parent, $str);    return true;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区国产| 懂色av一区二区三区免费看| 欧美亚洲一区二区在线观看| 亚洲视频一区在线观看| 91在线观看成人| 亚洲精品视频在线看| 91在线一区二区三区| 一区二区久久久| 欧美久久婷婷综合色| 热久久久久久久| 欧美一区二区精品| 国产美女一区二区三区| 国产精品热久久久久夜色精品三区 | 激情丁香综合五月| 国产欧美精品国产国产专区 | 日韩欧美精品在线视频| 精品一区二区三区香蕉蜜桃| 久久精品水蜜桃av综合天堂| 成人免费视频一区二区| 自拍偷拍欧美精品| 欧美日韩在线观看一区二区| 久久精品国产一区二区三区免费看| 精品国产一区二区亚洲人成毛片| 国产成人午夜视频| 亚洲欧美日韩国产一区二区三区| 欧美浪妇xxxx高跟鞋交| 国内精品国产成人国产三级粉色 | 91免费精品国自产拍在线不卡| 亚洲精品ww久久久久久p站| 欧美日韩国产电影| 国产成人免费视频网站| 一区二区国产盗摄色噜噜| 91精品国产麻豆国产自产在线| 国产一区二区三区四区五区入口| 亚洲欧洲无码一区二区三区| 欧美日韩三级一区| 国产成人精品aa毛片| 夜夜精品浪潮av一区二区三区| 精品日韩一区二区三区免费视频| 不卡在线观看av| 免费看精品久久片| 亚洲欧美在线观看| 日韩视频在线永久播放| 99久久婷婷国产综合精品电影| 五月天中文字幕一区二区| 国产欧美一区二区精品性色 | www.日韩精品| 另类专区欧美蜜桃臀第一页| 亚洲欧洲综合另类在线| 国产亚洲精品中文字幕| 91精品国产免费久久综合| 色一区在线观看| 国产精品综合视频| 日韩精品久久理论片| 亚洲三级在线播放| 久久久精品天堂| 日韩欧美一区二区在线视频| 在线一区二区三区四区五区| 成人永久aaa| 狠狠色丁香久久婷婷综| 日韩av中文在线观看| 亚洲欧美日韩久久精品| 国产精品久久久久久久午夜片| 精品少妇一区二区三区免费观看| 欧美日韩一卡二卡| av色综合久久天堂av综合| 亚洲柠檬福利资源导航| 日韩精品在线看片z| 7777女厕盗摄久久久| 色综合久久综合中文综合网| 国产麻豆成人精品| 亚洲chinese男男1069| 综合av第一页| 中文一区二区在线观看| 日韩精品在线一区| 欧美日韩一区三区四区| 91原创在线视频| 国产成人无遮挡在线视频| 日产国产高清一区二区三区| 一区二区三区四区在线播放| 国产偷国产偷精品高清尤物| 91成人国产精品| 91啪亚洲精品| 成人午夜又粗又硬又大| 韩国成人福利片在线播放| 日韩av电影免费观看高清完整版| 一区二区三区波多野结衣在线观看| 国产欧美日韩在线看| 欧美www视频| 日韩欧美一二三| 精品国精品国产| 精品国产三级a在线观看| 欧美精品123区| 欧美美女直播网站| 欧亚洲嫩模精品一区三区| 色综合久久久久综合体| 99久久精品免费看国产免费软件| 成人午夜大片免费观看| 激情五月播播久久久精品| 福利电影一区二区| 成人精品国产一区二区4080 | 国产精品白丝jk黑袜喷水| 激情伊人五月天久久综合| 国产很黄免费观看久久| 国产资源精品在线观看| 国产乱淫av一区二区三区| 国产一区激情在线| 久久精品国产一区二区三区免费看| 亚洲一区免费视频| 午夜电影一区二区三区| 免费av网站大全久久| 精品一区二区三区的国产在线播放| 麻豆精品视频在线观看免费| 国产一区二区在线观看视频| 美女诱惑一区二区| 国产老女人精品毛片久久| 国产91精品一区二区麻豆亚洲| 成人高清视频免费观看| 色噜噜狠狠色综合欧洲selulu| 成人小视频在线| 色综合一区二区| 欧美老女人在线| 7878成人国产在线观看| 国产日韩高清在线| 亚洲毛片av在线| 蜜臀av一区二区在线观看| 国产精品羞羞答答xxdd| 色婷婷香蕉在线一区二区| 3atv在线一区二区三区| 精品国一区二区三区| 国产精品女主播av| 午夜影院久久久| 国产乱码精品一区二区三区av| 91蜜桃婷婷狠狠久久综合9色| 欧美日韩精品三区| 久久综合色综合88| 欧美极品xxx| 亚洲精品久久7777| 欧美a级一区二区| 不卡的电视剧免费网站有什么| 欧美性做爰猛烈叫床潮| 国产亚洲综合在线| 亚洲一区二区欧美| 国产精品夜夜嗨| 色婷婷综合久久久久中文一区二区| 久久理论电影网| 亚洲第一主播视频| 国产精品性做久久久久久| 欧美日韩一区二区三区四区五区 | 亚洲三级电影网站| 美女网站一区二区| 一本色道久久综合狠狠躁的推荐| 日韩视频不卡中文| 自拍偷拍国产亚洲| 精品一区在线看| 欧美日韩在线播放三区四区| 国产精品麻豆久久久| 麻豆国产欧美日韩综合精品二区| 色婷婷精品大在线视频| 久久亚洲私人国产精品va媚药| 亚洲国产一区视频| 成人18视频日本| 久久久蜜臀国产一区二区| 亚洲成av人综合在线观看| 成人的网站免费观看| 久久这里都是精品| 六月丁香婷婷久久| 777亚洲妇女| 亚洲天堂福利av| 91丨porny丨蝌蚪视频| 国产亚洲精品精华液| 另类综合日韩欧美亚洲| 欧美美女网站色| 一区二区三区精品视频在线| 成人av动漫在线| 日韩精品一区二区三区蜜臀| 久久99在线观看| 日韩女优视频免费观看| 午夜精品一区在线观看| 欧美日韩在线直播| 亚洲成人激情自拍| 91丨porny丨蝌蚪视频| 一区二区在线看| 色综合久久久久| 伊人开心综合网| 欧美在线观看禁18| 一区二区三区四区国产精品| 色综合久久久久网| 五月婷婷久久综合| 91精品国产综合久久精品| 日韩国产欧美在线视频| 91精品国产福利在线观看| 五月婷婷综合在线| 日韩欧美区一区二| 成人app软件下载大全免费| 国产精品麻豆一区二区| 成人h动漫精品一区二| 国产精品理伦片| 日本丶国产丶欧美色综合| 亚洲一区在线观看免费观看电影高清|