| @@ -282,7 +282,7 @@ class Archives | |||||
| { | { | ||||
| if($this->Fields['litpic'] == '-' || $this->Fields['litpic'] == '') | if($this->Fields['litpic'] == '-' || $this->Fields['litpic'] == '') | ||||
| { | { | ||||
| $this->Fields['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif'; | |||||
| $this->Fields['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.jpg'; | |||||
| } | } | ||||
| if(!preg_match("#^http:\/\/#i", $this->Fields['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') | if(!preg_match("#^http:\/\/#i", $this->Fields['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') | ||||
| { | { | ||||
| @@ -350,7 +350,8 @@ class Archives | |||||
| */ | */ | ||||
| function MakeHtml($isremote=0) | function MakeHtml($isremote=0) | ||||
| { | { | ||||
| global $cfg_remote_site,$fileFirst; | |||||
| global $cfg_remote_site,$fileFirst,$baidu_seo,$cfg_basehost; | |||||
| if($this->IsError) | if($this->IsError) | ||||
| { | { | ||||
| return ''; | return ''; | ||||
| @@ -404,6 +405,7 @@ class Archives | |||||
| //循环生成HTML文件 | //循环生成HTML文件 | ||||
| else | else | ||||
| { | { | ||||
| $seoUrls = array(); | |||||
| for($i=1;$i<=$this->TotalPage;$i++) | for($i=1;$i<=$this->TotalPage;$i++) | ||||
| { | { | ||||
| if($this->TotalPage > 1) { | if($this->TotalPage > 1) { | ||||
| @@ -413,11 +415,14 @@ class Archives | |||||
| if($i>1) | if($i>1) | ||||
| { | { | ||||
| $TRUEfilename = $this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName; | $TRUEfilename = $this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName; | ||||
| $URLFilename = $fileFirst."_".$i.".".$this->ShortName; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $TRUEfilename = $this->GetTruePath().$filename; | $TRUEfilename = $this->GetTruePath().$filename; | ||||
| $URLFilename = $filename; | |||||
| } | } | ||||
| $seoUrls = array_merge($seoUrls, array($cfg_basehost.$URLFilename)); | |||||
| $this->ParseDMFields($i,1); | $this->ParseDMFields($i,1); | ||||
| $this->dtp->SaveTo($TRUEfilename); | $this->dtp->SaveTo($TRUEfilename); | ||||
| //如果启用远程发布则需要进行判断 | //如果启用远程发布则需要进行判断 | ||||
| @@ -433,6 +438,25 @@ class Archives | |||||
| $this->ftp->upload($localfile, $remotefile, 'ascii'); | $this->ftp->upload($localfile, $remotefile, 'ascii'); | ||||
| } | } | ||||
| } | } | ||||
| if ($baidu_seo == true) { | |||||
| $api = 'http://data.zz.baidu.com/urls?site=https://www.zixue.cn&token=vXkBb4Ot0yhOFcmP'; | |||||
| $ch = curl_init(); | |||||
| $options = array( | |||||
| CURLOPT_URL => $api, | |||||
| CURLOPT_POST => true, | |||||
| CURLOPT_RETURNTRANSFER => true, | |||||
| CURLOPT_POSTFIELDS => implode("\n", $seoUrls), | |||||
| CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), | |||||
| ); | |||||
| curl_setopt_array($ch, $options); | |||||
| $result = curl_exec($ch); | |||||
| $rs = json_decode($result,true); | |||||
| if ($rs["success"]==1) { | |||||
| echo "百度搜索引擎提交成功,剩余次数:".$rs["remain"]."<br/>\r\n"; | |||||
| } | |||||
| } | |||||
| } | } | ||||
| $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); | return $this->GetTrueUrl($filename); | ||||
| @@ -890,18 +914,18 @@ class Archives | |||||
| { | { | ||||
| return ""; | return ""; | ||||
| } | } | ||||
| $PageList = "<li><a>共".$totalPage."页: </a></li>"; | |||||
| $PageList = "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">共".$totalPage."页: </span></li>"; | |||||
| $nPage = $nowPage-1; | $nPage = $nowPage-1; | ||||
| $lPage = $nowPage+1; | $lPage = $nowPage+1; | ||||
| if($nowPage==1) | if($nowPage==1) | ||||
| { | { | ||||
| $PageList.="<li><a href='#'>上一页</a></li>"; | |||||
| $PageList.="<li class='page-item d-none d-sm-block disabled'><a class='page-link' href='#'>上一页</a></li>"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| if($nPage==1) | if($nPage==1) | ||||
| { | { | ||||
| $PageList.="<li><a href='view.php?aid=$aid'>上一页</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='view.php?aid=$aid'>上一页</a></li>"; | |||||
| if($cfg_rewrite == 'Y') | if($cfg_rewrite == 'Y') | ||||
| { | { | ||||
| $PageList = preg_replace("#.php\?aid=(\d+)#i", '-\\1-1.html', $PageList); | $PageList = preg_replace("#.php\?aid=(\d+)#i", '-\\1-1.html', $PageList); | ||||
| @@ -909,7 +933,7 @@ class Archives | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $PageList.="<li><a href='view.php?aid=$aid&pageno=$nPage'>上一页</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='view.php?aid=$aid&pageno=$nPage'>上一页</a></li>"; | |||||
| if($cfg_rewrite == 'Y') | if($cfg_rewrite == 'Y') | ||||
| { | { | ||||
| $PageList = str_replace(".php?aid=", "-", $PageList); | $PageList = str_replace(".php?aid=", "-", $PageList); | ||||
| @@ -923,7 +947,7 @@ class Archives | |||||
| { | { | ||||
| if($nowPage!=1) | if($nowPage!=1) | ||||
| { | { | ||||
| $PageList.="<li><a href='view.php?aid=$aid'>1</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='view.php?aid=$aid'>1</a></li>"; | |||||
| if($cfg_rewrite == 'Y') | if($cfg_rewrite == 'Y') | ||||
| { | { | ||||
| $PageList = preg_replace("#.php\?aid=(\d+)#i", '-\\1-1.html', $PageList); | $PageList = preg_replace("#.php\?aid=(\d+)#i", '-\\1-1.html', $PageList); | ||||
| @@ -931,7 +955,7 @@ class Archives | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $PageList.="<li class=\"thisclass\"><a>1</a></li>"; | |||||
| $PageList.="<li class=\"page-item active\"><a class='page-link'>1</a></li>"; | |||||
| } | } | ||||
| } | } | ||||
| else | else | ||||
| @@ -939,7 +963,7 @@ class Archives | |||||
| $n = $i; | $n = $i; | ||||
| if($nowPage!=$i) | if($nowPage!=$i) | ||||
| { | { | ||||
| $PageList.="<li><a href='view.php?aid=$aid&pageno=$i'>".$n."</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='view.php?aid=$aid&pageno=$i'>".$n."</a></li>"; | |||||
| if($cfg_rewrite == 'Y') | if($cfg_rewrite == 'Y') | ||||
| { | { | ||||
| $PageList = str_replace(".php?aid=", "-", $PageList); | $PageList = str_replace(".php?aid=", "-", $PageList); | ||||
| @@ -948,13 +972,13 @@ class Archives | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $PageList.="<li class=\"thisclass\"><a href='#'>{$n}</a></li>"; | |||||
| $PageList.="<li class=\"page-item active\"><span class='page-link'>{$n}</span></li>"; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if($lPage <= $totalPage) | if($lPage <= $totalPage) | ||||
| { | { | ||||
| $PageList.="<li><a href='view.php?aid=$aid&pageno=$lPage'>下一页</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='view.php?aid=$aid&pageno=$lPage'>下一页</a></li>"; | |||||
| if($cfg_rewrite == 'Y') | if($cfg_rewrite == 'Y') | ||||
| { | { | ||||
| $PageList = str_replace(".php?aid=", "-", $PageList); | $PageList = str_replace(".php?aid=", "-", $PageList); | ||||
| @@ -963,7 +987,7 @@ class Archives | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $PageList.= "<li><a href='#'>下一页</a></li>"; | |||||
| $PageList.= "<li class='page-item'><span class='page-link'>下一页</span></li>"; | |||||
| } | } | ||||
| return $PageList; | return $PageList; | ||||
| } | } | ||||
| @@ -983,22 +1007,22 @@ class Archives | |||||
| { | { | ||||
| return ""; | return ""; | ||||
| } | } | ||||
| $PageList = "<li><a>共".$totalPage."页: </a></li>"; | |||||
| $PageList = "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">共".$totalPage."页: </span></li>"; | |||||
| $nPage = $nowPage-1; | $nPage = $nowPage-1; | ||||
| $lPage = $nowPage+1; | $lPage = $nowPage+1; | ||||
| if($nowPage==1) | if($nowPage==1) | ||||
| { | { | ||||
| $PageList.="<li><a href='#'>上一页</a></li>"; | |||||
| $PageList.="<li class='page-item d-none d-sm-block disabled'><a class='page-link' href='#'>上一页</a></li>"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| if($nPage==1) | if($nPage==1) | ||||
| { | { | ||||
| $PageList.="<li><a href='".$this->NameFirst.".".$this->ShortName."'>上一页</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='".$this->NameFirst.".".$this->ShortName."'>上一页</a></li>"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $PageList.="<li><a href='".$this->NameFirst."_".$nPage.".".$this->ShortName."'>上一页</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='".$this->NameFirst."_".$nPage.".".$this->ShortName."'>上一页</a></li>"; | |||||
| } | } | ||||
| } | } | ||||
| for($i=1;$i<=$totalPage;$i++) | for($i=1;$i<=$totalPage;$i++) | ||||
| @@ -1007,11 +1031,11 @@ class Archives | |||||
| { | { | ||||
| if($nowPage!=1) | if($nowPage!=1) | ||||
| { | { | ||||
| $PageList.="<li><a href='".$this->NameFirst.".".$this->ShortName."'>1</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='".$this->NameFirst.".".$this->ShortName."'>1</a></li>"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $PageList.="<li class=\"thisclass\"><a href='#'>1</a></li>"; | |||||
| $PageList.="<li class=\"page-item active\"><span class='page-link'>1</span></li>"; | |||||
| } | } | ||||
| } | } | ||||
| else | else | ||||
| @@ -1019,21 +1043,21 @@ class Archives | |||||
| $n = $i; | $n = $i; | ||||
| if($nowPage!=$i) | if($nowPage!=$i) | ||||
| { | { | ||||
| $PageList.="<li><a href='".$this->NameFirst."_".$i.".".$this->ShortName."'>".$n."</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='".$this->NameFirst."_".$i.".".$this->ShortName."'>".$n."</a></li>"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $PageList.="<li class=\"thisclass\"><a href='#'>{$n}</a></li>"; | |||||
| $PageList.="<li class=\"page-item active\"><span class='page-link'>{$n}</span></li>"; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if($lPage <= $totalPage) | if($lPage <= $totalPage) | ||||
| { | { | ||||
| $PageList.="<li><a href='".$this->NameFirst."_".$lPage.".".$this->ShortName."'>下一页</a></li>"; | |||||
| $PageList.="<li class='page-item'><a class='page-link' href='".$this->NameFirst."_".$lPage.".".$this->ShortName."'>下一页</a></li>"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $PageList.= "<li><a href='#'>下一页</a></li>"; | |||||
| $PageList.= "<li class='page-item'><span class='page-link'>下一页</span></li>"; | |||||
| } | } | ||||
| return $PageList; | return $PageList; | ||||
| } | } | ||||
| @@ -1230,12 +1254,7 @@ class Archives | |||||
| // 这里可能会有错误 | // 这里可能会有错误 | ||||
| if (version_compare(PHP_VERSION, '5.5.0', '>=')) | if (version_compare(PHP_VERSION, '5.5.0', '>=')) | ||||
| { | { | ||||
| if (version_compare(PHP_VERSION, '8', '>=')) { | |||||
| $body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight8", $body); | |||||
| } else { | |||||
| $body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); | |||||
| } | |||||
| $body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); | |||||
| } else { | } else { | ||||
| $body = @preg_replace("#(^|>)([^<]+)(?=<|$)#sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); | $body = @preg_replace("#(^|>)([^<]+)(?=<|$)#sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); | ||||
| } | } | ||||
| @@ -1248,10 +1267,6 @@ class Archives | |||||
| }//End Archives | }//End Archives | ||||
| function _highlight8($matches) { | |||||
| // TODO | |||||
| } | |||||
| //高亮专用, 替换多次是可能不能达到最多次 | //高亮专用, 替换多次是可能不能达到最多次 | ||||
| function _highlight($string, $words, $result, $pre) | function _highlight($string, $words, $result, $pre) | ||||
| { | { | ||||
| @@ -891,7 +891,7 @@ class ListView | |||||
| $row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']); | $row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']); | ||||
| if($row['litpic'] == '-' || $row['litpic'] == '') | if($row['litpic'] == '-' || $row['litpic'] == '') | ||||
| { | { | ||||
| $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif'; | |||||
| $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.jpg'; | |||||
| } | } | ||||
| if(!preg_match("/^http:\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') | if(!preg_match("/^http:\/\//i", $row['litpic']) && $GLOBALS['cfg_multi_site'] == 'Y') | ||||
| { | { | ||||
| @@ -991,37 +991,36 @@ class ListView | |||||
| if($totalpage<=1 && $this->TotalResult>0) | if($totalpage<=1 && $this->TotalResult>0) | ||||
| { | { | ||||
| return "<li><span class=\"pageinfo\">共 <strong>1</strong>页<strong>".$this->TotalResult."</strong>条记录</span></li>\r\n"; | |||||
| return "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">共 <strong>1</strong>页<strong>".$this->TotalResult."</strong>条记录</span></li>\r\n"; | |||||
| } | } | ||||
| if($this->TotalResult == 0) | if($this->TotalResult == 0) | ||||
| { | { | ||||
| return "<li><span class=\"pageinfo\">共 <strong>0</strong>页<strong>".$this->TotalResult."</strong>条记录</span></li>\r\n"; | |||||
| return "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">共 <strong>0</strong>页<strong>".$this->TotalResult."</strong>条记录</span></li>\r\n"; | |||||
| } | } | ||||
| $purl = $this->GetCurUrl(); | $purl = $this->GetCurUrl(); | ||||
| $maininfo = "<li><span class=\"pageinfo\">共 <strong>{$totalpage}</strong>页<strong>".$this->TotalResult."</strong>条</span></li>\r\n"; | |||||
| $tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields['namerule2']); | |||||
| $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); | |||||
| $maininfo = "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">共 <strong>{$totalpage}</strong>页<strong>".$this->TotalResult."</strong>条</span></li>\r\n"; | |||||
| $tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields['namerule2']); | |||||
| //获得上一页和主页的链接 | //获得上一页和主页的链接 | ||||
| if($this->PageNo != 1) | if($this->PageNo != 1) | ||||
| { | { | ||||
| $prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>上一页</a></li>\r\n"; | |||||
| $indexpage="<li><a 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>\r\n"; | |||||
| $indexpage="<li class='page-item'><a class='page-link' href='".str_replace("{page}",1,$tnamerule)."'>首页</a></li>\r\n"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $indexpage="<li>首页</li>\r\n"; | |||||
| $indexpage="<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
| } | } | ||||
| //下一页,未页的链接 | //下一页,未页的链接 | ||||
| if($this->PageNo!=$totalpage && $totalpage>1) | if($this->PageNo!=$totalpage && $totalpage>1) | ||||
| { | { | ||||
| $nextpage.="<li><a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一页</a></li>\r\n"; | |||||
| $endpage="<li><a 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>\r\n"; | |||||
| $endpage="<li class='page-item'><a class='page-link' href='".str_replace("{page}",$totalpage,$tnamerule)."'>末页</a></li>\r\n"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $endpage="<li>末页</li>\r\n"; | |||||
| $endpage="<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
| } | } | ||||
| //option链接 | //option链接 | ||||
| @@ -1069,11 +1068,11 @@ class ListView | |||||
| { | { | ||||
| if($j==$this->PageNo) | if($j==$this->PageNo) | ||||
| { | { | ||||
| $listdd.= "<li class=\"thisclass\">$j</li>\r\n"; | |||||
| $listdd.= "<li class=\"page-item active\"><span class='page-link'>$j</span></li>\r\n"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $listdd.="<li><a 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>\r\n"; | |||||
| } | } | ||||
| } | } | ||||
| $plist = ''; | $plist = ''; | ||||
| @@ -1109,13 +1108,13 @@ 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><span class=\"pageinfo\">共 1 页/".$this->TotalResult." 条记录</span></li>\r\n"; | |||||
| return "<li class='d-none d-sm-block page-item disabled'><span class='page-link'>共 1 页/".$this->TotalResult." 条记录</span></li>\r\n"; | |||||
| } | } | ||||
| if($this->TotalResult == 0) | if($this->TotalResult == 0) | ||||
| { | { | ||||
| return "<li><span class=\"pageinfo\">共 0 页/".$this->TotalResult." 条记录</span></li>\r\n"; | |||||
| return "<li class='d-none d-sm-block page-item disabled'><span class=\"page-link\">共 0 页/".$this->TotalResult." 条记录</span></li>\r\n"; | |||||
| } | } | ||||
| $maininfo = "<li><span class=\"pageinfo\">共 <strong>{$totalpage}</strong>页<strong>".$this->TotalResult."</strong>条</span></li>\r\n"; | |||||
| $maininfo = "<li class='d-none d-sm-block page-item disabled'><span class=\"page-link\">共 <strong>{$totalpage}</strong>页<strong>".$this->TotalResult."</strong>条</span></li>\r\n"; | |||||
| $purl = $this->GetCurUrl(); | $purl = $this->GetCurUrl(); | ||||
| // 如果开启为静态,则对规则进行替换 | // 如果开启为静态,则对规则进行替换 | ||||
| @@ -1136,21 +1135,21 @@ class ListView | |||||
| //获得上一页和下一页的链接 | //获得上一页和下一页的链接 | ||||
| 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>\r\n"; | |||||
| $indexpage="<li class='page-item'><a href='".$purl."PageNo=1' class='page-link'>首页</a></li>\r\n"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $indexpage="<li><a>首页</a></li>\r\n"; | |||||
| $indexpage="<li class='page-item'><a class='page-link'>首页</a></li>\r\n"; | |||||
| } | } | ||||
| 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>\r\n"; | |||||
| $endpage="<li class='page-item'><a href='".$purl."PageNo=$totalpage' class='page-link'>末页</a></li>\r\n"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $endpage="<li><a>末页</a></li>\r\n"; | |||||
| $endpage="<li class='page-item'><a class='page-link'>末页</a></li>\r\n"; | |||||
| } | } | ||||
| @@ -1178,11 +1177,11 @@ class ListView | |||||
| { | { | ||||
| if($j==$this->PageNo) | if($j==$this->PageNo) | ||||
| { | { | ||||
| $listdd.= "<li class=\"thisclass\"><a>$j</a></li>\r\n"; | |||||
| $listdd.= "<li class=\"page-item active\"><a class='page-link'>$j</a></li>\r\n"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $listdd.="<li><a 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>\r\n"; | |||||
| } | } | ||||
| } | } | ||||
| @@ -64,10 +64,10 @@ class PartView | |||||
| } | } | ||||
| } | } | ||||
| $_sys_globals['curfile'] = 'partview'; | $_sys_globals['curfile'] = 'partview'; | ||||
| $_sys_globals['typename'] = $this->Fields['typename']; | |||||
| @$_sys_globals['typename'] = $this->Fields['typename']; | |||||
| //设置环境变量 | //设置环境变量 | ||||
| SetSysEnv($this->TypeID,$this->Fields['typename'],0,'','partview'); | |||||
| @SetSysEnv($this->TypeID,$this->Fields['typename'],0,'','partview'); | |||||
| } | } | ||||
| SetSysEnv($this->TypeID,'',0,'','partview'); | SetSysEnv($this->TypeID,'',0,'','partview'); | ||||
| $this->Fields['typeid'] = $this->TypeID; | $this->Fields['typeid'] = $this->TypeID; | ||||
| @@ -172,7 +172,11 @@ class TagList | |||||
| if (file_exists($makeDir)) { | if (file_exists($makeDir)) { | ||||
| header('HTTP/1.1 301 Moved Permanently'); | header('HTTP/1.1 301 Moved Permanently'); | ||||
| header('Location:a/tags/' . GetPinyin($this->Tag) . "/"); | |||||
| if (!empty($this->Tag)) { | |||||
| header('Location:a/tags/' . GetPinyin($this->Tag) . "/"); | |||||
| } else { | |||||
| header('Location:a/tags/'); | |||||
| } | |||||
| exit; | exit; | ||||
| } | } | ||||
| @@ -440,27 +444,27 @@ class TagList | |||||
| } | } | ||||
| $totalpage = $this->TotalPage; | $totalpage = $this->TotalPage; | ||||
| 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 d-none d-sm-block 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 d-none d-sm-block disabled'><span class=\"page-link\">共0页/" . $this->TotalResult . "条</span></li>"; | |||||
| } | } | ||||
| $maininfo = "<span class=\"pageinfo\">共{$totalpage}页/" . $this->TotalResult . "条</span>\r\n"; | |||||
| $maininfo = "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">共{$totalpage}页/" . $this->TotalResult . "条</span></li>\r\n"; | |||||
| $purl = $this->GetCurUrl(); | $purl = $this->GetCurUrl(); | ||||
| $purl .= "?/" . urlencode($this->Tag); | $purl .= "?/" . urlencode($this->Tag); | ||||
| //获得上一页和下一页的链接 | //获得上一页和下一页的链接 | ||||
| if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
| $prepage .= "<li><a href='" . $purl . "/$prepagenum/'>上一页</a></li>\r\n"; | |||||
| $indexpage = "<li><a href='" . $purl . "/1/'>首页</a></li>\r\n"; | |||||
| $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"; | |||||
| } else { | } else { | ||||
| $indexpage = "<li><a>首页</a></li>\r\n"; | |||||
| $indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
| } | } | ||||
| if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
| $nextpage .= "<li><a href='" . $purl . "/$nextpagenum/'>下一页</a></li>\r\n"; | |||||
| $endpage = "<li><a href='" . $purl . "/$totalpage/'>末页</a></li>\r\n"; | |||||
| $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"; | |||||
| } else { | } else { | ||||
| $endpage = "<li><a>末页</a></li>\r\n"; | |||||
| $endpage = "<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
| } | } | ||||
| //获得数字链接 | //获得数字链接 | ||||
| @@ -480,9 +484,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=\"thisclass\"><a>$j</a></li>\r\n"; | |||||
| $listdd .= "<li class=\"page-item active\"><span class='page-link'>$j</span></li>\r\n"; | |||||
| } else { | } else { | ||||
| $listdd .= "<li><a href='" . $purl . "/$j/'>" . $j . "</a></li>\r\n"; | |||||
| $listdd .= "<li class='page-item'><a class='page-link' href='" . $purl . "/$j/'>" . $j . "</a></li>\r\n"; | |||||
| } | } | ||||
| } | } | ||||
| $plist = ''; | $plist = ''; | ||||
| @@ -518,12 +522,12 @@ class TagList | |||||
| } | } | ||||
| $totalpage = $this->TotalPage; | $totalpage = $this->TotalPage; | ||||
| 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 d-none d-sm-block 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 d-none d-sm-block disabled'><span class=\"page-link\">共0页/" . $this->TotalResult . "条</span></li>"; | |||||
| } | } | ||||
| $maininfo = "<span class=\"pageinfo\">共{$totalpage}页/" . $this->TotalResult . "条</span>\r\n"; | |||||
| $maininfo = "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">共{$totalpage}页/" . $this->TotalResult . "条</span></li>\r\n"; | |||||
| // $purl = $this->GetCurUrl(); | // $purl = $this->GetCurUrl(); | ||||
| $purl = "/a/tags/" . GetPinyin($this->Tag); | $purl = "/a/tags/" . GetPinyin($this->Tag); | ||||
| @@ -531,16 +535,16 @@ class TagList | |||||
| //获得上一页和下一页的链接 | //获得上一页和下一页的链接 | ||||
| if ($this->PageNo != 1) { | if ($this->PageNo != 1) { | ||||
| $prepage .= "<li><a href='" . $purl . "/$prepagenum/'>上一页</a></li>\r\n"; | |||||
| $indexpage = "<li><a href='" . $purl . "/1/'>首页</a></li>\r\n"; | |||||
| $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"; | |||||
| } else { | } else { | ||||
| $indexpage = "<li><a>首页</a></li>\r\n"; | |||||
| $indexpage = "<li class='page-item'><span class='page-link'>首页</span></li>\r\n"; | |||||
| } | } | ||||
| if ($this->PageNo != $totalpage && $totalpage > 1) { | if ($this->PageNo != $totalpage && $totalpage > 1) { | ||||
| $nextpage .= "<li><a href='" . $purl . "/$nextpagenum/'>下一页</a></li>\r\n"; | |||||
| $endpage = "<li><a href='" . $purl . "/$totalpage/'>末页</a></li>\r\n"; | |||||
| $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"; | |||||
| } else { | } else { | ||||
| $endpage = "<li><a>末页</a></li>\r\n"; | |||||
| $endpage = "<li class='page-item'><span class='page-link'>末页</span></li>\r\n"; | |||||
| } | } | ||||
| //获得数字链接 | //获得数字链接 | ||||
| @@ -560,9 +564,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=\"thisclass\"><a>$j</a></li>\r\n"; | |||||
| $listdd .= "<li class=\"page-item active\"><span class='page-link'>$j</span></li>\r\n"; | |||||
| } else { | } else { | ||||
| $listdd .= "<li><a href='" . $purl . "/$j/'>" . $j . "</a></li>\r\n"; | |||||
| $listdd .= "<li class='page-item'><a class='page-link' href='" . $purl . "/$j/'>" . $j . "</a></li>\r\n"; | |||||
| } | } | ||||
| } | } | ||||
| $plist = ''; | $plist = ''; | ||||
| @@ -4,4 +4,17 @@ | |||||
| // 所以这里仅做一个文件引入映射,今后的开发,如果遇到此类函数 | // 所以这里仅做一个文件引入映射,今后的开发,如果遇到此类函数 | ||||
| // 在开发过程中直接使用helper('archive');即可 | // 在开发过程中直接使用helper('archive');即可 | ||||
| helper('archive'); | |||||
| helper('archive'); | |||||
| function IndexSub($idx, $num) { | |||||
| return intval($idx - $num) == 0? '0 ' : intval($idx - $num); | |||||
| } | |||||
| // 用来返回index的active | |||||
| function IndexActive($idx){ | |||||
| if ($idx == 1) { | |||||
| return ' active'; | |||||
| } else { | |||||
| return ''; | |||||
| } | |||||
| } | |||||
| @@ -278,10 +278,12 @@ $arrs2 = array(0x20,0x3c,0x61,0x20,0x68,0x72,0x65,0x66,0x3d,0x68,0x74,0x74,0x70, | |||||
| */ | */ | ||||
| function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0) | function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0) | ||||
| { | { | ||||
| global $cfg_soft_lang,$cfg_cmsurl; | |||||
| if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..'; | if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..'; | ||||
| $htmlhead = "<html>\r\n<head>\r\n<title>DedeCMS提示信息</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\">\r\n<meta name=\"renderer\" content=\"webkit\">\r\n<meta http-equiv=\"Cache-Control\" content=\"no-siteapp\" />"; | |||||
| $htmlhead .= "<base target='_self'/>\r\n<style>div{line-height:160%;}</style></head>\r\n<body leftmargin='0' topmargin='0' bgcolor='#FFFFFF'>".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."\r\n<center>\r\n<script>\r\n"; | |||||
| $htmlhead = "<html>\r\n<head>\r\n<title>DedeCMS提示信息</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_soft_lang}\" />\r\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">"; | |||||
| $htmlhead .= "<link rel=\"stylesheet\" href=\"{$cfg_cmsurl}/static/css/bootstrap.min.css\"><link href=\"{$cfg_cmsurl}/static/font-awesome/css/font-awesome.min.css\" rel=\"stylesheet\">"; | |||||
| $htmlhead .= "<base target='_self'/></head>\r\n<body leftmargin='0' topmargin='0' bgcolor='#FFFFFF'>".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."\r\n<center>\r\n<script>\r\n"; | |||||
| $htmlfoot = "</script>\r\n</center>\r\n</body>\r\n</html>\r\n"; | $htmlfoot = "</script>\r\n</center>\r\n</body>\r\n</html>\r\n"; | ||||
| $litime = ($limittime==0 ? 1000 : $limittime); | $litime = ($limittime==0 ? 1000 : $limittime); | ||||
| @@ -312,9 +314,8 @@ function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0) | |||||
| if(pgo==0){ location='$gourl'; pgo=1; } | if(pgo==0){ location='$gourl'; pgo=1; } | ||||
| }\r\n"; | }\r\n"; | ||||
| $rmsg = $func; | $rmsg = $func; | ||||
| $rmsg .= "document.write(\"<br /><div style='width:450px;padding:0px;border:1px solid #DADADA;'>"; | |||||
| $rmsg .= "<div style='padding:6px;font-size:12px;border-bottom:1px solid #DADADA;background-color:#FFF;'><b>DedeCMS 提示信息!</b></div>\");\r\n"; | |||||
| $rmsg .= "document.write(\"<div style='height:130px;font-size:10pt;background:#ffffff'><br />\");\r\n"; | |||||
| $rmsg .= "document.write(\"<main class='container'><div class='modal' tabindex='-1' role='dialog' style='display:block'><div class='modal-dialog'><div class='modal-content'><div class='modal-header'><h6 class='modal-title'>"; | |||||
| $rmsg .= "DedeCMS 提示信息!</h6></div><div class='modal-body'>\");\r\n"; | |||||
| $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");\r\n"; | $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");\r\n"; | ||||
| $rmsg .= "document.write(\""; | $rmsg .= "document.write(\""; | ||||
| @@ -323,17 +324,17 @@ function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0) | |||||
| if( $gourl != 'javascript:;' && $gourl != '') | if( $gourl != 'javascript:;' && $gourl != '') | ||||
| { | { | ||||
| $rmsg .= "<br /><a href='{$gourl}'>如果你的浏览器没反应,请点击这里...</a>"; | $rmsg .= "<br /><a href='{$gourl}'>如果你的浏览器没反应,请点击这里...</a>"; | ||||
| $rmsg .= "<br/></div>\");\r\n"; | |||||
| $rmsg .= "</div></div></div></div></main>\");\r\n"; | |||||
| $rmsg .= "setTimeout('JumpUrl()',$litime);"; | $rmsg .= "setTimeout('JumpUrl()',$litime);"; | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $rmsg .= "<br/></div>\");\r\n"; | |||||
| $rmsg .= "</div></div></div></div></main>\");\r\n"; | |||||
| } | } | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $rmsg .= "<br/><br/></div>\");\r\n"; | |||||
| $rmsg .= "</div></div></div></div></main>\");\r\n"; | |||||
| } | } | ||||
| $msg = $htmlhead.$rmsg.$htmlfoot; | $msg = $htmlhead.$rmsg.$htmlfoot; | ||||
| } | } | ||||
| @@ -294,13 +294,13 @@ class DataListCP | |||||
| //无结果或只有一页的情况 | //无结果或只有一页的情况 | ||||
| if($totalpage<=1 && $this->totalResult > 0) | if($totalpage<=1 && $this->totalResult > 0) | ||||
| { | { | ||||
| return "<span>{$lang_total} 1 {$lang_page}/".$this->totalResult.$lang_record_number."</span>"; | |||||
| return "<ul class='pagination justify-content-center'>\n<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">{$lang_total} 1 {$lang_page}/".$this->totalResult.$lang_record_number."</span></li></ul>"; | |||||
| } | } | ||||
| if($this->totalResult == 0) | if($this->totalResult == 0) | ||||
| { | { | ||||
| return "<span>{$lang_total} 0 {$lang_page}/".$this->totalResult.$lang_record_number."</span>"; | |||||
| return "<ul class='pagination justify-content-center'>\n<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">{$lang_total} 0 {$lang_page}/".$this->totalResult.$lang_record_number."</span></li></ul>"; | |||||
| } | } | ||||
| $infos = "<span>{$lang_total} {$totalpage} {$lang_page}/{$this->totalResult}{$lang_record_number} </span>"; | |||||
| $infos = "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">{$lang_total} {$totalpage} {$lang_page}/{$this->totalResult}{$lang_record_number} </span></li>"; | |||||
| if($this->totalResult!=0) | if($this->totalResult!=0) | ||||
| { | { | ||||
| $this->getValues['totalresult'] = $this->totalResult; | $this->getValues['totalresult'] = $this->totalResult; | ||||
| @@ -319,21 +319,21 @@ class DataListCP | |||||
| //获得上一页和下一页的链接 | //获得上一页和下一页的链接 | ||||
| if($this->pageNO != 1) | if($this->pageNO != 1) | ||||
| { | { | ||||
| $prepage .= "<a class='prePage' href='".$purl."pageno=$prepagenum'>$lang_pre_page</a> \n"; | |||||
| $indexpage = "<a class='indexPage' href='".$purl."pageno=1'>$lang_index_page</a> \n"; | |||||
| $prepage .= "<li class='page-item'><a class='page-link' href='".$purl."pageno=$prepagenum'>$lang_pre_page</a></li> \n"; | |||||
| $indexpage = "<li class='page-item'><a class='page-link' href='".$purl."pageno=1'>$lang_index_page</a></li> \n"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $indexpage = "<span class='indexPage'>"."$lang_index_page \n"."</span>"; | |||||
| $indexpage = "<li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">"."$lang_index_page \n"."</span></li>"; | |||||
| } | } | ||||
| if($this->pageNO != $totalpage && $totalpage > 1) | if($this->pageNO != $totalpage && $totalpage > 1) | ||||
| { | { | ||||
| $nextpage.="<a class='nextPage' href='".$purl."pageno=$nextpagenum'>$lang_next_page</a> \n"; | |||||
| $endpage="<a class='endPage' href='".$purl."pageno=$totalpage'>$lang_end_page</a> \n"; | |||||
| $nextpage.="<li class='page-item'><a class='page-link' href='".$purl."pageno=$nextpagenum'>$lang_next_page</a></li> \n"; | |||||
| $endpage="<li class='page-item'><a class='page-link' href='".$purl."pageno=$totalpage'>$lang_end_page</a></li> \n"; | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| $endpage=" <strong>$lang_end_page</strong> \n"; | |||||
| $endpage=" <li class='page-item d-none d-sm-block disabled'><span class=\"page-link\">$lang_end_page</span></li> \n"; | |||||
| } | } | ||||
| //获得数字链接 | //获得数字链接 | ||||
| @@ -358,10 +358,10 @@ class DataListCP | |||||
| } | } | ||||
| for($j; $j<=$total_list; $j++) | for($j; $j<=$total_list; $j++) | ||||
| { | { | ||||
| $listdd .= $j==$this->pageNO ? "<strong>$j</strong>\n" : "<a href='".$purl."pageno=$j'>".$j."</a>\n"; | |||||
| $listdd .= $j==$this->pageNO ? "<li class='page-item'><span class='page-link'>$j</span></li>\r\n" : "<li class='page-item'><a class='page-link' href='".$purl."pageno=$j'>".$j."</a></li>\n"; | |||||
| } | } | ||||
| $plist = "<div class=\"pagelistbox\">\n"; | |||||
| $plist = "<ul class='pagination justify-content-center'>\n"; | |||||
| //info,index,end,pre,next,pageno,form | //info,index,end,pre,next,pageno,form | ||||
| if(preg_match("#info#i",$atts['listitem'])) | if(preg_match("#info#i",$atts['listitem'])) | ||||
| @@ -398,7 +398,7 @@ class DataListCP | |||||
| } | } | ||||
| $plist .= "</form>\n"; | $plist .= "</form>\n"; | ||||
| } | } | ||||
| $plist .= "</div>\n"; | |||||
| $plist .= "</ul>\n"; | |||||
| return $plist; | return $plist; | ||||
| } | } | ||||
| @@ -41,7 +41,15 @@ function _FilterAll($fk, &$svar) | |||||
| } | } | ||||
| } | } | ||||
| if (!$magic_quotes_gpc) { | if (!$magic_quotes_gpc) { | ||||
| $svar = addslashes($svar); | |||||
| // var_dump($svar); | |||||
| if (is_array($svar)) { | |||||
| foreach ($svar as $key => $value) { | |||||
| $svar[$key] = addslashes($svar[$key]); | |||||
| } | |||||
| } else { | |||||
| $svar = addslashes($svar); | |||||
| } | |||||
| } | } | ||||
| return $svar; | return $svar; | ||||
| } | } | ||||
| @@ -76,7 +76,7 @@ if ( ! function_exists('OpenFtp')) | |||||
| } | } | ||||
| if(!ftp_login($g_ftpLink,$cfg_ftp_user,$cfg_ftp_pwd)) | if(!ftp_login($g_ftpLink,$cfg_ftp_user,$cfg_ftp_pwd)) | ||||
| { | { | ||||
| echo "登陆FTP失败!"; | |||||
| echo "登录FTP失败!"; | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| } | } | ||||
| @@ -66,10 +66,13 @@ function lib_channel(&$ctag,&$refObj) | |||||
| else | else | ||||
| { | { | ||||
| $row2 = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$typeid' "); | $row2 = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$typeid' "); | ||||
| $typeid = $row2['id']; | |||||
| $reid = $row2['reid']; | |||||
| $topid = $row2['topid']; | |||||
| $issetInfos = true; | |||||
| if (is_array($row2)) { | |||||
| $typeid = $row2['id']; | |||||
| $reid = $row2['reid']; | |||||
| $topid = $row2['topid']; | |||||
| $issetInfos = true; | |||||
| } | |||||
| } | } | ||||
| if($type=='' || $type=='sun') $type='son'; | if($type=='' || $type=='sun') $type='son'; | ||||
| @@ -0,0 +1,17 @@ | |||||
| <?php | |||||
| /** | |||||
| * 用于注释的标签 | |||||
| * | |||||
| * @version $Id: comment.lib.php 1 9:29 2020年9月2日Z tianya $ | |||||
| * @package DedeCMS.Taglib | |||||
| * @copyright Copyright (c) 2007 - 2020, DesDev, Inc. | |||||
| * @license http://help.dedecms.com/usersguide/license.html | |||||
| * @link http://www.dedecms.com | |||||
| */ | |||||
| // 只是用于进行注释 | |||||
| function lib_comment(&$ctag, &$refObj) | |||||
| { | |||||
| return ""; | |||||
| } | |||||
| ?> | |||||
| @@ -27,7 +27,7 @@ if(!defined('DEDEINC')) | |||||
| <attributes> | <attributes> | ||||
| <iterm>row:调用数目</iterm> | <iterm>row:调用数目</iterm> | ||||
| <iterm>iscommend:是否为推荐会员</iterm> | <iterm>iscommend:是否为推荐会员</iterm> | ||||
| <iterm>orderby:按登陆时间排序 money 按金钱排序 scores 按积分排序</iterm> | |||||
| <iterm>orderby:按登录时间排序 money 按金钱排序 scores 按积分排序</iterm> | |||||
| </attributes> | </attributes> | ||||
| >>dede>>*/ | >>dede>>*/ | ||||
| @@ -42,8 +42,8 @@ function lib_tag(&$ctag, &$refObj) | |||||
| $ltype = $sort; | $ltype = $sort; | ||||
| $num = $row; | $num = $row; | ||||
| $addsql = ''; | |||||
| $dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); // 取一个平均 | $dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); // 取一个平均 | ||||
| $addsql = "WHERE 1=1 AND total >= {$dd['tt']}"; | |||||
| if ($getall == 0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid'])) { | if ($getall == 0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid'])) { | ||||
| $dsql->SetQuery("SELECT tid FROM `#@__taglist` WHERE aid = '{$refObj->Fields['aid']}' "); | $dsql->SetQuery("SELECT tid FROM `#@__taglist` WHERE aid = '{$refObj->Fields['aid']}' "); | ||||
| @@ -53,12 +53,12 @@ function lib_tag(&$ctag, &$refObj) | |||||
| $ids .= ($ids == '' ? $row['tid'] : ',' . $row['tid']); | $ids .= ($ids == '' ? $row['tid'] : ',' . $row['tid']); | ||||
| } | } | ||||
| if ($ids != '') { | if ($ids != '') { | ||||
| $addsql = " WHERE id IN($ids) AND total >= {$dd['tt']}"; | |||||
| $addsql .= " AND id IN($ids) AND"; | |||||
| } | } | ||||
| if ($addsql == '') return ''; | if ($addsql == '') return ''; | ||||
| } else { | } else { | ||||
| if (!empty($typeid)) { | if (!empty($typeid)) { | ||||
| $addsql = " WHERE typeid='$typeid' AND total >= {$dd['tt']}"; | |||||
| $addsql .= " AND typeid='$typeid'"; | |||||
| } | } | ||||
| } | } | ||||
| @@ -11,31 +11,5 @@ | |||||
| */ | */ | ||||
| function plus_newvisitor(&$atts,&$refObj,&$fields) | function plus_newvisitor(&$atts,&$refObj,&$fields) | ||||
| { | { | ||||
| global $dsql,$_vars,$cfg_memberurl; | |||||
| $attlist = "titlelen=30,infolen=200,row=6"; | |||||
| FillAtts($atts,$attlist); | |||||
| FillFields($atts,$fields,$refObj); | |||||
| extract($atts, EXTR_OVERWRITE); | |||||
| $mid = $_vars['mid']; | |||||
| $query = "SELECT h.*,mb.face,mb.sex,mb.userid AS loginid,mb.uname,s.sign FROM `#@__member_vhistory` h | |||||
| LEFT JOIN `#@__member` mb ON mb.mid = h.vid | |||||
| LEFT JOIN `#@__member_space` s ON s.mid = h.vid | |||||
| WHERE h.mid='$mid' ORDER BY h.vtime DESC LIMIT 0,$row"; | |||||
| $dsql->SetQuery($query); | |||||
| $dsql->Execute("al"); | |||||
| $rearr = array(); | |||||
| while($row = $dsql->GetArray("al")) | |||||
| { | |||||
| $row['url'] = $cfg_memberurl."/index.php?uid=".$row['loginid']; | |||||
| if(empty($row['face'])) | |||||
| { | |||||
| $row['face']=($row['sex']=='?')? $cfg_memberurl.'/templets/images/dfgirl.png' : $cfg_memberurl.'/templets/images/dfboy.png'; | |||||
| } | |||||
| $rearr[] = $row; | |||||
| } | |||||
| $dsql->FreeResult("al"); | |||||
| return $rearr; | |||||
| return ""; | |||||
| } | } | ||||
| @@ -40,7 +40,7 @@ class TypeLink | |||||
| $this->indexName = $GLOBALS['cfg_indexname']; | $this->indexName = $GLOBALS['cfg_indexname']; | ||||
| $this->baseDir = $GLOBALS['cfg_basedir']; | $this->baseDir = $GLOBALS['cfg_basedir']; | ||||
| $this->modDir = $GLOBALS['cfg_templets_dir']; | $this->modDir = $GLOBALS['cfg_templets_dir']; | ||||
| $this->SplitSymbol = $GLOBALS['cfg_list_symbol']; | |||||
| $this->SplitSymbol = $GLOBALS['cfg_list_symbol'] === " > "? "" : $GLOBALS['cfg_list_symbol']; | |||||
| $this->dsql = $GLOBALS['dsql']; | $this->dsql = $GLOBALS['dsql']; | ||||
| $this->TypeID = $typeid; | $this->TypeID = $typeid; | ||||
| $this->valuePosition = ''; | $this->valuePosition = ''; | ||||
| @@ -112,9 +112,9 @@ class TypeLink | |||||
| { | { | ||||
| if ( defined('DEDEMOB') ) | if ( defined('DEDEMOB') ) | ||||
| { | { | ||||
| $indexpage = "<a href='index.php'>".$this->indexName."</a>"; | |||||
| $indexpage = "<li class='breadcrumb-item'><a href='index.php'>".$this->indexName."</a></li>"; | |||||
| } else{ | } else{ | ||||
| $indexpage = "<a href='".$this->indexUrl."'>".$this->indexName."</a>"; | |||||
| $indexpage = "<li class='breadcrumb-item'><a href='".$this->indexUrl."'>".$this->indexName."</a></li>"; | |||||
| } | } | ||||
| if($this->valuePosition!="" && $islink) | if($this->valuePosition!="" && $islink) | ||||
| @@ -196,7 +196,7 @@ class TypeLink | |||||
| function GetOneTypeLink($typeinfos) | function GetOneTypeLink($typeinfos) | ||||
| { | { | ||||
| $typepage = $this->GetOneTypeUrl($typeinfos); | $typepage = $this->GetOneTypeUrl($typeinfos); | ||||
| $typelink = "<a href='".$typepage."'>".$typeinfos['typename']."</a>"; | |||||
| $typelink = "<li class='breadcrumb-item'><a href='".$typepage."'>".$typeinfos['typename']."</a></a>"; | |||||
| return $typelink; | return $typelink; | ||||
| } | } | ||||