| @@ -10,7 +10,7 @@ if (!defined('DEDEINC')) exit ('dedebiz'); | |||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| /** | /** | ||||
| * 编辑标签 | |||||
| * adminname解析标签 | |||||
| * | * | ||||
| * @access public | * @access public | ||||
| * @param object $ctag 解析标签 | * @param object $ctag 解析标签 | ||||
| @@ -396,12 +396,10 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele | |||||
| 'weight' => $row['weight'], | 'weight' => $row['weight'], | ||||
| 'arclist' => $liststr | 'arclist' => $liststr | ||||
| ); | ); | ||||
| }//if hasRow | |||||
| else { | |||||
| } else { | |||||
| $artlist .= ''; | $artlist .= ''; | ||||
| } | } | ||||
| //进行判断,如果启用排序则文档输出为重新排序后的文档 | |||||
| //var_dump($isweight=='y' && count($orderWeight) == $line); | |||||
| //进行判断,如果启用排序则文档输出为重新排序后的文档var_dump($isweight=='y' && count($orderWeight) == $line); | |||||
| $isweight = strtolower($isweight); | $isweight = strtolower($isweight); | ||||
| if ($isweight == 'y') { | if ($isweight == 'y') { | ||||
| $artlist = ''; | $artlist = ''; | ||||
| @@ -412,14 +410,14 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele | |||||
| } | } | ||||
| } | } | ||||
| if ($col > 1) $artlist .= "</td>\r\n"; | if ($col > 1) $artlist .= "</td>\r\n"; | ||||
| }//Loop Col | |||||
| } | |||||
| if ($col > 1) $i += $col - 1; | if ($col > 1) $i += $col - 1; | ||||
| if ($col > 1) $artlist .= "</tr>\r\n"; | if ($col > 1) $artlist .= "</tr>\r\n"; | ||||
| }//loop line | |||||
| } | |||||
| if ($col > 1) $artlist .= "</table>\r\n"; | if ($col > 1) $artlist .= "</table>\r\n"; | ||||
| $dsql->FreeResult("al"); | $dsql->FreeResult("al"); | ||||
| $idsstr = join(',', $ids); | $idsstr = join(',', $ids); | ||||
| //保存ID缓存 | |||||
| //保存id缓存 | |||||
| if ($needSaveCache) { | if ($needSaveCache) { | ||||
| if ($idsstr == '') $idsstr = '0'; | if ($idsstr == '') $idsstr = '0'; | ||||
| if ($cfg_cache_type == 'content' && $idsstr != '0') { | if ($cfg_cache_type == 'content' && $idsstr != '0') { | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?php | <?php | ||||
| if (!defined('DEDEINC')) exit ('dedebiz'); | if (!defined('DEDEINC')) exit ('dedebiz'); | ||||
| /** | /** | ||||
| * 自定义模型列表标签 | |||||
| * 自定义文档列表标签 | |||||
| * | * | ||||
| * @version $id:arclistsg.lib.php 9:29 2010年7月6日 tianya $ | * @version $id:arclistsg.lib.php 9:29 2010年7月6日 tianya $ | ||||
| * @package DedeBIZ.Taglib | * @package DedeBIZ.Taglib | ||||
| @@ -207,16 +207,15 @@ function lib_arclistsg(&$ctag, &$refObj) | |||||
| $GLOBALS['autoindex']++; | $GLOBALS['autoindex']++; | ||||
| } | } | ||||
| $artlist .= $dtp2->GetResult()."\r\n"; | $artlist .= $dtp2->GetResult()."\r\n"; | ||||
| } //if hasRow | |||||
| else { | |||||
| } else { | |||||
| $artlist .= ''; | $artlist .= ''; | ||||
| } | } | ||||
| if ($col > 1) $artlist .= "</div>\r\n"; | if ($col > 1) $artlist .= "</div>\r\n"; | ||||
| } //Loop Col | |||||
| } | |||||
| if ($col > 1) $i += $col - 1; | if ($col > 1) $i += $col - 1; | ||||
| } //loop line | |||||
| } | |||||
| $dsql->FreeResult("al"); | $dsql->FreeResult("al"); | ||||
| //保存ID缓存 | |||||
| //保存id缓存 | |||||
| $idsstr = join(',', $ids); | $idsstr = join(',', $ids); | ||||
| if ($idsstr != '' && $needcache && $cfg_index_cache > 0) { | if ($idsstr != '' && $needcache && $cfg_index_cache > 0) { | ||||
| $mintime = time() - ($cfg_index_cache * 3600); | $mintime = time() - ($cfg_index_cache * 3600); | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?php | <?php | ||||
| if (!defined('DEDEINC')) exit ('dedebiz'); | if (!defined('DEDEINC')) exit ('dedebiz'); | ||||
| /** | /** | ||||
| * 按排序位置获取单个栏目链接 | |||||
| * 指定排序栏目信息标签 | |||||
| * | * | ||||
| * @version $id:autochannel.lib.php 9:29 2010年7月6日 tianya $ | * @version $id:autochannel.lib.php 9:29 2010年7月6日 tianya $ | ||||
| * @package DedeBIZ.Taglib | * @package DedeBIZ.Taglib | ||||
| @@ -106,12 +106,12 @@ function lib_channel(&$ctag, &$refObj) | |||||
| } | } | ||||
| if ($col > 1) $likeType .= "</dd>\r\n"; | if ($col > 1) $likeType .= "</dd>\r\n"; | ||||
| $GLOBALS['autoindex']++; | $GLOBALS['autoindex']++; | ||||
| }//Loop Col | |||||
| } | |||||
| if ($col > 1) { | if ($col > 1) { | ||||
| $i += $col - 1; | $i += $col - 1; | ||||
| $likeType .= "</dl>\r\n"; | $likeType .= "</dl>\r\n"; | ||||
| } | } | ||||
| }//Loop for $i | |||||
| } | |||||
| $dsql->FreeResult(); | $dsql->FreeResult(); | ||||
| if ($cacheid != '') { | if ($cacheid != '') { | ||||
| WriteCacheBlock($cacheid, $likeType); | WriteCacheBlock($cacheid, $likeType); | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?php | <?php | ||||
| if (!defined('DEDEINC')) exit ('dedebiz'); | if (!defined('DEDEINC')) exit ('dedebiz'); | ||||
| /** | /** | ||||
| * 当前栏目下级栏目文档列表标签 | |||||
| * 当前栏目列表标签 | |||||
| * | * | ||||
| * @version $id:channelartlist.lib.php 9:29 2010年7月6日 tianya $ | * @version $id:channelartlist.lib.php 9:29 2010年7月6日 tianya $ | ||||
| * @package DedeBIZ.Taglib | * @package DedeBIZ.Taglib | ||||
| @@ -19,7 +19,7 @@ function lib_flinktype(&$ctag, &$refObj) | |||||
| $totalrow = $row; | $totalrow = $row; | ||||
| $revalue = ''; | $revalue = ''; | ||||
| $equery = "SELECT * FROM `#@__flinktype` ORDER BY id ASC LIMIT 0,$totalrow"; | $equery = "SELECT * FROM `#@__flinktype` ORDER BY id ASC LIMIT 0,$totalrow"; | ||||
| if (trim($ctag->GetInnerText()) == '') $innertext = "<li>[field:typename/]</li>"; | |||||
| if (trim($ctag->GetInnerText()) == '') $innertext = "[field:typename/]"; | |||||
| else $innertext = $ctag->GetInnerText(); | else $innertext = $ctag->GetInnerText(); | ||||
| if (!isset($type)) $type = ''; | if (!isset($type)) $type = ''; | ||||
| $dtp = new DedeTagParse(); | $dtp = new DedeTagParse(); | ||||
| @@ -34,7 +34,7 @@ function lib_flinktype(&$ctag, &$refObj) | |||||
| } | } | ||||
| $DedeBIZ = new stdClass; | $DedeBIZ = new stdClass; | ||||
| $DedeBIZ->id = 999; | $DedeBIZ->id = 999; | ||||
| $DedeBIZ->typename = 'Dede链'; | |||||
| $DedeBIZ->typename = 'DedeBIZ'; | |||||
| if ($type == 'DedeBIZ') $row[] = $DedeBIZ; | if ($type == 'DedeBIZ') $row[] = $DedeBIZ; | ||||
| foreach ($row as $key => $value) { | foreach ($row as $key => $value) { | ||||
| if (is_array($dtp->CTags)) { | if (is_array($dtp->CTags)) { | ||||
| @@ -1,4 +1,4 @@ | |||||
| 自定义模型列表标签 | |||||
| 自定义文档列表标签 | |||||
| >>dede>> | >>dede>> | ||||
| {dede:arclistsg typeid='' row='' col='' titlelen='' flag='h' orderway='' keyword='' limit='0,1'} | {dede:arclistsg typeid='' row='' col='' titlelen='' flag='h' orderway='' keyword='' limit='0,1'} | ||||
| <a href='[field:arcurl/]'>[field:title/]</a> | <a href='[field:arcurl/]'>[field:title/]</a> | ||||
| @@ -1,4 +1,4 @@ | |||||
| 按排序位置获取单个栏目链接信息 | |||||
| 指定排序栏目信息标签 | |||||
| >>dede>> | >>dede>> | ||||
| {dede:autochannel partsort='' typeid=''}{/dede:autochannel} | {dede:autochannel partsort='' typeid=''}{/dede:autochannel} | ||||
| >>dede>> | >>dede>> | ||||
| @@ -1,4 +1,4 @@ | |||||
| 当前栏目下级栏目文档列表标签 | |||||
| 当前栏目列表标签 | |||||
| >>dede>> | >>dede>> | ||||
| {dede:channelartlist typeid='' notypeid='' row='6'} | {dede:channelartlist typeid='' notypeid='' row='6'} | ||||
| <ul> | <ul> | ||||
| @@ -1,4 +1,4 @@ | |||||
| 网站搜索热门关键词标签 | |||||
| 热搜标签 | |||||
| >>dede>> | >>dede>> | ||||
| {dede:hotwords/} | {dede:hotwords/} | ||||
| >>dede>> | >>dede>> | ||||
| @@ -1,4 +1,4 @@ | |||||
| 分类信息地区与小分类搜索标签 | |||||
| 分类信息地区搜索标签 | |||||
| >>dede>> | >>dede>> | ||||
| {dede:infoguide/} | {dede:infoguide/} | ||||
| >>dede>> | >>dede>> | ||||
| @@ -1,4 +1,4 @@ | |||||
| 分类信息地区与类型快捷链接标签 | |||||
| 分类信息地区链接标签 | |||||
| >>dede>> | >>dede>> | ||||
| {dede:infolink/} | {dede:infolink/} | ||||
| >>dede>> | >>dede>> | ||||
| @@ -1,4 +1,4 @@ | |||||
| 自定义宏标标签 | |||||
| 自定义宏标记标签 | |||||
| >>dede>> | >>dede>> | ||||
| {dede:mytag typeid='0' name=''/} | {dede:mytag typeid='0' name=''/} | ||||
| >>dede>> | >>dede>> | ||||
| @@ -1,4 +1,4 @@ | |||||
| 指定单个栏目数据标签 | |||||
| 指定栏目信息标签 | |||||
| >>dede>> | >>dede>> | ||||
| {dede:type typeid=''} | {dede:type typeid=''} | ||||
| <a href="[field:typelink/]">[field:typename/]</a> | <a href="[field:typelink/]">[field:typename/]</a> | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?php | <?php | ||||
| if (!defined('DEDEINC')) exit ('dedebiz'); | if (!defined('DEDEINC')) exit ('dedebiz'); | ||||
| /** | /** | ||||
| * 网站搜索热门关键词标签 | |||||
| * 热搜标签 | |||||
| * | * | ||||
| * @version $id:hotwords.lib.php 9:29 2010年7月6日 tianya $ | * @version $id:hotwords.lib.php 9:29 2010年7月6日 tianya $ | ||||
| * @package DedeBIZ.Taglib | * @package DedeBIZ.Taglib | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?php | <?php | ||||
| if (!defined('DEDEINC')) exit ('dedebiz'); | if (!defined('DEDEINC')) exit ('dedebiz'); | ||||
| /** | /** | ||||
| * 分类信息地区与小分类搜索标签 | |||||
| * 分类信息地区搜索标签 | |||||
| * | * | ||||
| * @version $id:infoguide.lib.php 9:29 2010年7月6日 tianya $ | * @version $id:infoguide.lib.php 9:29 2010年7月6日 tianya $ | ||||
| * @package DedeBIZ.Taglib | * @package DedeBIZ.Taglib | ||||
| @@ -12,9 +12,6 @@ if (!defined('DEDEINC')) exit ('dedebiz'); | |||||
| function lib_infoguide(&$ctag, &$refObj) | function lib_infoguide(&$ctag, &$refObj) | ||||
| { | { | ||||
| global $dsql, $nativeplace, $infotype, $hasSetEnumJs, $cfg_mainsite; | global $dsql, $nativeplace, $infotype, $hasSetEnumJs, $cfg_mainsite; | ||||
| //$attlist="row|10,titlelen|30"; | |||||
| //FillAttsDefault($ctag->CAttribute->Items,$attlist); | |||||
| //extract($ctag->CAttribute->Items, EXTR_SKIP); | |||||
| if (empty($refObj->Fields['typeid'])) { | if (empty($refObj->Fields['typeid'])) { | ||||
| $row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE channeltype='-8' And reid = '0' "); | $row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE channeltype='-8' And reid = '0' "); | ||||
| $typeid = (is_array($row) ? $row['id'] : 0); | $typeid = (is_array($row) ? $row['id'] : 0); | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?php | <?php | ||||
| if (!defined('DEDEINC')) exit ('dedebiz'); | if (!defined('DEDEINC')) exit ('dedebiz'); | ||||
| /** | /** | ||||
| * 分类信息地区与类型快捷链接标签 | |||||
| * 分类信息地区链接标签 | |||||
| * | * | ||||
| * @version $id:infolink.lib.php 9:29 2010年7月6日 tianya $ | * @version $id:infolink.lib.php 9:29 2010年7月6日 tianya $ | ||||
| * @package DedeBIZ.Taglib | * @package DedeBIZ.Taglib | ||||
| @@ -47,10 +47,8 @@ function lib_likearticle(&$ctag, &$refObj) | |||||
| $n = 1; | $n = 1; | ||||
| foreach ($keywords as $k) { | foreach ($keywords as $k) { | ||||
| if ($n > 3) break; | if ($n > 3) break; | ||||
| if (trim($k) == '') continue; | if (trim($k) == '') continue; | ||||
| else $k = addslashes($k); | else $k = addslashes($k); | ||||
| $keyword .= ($keyword == '' ? " CONCAT(arc.keywords,' ',arc.title) LIKE '%$k%' " : " OR CONCAT(arc.keywords,' ',arc.title) LIKE '%$k%' "); | $keyword .= ($keyword == '' ? " CONCAT(arc.keywords,' ',arc.title) LIKE '%$k%' " : " OR CONCAT(arc.keywords,' ',arc.title) LIKE '%$k%' "); | ||||
| $n++; | $n++; | ||||
| } | } | ||||
| @@ -65,12 +63,12 @@ function lib_likearticle(&$ctag, &$refObj) | |||||
| if (!empty($typeid)) { | if (!empty($typeid)) { | ||||
| $typeid = " AND arc.typeid IN($typeid) AND arc.id<>$arcid "; | $typeid = " AND arc.typeid IN($typeid) AND arc.id<>$arcid "; | ||||
| } | } | ||||
| $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank>-1 AND ($keyword) $typeid $orderquery limit 0, $row"; | |||||
| $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank>-1 AND ($keyword) $typeid $orderquery limit 0, $row"; | |||||
| } else { | } else { | ||||
| if (!empty($typeid)) { | if (!empty($typeid)) { | ||||
| $typeid = " arc.typeid IN($typeid) AND arc.id<>$arcid "; | $typeid = " arc.typeid IN($typeid) AND arc.id<>$arcid "; | ||||
| } | } | ||||
| $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank>-1 AND $typeid $orderquery limit 0, $row"; | |||||
| $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank>-1 AND $typeid $orderquery limit 0, $row"; | |||||
| } | } | ||||
| $innertext = trim($ctag->GetInnerText()); | $innertext = trim($ctag->GetInnerText()); | ||||
| if ($innertext == '') $innertext = GetSysTemplets('part_arclist.htm'); | if ($innertext == '') $innertext = GetSysTemplets('part_arclist.htm'); | ||||
| @@ -154,18 +152,14 @@ function lib_likearticle(&$ctag, &$refObj) | |||||
| $GLOBALS['autoindex']++; | $GLOBALS['autoindex']++; | ||||
| } | } | ||||
| $artlist .= $dtp2->GetResult()."\r\n"; | $artlist .= $dtp2->GetResult()."\r\n"; | ||||
| } | |||||
| //if hasRow | |||||
| else { | |||||
| } else { | |||||
| $artlist .= ''; | $artlist .= ''; | ||||
| } | } | ||||
| if ($col > 1) $artlist .= "</td>\r\n"; | if ($col > 1) $artlist .= "</td>\r\n"; | ||||
| } | } | ||||
| //Loop Col | |||||
| if ($col > 1) $i += $col - 1; | if ($col > 1) $i += $col - 1; | ||||
| if ($col > 1) $artlist .= "</tr>\r\n"; | if ($col > 1) $artlist .= "</tr>\r\n"; | ||||
| } | } | ||||
| //loop line | |||||
| if ($col > 1) $artlist .= "</table>\r\n"; | if ($col > 1) $artlist .= "</table>\r\n"; | ||||
| $dsql->FreeResult("al"); | $dsql->FreeResult("al"); | ||||
| return $artlist; | return $artlist; | ||||
| @@ -138,20 +138,15 @@ function lib_relation(&$ctag, &$refObj) | |||||
| } | } | ||||
| $GLOBALS['autoindex']++; | $GLOBALS['autoindex']++; | ||||
| } | } | ||||
| $artlist .= $dtp2->GetResult()."\r\n"; | $artlist .= $dtp2->GetResult()."\r\n"; | ||||
| } | |||||
| //if hasRow | |||||
| else { | |||||
| } else { | |||||
| $artlist .= ''; | $artlist .= ''; | ||||
| } | } | ||||
| if ($col > 1) $artlist .= "</td>\r\n"; | if ($col > 1) $artlist .= "</td>\r\n"; | ||||
| } | } | ||||
| //Loop Col | |||||
| if ($col > 1) $i += $col - 1; | if ($col > 1) $i += $col - 1; | ||||
| if ($col > 1) $artlist .= "</tr>\r\n"; | if ($col > 1) $artlist .= "</tr>\r\n"; | ||||
| } | } | ||||
| //loop line | |||||
| if ($col > 1) $artlist .= "</table>\r\n"; | if ($col > 1) $artlist .= "</table>\r\n"; | ||||
| $dsql->FreeResult("al"); | $dsql->FreeResult("al"); | ||||
| return $artlist; | return $artlist; | ||||
| @@ -12,9 +12,6 @@ if (!defined('DEDEINC')) exit ('dedebiz'); | |||||
| function lib_softmsg(&$ctag, &$refObj) | function lib_softmsg(&$ctag, &$refObj) | ||||
| { | { | ||||
| global $dsql; | global $dsql; | ||||
| //$attlist="type|textall,row|30,titlelen|30,linktype|1"; | |||||
| //FillAttsDefault($ctag->CAttribute->Items,$attlist); | |||||
| //extract($ctag->CAttribute->Items, EXTR_SKIP); | |||||
| $revalue = ''; | $revalue = ''; | ||||
| $row = $dsql->GetOne(" SELECT * FROM `#@__softconfig`"); | $row = $dsql->GetOne(" SELECT * FROM `#@__softconfig`"); | ||||
| if (is_array($row)) $revalue = $row['downmsg']; | if (is_array($row)) $revalue = $row['downmsg']; | ||||
| @@ -44,12 +44,12 @@ function lib_sonchannel(&$ctag, &$refObj) | |||||
| } | } | ||||
| if ($col > 1) $likeType .= "</dd>\r\n"; | if ($col > 1) $likeType .= "</dd>\r\n"; | ||||
| $GLOBALS['autoindex']++; | $GLOBALS['autoindex']++; | ||||
| } //Loop Col | |||||
| } | |||||
| if ($col > 1) { | if ($col > 1) { | ||||
| $i += $col - 1; | $i += $col - 1; | ||||
| $likeType .= "</dl>\r\n"; | $likeType .= "</dl>\r\n"; | ||||
| } | } | ||||
| } //Loop for $i | |||||
| } | |||||
| $dsql->FreeResult(); | $dsql->FreeResult(); | ||||
| return $likeType; | return $likeType; | ||||
| } | } | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?php | <?php | ||||
| if (!defined('DEDEINC')) exit ('dedebiz'); | if (!defined('DEDEINC')) exit ('dedebiz'); | ||||
| /** | /** | ||||
| * 指定单个栏目数据标签 | |||||
| * 指定栏目信息标签 | |||||
| * | * | ||||
| * @version $id:type.lib.php 9:29 2010年7月6日 tianya $ | * @version $id:type.lib.php 9:29 2010年7月6日 tianya $ | ||||
| * @package DedeBIZ.Taglib | * @package DedeBIZ.Taglib | ||||
| @@ -33,7 +33,7 @@ function lib_userinfo(&$ctag, &$refObj) | |||||
| $row['face'] = empty($row['face'])? $GLOBALS['cfg_mainsite'].'/static/web/img/admin.png' : $row['face']; | $row['face'] = empty($row['face'])? $GLOBALS['cfg_mainsite'].'/static/web/img/admin.png' : $row['face']; | ||||
| foreach($ctp->CTags as $tagid=>$ctag) | foreach($ctp->CTags as $tagid=>$ctag) | ||||
| { | { | ||||
| if (isset($row[$ctag->GetName()])){ | |||||
| if (isset($row[$ctag->GetName()])) { | |||||
| $ctp->Assign($tagid,$row[$ctag->GetName()]); | $ctp->Assign($tagid,$row[$ctag->GetName()]); | ||||
| } | } | ||||
| } | } | ||||