diff --git a/src/system/archive/archives.class.php b/src/system/archive/archives.class.php index d392b40f..e27a773d 100755 --- a/src/system/archive/archives.class.php +++ b/src/system/archive/archives.class.php @@ -197,9 +197,7 @@ class Archives unset($row); //处理要分页显示的字段 $this->SplitTitles = array(); - if ($this->SplitPageField != '' && $GLOBALS['cfg_arcsptitle'] = 'Y' - && isset($this->Fields[$this->SplitPageField]) - ) { + if ($this->SplitPageField != '' && $GLOBALS['cfg_arcsptitle'] = 'Y' && isset($this->Fields[$this->SplitPageField])) { $this->SplitFields = explode("#p#", $this->Fields[$this->SplitPageField]); $i = 1; foreach ($this->SplitFields as $k => $v) { @@ -357,7 +355,7 @@ class Archives $this->dtp->SaveTo($TRUEfilename); } } - $this->dsql->ExecuteNoneQuery("Update `#@__archives` SET ismake=1 WHERE id='".$this->ArcID."'"); + $this->dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET ismake=1 WHERE id='".$this->ArcID."'"); return $this->GetTrueUrl($filename); } /** @@ -483,7 +481,7 @@ class Archives if ($GLOBALS['cfg_jump_once'] == 'N') { $pageHtml = "\r\n\r\n\r\n".$this->Fields['title']."\r\n"; $pageHtml .= "Fields['redirecturl']."\">\r\n\r\n\r\n"; - $pageHtml .= "现在正在跳转:".$this->Fields['title'].",请稍候

\r\n跳转文档简介:".$this->Fields['description']."\r\n\r\n\r\n"; + $pageHtml .= "正在跳转文档:".$this->Fields['title']."

