📄 template.php
字号:
<?php/* BMForum Plus! Bulletin Board Systems Version : Plus! This is a freeware, but don't change the copyright information. A SourceForge Project - GNU Licence project. Web Site: http://www.bmforum.com Copyright (C) Bluview Technology 2005 New Template Engine */$iblock=0;function newtemplate($Handle,$file,$cache=0){global $template,$iblock,$block,$icount; $template[$iblock]=readfromfile($file);
if($cache==0) {
$block[$iblock]=preg_split("/\<\!--\s+BEGIN\s+(.+?)\s+--\>/is",$template[$iblock]);
array_shift($block[$iblock]);
} else {
$block[$iblock]=preg_split("/\<\!--\s+END\s+(.+?)\s+--\>/is",$template[$iblock]);
}
$icount[$iblock]=count($block[$iblock]);
$iblock++;
}
function set_var($tvars,$nones="",$types=TRUE,$keyname=""){
global $template,$icount,$block,$iblock;
for($i=0;$i<$iblock;$i++){
if($types===FALSE){
if(!is_array($tvars)) continue;
for($x=0;$x<$icount[$i];$x++){
foreach ($tvars as $key => $value) {
$block[$i][$x]=str_replace("{".$keyname."[".$key."]}",$value,$block[$i][$x]);
}
}
}else{
for($x=0;$x<$icount[$i];$x++){
foreach ($tvars as $key => $value) {
$block[$i][$x]=str_replace("{".$key."}",$value,$block[$i][$x]);
}
}
}
}
}
function nsubst($Handle="0"){
global $block;
return implode("",$block[$Handle]);
}
function subst($id,$Handle="0"){
global $block;
return $block[$Handle][$id];
}
function psubst($id,$Handle="0"){
global $block;
echo $block[$Handle][$id];
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -