吾爱尚玩资源基地

标题: WOW私服单机版网页:查询被封停的账号及IP信息 [打印本页]

作者: admin    时间: 2016-4-23 16:46
标题: WOW私服单机版网页:查询被封停的账号及IP信息
下面是一个PHP的网页代码。你设置好数据库的连接属性后,基本上就可以使用了

需要IIS或则apache支持+ PHP支持+MYSQL数据库+你的单机版数据库


<?php

$host = 'localhost';
$user = 'root';
$password = 'root';
$realmdb = 'realmd';

mysql_connect($host, $user, $password);
mysql_select_db($realmdb);

function banmaradek($time) {
if($time >= 3600)
{
$ora = $time/60/60;
$time_n = (int)$ora." hours.";
}

if($time <= 3599)
{
$perc = $time/60;
$time_n = (int)$perc." min.";
}

if($time <= 59)
{
$time_n = (int)$time." sec.";
}
return $time_n;
}

$query = mysql_query("SELECT id,bannedby,banreason,unbandate FROM account_banned WHERE unbandate>='".time()."'");
while ( $sql=mysql_fetch_row($query) ) {
$account_name = mysql_fetch_array(mysql_query("SELECT * FROM account WHERE id='".$sql['0']."'"));

$ban_acc .= "<tr>
< td>".strtolower($account_name[username])."</td>
< td >".$sql['1']."</td>
< td>".$sql['2']."</td>
< td>".banmaradek($sql['3'] - time())."</td>
< /tr>";

}

$query = mysql_query("SELECT ip,bannedby,banreason,unbandate FROM ip_banned WHERE unbandate>='".time()."'");
while ( $sql=mysql_fetch_row($query) ) {

$ban_ip .= "<tr>
< td >".$sql['0']."</td>
< td>".$sql['1']."</td>
< td>".$sql['2']."</td>
< td>".banmaradek($sql['3'] - time())."</td>
< /tr>";

}

print '<fieldset class="logged"><legend class="logged">Banolt Accountok:</legend>';
print "<table width='100%' border='0'>";
print "<tr>
< td width='120'><font color=\"#85889a\"><b>Account Name</b></font></td>
< td width='100'><font color=\"#85889a\"><b>Banned By</b></font></td>
< td><font color=\"#85889a\"><b>-</b></font></td>
< td width='120'><font color=\"#85889a\"><b>UnBanDate</b></font></td>
< /tr>";
print $ban_acc;
print "</table></fieldset>";


print '<fieldset class="logged"><legend class="logged">Banned IP List</legend>';
print "<table width='100%' border='0'>";
print "<tr>
< td width='120'><font color=\"#85889a\"><b>IP</b></font></td>
< td width='100'><font color=\"#85889a\"><b>Banned By</b></font></td>
< td><font color=\"#85889a\"><b>-</b></font></td>
< td width='120'><font color=\"#85889a\"><b>UnBanDate</b></font></td>
< /tr>";
print $ban_ip;
print "</table></fieldset>";

mysql_close();
?>





欢迎光临 吾爱尚玩资源基地 (http://bbs.523play.com/) Powered by Discuz! X3.4