diff --git a/src/include/arc.archives.class.php b/src/include/arc.archives.class.php index 42dc1b92..d2168aa6 100755 --- a/src/include/arc.archives.class.php +++ b/src/include/arc.archives.class.php @@ -282,7 +282,7 @@ class Archives { 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') { @@ -350,7 +350,8 @@ class Archives */ function MakeHtml($isremote=0) { - global $cfg_remote_site,$fileFirst; + global $cfg_remote_site,$fileFirst,$baidu_seo,$cfg_basehost; + if($this->IsError) { return ''; @@ -404,6 +405,7 @@ class Archives //循环生成HTML文件 else { + $seoUrls = array(); for($i=1;$i<=$this->TotalPage;$i++) { if($this->TotalPage > 1) { @@ -413,11 +415,14 @@ class Archives if($i>1) { $TRUEfilename = $this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName; + $URLFilename = $fileFirst."_".$i.".".$this->ShortName; } else { $TRUEfilename = $this->GetTruePath().$filename; + $URLFilename = $filename; } + $seoUrls = array_merge($seoUrls, array($cfg_basehost.$URLFilename)); $this->ParseDMFields($i,1); $this->dtp->SaveTo($TRUEfilename); //如果启用远程发布则需要进行判断 @@ -433,6 +438,25 @@ class Archives $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"]."
\r\n"; + } + } } $this->dsql->ExecuteNoneQuery("Update `#@__archives` SET ismake=1 WHERE id='".$this->ArcID."'"); return $this->GetTrueUrl($filename); @@ -890,18 +914,18 @@ class Archives { return ""; } - $PageList = "
  • 共".$totalPage."页:
  • "; + $PageList = "
  • 共".$totalPage."页:
  • "; $nPage = $nowPage-1; $lPage = $nowPage+1; if($nowPage==1) { - $PageList.="
  • 上一页
  • "; + $PageList.="
  • 上一页
  • "; } else { if($nPage==1) { - $PageList.="
  • 上一页
  • "; + $PageList.="
  • 上一页
  • "; if($cfg_rewrite == 'Y') { $PageList = preg_replace("#.php\?aid=(\d+)#i", '-\\1-1.html', $PageList); @@ -909,7 +933,7 @@ class Archives } else { - $PageList.="
  • 上一页
  • "; + $PageList.="
  • 上一页
  • "; if($cfg_rewrite == 'Y') { $PageList = str_replace(".php?aid=", "-", $PageList); @@ -923,7 +947,7 @@ class Archives { if($nowPage!=1) { - $PageList.="
  • 1
  • "; + $PageList.="
  • 1
  • "; if($cfg_rewrite == 'Y') { $PageList = preg_replace("#.php\?aid=(\d+)#i", '-\\1-1.html', $PageList); @@ -931,7 +955,7 @@ class Archives } else { - $PageList.="
  • 1
  • "; + $PageList.="
  • 1
  • "; } } else @@ -939,7 +963,7 @@ class Archives $n = $i; if($nowPage!=$i) { - $PageList.="
  • ".$n."
  • "; + $PageList.="
  • ".$n."
  • "; if($cfg_rewrite == 'Y') { $PageList = str_replace(".php?aid=", "-", $PageList); @@ -948,13 +972,13 @@ class Archives } else { - $PageList.="
  • {$n}
  • "; + $PageList.="
  • {$n}
  • "; } } } if($lPage <= $totalPage) { - $PageList.="
  • 下一页
  • "; + $PageList.="
  • 下一页
  • "; if($cfg_rewrite == 'Y') { $PageList = str_replace(".php?aid=", "-", $PageList); @@ -963,7 +987,7 @@ class Archives } else { - $PageList.= "
  • 下一页
  • "; + $PageList.= "
  • 下一页
  • "; } return $PageList; } @@ -983,22 +1007,22 @@ class Archives { return ""; } - $PageList = "
  • 共".$totalPage."页:
  • "; + $PageList = "
  • 共".$totalPage."页:
  • "; $nPage = $nowPage-1; $lPage = $nowPage+1; if($nowPage==1) { - $PageList.="
  • 上一页
  • "; + $PageList.="
  • 上一页
  • "; } else { if($nPage==1) { - $PageList.="
  • 上一页
  • "; + $PageList.="
  • 上一页
  • "; } else { - $PageList.="
  • 上一页
  • "; + $PageList.="
  • 上一页
  • "; } } for($i=1;$i<=$totalPage;$i++) @@ -1007,11 +1031,11 @@ class Archives { if($nowPage!=1) { - $PageList.="
  • 1
  • "; + $PageList.="
  • 1
  • "; } else { - $PageList.="
  • 1
  • "; + $PageList.="
  • 1
  • "; } } else @@ -1019,21 +1043,21 @@ class Archives $n = $i; if($nowPage!=$i) { - $PageList.="
  • ".$n."
  • "; + $PageList.="
  • ".$n."
  • "; } else { - $PageList.="
  • {$n}
  • "; + $PageList.="
  • {$n}
  • "; } } } if($lPage <= $totalPage) { - $PageList.="
  • 下一页
  • "; + $PageList.="
  • 下一页
  • "; } else { - $PageList.= "
  • 下一页
  • "; + $PageList.= "
  • 下一页
  • "; } return $PageList; } @@ -1230,12 +1254,7 @@ class Archives // 这里可能会有错误 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 { $body = @preg_replace("#(^|>)([^<]+)(?=<|$)#sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); } @@ -1248,10 +1267,6 @@ class Archives }//End Archives -function _highlight8($matches) { - // TODO -} - //高亮专用, 替换多次是可能不能达到最多次 function _highlight($string, $words, $result, $pre) { diff --git a/src/include/arc.listview.class.php b/src/include/arc.listview.class.php index 8b0d0409..c90cce1d 100755 --- a/src/include/arc.listview.class.php +++ b/src/include/arc.listview.class.php @@ -891,7 +891,7 @@ class ListView $row['ispart'],$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']); 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') { @@ -991,37 +991,36 @@ class ListView if($totalpage<=1 && $this->TotalResult>0) { - return "
  • 1".$this->TotalResult."条记录
  • \r\n"; + return "
  • 1".$this->TotalResult."条记录
  • \r\n"; } if($this->TotalResult == 0) { - return "
  • 0".$this->TotalResult."条记录
  • \r\n"; + return "
  • 0".$this->TotalResult."条记录
  • \r\n"; } $purl = $this->GetCurUrl(); - $maininfo = "
  • {$totalpage}".$this->TotalResult."
  • \r\n"; - $tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields['namerule2']); - $tnamerule = preg_replace("/^(.*)\//", '', $tnamerule); + $maininfo = "
  • {$totalpage}".$this->TotalResult."
  • \r\n"; + $tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields['namerule2']); //获得上一页和主页的链接 if($this->PageNo != 1) { - $prepage.="
  • 上一页
  • \r\n"; - $indexpage="
  • 首页
  • \r\n"; + $prepage.="
  • 上一页
  • \r\n"; + $indexpage="
  • 首页
  • \r\n"; } else { - $indexpage="
  • 首页
  • \r\n"; + $indexpage="
  • 首页
  • \r\n"; } //下一页,未页的链接 if($this->PageNo!=$totalpage && $totalpage>1) { - $nextpage.="
  • 下一页
  • \r\n"; - $endpage="
  • 末页
  • \r\n"; + $nextpage.="
  • 下一页
  • \r\n"; + $endpage="
  • 末页
  • \r\n"; } else { - $endpage="
  • 末页
  • \r\n"; + $endpage="
  • 末页
  • \r\n"; } //option链接 @@ -1069,11 +1068,11 @@ class ListView { if($j==$this->PageNo) { - $listdd.= "
  • $j
  • \r\n"; + $listdd.= "
  • $j
  • \r\n"; } else { - $listdd.="
  • ".$j."
  • \r\n"; + $listdd.="
  • ".$j."
  • \r\n"; } } $plist = ''; @@ -1109,13 +1108,13 @@ class ListView $totalpage = ceil($this->TotalResult/$this->PageSize); if($totalpage<=1 && $this->TotalResult>0) { - return "
  • 共 1 页/".$this->TotalResult." 条记录
  • \r\n"; + return "
  • 共 1 页/".$this->TotalResult." 条记录
  • \r\n"; } if($this->TotalResult == 0) { - return "
  • 共 0 页/".$this->TotalResult." 条记录
  • \r\n"; + return "
  • 共 0 页/".$this->TotalResult." 条记录
  • \r\n"; } - $maininfo = "
  • {$totalpage}".$this->TotalResult."
  • \r\n"; + $maininfo = "
  • {$totalpage}".$this->TotalResult."
  • \r\n"; $purl = $this->GetCurUrl(); // 如果开启为静态,则对规则进行替换 @@ -1136,21 +1135,21 @@ class ListView //获得上一页和下一页的链接 if($this->PageNo != 1) { - $prepage.="
  • 上一页
  • \r\n"; - $indexpage="
  • 首页
  • \r\n"; + $prepage.="
  • 上一页
  • \r\n"; + $indexpage="
  • 首页
  • \r\n"; } else { - $indexpage="
  • 首页
  • \r\n"; + $indexpage="
  • 首页
  • \r\n"; } if($this->PageNo!=$totalpage && $totalpage>1) { - $nextpage.="
  • 下一页
  • \r\n"; - $endpage="
  • 末页
  • \r\n"; + $nextpage.="
  • 下一页
  • \r\n"; + $endpage="
  • 末页
  • \r\n"; } else { - $endpage="
  • 末页
  • \r\n"; + $endpage="
  • 末页
  • \r\n"; } @@ -1178,11 +1177,11 @@ class ListView { if($j==$this->PageNo) { - $listdd.= "
  • $j
  • \r\n"; + $listdd.= "
  • $j
  • \r\n"; } else { - $listdd.="
  • ".$j."
  • \r\n"; + $listdd.="
  • ".$j."
  • \r\n"; } } diff --git a/src/include/arc.partview.class.php b/src/include/arc.partview.class.php index be3e3308..ff8e5795 100755 --- a/src/include/arc.partview.class.php +++ b/src/include/arc.partview.class.php @@ -64,10 +64,10 @@ class 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'); $this->Fields['typeid'] = $this->TypeID; diff --git a/src/include/arc.taglist.class.php b/src/include/arc.taglist.class.php index 489859b1..3f470b73 100755 --- a/src/include/arc.taglist.class.php +++ b/src/include/arc.taglist.class.php @@ -172,7 +172,11 @@ class TagList if (file_exists($makeDir)) { 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; } @@ -440,27 +444,27 @@ class TagList } $totalpage = $this->TotalPage; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "共1页/" . $this->TotalResult . "条"; + return "
  • 共1页/" . $this->TotalResult . "条
  • "; } if ($this->TotalResult == 0) { - return "共0页/" . $this->TotalResult . "条"; + return "
  • 共0页/" . $this->TotalResult . "条
  • "; } - $maininfo = "共{$totalpage}页/" . $this->TotalResult . "条\r\n"; + $maininfo = "
  • 共{$totalpage}页/" . $this->TotalResult . "条
  • \r\n"; $purl = $this->GetCurUrl(); $purl .= "?/" . urlencode($this->Tag); //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上一页
  • \r\n"; - $indexpage = "
  • 首页
  • \r\n"; + $prepage .= "
  • 上一页
  • \r\n"; + $indexpage = "
  • 首页
  • \r\n"; } else { - $indexpage = "
  • 首页
  • \r\n"; + $indexpage = "
  • 首页
  • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下一页
  • \r\n"; - $endpage = "
  • 末页
  • \r\n"; + $nextpage .= "
  • 下一页
  • \r\n"; + $endpage = "
  • 末页
  • \r\n"; } else { - $endpage = "
  • 末页
  • \r\n"; + $endpage = "
  • 末页
  • \r\n"; } //获得数字链接 @@ -480,9 +484,9 @@ class TagList } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • \r\n"; + $listdd .= "
  • $j
  • \r\n"; } else { - $listdd .= "
  • " . $j . "
  • \r\n"; + $listdd .= "
  • " . $j . "
  • \r\n"; } } $plist = ''; @@ -518,12 +522,12 @@ class TagList } $totalpage = $this->TotalPage; if ($totalpage <= 1 && $this->TotalResult > 0) { - return "共1页/" . $this->TotalResult . "条"; + return "
  • 共1页/" . $this->TotalResult . "条
  • "; } if ($this->TotalResult == 0) { - return "共0页/" . $this->TotalResult . "条"; + return "
  • 共0页/" . $this->TotalResult . "条
  • "; } - $maininfo = "共{$totalpage}页/" . $this->TotalResult . "条\r\n"; + $maininfo = "
  • 共{$totalpage}页/" . $this->TotalResult . "条
  • \r\n"; // $purl = $this->GetCurUrl(); $purl = "/a/tags/" . GetPinyin($this->Tag); @@ -531,16 +535,16 @@ class TagList //获得上一页和下一页的链接 if ($this->PageNo != 1) { - $prepage .= "
  • 上一页
  • \r\n"; - $indexpage = "
  • 首页
  • \r\n"; + $prepage .= "
  • 上一页
  • \r\n"; + $indexpage = "
  • 首页
  • \r\n"; } else { - $indexpage = "
  • 首页
  • \r\n"; + $indexpage = "
  • 首页
  • \r\n"; } if ($this->PageNo != $totalpage && $totalpage > 1) { - $nextpage .= "
  • 下一页
  • \r\n"; - $endpage = "
  • 末页
  • \r\n"; + $nextpage .= "
  • 下一页
  • \r\n"; + $endpage = "
  • 末页
  • \r\n"; } else { - $endpage = "
  • 末页
  • \r\n"; + $endpage = "
  • 末页
  • \r\n"; } //获得数字链接 @@ -560,9 +564,9 @@ class TagList } for ($j; $j <= $total_list; $j++) { if ($j == $this->PageNo) { - $listdd .= "
  • $j
  • \r\n"; + $listdd .= "
  • $j
  • \r\n"; } else { - $listdd .= "
  • " . $j . "
  • \r\n"; + $listdd .= "
  • " . $j . "
  • \r\n"; } } $plist = ''; diff --git a/src/include/archives.func.php b/src/include/archives.func.php index 4388e75d..ce0e73e0 100755 --- a/src/include/archives.func.php +++ b/src/include/archives.func.php @@ -4,4 +4,17 @@ // 所以这里仅做一个文件引入映射,今后的开发,如果遇到此类函数 // 在开发过程中直接使用helper('archive');即可 -helper('archive'); \ No newline at end of file +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 ''; + } +} \ No newline at end of file diff --git a/src/include/common.func.php b/src/include/common.func.php index 3f8c42fc..2748f271 100755 --- a/src/include/common.func.php +++ b/src/include/common.func.php @@ -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) { + global $cfg_soft_lang,$cfg_cmsurl; if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..'; - $htmlhead = "\r\n\r\nDedeCMS提示信息\r\n\r\n\r\n\r\n"; - $htmlhead .= "\r\n\r\n".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."\r\n
    \r\n\r\n
    \r\n\r\n\r\n"; $litime = ($limittime==0 ? 1000 : $limittime); @@ -312,9 +314,8 @@ function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0) if(pgo==0){ location='$gourl'; pgo=1; } }\r\n"; $rmsg = $func; - $rmsg .= "document.write(\"
    "; - $rmsg .= "
    DedeCMS 提示信息!
    \");\r\n"; - $rmsg .= "document.write(\"

    \");\r\n"; + $rmsg .= "document.write(\"
    \");\r\n"; $rmsg .= "setTimeout('JumpUrl()',$litime);"; } else { - $rmsg .= "
    \");\r\n"; + $rmsg .= "\");\r\n"; } } else { - $rmsg .= "

    \");\r\n"; + $rmsg .= "\");\r\n"; } $msg = $htmlhead.$rmsg.$htmlfoot; } diff --git a/src/include/datalistcp.class.php b/src/include/datalistcp.class.php index f30dccf5..5786141c 100755 --- a/src/include/datalistcp.class.php +++ b/src/include/datalistcp.class.php @@ -294,13 +294,13 @@ class DataListCP //无结果或只有一页的情况 if($totalpage<=1 && $this->totalResult > 0) { - return "{$lang_total} 1 {$lang_page}/".$this->totalResult.$lang_record_number.""; + return ""; } if($this->totalResult == 0) { - return "{$lang_total} 0 {$lang_page}/".$this->totalResult.$lang_record_number.""; + return ""; } - $infos = "{$lang_total} {$totalpage} {$lang_page}/{$this->totalResult}{$lang_record_number} "; + $infos = "
  • {$lang_total} {$totalpage} {$lang_page}/{$this->totalResult}{$lang_record_number}
  • "; if($this->totalResult!=0) { $this->getValues['totalresult'] = $this->totalResult; @@ -319,21 +319,21 @@ class DataListCP //获得上一页和下一页的链接 if($this->pageNO != 1) { - $prepage .= "$lang_pre_page \n"; - $indexpage = "$lang_index_page \n"; + $prepage .= "
  • $lang_pre_page
  • \n"; + $indexpage = "
  • $lang_index_page
  • \n"; } else { - $indexpage = ""."$lang_index_page \n".""; + $indexpage = "
  • "."$lang_index_page \n"."
  • "; } if($this->pageNO != $totalpage && $totalpage > 1) { - $nextpage.="$lang_next_page \n"; - $endpage="$lang_end_page \n"; + $nextpage.="
  • $lang_next_page
  • \n"; + $endpage="
  • $lang_end_page
  • \n"; } else { - $endpage=" $lang_end_page \n"; + $endpage="
  • $lang_end_page
  • \n"; } //获得数字链接 @@ -358,10 +358,10 @@ class DataListCP } for($j; $j<=$total_list; $j++) { - $listdd .= $j==$this->pageNO ? "$j\n" : "".$j."\n"; + $listdd .= $j==$this->pageNO ? "
  • $j
  • \r\n" : "
  • ".$j."
  • \n"; } - $plist = "
    \n"; + $plist = "
    \n"; + $plist .= "\n"; return $plist; } diff --git a/src/include/filter.inc.php b/src/include/filter.inc.php index e8a3a682..c8a3a144 100755 --- a/src/include/filter.inc.php +++ b/src/include/filter.inc.php @@ -41,7 +41,15 @@ function _FilterAll($fk, &$svar) } } 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; } diff --git a/src/include/helpers/file.helper.php b/src/include/helpers/file.helper.php index aa86d60e..f51833de 100755 --- a/src/include/helpers/file.helper.php +++ b/src/include/helpers/file.helper.php @@ -76,7 +76,7 @@ if ( ! function_exists('OpenFtp')) } if(!ftp_login($g_ftpLink,$cfg_ftp_user,$cfg_ftp_pwd)) { - echo "登陆FTP失败!"; + echo "登录FTP失败!"; exit(); } } diff --git a/src/include/taglib/channel.lib.php b/src/include/taglib/channel.lib.php index 1d3640f9..8ba1dda0 100755 --- a/src/include/taglib/channel.lib.php +++ b/src/include/taglib/channel.lib.php @@ -66,10 +66,13 @@ function lib_channel(&$ctag,&$refObj) else { $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'; diff --git a/src/include/taglib/comment.lib.php b/src/include/taglib/comment.lib.php new file mode 100644 index 00000000..a27bc2f9 --- /dev/null +++ b/src/include/taglib/comment.lib.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/src/include/taglib/memberlist.lib.php b/src/include/taglib/memberlist.lib.php index 026be41c..49e8aa29 100755 --- a/src/include/taglib/memberlist.lib.php +++ b/src/include/taglib/memberlist.lib.php @@ -27,7 +27,7 @@ if(!defined('DEDEINC')) row:调用数目 iscommend:是否为推荐会员 - orderby:按登陆时间排序 money 按金钱排序 scores 按积分排序 + orderby:按登录时间排序 money 按金钱排序 scores 按积分排序 >>dede>>*/ diff --git a/src/include/taglib/tag.lib.php b/src/include/taglib/tag.lib.php index a2a54df3..8e0e8541 100755 --- a/src/include/taglib/tag.lib.php +++ b/src/include/taglib/tag.lib.php @@ -42,8 +42,8 @@ function lib_tag(&$ctag, &$refObj) $ltype = $sort; $num = $row; - $addsql = ''; $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'])) { $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']); } if ($ids != '') { - $addsql = " WHERE id IN($ids) AND total >= {$dd['tt']}"; + $addsql .= " AND id IN($ids) AND"; } if ($addsql == '') return ''; } else { if (!empty($typeid)) { - $addsql = " WHERE typeid='$typeid' AND total >= {$dd['tt']}"; + $addsql .= " AND typeid='$typeid'"; } } diff --git a/src/include/tpllib/plus_newvisitor.php b/src/include/tpllib/plus_newvisitor.php index bf447e2a..b8b7415b 100755 --- a/src/include/tpllib/plus_newvisitor.php +++ b/src/include/tpllib/plus_newvisitor.php @@ -11,31 +11,5 @@ */ 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 ""; } \ No newline at end of file diff --git a/src/include/typelink.class.php b/src/include/typelink.class.php index fda9538c..02786250 100755 --- a/src/include/typelink.class.php +++ b/src/include/typelink.class.php @@ -40,7 +40,7 @@ class TypeLink $this->indexName = $GLOBALS['cfg_indexname']; $this->baseDir = $GLOBALS['cfg_basedir']; $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->TypeID = $typeid; $this->valuePosition = ''; @@ -112,9 +112,9 @@ class TypeLink { if ( defined('DEDEMOB') ) { - $indexpage = "".$this->indexName.""; + $indexpage = ""; } else{ - $indexpage = "".$this->indexName.""; + $indexpage = ""; } if($this->valuePosition!="" && $islink) @@ -196,7 +196,7 @@ class TypeLink function GetOneTypeLink($typeinfos) { $typepage = $this->GetOneTypeUrl($typeinfos); - $typelink = "".$typeinfos['typename'].""; + $typelink = "