@@ -60,8 +60,8 @@ function GetOptionList($selid = 0, $userCatalog = 0, $channeltype = 0) | |||||
$sonCats = ''; | $sonCats = ''; | ||||
LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); | LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); | ||||
if ($sonCats != '') { | if ($sonCats != '') { | ||||
if ($row->ispart == 1) $OptionArrayList .= "<option value='".$row->id."' class='opt-bg1'>".$row->typename." - 封面栏目</option>"; | |||||
else if ($row->ispart == 2) $OptionArrayList .= "<option value='".$row->id."' class='opt-bg1'>".$row->typename." - 外部栏目</option>"; | |||||
if ($row->ispart == 1) $OptionArrayList .= "<option value='".$row->id."' class='opt-bg1'>".$row->typename."</option>"; | |||||
else if ($row->ispart == 2) $OptionArrayList .= "<option value='".$row->id."' class='opt-bg1'>".$row->typename."</option>"; | |||||
else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "<option value='".$row->id."' class='opt-bg2'>".$row->typename."-".$channels[$row->channeltype]."</option>"; | else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "<option value='".$row->id."' class='opt-bg2'>".$row->typename."-".$channels[$row->channeltype]."</option>"; | ||||
else $OptionArrayList .= "<option value='".$row->id."' class='opt-bg3'>".$row->typename."</option>"; | else $OptionArrayList .= "<option value='".$row->id."' class='opt-bg3'>".$row->typename."</option>"; | ||||
$OptionArrayList .= $sonCats; | $OptionArrayList .= $sonCats; | ||||
@@ -41,7 +41,7 @@ function IsCommendArchives($iscommend) | |||||
global $arcatts; | global $arcatts; | ||||
$sn = ''; | $sn = ''; | ||||
foreach ($arcatts as $k => $v) { | foreach ($arcatts as $k => $v) { | ||||
$v = cn_substr($v, 2); | |||||
$v = cn_substr($v, 8); | |||||
$sn .= (preg_match("#".$k."#", $iscommend) ? ' '.$v : ''); | $sn .= (preg_match("#".$k."#", $iscommend) ? ' '.$v : ''); | ||||
} | } | ||||
$sn = trim($sn); | $sn = trim($sn); | ||||
@@ -309,8 +309,7 @@ class DedeTemplate | |||||
//模板解析时间 | //模板解析时间 | ||||
//echo ExecTime() - $t1; | //echo ExecTime() - $t1; | ||||
} else { | } else { | ||||
//如果存在config文件,则载入此文件,该文件用于保存 $this->tpCfgs的文档,以供扩展用途 | |||||
//模板中用“{tag:config name=''/}”来设定该值 | |||||
//如果存在config文件,则载入此文件,该文件用于保存 $this->tpCfgs的文档,以供扩展用途,模板中用“{tag:config name=''/}”来设定该值 | |||||
if (file_exists($this->configFile)) { | if (file_exists($this->configFile)) { | ||||
include($this->configFile); | include($this->configFile); | ||||
} | } | ||||
@@ -344,8 +343,7 @@ class DedeTemplate | |||||
return $this->cacheFile; | return $this->cacheFile; | ||||
} | } | ||||
/** | /** | ||||
* 显示文档,由于函数中会重新解压一次$GLOBALS变量,所以在动态页中,应该尽量少用本方法, | |||||
* 取代之是直接在程序中 include $tpl->CacheFile(),不过include $tpl->CacheFile()这种方式不能在类或函数内使用 | |||||
* 显示文档,由于函数中会重新解压一次$GLOBALS变量,所以在动态页中,应该尽量少用本方法,取代之是直接在程序中 include $tpl->CacheFile(),不过include $tpl->CacheFile()这种方式不能在类或函数内使用 | |||||
* | * | ||||
* @access public | * @access public | ||||
* @param string | * @param string | ||||
@@ -378,8 +376,6 @@ class DedeTemplate | |||||
fclose($fp); | fclose($fp); | ||||
} | } | ||||
/** | /** | ||||
* CheckDisabledFunctions | |||||
* | |||||
* COMMENT : CheckDisabledFunctions : 检查是否存在禁止的函数 | * COMMENT : CheckDisabledFunctions : 检查是否存在禁止的函数 | ||||
* | * | ||||
* @access public | * @access public | ||||
@@ -663,8 +659,7 @@ class DedeTemplate | |||||
$tagname = $cTag->tagName; | $tagname = $cTag->tagName; | ||||
$varname = $cTag->GetAtt('name'); | $varname = $cTag->GetAtt('name'); | ||||
$rsvalue = ''; | $rsvalue = ''; | ||||
//用于在模板中设置一个变量以提供作扩展用途 | |||||
//此变量直接提交到 this->tpCfgs 中,并会生成与模板对应的缓存文件 ***_config.php 文件 | |||||
//用于在模板中设置一个变量以提供作扩展用途,此变量直接提交到 this->tpCfgs 中,并会生成与模板对应的缓存文件 ***_config.php 文件 | |||||
if ($tagname == 'config') { | if ($tagname == 'config') { | ||||
$this->tpCfgs[$varname] = $cTag->GetAtt('value'); | $this->tpCfgs[$varname] = $cTag->GetAtt('value'); | ||||
} else if ($tagname == 'global') { | } else if ($tagname == 'global') { | ||||
@@ -31,7 +31,7 @@ if (!function_exists('obtaintags')) { | |||||
$dsql->Execute('tag', $query); | $dsql->Execute('tag', $query); | ||||
while($row = $dsql->GetArray('tag')) { | while($row = $dsql->GetArray('tag')) { | ||||
$link = $cfg_cmspath."/apps/tags.php?/{$row['tid']}"; | $link = $cfg_cmspath."/apps/tags.php?/{$row['tid']}"; | ||||
$tags .= ($tags == '' ? "<a href='{$link}'>{$row['tag']}</a> " : "<a href='{$link}'>{$row['tag']}</a> "); | |||||
$tags .= ($tags == '' ? "<a href='{$link}'>{$row['tag']}</a>" : "、<a href='{$link}'>{$row['tag']}</a>"); | |||||
} | } | ||||
return $tags; | return $tags; | ||||
} | } | ||||
@@ -31,7 +31,7 @@ function lib_arclist(&$ctag, &$refObj) | |||||
} else { | } else { | ||||
$tagid = $ctag->GetAtt('tagid'); | $tagid = $ctag->GetAtt('tagid'); | ||||
} | } | ||||
//arclist是否需要weight排序,默认为"N",如果需要排序则设置为"Y" | |||||
//arclist是否需要weight排序,默认为"N",如果需要排序则设置为"Y" | |||||
$isweight = $ctag->GetAtt('isweight'); | $isweight = $ctag->GetAtt('isweight'); | ||||
if ($tagname == 'imglist' || $tagname == 'imginfolist') { | if ($tagname == 'imglist' || $tagname == 'imginfolist') { | ||||
$listtype = 'image'; | $listtype = 'image'; | ||||
@@ -130,7 +130,7 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele | |||||
$colWidth = ceil(100 / $col); | $colWidth = ceil(100 / $col); | ||||
$tablewidth = $tablewidth."%"; | $tablewidth = $tablewidth."%"; | ||||
$colWidth = $colWidth."%"; | $colWidth = $colWidth."%"; | ||||
//记录属性,以便分页样式统一调用 | |||||
//记录属性,以便分页样式统一调用 | |||||
$attarray = compact('row', 'titlelen', 'infolen', 'imgwidth', 'imgheight', 'listtype', 'arcid', 'channelid', 'orderby', 'orderWay', 'subday', 'pagesize', 'orderby', 'keyword', 'tablewidth', 'col', 'colWidth'); | $attarray = compact('row', 'titlelen', 'infolen', 'imgwidth', 'imgheight', 'listtype', 'arcid', 'channelid', 'orderby', 'orderWay', 'subday', 'pagesize', 'orderby', 'keyword', 'tablewidth', 'col', 'colWidth'); | ||||
if ($innertext == '') $innertext = GetSysTemplets('part_arclist.htm'); | if ($innertext == '') $innertext = GetSysTemplets('part_arclist.htm'); | ||||
if (@$ctag->GetAtt('getall') == 1) $getall = 1; | if (@$ctag->GetAtt('getall') == 1) $getall = 1; | ||||
@@ -140,7 +140,7 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele | |||||
if ($att == '1') $att = 'h'; | if ($att == '1') $att = 'h'; | ||||
$orwheres = array(); | $orwheres = array(); | ||||
$maintable = '#@__archives'; | $maintable = '#@__archives'; | ||||
//按不同情况设定SQL条件 排序方式 | |||||
//按不同情况设定SQL条件排序方式 | |||||
if ($idlist == '') { | if ($idlist == '') { | ||||
if ($orderby == 'near' && $cfg_keyword_like == 'N') { | if ($orderby == 'near' && $cfg_keyword_like == 'N') { | ||||
$keyword = ''; | $keyword = ''; | ||||
@@ -57,7 +57,7 @@ function lib_arclistsg(&$ctag, &$refObj) | |||||
} | } | ||||
$arclistquery = join(',', $listarcs); | $arclistquery = join(',', $listarcs); | ||||
$arclistquery .= ",arc.aid AS id,arc.senddate AS pubdate"; | $arclistquery .= ",arc.aid AS id,arc.senddate AS pubdate"; | ||||
//按不同情况设定SQL条件 排序方式 | |||||
//按不同情况设定SQL条件排序方式 | |||||
if ($idlist == '') { | if ($idlist == '') { | ||||
if ($orderby == 'near' && $cfg_keyword_like == 'N') { | if ($orderby == 'near' && $cfg_keyword_like == 'N') { | ||||
$keyword = ''; | $keyword = ''; | ||||