<?php
if( !defined('ISDVBBS') ){
	header('HTTP/1.0 404 Not Found');
	exit;
}
global $lang;
?><!--<?php
$lang['tpl.topl.str1']=str_replace(array('{$usernum}','{$postnum}'),array($usernum,$postnum),$lang['tpl.topl.str1']);
print <<<EOT
-->
<table cellpadding=0 cellspacing=0 border="0" align=center class="mainbox tableborder">
<form method=POST action="?t=toplist">
<tr>
<td colspan=4 valign=top width=350>&nbsp;>> <B>{$gettitle}</B> <<
{$lang['tpl.topl.str1']}</td>
<td colspan=4 align=right style="border-right:none;">
<!--
EOT;
if( $fsetting['search_user'] == 1 ):
	print <<<EOT
-->
&nbsp;&nbsp;{$lang['tpl.topl.str2']}<input type="text" size=15 name="keyword" value="{$keyword}"> <input type=submit class="button" name=Submit value="{$lang['tpl.topl.str3']}">
<!--
EOT;
endif;
if( $fsetting['search_topuser'] != '0' ):
	print <<<EOT
-->
<INPUT TYPE="hidden" name="gettitle1" value="{$lang['tpl.topl.str4']}{$pagelistnum}">
<INPUT TYPE="hidden" name="gettitle2" value="{$lang['tpl.topl.str5']}">
<INPUT TYPE="hidden" name="gettitle3" value="{$pagelistnum}{$lang['tpl.topl.str6']}">
<INPUT TYPE="hidden" name="gettitle7" value="{$lang['tpl.topl.str7']}">
<INPUT TYPE="hidden" name="gettitle8" value="{$lang['tpl.topl.str8']}">
<select name=orders onchange='javascript:submit()'>
<option value=1 {$select1}>{$lang['tpl.topl.str4']}{$toplistnum}</option>
<option value=2 {$select2}>{$lang['tpl.topl.str5']}</option>
<option value=3 {$select3}>{$toplistnum}{$lang['tpl.topl.str6']}</option>
<!--
EOT;
endif;
if( $fsetting['search_alluser'] != '0' ):
	print <<<EOT
-->
<option value=7 {$select7}>{$lang['tpl.topl.str7']}</option>
<!--
EOT;
endif;
if( $fsetting['search_master'] != '0' ):
	print <<<EOT
-->
<option value=8 {$select8}>{$lang['tpl.topl.str8']}</option>
</select>
<!--
EOT;
endif;
print <<<EOT
-->
</td>
</tr></form>
<tr align=center>
<th style="text-align:left; text-indent:10px;">{$lang['tpl.topl.str9']}</th>
<th>{$lang['tpl.topl.str10']}</th>
<th>{$lang['tpl.topl.str11']}</th>
<th>{$lang['tpl.topl.str12']}</th>
<th>{$lang['tpl.topl.str13']}</th>
<th>{$lang['tpl.topl.str14']}</th>
<th>{$lang['tpl.topl.str15']}</th>
<th>{$lang['tpl.topl.str16']}</th></tr>
<!--
EOT;
if( !empty($_infoList) ):
	if( is_array($_infoList) ):
		$site =& $fsetting['forumurl'];
		foreach( $_infoList as $val ):
			$userid =& $val['userid'];
			$username = htmlspecialchars($val['username']);
			list($homepage,$oicq) = explode('|||',htmlspecialchars(addslashes($val['userim'])));
			$adddate = gmdate("Y-m-d H:i:s",$val['joindate']+getUserTimeZoneOffset());
			$userclass =& $val['userclass'];
			$article =& $val['userpost'];
			$wealth =& $val['userwealth'];
			$oicqinfo = str_replace('{$oicq}',$oicq,$lang['tpl.topl.str17']);
			print <<<EOT
-->
<tr>
<td  height=23 style="text-align:left; text-indent:8px;">&nbsp;<a href="dispuser.php?id={$userid}" target=_blank>{$username}</a></td>
<td align=center ><!--
EOT;
if ( $oicq != '' && is_numeric($oicq) ){
print <<<EOT
--><a target=blank href="http://wpa.qq.com/msgrd?V=1&Uin={$oicq}&Site=dvbbs.net&Menu=yes"><img border="0" SRC="http://wpa.qq.com/pa?p=1:{$oicq}:8" alt="{$oicqinfo}"></a>
<!--
EOT;
}else{
print <<<EOT
-->{$lang['tpl.topl.str18']}
<!--
EOT;
}
print <<<EOT
-->
</td>
<td align=center ><!--
EOT;
if ( $oicq != '' && is_numeric($oicq) ){
print <<<EOT
--><a href="{$homepage}" target=_blank><img border=0 src="{$imgurl}homepage.gif"></a></a>
<!--
EOT;
}else{
print <<<EOT
-->{$lang['tpl.topl.str18']}
<!--
EOT;
}
print <<<EOT
-->
</td>
<td align=center ><a href="javascript:openScript('messanger.php?action=new&touser={$username}',500,400)"><img src="{$imgurl}message.gif" border=0></a></td>
<td align=center >{$adddate}</td>
<td align=center >{$userclass}<br>
</td>
<td align=center >{$article}</td>
<td align=center >{$wealth}</td>
</tr>
<!--
EOT;
	endforeach;
	endif;
endif;
print <<<EOT
-->
<SCRIPT LANGUAGE="JavaScript">
<!--
var currentpage='{$page}';
var Pcount='{$Pcount}';
currentpage=Math.floor(currentpage);
Pcount=Math.floor(Pcount);
document.write ('</table>');
document.write ('<table border=0 cellpadding=0 cellspacing=3 width="{$width}" align=center>');
document.write ('<tr><td valign=middle nowrap>');
document.write ('{$lang['tpl.topl.str19']}<b>'+currentpage+'</b>/<b>'+Pcount+'</b>{$lang['tpl.topl.str20']}');
document.write ('{$lang['tpl.topl.str21']}<b>{$pagelimited}</b> {$lang['tpl.topl.str22']}<b>{$listnum}</b>{$lang['tpl.topl.str23']}</td>');
document.write ('<td valign=middle nowrap><div align=right><p>{$lang['tpl.topl.str24']}');
var endpage;
if (currentpage>4)
{
	document.write ('<a href="?{$action}page=1&boardid={$boardid}&keyword={$keyword}">[1]</a> ...');
}
if (Pcount>currentpage+3)
{
	endpage=currentpage+3;
}else{
	endpage=Pcount;
}
for (i=currentpage-3;i<endpage+1 ;i++ )
{
	i=Math.floor(i);
	if (i>0)
	{
		if (i>currentpage || i<currentpage)
		{
			document.write (' <a href="?{$action}page='+i+'&boardid={$boardid}&keyword={$keyword}">['+i+']</a>')
		}
		else{
			document.write (' <font color={$alertcolor}>['+i+']</font>');
		}
	}
}
if (currentpage+3 < Pcount)
{
	document.write ('... <a href="?{$action}page='+Pcount+'&boardid={$boardid}&keyword={$keyword}">['+Pcount+']</a>');
}
document.write ('</font></td></tr>');
document.write ('</form></table>');
//-->
</SCRIPT>
<!--
EOT;
?>-->