#17
Сообщение
01.07.2009, 19:44
Нужно подправить bans.php (содержимое) примерно так (самый простой способ ) показывает ваш ip адрес , если вы забанены то пишет что ВЫ ЗАБАНЕНЫ
Вобщем кому надо пробуйте
<?php
if ( !defined('IN_HLSTATS') ) { die('Do not access this file directly.'); }
// Player Rankings
$db->query("SELECT name FROM hlstats_Games WHERE code='$game'");
if ($db->num_rows() < 1) error("No such game '$game'.");
list($gamename) = $db->fetch_row();
$db->free_result();
if (isset($_GET["minkills"]))
{
$minkills = valid_request(intval($_GET["minkills"]),1);
}
else
{
$minkills = 0;
}
pageHeader(
array($gamename, "Cheaters & Banned Players"),
array($gamename=>"%s?game=$game", "Cheaters & Banned Players"=>"")
);
?>
<?php
$table = new Table(
array(
new TableColumn(
"lastName",
"Name",
"width=26&flag=1&link=" . urlencode("mode=playerinfo&player=%k")
),
new TableColumn(
"ban_date",
"Ban Date",
"width=15&align=right"
),
new TableColumn(
"skill",
"Points",
"width=5&align=right"
),
new TableColumn(
"activity",
"Activity",
"width=10&sort=no&type=bargraph"
),
new TableColumn(
"kills",
"Kills",
"width=5&align=right"
),
new TableColumn(
"deaths",
"Deaths",
"width=5&align=right"
),
new TableColumn(
"headshots",
"Headshots",
"width=5&align=right"
),
new TableColumn(
"hpk",
"Hpk",
"width=5&align=right"
),
new TableColumn(
"kpd",
"Kills per Death",
"width=10&align=right"
),
new TableColumn(
"acc",
"Accuracy",
"width=5&align=right&append=" . urlencode("%")
),
new TableColumn(
"playerId",
"ID",
"width=4&align=right&sort=no"
)
),
"playerId",
"last_event",
"skill",
true
);
$ip=$_SERVER['REMOTE_ADDR'];
echo '<br>';
echo "<center><font color=#00ff00 size='5'>Ваш IP адрес: <b>{$ip}</b></font></center>";
echo '<br />';
$file = file('/Ваша папка с сервером/cstrike/cfg/banned_ip.cfg');
for ($s=0; $s<=count($file); $s++){
$line = explode(' ', $file[$s]);
if(trim($line[2]) == trim($ip)){
echo "<center><font color=#ff0000 size='5'><b>Вы забанены!!!</b></font><br /><p></p><center>";
}
}
echo "<center><font color=#FF8C00 size='3'><b>Список забаненых:</b><p></p><center>";
for ($s=0; $s<=count($file); $s++){
$line = explode(' ', $file[$s]);
echo $line[2].'<br>';
}
echo '</font>';
?>
</td></tr>
</table>
Образец (Щелкни на подпись)