\r\n文档描述:".$this->Fields['description']."\r\n\r\n\r\n"; echo $pageHtml; } else { header("location:{$this->Fields['redirecturl']}"); @@ -585,8 +583,7 @@ class Archives else if ($ctag->GetName()=='prenextdiy') { $innertext = trim($ctag->GetInnerText()); - if ($innertext) - { + if ($innertext) { $get = $ctag->GetAtt('get'); $diys['diy'] = $this->GetPreNext('diy'); $revalue = ''; @@ -597,8 +594,7 @@ class Archives { foreach($dtp2->CTags as $tid=>$ctag2) { - if (isset($row[$get][$ctag2->GetName()])) - { + if (isset($row[$get][$ctag2->GetName()])) { $dtp2->Assign($tid,$row[$get][$ctag2->GetName()]); } } @@ -656,10 +652,10 @@ class Archives $this->Fields = ''; } /** - * 获取上一篇,下一篇链接 + * 获取上一篇和下一篇链接 * * @access public - * @param string $gtype pre为上一篇 preimg为上一篇图片 next为下一篇 nextimg为下一篇图片 + * @param string $gtype pre为上一篇,preimg为上一篇图片,next为下一篇,nextimg为下一篇图片 * @return string */ function GetPreNext($gtype = '') @@ -734,12 +730,9 @@ class Archives } } //二次开发上一篇下一篇 - if ($gtype=='diy') - { + if ($gtype=='diy') { return $this->PreNext['diy']; - } - if ($gtype=='pre') - { + } if ($gtype=='pre') { $rs = $this->PreNext['pre']; } else if ($gtype == 'preimg') { $rs = $this->PreNext['preimg']; @@ -997,7 +990,8 @@ class Archives return $body; } }//End Archives -function _highlightkeywords($matches){ +function _highlightkeywords($matches) +{ return _highlight($matches[2], $GLOBALS['_dd_karr'], $GLOBALS['_dd_kaarr'], $matches[1]); } //高亮专用,替换多次是可能不能达到最多次 diff --git a/src/system/archive/freelist.class.php b/src/system/archive/freelist.class.php index fa3439a0..b71322de 100755 --- a/src/system/archive/freelist.class.php +++ b/src/system/archive/freelist.class.php @@ -50,16 +50,6 @@ class FreeList $this->pagesize = 30; } $channelid = $this->ListObj->GetAtt('channel'); - /* - if (empty($channelid)) - { - showmsg('必须指定栏目','-1');exit(); - } else { - $channelid = intval($channelid); - $channelinfo = $this->dsql->getone("select maintable from #@__channeltype WHERE id='$channelid'"); - $this->maintable = $channelinfo['maintable']; - } - */ $channelid = intval($channelid); $this->maintable = '#@__archives'; //全局模板解析器 diff --git a/src/system/archive/listview.class.php b/src/system/archive/listview.class.php index c70c6506..8ac61013 100755 --- a/src/system/archive/listview.class.php +++ b/src/system/archive/listview.class.php @@ -254,7 +254,7 @@ class ListView } //创建封面模板文件 if ($this->TypeLink->TypeInfos['isdefault'] == -1) { - echo '这个栏目是动态栏目'; + echo '这个是动态栏目'; return '../apps/list.php?tid='.$this->TypeLink->TypeInfos['id']; } //单独页面 @@ -650,11 +650,11 @@ class ListView $addField = ''; $addJoin = ''; } - //如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢) + //如果不用默认的sortrank或id排序,使用联合查询数据量大时非常缓慢 if (preg_match('/hot|click|lastpost/', $orderby)) { $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath $addField FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id $addJoin WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row"; } - //普通情况先从arctiny表查出ID,然后按ID查询(速度非常快) + //普通情况先从arctiny表查出id,然后按di查询速度非常快 else { $t1 = ExecTime(); $ids = array(); @@ -671,12 +671,10 @@ class ListView $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 $addField FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id $addJoin WHERE arc.id in($idstr) $ordersql "; } $t2 = ExecTime(); - //echo $t2-$t1; } $this->dsql->SetQuery($query); $this->dsql->Execute('al'); $t2 = ExecTime(); - //echo $t2-$t1; $artlist = ''; $this->dtp2->LoadSource($innertext); $GLOBALS['autoindex'] = 0; @@ -775,7 +773,6 @@ class ListView } }//Loop Line $t3 = ExecTime(); - //echo ($t3-$t2); $this->dsql->FreeResult('al'); return $artlist; } diff --git a/src/system/archive/searchview.class.php b/src/system/archive/searchview.class.php index ed027c3d..3c70d804 100755 --- a/src/system/archive/searchview.class.php +++ b/src/system/archive/searchview.class.php @@ -169,7 +169,6 @@ class SearchView } $keywords = preg_replace("/[ ]{1,}/", " ", $keywords); $client->Close(); - //var_dump($keywords);exit; } else { $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); $sp->SetSource($keyword, $cfg_soft_lang, $cfg_soft_lang); @@ -186,7 +185,6 @@ class SearchView $keywords .= ' '.$key; } $keywords = preg_replace("/[ ]{1,}/", " ", $keywords); - //var_dump($keywords);exit(); unset($sp); } } else { @@ -296,7 +294,6 @@ class SearchView */ function GetRedKeyWord($fstr) { - //echo $fstr; $ks = explode(' ', $this->Keywords); foreach ($ks as $k) { $k = trim($k); @@ -308,8 +305,7 @@ class SearchView } //这里不区分大小写进行关键词替换 $fstr = str_ireplace($k, "$k", $fstr); - //速度更快,效率更高 - //$fstr = str_replace($k, "$k", $fstr); + //速度更快,效率更高$fstr = str_replace($k, "$k", $fstr); } return $fstr; } diff --git a/src/system/archive/sglistview.class.php b/src/system/archive/sglistview.class.php index c399be08..bd338ac9 100755 --- a/src/system/archive/sglistview.class.php +++ b/src/system/archive/sglistview.class.php @@ -213,7 +213,7 @@ class SgListView } //创建封面模板文件 if ($this->TypeLink->TypeInfos['isdefault'] == -1) { - echo '这个栏目是动态栏目'; + echo '这个是动态栏目'; return ''; } //单独页面 @@ -537,11 +537,11 @@ class SgListView $ordersql = " ORDER BY arc.aid $orderWay"; } $addField = 'arc.'.join(',arc.', $this->ListFields); - //如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢) + //如果不用默认的sortrank或id排序,使用联合查询数据量大时非常缓慢 if (preg_match('/hot|click/', $orderby) || $this->sAddTable) { $query = "SELECT tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,arc.aid,arc.aid AS id,arc.typeid,$addField FROM `{$this->AddTable}` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE {$this->addSql} $ordersql LIMIT $limitstart,$row"; } - //普通情况先从arctiny表查出ID,然后按ID查询(速度非常快) + //普通情况先从arctiny表查出id,然后按id查询速度非常快 else { $t1 = ExecTime(); $ids = array(); @@ -559,12 +559,10 @@ class SgListView $query = "SELECT tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,arc.aid,arc.aid AS id,arc.typeid,$addField FROM `{$this->AddTable}` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.aid IN($idstr) AND arc.arcrank >-1 $ordersql"; } $t2 = ExecTime(); - //echo $t2-$t1; } $this->dsql->SetQuery($query); $this->dsql->Execute('al'); $t2 = ExecTime(); - //echo $t2-$t1; $artlist = ''; $this->dtp2->LoadSource($innertext); $GLOBALS['autoindex'] = 0; @@ -649,14 +647,13 @@ class SgListView } $artlist .= $this->dtp2->GetResult(); } //if hasRow - } //Loop Col + }//Loop Col if ($col > 1) { $i += $col - 1; $artlist .= "\r\n"; } - } //Loop Line + }//Loop Line $t3 = ExecTime(); - //echo ($t3-$t2); $this->dsql->FreeResult('al'); return $artlist; } @@ -704,21 +701,6 @@ class SgListView } //option链接 $optionlist = ""; - /* - $optionlen = strlen($totalpage); - $optionlen = $optionlen*10+18; - $optionlist = "
  • "; - */ //获得数字链接 $listdd = ""; $total_list = $list_len * 2 + 1; diff --git a/src/system/archive/specview.class.php b/src/system/archive/specview.class.php index 3c0b3fbb..9e75b3fd 100755 --- a/src/system/archive/specview.class.php +++ b/src/system/archive/specview.class.php @@ -399,18 +399,18 @@ class SpecView } } $artlist .= $this->dtp2->GetResult(); - } //if hasRow + }//if hasRow else { $artlist .= ""; } if ($col > 1) { $artlist .= "\r\n"; } - } //Loop Col + }//Loop Col if ($col > 1) { $artlist .= "\r\n"; } - } //Loop Line + }//Loop Line if ($col > 1) { $artlist .= "\r\n"; } diff --git a/src/system/archive/taglist.class.php b/src/system/archive/taglist.class.php index 4b4d998b..de21c1e3 100755 --- a/src/system/archive/taglist.class.php +++ b/src/system/archive/taglist.class.php @@ -61,7 +61,7 @@ class TagList if (!empty($this->Tag)) { $this->TagInfos = $this->dsql->GetOne("SELECT * FROM `#@__tagindex` where id = '{$this->Tag}' "); if (!is_array($this->TagInfos)) { - $msg = "系统无此标签,可能已经移除"; + $msg = "系统无此标签,已经移除标签"; ShowMsg($msg, "-1"); exit(); } @@ -165,7 +165,6 @@ class TagList $this->ParseDMFields($this->PageNo, 0); } $this->dtp->Display(); - //$this->Close(); } /** * 解析模板,对固定的标记进行初始给值 @@ -223,7 +222,6 @@ class TagList if ($list_len == "") { $list_len = 3; } - //var_dump($ismake); if ($ismake == 0) { $this->dtp->Assign($tagid, $this->GetPageListDM($list_len, $listitem)); } else { @@ -380,13 +378,13 @@ class TagList } } $artlist .= $this->dtp2->GetResult(); - } //if hasRow - } //Loop Col + }//if hasRow + }//Loop Col if ($col > 1) { $i += $col - 1; $artlist .= "\r\n"; } - } //Loop Line + }//Loop Line $this->dsql->FreeResult('al'); return $artlist; } @@ -452,7 +450,7 @@ class TagList $listdd .= "
  • ".$j."
  • \r\n"; } } - $plist = ''; + $plist = ''; if (preg_match('/info/i', $listitem)) { $plist .= $maininfo.' '; }