diff --git a/src/system/archive/listview.class.php b/src/system/archive/listview.class.php index 67899f1d..22f88137 100755 --- a/src/system/archive/listview.class.php +++ b/src/system/archive/listview.class.php @@ -145,33 +145,6 @@ class ListView { global $cfg_list_son, $cfg_need_typeid2, $cfg_cross_sectypeid; if (empty($cfg_need_typeid2)) $cfg_need_typeid2 = 'N'; - $filtersql = ''; - //获得附加表的相关信息,联动单筛选 - $addtable = $this->ChannelUnit->ChannelInfos['addtable']; - if ($addtable!="") { - $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid '; - $addField = ''; - $fields = explode(',',$this->ChannelUnit->ChannelInfos['listfields']); - foreach($fields as $k=>$v) - { - $nfields[$v] = $k; - } - if (is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields)) { - foreach($this->ChannelUnit->ChannelFields as $k=>$arr) - { - if (isset($nfields[$k])) { - if (!empty($arr['rename'])) { - $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename']; - } else { - $addField .= ','.$addtable.'.'.$k; - } - } - } - } - } else { - $addField = ''; - $addJoin = ''; - } //统计数据库记录 $this->TotalResult = -1; if (isset($GLOBALS['TotalResult'])) $this->TotalResult = $GLOBALS['TotalResult']; @@ -219,8 +192,7 @@ class ListView } } if ($this->TotalResult==-1) { - //添加联动单筛选 - $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc $addJoin WHERE ".$this->addSql; + $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc WHERE ".$this->addSql; $row = $this->dsql->GetOne($cquery); if (is_array($row)) { $this->TotalResult = $row['dd']; @@ -873,7 +845,7 @@ class ListView if (preg_match('/senddate|pubdate|senddate|hot|click|weight|lastpost|rand/', $orderby)) { $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,mb.uname,mb.face,mb.userid $addField FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id LEFT JOIN `#@__member` mb ON arc.mid=mb.mid $addJoin WHERE {$this->addSql} $ordersql LIMIT $limitstart,$row"; } - //普通情况先从arctiny表查出id,然后按di查询速度非常快 + //普通情况先从arctiny表查出id,然后按id查询速度非常快 else { $t1 = ExecTime(); $ids = array(); diff --git a/src/system/archive/sglistview.class.php b/src/system/archive/sglistview.class.php index c3d4468e..d91a112c 100755 --- a/src/system/archive/sglistview.class.php +++ b/src/system/archive/sglistview.class.php @@ -9,7 +9,7 @@ if (!defined('DEDEINC')) exit('dedebiz'); * @license GNU GPL v2 (https://www.dedebiz.com/license) * @link https://www.dedebiz.com */ -require_once(DEDEINC."/archive/partview.class.php"); +require_once(DEDEINC.'/archive/partview.class.php'); @set_time_limit(0); class SgListView { @@ -218,12 +218,12 @@ class SgListView $ctag = $this->dtp->GetTag("list"); } if (!is_object($ctag)) { - $this->pagesize = 20; + $this->pagesize = 30; } else { if ($ctag->GetAtt('pagesize') != '') { $this->pagesize = $ctag->GetAtt('pagesize'); } else { - $this->pagesize = 20; + $this->pagesize = 30; } } } else { @@ -383,7 +383,7 @@ class SgListView } $addField = 'arc.'.join(',arc.', $this->ListFields); //如果不用默认的sortrank或id排序,使用联合查询数据量大时非常缓慢 - if (preg_match('/hot|click/', $orderby) || $this->sAddTable) { + if (preg_match('/senddate|pubdate|senddate|hot|click|weight|lastpost|rand/', $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,mb.uname,mb.face,$addField FROM `{$this->AddTable}` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id LEFT JOIN `#@__member` mb on arc.mid = mb.mid WHERE {$this->addSql} $ordersql LIMIT $limitstart,$row"; } //普通情况先从arctiny表查出id,然后按id查询速度非常快 @@ -740,7 +740,7 @@ class SgListView } $addField = 'arc.'.join(',arc.', $this->ListFields); //如果不用默认的sortrank或id排序,使用联合查询数据量大时非常缓慢 - if (preg_match('/hot|click/', $orderby) || $this->sAddTable) { + if (preg_match('/senddate|pubdate|senddate|hot|click|weight|lastpost|rand/', $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,mb.uname,mb.face,mb.userid,$addField FROM `{$this->AddTable}` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id LEFT JOIN `#@__member` mb on arc.mid = mb.mid WHERE {$this->addSql} $ordersql LIMIT $limitstart,$row"; } //普通情况先从arctiny表查出id,然后按id查询速度非常快 @@ -972,25 +972,21 @@ class SgListView $nowurls = explode("?", $nowurls); $purl = $nowurls[0]; } - $geturl = "&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&keyword=".urlencode($keyword)."&"; - $hidenform = ""; - $hidenform = ""; - $hidenform = ""; - $hidenform = ""; - $hidenform .= ""; - $purl .= "?tid=".$this->TypeID."&"; + $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; + $purl .= '?'.$geturl; + $optionlist = ''; //获得上页和下页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上页
  • "; - $indexpage = "
  • 首页
  • "; + $prepage .= "
  • 上页
  • "; + $indexpage = "
  • 首页
  • "; } else { - $indexpage = "
  • 首页
  • "; + $indexpage = "
  • 首页
  • "; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下页
  • "; - $endpage = "
  • 末页
  • "; + $nextpage .= "
  • 下页
  • "; + $endpage = "
  • 末页
  • "; } else { - $endpage = "
  • 末页
  • "; + $endpage = "
  • 末页
  • "; } //获得数字链接 $listdd = ''; @@ -1011,7 +1007,7 @@ class SgListView if ($j == $this->PageNo) { $listdd .= "
  • $j
  • "; } else { - $listdd .= "
  • $j
  • "; + $listdd .= "
  • $j
  • "; } } $plist = ''; @@ -1020,6 +1016,8 @@ class SgListView if (preg_match('/pageno/i', $listitem)) $plist .= $listdd; if (preg_match('/next/i', $listitem)) $plist .= $nextpage; if (preg_match('/end/i', $listitem)) $plist .= $endpage; + if (preg_match('/option/i', $listitem)) $plist .= $optionlist; + if (preg_match('/info/i', $listitem)) $plist .= $maininfo; //伪静态栏目分页 if ($cfg_rewrite == 'Y') { $plist = str_replace("?tid=", "", $plist); diff --git a/src/user/config.php b/src/user/config.php index 8ccf9530..d0c5a75e 100755 --- a/src/user/config.php +++ b/src/user/config.php @@ -29,7 +29,6 @@ $_GET = XSSClean($_GET); $_POST = XSSClean($_POST); $_REQUEST = XSSClean($_REQUEST); $_COOKIE = XSSClean($_COOKIE); - require_once(DEDEINC.'/filter.inc.php'); require_once(DEDEINC.'/memberlogin.class.php'); require_once(DEDEINC.'/dedetemplate.class.php');