<!--<?php print <<<EOT
-->
<table width='$tablewidth' cellspacing=0 cellpadding=0 align=center>
<tr><td align=left>
<img src='$imgpath/$stylepath/index/home.gif' align=absbottom> 
<b><a href='$db_bfn'>$db_bbsname </a> {#sort_guide}</b>
<!--
EOT;
if($cachetime){print <<<EOT
-->
</td>
<td align=right>
<b>{#sort_cache}$cachetime</b>
</td>
<!--
EOT;
}print <<<EOT
-->
</td></tr></table><br>

<table width="$tablewidth" cellspacing="1" cellpadding="5" $i_table align="center" style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word">
<tr align=center>
<td class='f_one'><a href='sort.php'>{#sort_stat}</a></td>
<td class='f_one'><a href='sort.php?action=ipstate'>{#sort_ipstat}</a></td>
<td class='f_one'><a href='sort.php?action=team'>{#sort_team}</a></td>
<td class='f_one'><a href='sort.php?action=online'>{#sort_online}</a></td>
<td class='f_one'><a href='sort.php?action=member'>{#sort_member}</a></td>
<td class='f_one'><a href='sort.php?action=forum'>{#sort_forum}</a></td>
<td class='f_one'><a href='sort.php?action=article'>{#sort_post}</a></td>
</tr></table><br>
<!--
EOT;
if(empty($action)){print <<<EOT
-->
<table width='$tablewidth' align=center cellspacing=1 cellpadding=6 $i_table>
<tr><td class=head colspan=3><b>{#sort_stat}</b></td></tr>
<tr align=center>

<td class='f_one' width=33% valign=top><table>
<tr><td>{#sort_member_info}</td></tr> 
<tr><td><br></td></tr>
<tr><td>{#sort_total_member}$bbsinfo[totalmember]</td></tr>
<tr><td><br></td></tr>
<tr><td>
{#sort_new_member}<a href="profile.php?action=show&username=$bbsinfo[newmember]" target="_blank">$bbsinfo[newmember]</a>
</td></tr></table></td>

<td class='f_one' width=33%><table>
<tr><td>{#sort_post_info}</td></tr>
<tr><td>{#sort_topic}$topic</td></tr>
<tr><td>{#sort_article}$article </td></tr>
<tr><td>{#sort_today}$tposts </td></tr>
<tr><td>{#sort_yestoday}$bbsinfo[yposts]</td></tr> 
<tr><td>{#sort_highpost}$bbsinfo[hposts]</td></tr></table></td>

<td class='f_one'><table>
<tr><td>{#sort_online_info}</td></tr>
<tr><td>{#sort_total_online}$usertotal</td></tr>
<tr><td>{#sort_member_num}$userinbbs</td></tr>
<tr><td>{#sort_guest_num}$guestinbbs</td></tr>
<tr><td>{#sort_high_num}$bbsinfo[higholnum]</td></tr>
<tr><td>{#sort_high_time}$bbsinfo[higholtime]</td></tr>
</table></td></tr></table>
<!--
EOT;
}elseif($action=='ipstate'){print <<<EOT
-->
<table width='$tablewidth' align=center cellspacing=1 cellpadding=6 $i_table>
<tr><td class=head colspan=2><b>{#sort_ipstat}</b></td></tr>
<!--
EOT;
if($type=='month'){print <<<EOT
-->
<tr><td class='cbg' colspan=2><b>{#sort_monthip}</b>
<a href="sort.php?action=ipstate&year=$p_year">< </a> $c_year <a href="sort.php?action=ipstate&year=$n_year">></a>
</td></tr>
<!--
EOT;
foreach($m_ipdb as $key => $ip){
$percent=round($ip[nums]/$summip*100,1);
$imgwidth=floor(500*$ip[nums]/($summip+1));
print <<<EOT
-->
<tr class='f_one'><td width="15%">$ip[month] 
<a href="sort.php?action=ipstate&type=day&month=$ip[month]">{#sort_view}</a></td>
<td><img src='$imgpath/post/vote/bar1.gif' width="$imgwidth" height=10> $ip[nums]($percent%)</td></tr>
<!--
EOT;
}}elseif($type=='day'){print <<<EOT
-->
<tr><td class='cbg' colspan=2>
<a href="sort.php?action=ipstate&year=$Y"><b>{#sort_monthip}</b></a>
<b>{#sort_dayip}</b>
<a href="sort.php?action=ipstate&type=day&month=$p_month">< </a> $c_month 
<a href="sort.php?action=ipstate&type=day&month=$n_month">></a>
</td></tr>
<!--
EOT;
foreach($d_ipdb as $key => $ip){
$percent=round($ip[nums]/$sumip*100,1);
$imgwidth=floor(500*$ip[nums]/($sumip+1));
print <<<EOT
-->
<tr class='f_one'><td width="15%">$ip[day]</td>
<td><img src='$imgpath/post/vote/bar1.gif' width="$imgwidth" height=10> $ip[nums]($percent%)</td></tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
<!--
EOT;
}elseif($action=='online'){print <<<EOT
-->
<table width='$tablewidth' align=center cellspacing='1' cellpadding='6' $i_table>
<tr><td class=head colspan=10><b>{#sort_online}</b></td></tr>
<tr class=cbg>
<td align='center'>{#username}</td>
<td align='center'>IP</td>
<td align='center'>{#level}</td>
<td align='center'>{#sort_action}</td>
<td align='center'>{#sort_lastaction}</td>
<td align='center'>{#sort_in_forum}</td>
<td align='center'>{#sort_in_topic}</td>
</tr>
<!--
EOT;
foreach($threaddb as $thread){
if($thread){
print <<<EOT
-->
<tr height=26>
<td align=center  bgcolor=$threadcolorone>
<b>
<!--
EOT;
if($thread[9]=='<>' && $groupid==3){
print <<<EOT
-->
<a href="profile.php?action=show&uid=$thread[8]" target="_blank">$thread[username]({#sort_hide})</a>
<!--
EOT;
}elseif($thread[9]=='<>' && $groupid!=3){
print <<<EOT
-->
{#sort_hideman}
<!--
EOT;
}else{
print <<<EOT
-->
<a href="profile.php?action=show&uid=$thread[8]" target="_blank">$thread[username]</a>
<!--
EOT;
}print <<<EOT
-->
</b></td>
<td align=center bgcolor=$forumcolortwo>$thread[ip]</td>
<td align=center bgcolor=$forumcolortwo>$thread[group]</td>
<td align=center bgcolor=$forumcolortwo>$thread[action]</td>
<td align=center  bgcolor=$threadcolorone>$thread[lasttime]</td>
<td align=center bgcolor=$forumcolortwo>$thread[forum]</td>
<td align=center bgcolor=$forumcolortwo>
<!--
EOT;
if($thread[atc]){print <<<EOT
-->
<a href='read.php?tid=$thread[atc]'>{#sort_enter_topic}</a>
<!--
EOT;
}print <<<EOT
-->
</td>
</tr>
<!--
EOT;
}}
print <<<EOT
-->
</table>
<table width='$tablewidth' align=center cellspacing=1 cellpadding=0>
<tr><td>{#sort_page}</td></tr></table>
<!--
EOT;
}elseif($action=='team'){print <<<EOT
-->
<table width='$tablewidth' align=center cellspacing=1 cellpadding=6 $i_table>
<tr><td class=head colspan=10><b>{#sort_team}</b></td></tr>
<tr class=cbg align=center>
<td>{#username}</td>
<td>{#userdb_system}</td>
<td>{#userdb_level}</td>
<td>{#lasttime}</td>
<td>{#lastpost}</td>
<td>{#leavedays}</td>
<td>{#posts}</td>
<td>{$db_rvrcname}</td>
<td>$db_moneyname</td>
<td>{#oltime}</td>
</tr>
<!--
EOT;
foreach($teamdb as $key => $team){
print <<<EOT
-->
<tr class=f_one align=center>
<td><a href="profile.php?action=show&uid=$team[uid]" target="_blank">$team[username]</a></td>
<td>$team[systitle]</td>
<td>$team[memtitle]</td>
<td>$team[lastvisit]</td>
<td>$team[lastpost]</td>
<td>$team[leavedays]</td>
<td>$team[postnum]</td>
<td>$team[rvrc]</td>
<td>$team[money]</td>
<td>$team[onlinetime]</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<!--
EOT;
} else{print <<<EOT
-->
<table width='$tablewidth' align=center cellspacing=1 cellpadding=0 style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word'>
<tr><td colspan=3 class=head><b>{#sort_title}</b></td></tr>
<tr>
<!--
EOT;
$cid=0;
foreach($_SORTDB as $key=>$_SORT){
$type=!is_numeric($key)?$lang[$key]:$_CREDITDB[$key][0];
$cid++;
print <<<EOT
-->
<td valign=top>
<table width="100%" cellspacing=0 cellpadding=2 $i_table>
<tr><td class=cbg  height=23 colspan=3> &nbsp; {$type}{#sort_board}</td></tr>
<!--
EOT;
$id=0;
foreach($_SORT as $id=>$sort){
if($sort[2]){
$id++;
print <<<EOT
-->
<tr>
<td class='f_one' align="center">$id</td>
<td class='f_one'>
<a href='$show_url=$sort[0]' target="_blank">$sort[1]</a>
</td>
<!--
EOT;
if($key!='digest'){print <<<EOT
-->
<td class='f_one' align="center">$sort[2]</td>
<!--
EOT;
}print <<<EOT
-->
</tr>
<!--
EOT;
}}print <<<EOT
-->
</table></td>
<!--
EOT;
if($cid%3==0){print <<<EOT
-->
</tr>
<tr>
<!--
EOT;
}}print <<<EOT
-->
</tr></table>
<!--
EOT;
}?>-->
