|
|
@@ -84,10 +84,10 @@ class Archives |
|
|
|
$this->FixedValues = '';
|
|
|
|
$this->TempSource = '';
|
|
|
|
$this->remoteDir = '';
|
|
|
|
if (empty($GLOBALS['pageno'])) {
|
|
|
|
if (empty($GLOBALS['PageNo'])) {
|
|
|
|
$this->NowPage = 1;
|
|
|
|
} else {
|
|
|
|
$this->NowPage = $GLOBALS['pageno'];
|
|
|
|
$this->NowPage = $GLOBALS['PageNo'];
|
|
|
|
}
|
|
|
|
//特殊的字段数据处理
|
|
|
|
$this->Fields['aid'] = $aid;
|
|
|
@@ -340,7 +340,7 @@ class Archives |
|
|
|
for ($i = 1; $i <= $this->TotalPage; $i++) {
|
|
|
|
if ($this->TotalPage > 1) {
|
|
|
|
$this->Fields['tmptitle'] = (empty($this->Fields['tmptitle']) ? $this->Fields['title'] : $this->Fields['tmptitle']);
|
|
|
|
if ($i > 1) $this->Fields['title'] = $this->Fields['tmptitle']."($i)";
|
|
|
|
if ($i > 1) $this->Fields['title'] = $this->Fields['tmptitle']."-第"."$i"."页";
|
|
|
|
}
|
|
|
|
if ($i > 1) {
|
|
|
|
$TRUEfilename = $this->GetTruePath().$fileFirst."-".$i.".".$this->ShortName;
|
|
|
@@ -469,7 +469,7 @@ class Archives |
|
|
|
return '';
|
|
|
|
}
|
|
|
|
$this->Fields["displaytype"] = "dm";
|
|
|
|
if ($this->NowPage > 1) $this->Fields["title"] = $this->Fields["title"]."({$this->NowPage})";
|
|
|
|
if ($this->NowPage > 1) $this->Fields["title"] = $this->Fields["title"]."-第"."{$this->NowPage}"."页";
|
|
|
|
//预编译
|
|
|
|
$this->LoadTemplet();
|
|
|
|
$this->ParAddTable();
|
|
|
@@ -545,17 +545,17 @@ class Archives |
|
|
|
* 解析模板,对文档里的变动进行赋值
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @param string $pageNo 页码数
|
|
|
|
* @param string $PageNo 页码数
|
|
|
|
* @param string $ismake 是否生成
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
function ParseDMFields($pageNo, $ismake = 1)
|
|
|
|
function ParseDMFields($PageNo, $ismake = 1)
|
|
|
|
{
|
|
|
|
$this->NowPage = $pageNo;
|
|
|
|
$this->NowPage = $PageNo;
|
|
|
|
$this->Fields['nowpage'] = $this->NowPage;
|
|
|
|
if ($this->SplitPageField != '' && isset($this->Fields[$this->SplitPageField])) {
|
|
|
|
$this->Fields[$this->SplitPageField] = $this->SplitFields[$pageNo - 1];
|
|
|
|
if ($pageNo > 1) $this->Fields['description'] = trim(preg_replace("/[\r\n\t]/", ' ', cn_substr(html2text($this->Fields[$this->SplitPageField]), 200)));
|
|
|
|
$this->Fields[$this->SplitPageField] = $this->SplitFields[$PageNo - 1];
|
|
|
|
if ($PageNo > 1) $this->Fields['description'] = trim(preg_replace("/[\r\n\t]/", ' ', cn_substr(html2text($this->Fields[$this->SplitPageField]), 200)));
|
|
|
|
}
|
|
|
|
//解析模板
|
|
|
|
if (is_array($this->dtp->CTags)) {
|
|
|
@@ -570,9 +570,9 @@ class Archives |
|
|
|
}
|
|
|
|
} else if ($ctag->GetName() == 'pagetitle') {
|
|
|
|
if ($ismake == 0) {
|
|
|
|
$this->dtp->Assign($i, $this->GetPageTitlesDM($ctag->GetAtt("style"), $pageNo));
|
|
|
|
$this->dtp->Assign($i, $this->GetPageTitlesDM($ctag->GetAtt("style"), $PageNo));
|
|
|
|
} else {
|
|
|
|
$this->dtp->Assign($i, $this->GetPageTitlesST($ctag->GetAtt("style"), $pageNo));
|
|
|
|
$this->dtp->Assign($i, $this->GetPageTitlesST($ctag->GetAtt("style"), $PageNo));
|
|
|
|
}
|
|
|
|
} else if ($ctag->GetName() == 'prenext') {
|
|
|
|
$this->dtp->Assign($i, $this->GetPreNext($ctag->GetAtt('get')));
|
|
|
@@ -745,10 +745,10 @@ class Archives |
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @param string $styleName 类型名称
|
|
|
|
* @param string $pageNo 页码数
|
|
|
|
* @param string $PageNo 页码数
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
function GetPageTitlesST($styleName, $pageNo)
|
|
|
|
function GetPageTitlesST($styleName, $PageNo)
|
|
|
|
{
|
|
|
|
if ($this->TotalPage == 1) {
|
|
|
|
return "";
|
|
|
@@ -763,7 +763,7 @@ class Archives |
|
|
|
if ($i == 1) {
|
|
|
|
$revalue .= "<a href='".$this->NameFirst.".".$this->ShortName."'>$v</a>";
|
|
|
|
} else {
|
|
|
|
if ($pageNo == $i) {
|
|
|
|
if ($PageNo == $i) {
|
|
|
|
$revalue .= "$v";
|
|
|
|
} else {
|
|
|
|
$revalue .= "<a href='".$this->NameFirst."-".$i.".".$this->ShortName."'>$v</a>";
|
|
|
@@ -777,7 +777,7 @@ class Archives |
|
|
|
if ($i == 1) {
|
|
|
|
$revalue .= "<option value='".$this->NameFirst.".".$this->ShortName."'>{$i}、{$v}</option>";
|
|
|
|
} else {
|
|
|
|
if ($pageNo == $i) {
|
|
|
|
if ($PageNo == $i) {
|
|
|
|
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."' selected>{$i}、{$v}</option>";
|
|
|
|
} else {
|
|
|
|
$revalue .= "<option value='".$this->NameFirst."-".$i.".".$this->ShortName."'>{$i}、{$v}</option>";
|
|
|
@@ -843,10 +843,10 @@ class Archives |
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @param string $styleName 类型名称
|
|
|
|
* @param string $pageNo 页码数
|
|
|
|
* @param string $PageNo 页码数
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
function GetPageTitlesDM($styleName, $pageNo)
|
|
|
|
function GetPageTitlesDM($styleName, $PageNo)
|
|
|
|
{
|
|
|
|
global $cfg_rewrite;
|
|
|
|
if ($this->TotalPage == 1) {
|
|
|
@@ -867,7 +867,7 @@ class Archives |
|
|
|
$revalue .= "<a href='".$this->Fields['phpurl']."/view.php?aid=$aid&PageNo=$i'>$v</a>";
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if ($pageNo == $i) {
|
|
|
|
if ($PageNo == $i) {
|
|
|
|
$revalue .= " $v ";
|
|
|
|
} else {
|
|
|
|
if ($cfg_rewrite == 'Y') {
|
|
|
@@ -890,7 +890,7 @@ class Archives |
|
|
|
$revalue .= "<option value='".$this->Fields['phpurl']."/view.php?aid=$aid&PageNo=$i'>{$i}、{$v}</option>";
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if ($pageNo == $i) {
|
|
|
|
if ($PageNo == $i) {
|
|
|
|
if ($cfg_rewrite == 'Y') {
|
|
|
|
$revalue .= "<option value='/article/$aid-$i.html' selected>{$i}、{$v}</option>";
|
|
|
|
} else {
|
|
|
|