Selaa lähdekoodia

同步列表代码排序

tags/6.2.8
叙述、别离 1 vuosi sitten
vanhempi
commit
efd815b771
1 muutettua tiedostoa jossa 64 lisäystä ja 64 poistoa
  1. +64
    -64
      src/system/archive/archives.class.php

+ 64
- 64
src/system/archive/archives.class.php Näytä tiedosto

@@ -750,14 +750,14 @@ class Archives
return $rs;
}
/**
* 获得态文档分页标题
* 获得态文档分页标题
*
* @access public
* @param string $styleName 类型名称
* @param string $pageNo 页码数
* @return string
*/
function GetPageTitlesDM($styleName, $pageNo)
function GetPageTitlesST($styleName, $pageNo)
{
if ($this->TotalPage == 1) {
return "";
@@ -766,17 +766,16 @@ class Archives
return "";
}
$i = 1;
$aid = $this->ArcID;
if ($styleName == 'link') {
$revalue = "";
foreach ($this->SplitTitles as $k => $v) {
if ($i == 1) {
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>\r\n";
$revalue .= "<a href='".$this->NameFirst.".".$this->ShortName."'>$v</a>\r\n";
} else {
if ($pageNo == $i) {
$revalue .= " $v \r\n";
} else {
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>\r\n";
$revalue .= "<a href='".$this->NameFirst."-".$i.".".$this->ShortName."'>$v</a>\r\n";
}
}
$i++;
@@ -785,12 +784,12 @@ class Archives
$revalue = "<select id='dedepagetitles' onchange='location.href=this.options[this.selectedIndex].value;'>\r\n";
foreach ($this->SplitTitles as $k => $v) {
if ($i == 1) {
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>\r\n";
$revalue .= "<option value='".$this->NameFirst.".".$this->ShortName."'>{$i}、{$v}</option>\r\n";
} else {
if ($pageNo == $i) {
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i' selected>{$i}、{$v}</option>\r\n";
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."' selected>{$i}、{$v}</option>\r\n";
} else {
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>\r\n";
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."'>{$i}、{$v}</option>\r\n";
}
}
$i++;
@@ -800,14 +799,63 @@ class Archives
return $revalue;
}
/**
* 获得静态文档分页标题
* 获得静态文档分页列表
*
* @access public
* @param int $totalPage 总页数
* @param int $nowPage 当前页数
* @param int $aid 文档id
* @return string
*/
function GetPagebreak($totalPage, $nowPage, $aid)
{
if ($totalPage == 1) {
return "";
}
$PageList = "<li class='page-item disabled'><span class='page-link'>".$totalPage."页</span></li>";
$nPage = $nowPage - 1;
$lPage = $nowPage + 1;
if ($nowPage == 1) {
$PageList .= "<li class='page-item disabled'><span class='page-link'>上一页</span></li>";
} else {
if ($nPage == 1) {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst.".".$this->ShortName."'>上一页</a></li>";
} else {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst."-".$nPage.".".$this->ShortName."'>上一页</a></li>";
}
}
for ($i = 1; $i <= $totalPage; $i++) {
if ($i == 1) {
if ($nowPage != 1) {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst.".".$this->ShortName."'>1</a></li>";
} else {
$PageList .= "<li class='page-item active'><span class='page-link'>1</span></li>";
}
} else {
$n = $i;
if ($nowPage != $i) {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst."-".$i.".".$this->ShortName."'>{$n}</a></li>";
} else {
$PageList .= "<li class='page-item active'><span class='page-link'>{$n}</span></li>";
}
}
}
if ($lPage <= $totalPage) {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst."-".$lPage.".".$this->ShortName."'>下一页</a></li>";
} else {
$PageList .= "<li class='page-item'><span class='page-link'>下一页</span></li>";
}
return $PageList;
}
/**
* 获得动态文档分页标题
*
* @access public
* @param string $styleName 类型名称
* @param string $pageNo 页码数
* @return string
*/
function GetPageTitlesST($styleName, $pageNo)
function GetPageTitlesDM($styleName, $pageNo)
{
if ($this->TotalPage == 1) {
return "";
@@ -816,16 +864,17 @@ class Archives
return "";
}
$i = 1;
$aid = $this->ArcID;
if ($styleName == 'link') {
$revalue = "";
foreach ($this->SplitTitles as $k => $v) {
if ($i == 1) {
$revalue .= "<a href='".$this->NameFirst.".".$this->ShortName."'>$v</a>\r\n";
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>\r\n";
} else {
if ($pageNo == $i) {
$revalue .= " $v \r\n";
} else {
$revalue .= "<a href='".$this->NameFirst."-".$i.".".$this->ShortName."'>$v</a>\r\n";
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>$v</a>\r\n";
}
}
$i++;
@@ -834,12 +883,12 @@ class Archives
$revalue = "<select id='dedepagetitles' onchange='location.href=this.options[this.selectedIndex].value;'>\r\n";
foreach ($this->SplitTitles as $k => $v) {
if ($i == 1) {
$revalue .= "<option value='".$this->NameFirst.".".$this->ShortName."'>{$i}、{$v}</option>\r\n";
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>\r\n";
} else {
if ($pageNo == $i) {
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."' selected>{$i}、{$v}</option>\r\n";
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i' selected>{$i}、{$v}</option>\r\n";
} else {
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."'>{$i}、{$v}</option>\r\n";
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&pageno=$i'>{$i}、{$v}</option>\r\n";
}
}
$i++;
@@ -916,55 +965,6 @@ class Archives
}
return $PageList;
}
/**
* 获得静态文档分页列表
*
* @access public
* @param int $totalPage 总页数
* @param int $nowPage 当前页数
* @param int $aid 文档id
* @return string
*/
function GetPagebreak($totalPage, $nowPage, $aid)
{
if ($totalPage == 1) {
return "";
}
$PageList = "<li class='page-item disabled'><span class='page-link'>".$totalPage."页</span></li>";
$nPage = $nowPage - 1;
$lPage = $nowPage + 1;
if ($nowPage == 1) {
$PageList .= "<li class='page-item disabled'><span class='page-link'>上一页</span></li>";
} else {
if ($nPage == 1) {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst.".".$this->ShortName."'>上一页</a></li>";
} else {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst."-".$nPage.".".$this->ShortName."'>上一页</a></li>";
}
}
for ($i = 1; $i <= $totalPage; $i++) {
if ($i == 1) {
if ($nowPage != 1) {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst.".".$this->ShortName."'>1</a></li>";
} else {
$PageList .= "<li class='page-item active'><span class='page-link'>1</span></li>";
}
} else {
$n = $i;
if ($nowPage != $i) {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst."-".$i.".".$this->ShortName."'>{$n}</a></li>";
} else {
$PageList .= "<li class='page-item active'><span class='page-link'>{$n}</span></li>";
}
}
}
if ($lPage <= $totalPage) {
$PageList .= "<li class='page-item'><a class='page-link' href='".$this->NameFirst."-".$lPage.".".$this->ShortName."'>下一页</a></li>";
} else {
$PageList .= "<li class='page-item'><span class='page-link'>下一页</span></li>";
}
return $PageList;
}
/**
* 高亮问题修正,排除alt、title、<a></a>直接的字符替换
*


Loading…
Peruuta
Tallenna