@@ -770,31 +770,31 @@ class Archives | |||||
$revalue = ''; | $revalue = ''; | ||||
foreach ($this->SplitTitles as $k => $v) { | foreach ($this->SplitTitles as $k => $v) { | ||||
if ($i == 1) { | if ($i == 1) { | ||||
$revalue .= "<a href='".$this->NameFirst.".".$this->ShortName."'>$v</a>\r\n"; | |||||
$revalue .= "<a href='".$this->NameFirst.".".$this->ShortName."'>$v</a>"; | |||||
} else { | } else { | ||||
if ($pageNo == $i) { | if ($pageNo == $i) { | ||||
$revalue .= " $v \r\n"; | |||||
$revalue .= "$v"; | |||||
} else { | } else { | ||||
$revalue .= "<a href='".$this->NameFirst."-".$i.".".$this->ShortName."'>$v</a>\r\n"; | |||||
$revalue .= "<a href='".$this->NameFirst."-".$i.".".$this->ShortName."'>$v</a>"; | |||||
} | } | ||||
} | } | ||||
$i++; | $i++; | ||||
} | } | ||||
} else { | } else { | ||||
$revalue = "<select class='form-control w-25' onchange='location.href=this.options[this.selectedIndex].value;'>\r\n"; | |||||
$revalue = "<select class='form-control w-25' onchange='location.href=this.options[this.selectedIndex].value;'>"; | |||||
foreach ($this->SplitTitles as $k => $v) { | foreach ($this->SplitTitles as $k => $v) { | ||||
if ($i == 1) { | if ($i == 1) { | ||||
$revalue .= "<option value='".$this->NameFirst.".".$this->ShortName."'>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='".$this->NameFirst.".".$this->ShortName."'>{$i}、{$v}</option>"; | |||||
} else { | } else { | ||||
if ($pageNo == $i) { | if ($pageNo == $i) { | ||||
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."' selected>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."' selected>{$i}、{$v}</option>"; | |||||
} else { | } else { | ||||
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."'>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."'>{$i}、{$v}</option>"; | |||||
} | } | ||||
} | } | ||||
$i++; | $i++; | ||||
} | } | ||||
$revalue .= "</select>\r\n"; | |||||
$revalue .= "</select>"; | |||||
} | } | ||||
return $revalue; | return $revalue; | ||||
} | } | ||||
@@ -871,18 +871,18 @@ class Archives | |||||
foreach ($this->SplitTitles as $k => $v) { | foreach ($this->SplitTitles as $k => $v) { | ||||
if ($i == 1) { | if ($i == 1) { | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$revalue .= "<a href='/doc-$aid-$i.html'>$v</a>\r\n"; | |||||
$revalue .= "<a href='/doc-$aid-$i.html'>$v</a>"; | |||||
} else { | } else { | ||||
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>\r\n"; | |||||
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>"; | |||||
} | } | ||||
} else { | } else { | ||||
if ($pageNo == $i) { | if ($pageNo == $i) { | ||||
$revalue .= " $v \r\n"; | |||||
$revalue .= " $v "; | |||||
} else { | } else { | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$revalue .= "<a href='/doc-$aid-$i.html'>$v</a>\r\n"; | |||||
$revalue .= "<a href='/doc-$aid-$i.html'>$v</a>"; | |||||
} else { | } else { | ||||
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>\r\n"; | |||||
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>"; | |||||
} | } | ||||
} | } | ||||
@@ -890,32 +890,32 @@ class Archives | |||||
$i++; | $i++; | ||||
} | } | ||||
} else { | } else { | ||||
$revalue = "<select class='form-control w-25' onchange='location.href=this.options[this.selectedIndex].value;'>\r\n"; | |||||
$revalue = "<select class='form-control w-25' onchange='location.href=this.options[this.selectedIndex].value;'>"; | |||||
foreach ($this->SplitTitles as $k => $v) { | foreach ($this->SplitTitles as $k => $v) { | ||||
if ($i == 1) { | if ($i == 1) { | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$revalue .= "<option value='/doc-$aid-$i.html'>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='/doc-$aid-$i.html'>{$i}、{$v}</option>"; | |||||
} else { | } else { | ||||
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>"; | |||||
} | } | ||||
} else { | } else { | ||||
if ($pageNo == $i) { | if ($pageNo == $i) { | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$revalue .= "<option value='/doc-$aid-$i.html' selected>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='/doc-$aid-$i.html' selected>{$i}、{$v}</option>"; | |||||
} else { | } else { | ||||
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i' selected>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i' selected>{$i}、{$v}</option>"; | |||||
} | } | ||||
} else { | } else { | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$revalue .= "<option value='/doc-$aid-$i.html'>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='/doc-$aid-$i.html'>{$i}、{$v}</option>"; | |||||
} else { | } else { | ||||
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>\r\n"; | |||||
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>"; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
$i++; | $i++; | ||||
} | } | ||||
$revalue .= "</select>\r\n"; | |||||
$revalue .= "</select>"; | |||||
} | } | ||||
return $revalue; | return $revalue; | ||||
} | } | ||||
@@ -490,7 +490,7 @@ class FreeList | |||||
$this->dsql->Execute("al"); | $this->dsql->Execute("al"); | ||||
$artlist = ''; | $artlist = ''; | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist = "<table width='$tablewidth'>\r\n"; | |||||
$artlist = "<table width='$tablewidth'>"; | |||||
} | } | ||||
$indtp = new DedeTagParse(); | $indtp = new DedeTagParse(); | ||||
$indtp->SetNameSpace("field", "[", "]"); | $indtp->SetNameSpace("field", "[", "]"); | ||||
@@ -498,11 +498,11 @@ class FreeList | |||||
$GLOBALS['autoindex'] = 0; | $GLOBALS['autoindex'] = 0; | ||||
for ($i = 0; $i < $this->pagesize; $i++) { | for ($i = 0; $i < $this->pagesize; $i++) { | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "<tr>\r\n"; | |||||
$artlist .= "<tr>"; | |||||
} | } | ||||
for ($j = 0; $j < $col; $j++) { | for ($j = 0; $j < $col; $j++) { | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "<td width='$colWidth'>\r\n"; | |||||
$artlist .= "<td width='$colWidth'>"; | |||||
} | } | ||||
if ($row = $this->dsql->GetArray("al")) { | if ($row = $this->dsql->GetArray("al")) { | ||||
$GLOBALS['autoindex']++; | $GLOBALS['autoindex']++; | ||||
@@ -600,18 +600,18 @@ class FreeList | |||||
$artlist .= ''; | $artlist .= ''; | ||||
} | } | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "</td>\r\n"; | |||||
$artlist .= "</td>"; | |||||
} | } | ||||
} //Loop Col | } //Loop Col | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$i += $col - 1; | $i += $col - 1; | ||||
} | } | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "</tr>\r\n"; | |||||
$artlist .= "</tr>"; | |||||
} | } | ||||
} //Loop Line | } //Loop Line | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "</table>\r\n"; | |||||
$artlist .= "</table>"; | |||||
} | } | ||||
$this->dsql->FreeResult("al"); | $this->dsql->FreeResult("al"); | ||||
return $artlist; | return $artlist; | ||||
@@ -646,29 +646,29 @@ class FreeList | |||||
$tnamerule = preg_replace("#^(.*)\/#", '', $tnamerule); | $tnamerule = preg_replace("#^(.*)\/#", '', $tnamerule); | ||||
//获得上页和首页的链接 | //获得上页和首页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $prepagenum, $tnamerule)."'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".str_replace("{page}", 1, $tnamerule)."'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a href='".str_replace("{page}", $prepagenum, $tnamerule)."' class='page-link'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a href='".str_replace("{page}", 1, $tnamerule)."' class='page-link'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
//下页和未页的链接 | //下页和未页的链接 | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $nextpagenum, $tnamerule)."'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $totalpage, $tnamerule)."'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a href='".str_replace("{page}", $nextpagenum, $tnamerule)."' class='page-link'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a href='".str_replace("{page}", $totalpage, $tnamerule)."' class='page-link'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//option链接 | //option链接 | ||||
$optionlen = strlen($totalpage); | $optionlen = strlen($totalpage); | ||||
$optionlen = $optionlen * 12 + 18; | $optionlen = $optionlen * 12 + 18; | ||||
if ($optionlen < 36) $optionlen = 36; | if ($optionlen < 36) $optionlen = 36; | ||||
if ($optionlen > 100) $optionlen = 100; | if ($optionlen > 100) $optionlen = 100; | ||||
$optionlist = "<select name='sldd' style='width:$optionlen' onchange='location.href=this.options[this.selectedIndex].value;'>\r\n"; | |||||
$optionlist = "<select name='sldd' style='width:$optionlen' onchange='location.href=this.options[this.selectedIndex].value;'>"; | |||||
for ($fl = 1; $fl <= $totalpage; $fl++) { | for ($fl = 1; $fl <= $totalpage; $fl++) { | ||||
if ($fl == $this->PageNo) { | if ($fl == $this->PageNo) { | ||||
$optionlist .= "<option value='".str_replace("{page}", $fl, $tnamerule)."' selected>$fl</option>\r\n"; | |||||
$optionlist .= "<option value='".str_replace("{page}", $fl, $tnamerule)."' selected>$fl</option>"; | |||||
} else { | } else { | ||||
$optionlist .= "<option value='".str_replace("{page}", $fl, $tnamerule)."'>$fl</option>\r\n"; | |||||
$optionlist .= "<option value='".str_replace("{page}", $fl, $tnamerule)."'>$fl</option>"; | |||||
} | } | ||||
} | } | ||||
$optionlist .= "</select>"; | $optionlist .= "</select>"; | ||||
@@ -689,9 +689,9 @@ class FreeList | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class=\"page-item active\"><span class='page-link'>{$j}</span></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $j, $tnamerule)."'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a href='".str_replace("{page}", $j, $tnamerule)."' class='page-link'>$j</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = ''; | $plist = ''; | ||||
@@ -745,21 +745,21 @@ class FreeList | |||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>"; | $maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>"; | ||||
$purl = $this->GetCurUrl(); | $purl = $this->GetCurUrl(); | ||||
$geturl = "lid=".$this->FreeID."&TotalResult=".$this->TotalResult."&"; | $geturl = "lid=".$this->FreeID."&TotalResult=".$this->TotalResult."&"; | ||||
$hidenform = "<input type='hidden' name='lid' value='".$this->FreeID."' />\r\n"; | |||||
$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."' />\r\n"; | |||||
$hidenform = "<input type='hidden' name='lid' value='".$this->FreeID."'>"; | |||||
$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>"; | |||||
$purl .= "?".$geturl; | $purl .= "?".$geturl; | ||||
//获得上页和下页的链接 | //获得上页和下页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$prepagenum'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".$purl."PageNo=1'>首页</a>\r\n"; | |||||
$prepage .= "<li class='page-item'><a href='".$purl."PageNo=$prepagenum' class='page-link'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a href='".$purl."PageNo=1' class='page-link'>首页</a>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$nextpagenum'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$totalpage'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a href='".$purl."PageNo=$nextpagenum' class='page-link'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a href='".$purl."PageNo=$totalpage' class='page-link'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
@@ -774,18 +774,18 @@ class FreeList | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$j'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a href='".$purl."PageNo=$j' class='page-link'>$j</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = "<form name='pagelist' action='".$this->GetCurUrl()."'>$hidenform"; | $plist = "<form name='pagelist' action='".$this->GetCurUrl()."'>$hidenform"; | ||||
$plist .= $maininfo.$indexpage.$prepage.$listdd.$nextpage.$endpage; | $plist .= $maininfo.$indexpage.$prepage.$listdd.$nextpage.$endpage; | ||||
if ($totalpage > $total_list) { | if ($totalpage > $total_list) { | ||||
$plist .= "<input type='text' name='PageNo' value='".$this->PageNo."'>\r\n"; | |||||
$plist .= "<input type='submit' name='plistgo' value='GO'>\r\n"; | |||||
$plist .= "<input type='text' name='PageNo' value='".$this->PageNo."'>"; | |||||
$plist .= "<input type='submit' name='plistgo' value='GO'>"; | |||||
} | } | ||||
$plist .= "</form>\r\n"; | |||||
$plist .= "</form>"; | |||||
return $plist; | return $plist; | ||||
} | } | ||||
/** | /** | ||||
@@ -1023,28 +1023,28 @@ class ListView | |||||
} | } | ||||
$totalpage = ceil($this->TotalResult / $this->pagesize); | $totalpage = ceil($this->TotalResult / $this->pagesize); | ||||
if ($totalpage <= 1 && $this->TotalResult > 0) { | if ($totalpage <= 1 && $this->TotalResult > 0) { | ||||
return "<li class='page-item disabled'><span class='page-link'>1页".$this->TotalResult."条</span></li>\r\n"; | |||||
return "<li class='page-item disabled'><span class='page-link'>1页".$this->TotalResult."条</span></li>"; | |||||
} | } | ||||
if ($this->TotalResult == 0) { | if ($this->TotalResult == 0) { | ||||
return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>\r\n"; | |||||
return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>"; | |||||
} | } | ||||
$purl = $this->GetCurUrl(); | $purl = $this->GetCurUrl(); | ||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>\r\n"; | |||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>"; | |||||
$tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); | $tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']); | ||||
$tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); | $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); | ||||
//获得上页和首页的链接 | //获得上页和首页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $prepagenum, $tnamerule)."'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".str_replace("{page}", 1, $tnamerule)."'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $prepagenum, $tnamerule)."'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".str_replace("{page}", 1, $tnamerule)."'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
//下页和未页的链接 | //下页和未页的链接 | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $nextpagenum, $tnamerule)."'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $totalpage, $tnamerule)."'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $nextpagenum, $tnamerule)."'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $totalpage, $tnamerule)."'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//option链接 | //option链接 | ||||
$optionlist = ''; | $optionlist = ''; | ||||
@@ -1052,15 +1052,15 @@ class ListView | |||||
$optionlen = $optionlen * 12 + 18; | $optionlen = $optionlen * 12 + 18; | ||||
if ($optionlen < 36) $optionlen = 36; | if ($optionlen < 36) $optionlen = 36; | ||||
if ($optionlen > 100) $optionlen = 100; | if ($optionlen > 100) $optionlen = 100; | ||||
$optionlist = "<li><select name='sldd' style='width:{$optionlen}px' onchange='location.href=this.options[this.selectedIndex].value;'>\r\n"; | |||||
$optionlist = "<li><select name='sldd' style='width:{$optionlen}px' onchange='location.href=this.options[this.selectedIndex].value;'>"; | |||||
for ($mjj = 1; $mjj <= $totalpage; $mjj++) { | for ($mjj = 1; $mjj <= $totalpage; $mjj++) { | ||||
if ($mjj == $this->PageNo) { | if ($mjj == $this->PageNo) { | ||||
$optionlist .= "<option value='".str_replace("{page}", $mjj, $tnamerule)."' selected>$mjj</option>\r\n"; | |||||
$optionlist .= "<option value='".str_replace("{page}", $mjj, $tnamerule)."' selected>$mjj</option>"; | |||||
} else { | } else { | ||||
$optionlist .= "<option value='".str_replace("{page}", $mjj, $tnamerule)."'>$mjj</option>\r\n"; | |||||
$optionlist .= "<option value='".str_replace("{page}", $mjj, $tnamerule)."'>$mjj</option>"; | |||||
} | } | ||||
} | } | ||||
$optionlist .= "</select></li>\r\n"; | |||||
$optionlist .= "</select></li>"; | |||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
$total_list = $list_len * 2 + 1; | $total_list = $list_len * 2 + 1; | ||||
@@ -1101,9 +1101,9 @@ class ListView | |||||
continue; | continue; | ||||
} | } | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $j, $tnamerule)."'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $j, $tnamerule)."'>$j</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = ''; | $plist = ''; | ||||
@@ -1135,12 +1135,12 @@ class ListView | |||||
} | } | ||||
$totalpage = ceil($this->TotalResult / $this->pagesize); | $totalpage = ceil($this->TotalResult / $this->pagesize); | ||||
if ($totalpage <= 1 && $this->TotalResult > 0) { | if ($totalpage <= 1 && $this->TotalResult > 0) { | ||||
return "<li class='page-item disabled'><span class='page-link'>1页".$this->TotalResult."条</span></li>\r\n"; | |||||
return "<li class='page-item disabled'><span class='page-link'>1页".$this->TotalResult."条</span></li>"; | |||||
} | } | ||||
if ($this->TotalResult == 0) { | if ($this->TotalResult == 0) { | ||||
return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>\r\n"; | |||||
return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>"; | |||||
} | } | ||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>\r\n"; | |||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>"; | |||||
$purl = $this->GetCurUrl(); | $purl = $this->GetCurUrl(); | ||||
//开启伪静态对规则替换 | //开启伪静态对规则替换 | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
@@ -1159,16 +1159,16 @@ class ListView | |||||
} | } | ||||
//获得上页和下页的链接 | //获得上页和下页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a href='".$purl."PageNo=$prepagenum".$pageaddurl."' class='page-link'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a href='".$purl."PageNo=1".$pageaddurl."' class='page-link'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a href='".$purl."PageNo=$prepagenum".$pageaddurl."' class='page-link'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a href='".$purl."PageNo=1".$pageaddurl."' class='page-link'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a href='".$purl."PageNo=$nextpagenum".$pageaddurl."' class='page-link'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a href='".$purl."PageNo=$totalpage".$pageaddurl."' class='page-link'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a href='".$purl."PageNo=$nextpagenum".$pageaddurl."' class='page-link'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a href='".$purl."PageNo=$totalpage".$pageaddurl."' class='page-link'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
@@ -1210,9 +1210,9 @@ class ListView | |||||
continue; | continue; | ||||
} | } | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a href='".$purl."PageNo=$j".$pageaddurl."' class='page-link'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a href='".$purl."PageNo=$j".$pageaddurl."' class='page-link'>$j</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = ''; | $plist = ''; | ||||
@@ -528,16 +528,16 @@ class SearchView | |||||
$this->dsql->Execute("al"); | $this->dsql->Execute("al"); | ||||
$artlist = ''; | $artlist = ''; | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist = "<table width='$tablewidth'>\r\n"; | |||||
$artlist = "<table width='$tablewidth'>"; | |||||
} | } | ||||
$this->dtp2->LoadSource($innertext); | $this->dtp2->LoadSource($innertext); | ||||
for ($i = 0; $i < $row; $i++) { | for ($i = 0; $i < $row; $i++) { | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "<tr>\r\n"; | |||||
$artlist .= "<tr>"; | |||||
} | } | ||||
for ($j = 0; $j < $col; $j++) { | for ($j = 0; $j < $col; $j++) { | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "<td width='$colWidth'>\r\n"; | |||||
$artlist .= "<td width='$colWidth'>"; | |||||
} | } | ||||
if ($row = $this->dsql->GetArray("al")) { | if ($row = $this->dsql->GetArray("al")) { | ||||
if ($this->ChannelType < 0 || $this->ChannelTypeid < 0) { | if ($this->ChannelType < 0 || $this->ChannelTypeid < 0) { | ||||
@@ -606,14 +606,14 @@ class SearchView | |||||
else { | else { | ||||
$artlist .= ''; | $artlist .= ''; | ||||
} | } | ||||
if ($col > 1) $artlist .= "</td>\r\n"; | |||||
if ($col > 1) $artlist .= "</td>"; | |||||
} //Loop Col | } //Loop Col | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "</tr>\r\n"; | |||||
$artlist .= "</tr>"; | |||||
} | } | ||||
} //Loop Line | } //Loop Line | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "</table>\r\n"; | |||||
$artlist .= "</table>"; | |||||
} | } | ||||
$this->dsql->FreeResult("al"); | $this->dsql->FreeResult("al"); | ||||
@@ -649,31 +649,31 @@ class SearchView | |||||
if ($this->TotalResult > $this->SearchMaxRc) { | if ($this->TotalResult > $this->SearchMaxRc) { | ||||
$totalpage = ceil($this->SearchMaxRc / $this->pagesize); | $totalpage = ceil($this->SearchMaxRc / $this->pagesize); | ||||
} | } | ||||
$infos = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>\r\n"; | |||||
$infos = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>"; | |||||
$geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType; | $geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType; | ||||
$hidenform = "<input type='hidden' name='keyword' value='".rawurldecode($oldkeyword)."'>\r\n"; | |||||
$hidenform = "<input type='hidden' name='keyword' value='".rawurldecode($oldkeyword)."'>"; | |||||
$geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy; | $geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy; | ||||
$hidenform .= "<input type='hidden' name='channeltype' value='".$this->ChannelType."'>\r\n"; | |||||
$hidenform .= "<input type='hidden' name='orderby' value='".$this->OrderBy."'>\r\n"; | |||||
$hidenform .= "<input type='hidden' name='channeltype' value='".$this->ChannelType."'>"; | |||||
$hidenform .= "<input type='hidden' name='orderby' value='".$this->OrderBy."'>"; | |||||
$geturl .= "&kwtype=".$this->KType."&pagesize=".$this->pagesize; | $geturl .= "&kwtype=".$this->KType."&pagesize=".$this->pagesize; | ||||
$hidenform .= "<input type='hidden' name='kwtype' value='".$this->KType."'>\r\n"; | |||||
$hidenform .= "<input type='hidden' name='pagesize' value='".$this->pagesize."'>\r\n"; | |||||
$hidenform .= "<input type='hidden' name='kwtype' value='".$this->KType."'>"; | |||||
$hidenform .= "<input type='hidden' name='pagesize' value='".$this->pagesize."'>"; | |||||
$geturl .= "&typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; | $geturl .= "&typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; | ||||
$hidenform .= "<input type='hidden' name='typeid' value='".$this->TypeID."'>\r\n"; | |||||
$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>\r\n"; | |||||
$hidenform .= "<input type='hidden' name='typeid' value='".$this->TypeID."'>"; | |||||
$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>"; | |||||
$purl .= "?".$geturl; | $purl .= "?".$geturl; | ||||
//获得上页和下页的链接 | //获得上页和下页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$prepagenum'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".$purl."PageNo=1'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a href='".$purl."PageNo=$prepagenum' class='page-link'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a href='".$purl."PageNo=1' class='page-link'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item disabled'><a class='page-link'>首页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item disabled'><a class='page-link'>首页</a></li>"; | |||||
} | } | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$nextpagenum'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$totalpage'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a href='".$purl."PageNo=$nextpagenum' class='page-link'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a href='".$purl."PageNo=$totalpage' class='page-link'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item'><a class='page-link'>末页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a class='page-link'>末页</a></li>"; | |||||
} | } | ||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
@@ -692,9 +692,9 @@ class SearchView | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='page-item active'><a class='page-link'>$j</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$j'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$j'>$j</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = ''; | $plist = ''; | ||||
@@ -705,7 +705,7 @@ class SearchView | |||||
$plist .= preg_match('/pageno/i', $listitem)? $listdd : ""; | $plist .= preg_match('/pageno/i', $listitem)? $listdd : ""; | ||||
$plist .= preg_match('/next/i', $listitem)? $nextpage : ""; | $plist .= preg_match('/next/i', $listitem)? $nextpage : ""; | ||||
$plist .= preg_match('/end/i', $listitem)? $endpage : ""; | $plist .= preg_match('/end/i', $listitem)? $endpage : ""; | ||||
$plist .= "</form>\r\n"; | |||||
$plist .= "</form>"; | |||||
return $plist; | return $plist; | ||||
} | } | ||||
/** | /** | ||||
@@ -742,7 +742,7 @@ class SgListView | |||||
$GLOBALS['autoindex'] = 0; | $GLOBALS['autoindex'] = 0; | ||||
for ($i = 0; $i < $row; $i++) { | for ($i = 0; $i < $row; $i++) { | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "<div>\r\n"; | |||||
$artlist .= "<div>"; | |||||
} | } | ||||
for ($j = 0; $j < $col; $j++) { | for ($j = 0; $j < $col; $j++) { | ||||
if ($row = $this->dsql->GetArray("al")) { | if ($row = $this->dsql->GetArray("al")) { | ||||
@@ -826,7 +826,7 @@ class SgListView | |||||
}//Loop Col | }//Loop Col | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$i += $col - 1; | $i += $col - 1; | ||||
$artlist .= "</div>\r\n"; | |||||
$artlist .= "</div>"; | |||||
} | } | ||||
}//Loop Line | }//Loop Line | ||||
$t3 = ExecTime(); | $t3 = ExecTime(); | ||||
@@ -863,17 +863,17 @@ class SgListView | |||||
$tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); | $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); | ||||
//获得上页和首页的链接 | //获得上页和首页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $prepagenum, $tnamerule)."'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".str_replace("{page}", 1, $tnamerule)."'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a href='".str_replace("{page}", $prepagenum, $tnamerule)."' class='page-link'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a href='".str_replace("{page}", 1, $tnamerule)."' class='page-link'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item'>首页</li>\r\n"; | |||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
//下页和未页的链接 | //下页和未页的链接 | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $nextpagenum, $tnamerule)."'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $totalpage, $tnamerule)."'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a href='".str_replace("{page}", $nextpagenum, $tnamerule)."' class='page-link'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a href='".str_replace("{page}", $totalpage, $tnamerule)."' class='page-link'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item'><a class='page-link'>末页</a></li>"; | |||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//option链接 | //option链接 | ||||
$optionlist = ''; | $optionlist = ''; | ||||
@@ -894,9 +894,9 @@ class SgListView | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='page-item active'><a class='page-link'>$j</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $j, $tnamerule)."'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a class='page-link' href='".str_replace("{page}", $j, $tnamerule)."'>".$j."</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = ''; | $plist = ''; | ||||
@@ -959,24 +959,24 @@ class SgListView | |||||
$purl = $nowurls[0]; | $purl = $nowurls[0]; | ||||
} | } | ||||
$geturl = "&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&keyword=".urlencode($keyword)."&"; | $geturl = "&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&keyword=".urlencode($keyword)."&"; | ||||
$hidenform = "<input type='hidden' name='tid' value='".$this->TypeID."' />\r\n"; | |||||
$hidenform = "<input type='hidden' name='nativeplace' value='$nativeplace' />\r\n"; | |||||
$hidenform = "<input type='hidden' name='infotype' value='$infotype' />\r\n"; | |||||
$hidenform = "<input type='hidden' name='keyword' value='$keyword' />\r\n"; | |||||
$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."' />\r\n"; | |||||
$hidenform = "<input type='hidden' name='tid' value='".$this->TypeID."' />"; | |||||
$hidenform = "<input type='hidden' name='nativeplace' value='$nativeplace' />"; | |||||
$hidenform = "<input type='hidden' name='infotype' value='$infotype' />"; | |||||
$hidenform = "<input type='hidden' name='keyword' value='$keyword' />"; | |||||
$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."' />"; | |||||
$purl .= "?tid=".$this->TypeID."&"; | $purl .= "?tid=".$this->TypeID."&"; | ||||
//获得上页和下页的链接 | //获得上页和下页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$prepagenum{$geturl}'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".$purl."PageNo=1{$geturl}'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a href='".$purl."PageNo=$prepagenum{$geturl}' class='page-link'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a href='".$purl."PageNo=1{$geturl}' class='page-link'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item disabled'><a class='page-link'>首页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item disabled'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$nextpagenum{$geturl}'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$totalpage{$geturl}'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a href='".$purl."PageNo=$nextpagenum{$geturl}' class='page-link'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a href='".$purl."PageNo=$totalpage{$geturl}' class='page-link'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item disabled'><a class='page-link'>末页</a></li>"; | |||||
$endpage = "<li class='page-item disabled'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
@@ -995,9 +995,9 @@ class SgListView | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='page-item active'><a class='page-link'>$j</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$j{$geturl}'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a class='page-link' href='".$purl."PageNo=$j{$geturl}'>$j</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; | $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; | ||||
@@ -331,16 +331,16 @@ class SpecView | |||||
$this->dsql->Execute('al'); | $this->dsql->Execute('al'); | ||||
$artlist = ''; | $artlist = ''; | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist = "<table width='$tablewidth'>\r\n"; | |||||
$artlist = "<table width='$tablewidth'>"; | |||||
} | } | ||||
$this->dtp2->LoadSource($innertext); | $this->dtp2->LoadSource($innertext); | ||||
for ($i = 0; $i < $row; $i++) { | for ($i = 0; $i < $row; $i++) { | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "<tr>\r\n"; | |||||
$artlist .= "<tr>"; | |||||
} | } | ||||
for ($j = 0; $j < $col; $j++) { | for ($j = 0; $j < $col; $j++) { | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "<td width='$colWidth'>\r\n"; | |||||
$artlist .= "<td width='$colWidth'>"; | |||||
} | } | ||||
if ($row = $this->dsql->GetArray("al")) { | if ($row = $this->dsql->GetArray("al")) { | ||||
//处理一些特殊字段 | //处理一些特殊字段 | ||||
@@ -408,15 +408,15 @@ class SpecView | |||||
$artlist .= ''; | $artlist .= ''; | ||||
} | } | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "</td>\r\n"; | |||||
$artlist .= "</td>"; | |||||
} | } | ||||
}//Loop Col | }//Loop Col | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "</tr>\r\n"; | |||||
$artlist .= "</tr>"; | |||||
} | } | ||||
}//Loop Line | }//Loop Line | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "</table>\r\n"; | |||||
$artlist .= "</table>"; | |||||
} | } | ||||
$this->dsql->FreeResult("al"); | $this->dsql->FreeResult("al"); | ||||
return $artlist; | return $artlist; | ||||
@@ -448,16 +448,16 @@ class SpecView | |||||
$tnamerule = "spec_"; | $tnamerule = "spec_"; | ||||
//获得上页和下页的链接 | //获得上页和下页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li><a href='".$tnamerule."$prepagenum".$GLOBALS['art_shortname']."'>上页</a></li>\r\n"; | |||||
$indexpage = "<li><a href='".$tnamerule."1".$GLOBALS['art_shortname']."'>首页</a></li>\r\n"; | |||||
$prepage .= "<li><a href='".$tnamerule."$prepagenum".$GLOBALS['art_shortname']."'>上页</a></li>"; | |||||
$indexpage = "<li><a href='".$tnamerule."1".$GLOBALS['art_shortname']."'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li><a>首页</a></li>\r\n"; | |||||
$indexpage = "<li><a>首页</a></li>"; | |||||
} | } | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li><a href='".$tnamerule."$nextpagenum".$GLOBALS['art_shortname']."'>下页</a></li>\r\n"; | |||||
$endpage = "<li><a href='".$tnamerule."$totalpage".$GLOBALS['art_shortname']."'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li><a href='".$tnamerule."$nextpagenum".$GLOBALS['art_shortname']."'>下页</a></li>"; | |||||
$endpage = "<li><a href='".$tnamerule."$totalpage".$GLOBALS['art_shortname']."'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li><a>末页</a></li>\r\n"; | |||||
$endpage = "<li><a>末页</a></li>"; | |||||
} | } | ||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
@@ -476,9 +476,9 @@ class SpecView | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='thisclass'><a>$j</a></li>\r\n"; | |||||
$listdd .= "<li class='thisclass'><a>$j</a></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li><a href='".$tnamerule."$j".$GLOBALS['art_shortname']."'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li><a href='".$tnamerule."$j".$GLOBALS['art_shortname']."'>".$j."</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; | $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; | ||||
@@ -503,28 +503,28 @@ class SpecView | |||||
} | } | ||||
$totalpage = ceil($this->TotalResult / $this->pagesize); | $totalpage = ceil($this->TotalResult / $this->pagesize); | ||||
if ($totalpage <= 1 && $this->TotalResult > 0) { | if ($totalpage <= 1 && $this->TotalResult > 0) { | ||||
return "<span class='pageinfo'>1页".$this->TotalResult."条</span>"; | |||||
return "<li class='page-item disabled'><span class='page-link'>1页".$this->TotalResult."条</span></li>"; | |||||
} | } | ||||
if ($this->TotalResult == 0) { | if ($this->TotalResult == 0) { | ||||
return "<span class='pageinfo'>0页".$this->TotalResult."条</span>"; | |||||
return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>"; | |||||
} | } | ||||
$purl = $this->GetCurUrl(); | $purl = $this->GetCurUrl(); | ||||
$geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; | $geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; | ||||
$hidenform = "<input type='hidden' name='typeid' value='".$this->TypeID."'>\r\n"; | |||||
$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>\r\n"; | |||||
$hidenform = "<input type='hidden' name='typeid' value='".$this->TypeID."'>"; | |||||
$hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>"; | |||||
$purl .= "?".$geturl; | $purl .= "?".$geturl; | ||||
//获得上页和下页的链接 | //获得上页和下页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li><a href='".$purl."PageNo=$prepagenum'>上页</a></li>\r\n"; | |||||
$indexpage = "<li><a href='".$purl."PageNo=1'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a href='".$purl."PageNo=$prepagenum' class='page-link'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a href='".$purl."PageNo=1' class='page-link'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li><a>首页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li><a href='".$purl."PageNo=$nextpagenum'>下页</a></li>\r\n"; | |||||
$endpage = "<li><a href='".$purl."PageNo=$totalpage'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a href='".$purl."PageNo=$nextpagenum' class='page-link'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a href='".$purl."PageNo=$totalpage' class='page-link'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li><a>末页</a></li>"; | |||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
@@ -543,9 +543,9 @@ class SpecView | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='thisclass'><a>$j</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li><a href='".$purl."PageNo=$j'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a href='".$purl."PageNo=$j'>$j</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; | $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; | ||||
@@ -304,7 +304,7 @@ class TagList | |||||
$GLOBALS['autoindex'] = 0; | $GLOBALS['autoindex'] = 0; | ||||
for ($i = 0; $i < $row; $i++) { | for ($i = 0; $i < $row; $i++) { | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$artlist .= "<div>\r\n"; | |||||
$artlist .= "<div>"; | |||||
} | } | ||||
for ($j = 0; $j < $col; $j++) { | for ($j = 0; $j < $col; $j++) { | ||||
if ($row = $this->dsql->GetArray("al")) { | if ($row = $this->dsql->GetArray("al")) { | ||||
@@ -383,7 +383,7 @@ class TagList | |||||
}//Loop Col | }//Loop Col | ||||
if ($col > 1) { | if ($col > 1) { | ||||
$i += $col - 1; | $i += $col - 1; | ||||
$artlist .= "</div>\r\n"; | |||||
$artlist .= "</div>"; | |||||
} | } | ||||
}//Loop Line | }//Loop Line | ||||
$this->dsql->FreeResult('al'); | $this->dsql->FreeResult('al'); | ||||
@@ -413,21 +413,21 @@ class TagList | |||||
if ($this->TotalResult == 0) { | if ($this->TotalResult == 0) { | ||||
return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>"; | return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>"; | ||||
} | } | ||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>\r\n"; | |||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>"; | |||||
$purl = $this->GetCurUrl(); | $purl = $this->GetCurUrl(); | ||||
$purl .= "?/".urlencode($this->Tag); | $purl .= "?/".urlencode($this->Tag); | ||||
//获得上页和下页的链接 | //获得上页和下页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a class='page-link' href='".$purl."/$prepagenum/'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".$purl."/1/'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a class='page-link' href='".$purl."/$prepagenum/'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a class='page-link' href='".$purl."/1/'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".$purl."/$nextpagenum/'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".$purl."/$totalpage/'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a class='page-link' href='".$purl."/$nextpagenum/'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a class='page-link' href='".$purl."/$totalpage/'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
@@ -446,9 +446,9 @@ class TagList | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a class='page-link' href='".$purl."/$j/'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a class='page-link' href='".$purl."/$j/'>".$j."</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = ''; | $plist = ''; | ||||
@@ -488,20 +488,20 @@ class TagList | |||||
if ($this->TotalResult == 0) { | if ($this->TotalResult == 0) { | ||||
return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>"; | return "<li class='page-item disabled'><span class='page-link'>0页".$this->TotalResult."条</span></li>"; | ||||
} | } | ||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>\r\n"; | |||||
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>"; | |||||
$purl = $this->tagsDir.'/'.$this->TagInfos['id']; | $purl = $this->tagsDir.'/'.$this->TagInfos['id']; | ||||
//获得上页和下页的链接 | //获得上页和下页的链接 | ||||
if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
$prepage .= "<li class='page-item'><a href='".$purl."/$prepagenum/' class='page-link'>上页</a></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><a href='".$purl."/1/' class='page-link'>首页</a></li>\r\n"; | |||||
$prepage .= "<li class='page-item'><a href='".$purl."/$prepagenum/' class='page-link'>上页</a></li>"; | |||||
$indexpage = "<li class='page-item'><a href='".$purl."/1/' class='page-link'>首页</a></li>"; | |||||
} else { | } else { | ||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
$indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>"; | |||||
} | } | ||||
if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
$nextpage .= "<li class='page-item'><a href='".$purl."/$nextpagenum/' class='page-link'>下页</a></li>\r\n"; | |||||
$endpage = "<li class='page-item'><a href='".$purl."/$totalpage/' class='page-link'>末页</a></li>\r\n"; | |||||
$nextpage .= "<li class='page-item'><a href='".$purl."/$nextpagenum/' class='page-link'>下页</a></li>"; | |||||
$endpage = "<li class='page-item'><a href='".$purl."/$totalpage/' class='page-link'>末页</a></li>"; | |||||
} else { | } else { | ||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
$endpage = "<li class='page-item'><span class='page-link'>末页</span></li>"; | |||||
} | } | ||||
//获得数字链接 | //获得数字链接 | ||||
$listdd = ''; | $listdd = ''; | ||||
@@ -520,9 +520,9 @@ class TagList | |||||
} | } | ||||
for ($j; $j <= $total_list; $j++) { | for ($j; $j <= $total_list; $j++) { | ||||
if ($j == $this->PageNo) { | if ($j == $this->PageNo) { | ||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>\r\n"; | |||||
$listdd .= "<li class='page-item active'><span class='page-link'>$j</span></li>"; | |||||
} else { | } else { | ||||
$listdd .= "<li class='page-item'><a href='".$purl."/$j/' class='page-link'>".$j."</a></li>\r\n"; | |||||
$listdd .= "<li class='page-item'><a href='".$purl."/$j/' class='page-link'>$j</a></li>"; | |||||
} | } | ||||
} | } | ||||
$plist = ''; | $plist = ''; | ||||