⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 viewtop.php

📁 FTB安装版 v1.3(虚拟形象)FTB安装版 v1.3(虚拟形象)
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<? 
$forumid=103;
require("userdata/style.php");
require("global.php");
require("header.php");echo"$headertp";
if(!$topjob)
{
headguide('你现在正在论坛的用户排名程式中','论坛发贴排行榜','','no');
if ($login_status !=1) {
msg_box('对不起!!','<center>你还没有登陆或注册,暂时不能使用本功能!!<br><ul><li><a href="register.php">现在注册</a></li><br><li><a href="login.php">现在登录</li></ul></center>');
require("footer.php");echo"$footertp";
        exit;}
?> 
<table width="50%" border="0" cellspacing="0" cellpadding="0" align="center"> 
<tr align="center"> 
</tr> 
</table> 
<table width="50%" border="0" cellspacing="0" cellpadding="0" bordercolor="<? echo $color2; ?>" align="center"> 
<tr align="center"> 
<td><b><a href=viewtop.php>论坛发贴排行榜</b>     <b><a href=viewtop.php?topjob=ww>论坛威望排行榜</b>&nbsp;&nbsp;<a href=viewtop.php?topjob=money><b>财富排行</b></a> </td> 
</tr> 
</table> 
<table width="75%" border="0" cellspacing="0" cellpadding="0" align="center"> 
<tr> 
<td> </td> 
</tr> 
</table> 
<table width=500 align="center" cellspacing=0 cellpadding=1> 
<tr><td> 
<table width="100%" border="0" cellspacing="1" cellpadding="1" bordercolor="<? echo $color2; ?>" align="center"> 
<tr> 
<td colspan=3><b><font face="Verdana, Arial, Helvetica, sans-serif">Top Users</font></b></td> 
</tr> 
<tr><td colspan=3> </td></tr> 
<?php 
$dh=opendir("$userpath/"); 
while ($userfile=readdir($dh)) { 
if (($userfile!=".") && ($userfile!="..") && ($userfile!="") && !strpos($userfile,".msg") && !strpos($userfile,".old")) { 
$user_info_str=file("$userpath/".$userfile); 
$user_info=explode("|",$user_info_str[0]); 
if (empty($user_info[13])) $user_info=0; 
$rank_array[$user_info[1]]=$user_info[13]; 
} 
} 
closedir($dh); 
arsort($rank_array); 
reset($rank_array); 
for ($counter=1; $counter<=25; $counter++) { //那个10代表前10,可以自己修改~
$key=key($rank_array); 
if ($counter==1) $maxpoint=$rank_array[$key]; 
$img_width=300*($rank_array[$key])/($maxpoint); 
echo '<tr>'; 
echo '<td>'.$key.'</td>'; 
echo '<td>发表文章数:'.$rank_array[$key].'</td>'; 
echo '<td><img src="images/bar1.gif" width='.$img_width.' height=10></td>'; //别忘了加上图片:)

echo '</tr>'; 
if (!(next($rank_array))) break; 
} 
?> 
<tr><td colspan=3> </td></tr> 
<tr> 
<td colspan=3><center><input type="button" value="论坛首页" 
onClick="location.href='index.php'" 
style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFFFFF'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" onfocus=this.blur()> 
<input type="button" value="返回前页" 
onClick="location.href='javascript:history.back(1)';" 
style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFFFFF'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" onfocus=this.blur()></center></td> 
</tr> 
</table> 
</td></tr></table><br> 
<?
require("footer.php");echo"$footertp";
exit;
}
if($topjob==atc)
{
if (empty($listby)) $listby=2;
if($listby==2) $bar="新贴排行";
if($listby==7) $bar="点击排行";
if($listby==6) $bar="回复排行";
if($login_status==1) add_online("查看".$bar);
else add_guest("查看".$bar);
headguide('你现在正在<br>'.$bbs_title.'<br>的贴子排行中',$bar,'','yes');
if ($login_status !=1) {
msg_box('对不起!!','<center>你还没有登陆或注册,暂时不能使用本功能!!<br><ul><li><a href="register.php">现在注册</a></li><br><li><a href="login.php">现在登录</li></ul></center>');
require("footer.php");echo"$footertp";
        exit;}
$minv=35;               
$forumlist=file("bbsdata/forumdata.php");
	$fcount=count($forumlist);
	for ($i=0; $i<$fcount; $i++) {
		$detl=explode("|",$forumlist[$i]);
		if ($detl[0]!="category") {$forumnum[]=$detl[3];$forumtype[]=$detl[0];}
	}
$fcount=count($forumnum);
for ($ii=0; $ii<11; $ii++) {
if(file_exists("{$idpath}forum$forumnum[$ii]/list.php") && $forumtype[$ii]!="hidden" && $forumtype[$ii]!="closed" && $forumtype[$ii]!="locked"){
$article=file("{$idpath}forum$forumnum[$ii]/list.php");
$c=min(count($article),$minv); 
 for ($i=0; $i<$c; $i++){

         $detail=explode("|",$article[$i]);
         if($listby==2) $detail=explode(",",$detail[8]);
		  $bad[0]=$forumnum[$ii];
          $bad[1]=$i;
          $bad[2]=$article[$i];
		 
        $abcde=implode("|",$bad);
		 $rvrcview[$abcde]=$detail[$listby];
 }}
}
if($c>1){
arsort($rvrcview);
$abcde=implode("|",$rvrcview);
reset($rvrcview);
}
?>
<table cellspacing=1 cellpadding=0 width=<?=$tablewidth?> border=0 align=center bgcolor=<?=$bordercolor?>>
  <tr align=center height=24 bgcolor=<?=$titlecolor?>> 
    <td colspan=2 width=* class=title bgcolor=<?=$titlecolor?>><b>主&nbsp;题&nbsp;&nbsp;(<a href=viewtop.php?topjob=atc&listby=2 class=title>新贴排行</a>◆<a href=viewtop.php?topjob=atc&listby=7 class=title>点击排行</a>◆<a href=viewtop.php?topjob=atc&listby=6 class=title>回复排行</a>)</b></td>
    <td width=80 bgcolor=<?=$titlecolor?>><b class=title>讨论区</b></td>
    <td width=80 bgcolor=<?=$titlecolor?>><b class=title>作 者</b></td>
    <td width=30 bgcolor=<?=$titlecolor?>><b class=title>回复</b></td>
    <td width=30 bgcolor=<?=$titlecolor?>><b class=title>点击</b></td>
    <td width=220 bgcolor=<?=$titlecolor?>><b class=title>最后发表</b></td>
  </tr>
  <?
for ($counter=1; $counter<=$c; $counter++) {
	$key=key($rvrcview); 
$multipage=''; list($forumid,$postid,$title,$author,$date,$des,$icon,$filename,$reply,$hit,$last_mod_data,$islock,$topic_type,$jihua)=explode("|",$key);
 get_forum_info();
$topic_type = trim($topic_type);
$topic_islock = trim($islock);
if(file_exists("{$idpath}forum$forumid/$filename"))$articlelist=file("{$idpath}forum$forumid/$filename");
list($topic_name,$topic_author,$topic_content,$topic_date,$topic_area)=explode("|",$articlelist[0]);
$toplang=strlen($topic_content);
if (strlen($author)>=12) $viewauthor=substr($author,0,9).'...';
	else $viewauthor=$author;
if ($icon=="ran") $icon=mt_rand(0,19).'.gif';
$icon="<a target=_blank href='read.php?forumid=$forumid&postid=$postid&filename=$filename'><img src='images/emotion/$icon' width=19 alt=开新窗口浏览此主题 border=0></a>";
if ($topic_type==1) {
	$stats="<img src='images/statistic.gif'>";
	if ($islock==1) $stats="<img src='images/closesta.gif'>";
} elseif ($topic_type==2) {
	$stats="<img src='images/ucommend.gif'>";
	if ($islock==1) $stats="<img src='images/closeu.gif'>";
	if ($jihua==1) $stats="<img src='images/jihua.gif'>";
} elseif ($topic_type>=3) {
	$stats="<img src='images/holdtopic.gif'>";
} else {
		$stats="<img src='images/topicnew.gif'>";
		if ($reply>=10) $stats="<img src='images/topichot.gif'>";
		if ($islock==1) $stats="<img src='images/topiclocked.gif'>";
}
//-------if more than one page-----------
if ($reply+1>$read_perpage) {
	if (($reply+1)%$read_perpage==0) $maxpageno=($reply+1)/$read_perpage;
		else $maxpageno=floor(($reply+1)/$read_perpage)+1;
	if ($maxpageno>5) $multipage='<br>&nbsp;';
		else $multipage=' ';
	$multipage.='[ <b style="font-size:7pt;font-family:verdana;">';
	for ($i=1; $i<=$maxpageno; $i++) {
		$multipage.=" <a style='color:505060' href=\"read.php?forumid=$forumid&postid=$postid&filename=$filename&page=$i\">$i</a>";
		if ($i==23) {$multipage.=" ... <a style='color:000066' href=\"read.php?forumid=$forumid&postid=$postid&filename=$filename&page=$maxpageno\">Last</a>"; break;}
	}
	$multipage.='</b> 页]';
}
$title_back=$topic_content;
$title_back=preg_replace("/\[hide=(.+?)\](.+?)\[\/hide\]/is","此贴已被作者加密!",$title_back);//加密提示。
$title_back=preg_replace("/\[post\](.+?)\[\/post\]/is","此贴已被作者隐藏!",$title_back);//隐藏提示。 
$title_back=preg_replace("/\[sell=(.+?)\](.+?)\[\/sell\]/is","此贴已经被出售,需付钱才能看到内容!",$title_back);//加密提示。
if (strlen($title_back)>=50) $title_back=substr($title_back,0,44)."......";
$title_back	=	safe_convert($title_back);
$title_back = str_replace("\"","“",$title_back);
$title_back = str_replace("\'","‘",$title_back);
if (strlen($title)>=51) $title=substr($title,0,48)."...";
$title=str_replace('%a%','<img src="images/addon.gif" border=0>',$title);
$title="<a href='read.php?forumid=$forumid&postid=$postid&filename=$filename'\" title=\"$title_back\">$title</a>";
$lmd=explode(",",$last_mod_data);
$g=$timestamp-$lmd[2];
if ($lmd[2]==$date) $lmdauthor="------";
else $lmdauthor="<a href=\"profile.php?job=show&target=$lmd[1]\">$lmd[1]</a>";
$lmdtime=get_date($lmd[2]).' '.get_time($lmd[2]);
echo " 
<tr height=22 bgcolor=$forumcolorone> 
<td align=center width=24 bgcolor=$forumcolortwo>$stats</td>
<td  bgcolor=$forumcolorone>&nbsp;$icon&nbsp;<acronym title=\"$des\">$title ($toplang 字节)</acronym>$multipage </td> 
<td  align=center bgcolor=$forumcolortwo><a href=thread.php?forumid=$forumid>$forum_name</a></td> 
<td  align=center bgcolor=$forumcolorone><a href=profile.php?job=show&target=$topic_author target=_blank>$author</a></td>
<td align=center bgcolor=$forumcolortwo>$reply</td>
<td align=center bgcolor=$forumcolortwo>$hit</td>
<td  align=left bgcolor=$forumcolorone >&nbsp;<img src=images/lastpost2.gif border=0>&nbsp;{$lmdtime}&nbsp;<font color=#000066>|</font>&nbsp;$lmdauthor</td>
</tr>"; 
if (!(next($rvrcview))) break;
}
?>
  <tr> 
    <td bgcolor=<?=$titlecolor?> align=center colspan=7 height="24"> 
      <input type="button" value="论坛首页" onClick="location.href='index.php'" style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
      <input type="button" value="返回前页" onClick="javascript:history.back(1)" style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'">
    </td>
  </tr>
  <tbody> 
</table> 
<br>
<? 
require("footer.php");echo"$footertp"; 
exit;
}
if($topjob==ww)
{
headguide('你现在正在<br>ftb论坛 <br>的用户排名程式中','论坛威望值排行榜','','no');
if ($login_status !=1) {
msg_box('对不起!!','<center>你还没有登陆或注册,暂时不能使用本功能!!<br><ul><li><a href="register.php">现在注册</a></li><br><li><a href="login.php">现在登录</li></ul></center>');
require("footer.php");echo"$footertp";
        exit;}
?> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -