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

📄 viewtop.php

📁 bmb的论坛
💻 PHP
字号:
<? 
/*
 BMForum Plus! Bulletin Board Systems
 Version : Plus!
 
 This is a freeware, but don't change the copyright information.
 A SourceForge Project - GNU Licence project.
 Web Site: http://www.bmforum.com
 Copyright (C) Bluview Technology
*/
require("datafile/config.php"); 
require("getskin.php");
@set_time_limit(300);

if (empty($page)) $page=1;
if ($porank_list==0) {
	include("header.php");
	navi_bar("$gl[9]","$gl[10]","","no" );
	msg_box($gl[10],$gl[277]);
	include("footer.php");
	exit;
}
require("header.php");
navi_bar("$gl[9]","$gl[10]","","no" );
?> 
<table width="<?=$tablewidth?>" 
 align="center">
  <tr> 
    <td colspan=6 > 
      <div align="left"><?=$gl[10]?></div>
    </td>
  </tr>
</table>
<table cellspacing=1 cellpadding=0 width="<?=$tablewidth?>" border=0 align=center bgcolor='<?=$tile_back?>' background='<?=$tile_back?>'>
  <tr align=center height=24 background='<?=$tile_back?>'> 
    <td width=120 align="center"><b class=title><?=$gl[11]?></b></td>
	<td><b class=title><?=$gl[12]?></b></td>
	<td>&nbsp;</td>
  </tr>
<?php 
if($refreshpostrank!=0){
	$lastrefresh=@readfromfile("tmp/lastrefresh");
	$chatime=$timestamp-$lastrefresh;
	$jiantime=$refreshpostrank*86400;
	if($chatime>=$jiantime){
		$dh=opendir("$id_unique/"); 
		while (false !== ($userfile = readdir($dh))) {
			if (($userfile!=".") && ($userfile!="..") && ($userfile!="") && strpos($userfile,".php")) { 
				$user_info_str=readfromfile("$id_unique/$userfile"); 
				$user_info=explode("|",$user_info_str);
				$user_info[0]=str_replace("<?exit;?>","",$user_info[0]);
				if (empty($user_info[12])) $user_info[12]=0; 
				if (empty($user_info[0])) $user_info[12]=0; 
				$rank_array[$user_info[0]]=$user_info[12]; 
			} 
		} 
		closedir($dh); 
		arsort($rank_array); 
		reset($rank_array); 
		$addtofile="";
		for ($counter=1; $counter<=15; $counter++) { 
			$key=@key($rank_array); 
			if ($counter==1) $maxpoint=$rank_array[$key]; 
			$addtofile.=$rank_array[$key]."|".$key."\n";
			if (!(next($rank_array))) break; 
		}
		writetofile("datafile/ranklist.php",$addtofile);
		writetofile("tmp/lastrefresh",$timestamp);
	}
}

$rankfile=@file("datafile/ranklist.php");
$count=count($rankfile);

for ($counter=0; $counter<$count; $counter++) { //那个10代表前10,可以自己修改~
	$rankoftmp=explode("|",$rankfile[$counter]);
	if ($counter==0) $maxpoint=$rankoftmp[0];
	if (empty($maxpoint)) die(); 
	if(!empty($postamount)) $img_width=300*($rankoftmp[0])/($maxpoint);
	$usertoview=str_replace("\n","",$rankoftmp[1]);
	$fview=urlencode($usertoview);
	list(,,,,,,,,,,,,$postamount)=get_user_info($usertoview);
	echo "<tr height=22 bgcolor=$forumcolortwo>"; 
	echo "<td align=center bgcolor=$forumcolortwo><a href='profile.php?job=show&target=$fview'>$rankoftmp[1]</a></td>"; 
	echo "<td align=center bgcolor=$forumcolortwo>$postamount{$gl[13]}</td>"; 
	echo "<td bgcolor=$forumcolortwo>&nbsp;<img src=$otherimages/system/bar1.gif width=$img_width height=10></td>"; //别忘了加上图片:)
	echo '</tr>'; 
}
?> 
  <tr> 
    <td colspan=6 bgcolor=<?=$tile_back?> background="<?=$tile_back?>" 
 height=24 class='title'> 
      <div align="center">
        <input type="button" value="<?=$gl[14]?>" 
onClick="location.href='index.php'" 
 name="button">
        <input type="button" value="<?=$gl[15]?>" 
onClick="location.href='javascript:history.back(1)';" 
 name="button2">
      </div>
    </td>
  </tr>
</table>
<br>
<?
include("footer.php");
?>
</body> 
</html> 

⌨️ 快捷键说明

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