Hello!
I present to you scripts written by: Aleh.
Please don't copy the script to other forums.
Open bans.php (WINDOWS: xampp/htdocs/bans.php, LINUX: var/www/bans.php).
After
Add
Then, before
Add
http://localhost/?subtopic=bans&action=notations
Screen:
Thanks, REP ++!
I present to you scripts written by: Aleh.
Please don't copy the script to other forums.
Open bans.php (WINDOWS: xampp/htdocs/bans.php, LINUX: var/www/bans.php).
After
PHP:
<?PHP
PHP:
if($action == "notations") {
/////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////Last 20 notations on server//////////////////////////////////
/////////////////////////////////////by Aleh/////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
$zapytanie = $SQL->query("SELECT `bans`.`added`, `bans`.`type`, `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`added`, `players`.`name`, `accounts`.`warnings` FROM `accounts`, `bans`, `players` WHERE `accounts`.`id` = `bans`.`value` AND `players`.`account_id` = `bans`.`value` AND `type` = 4 LIMIT 20");
foreach($zapytanie as $zap) {
$data = date("d.m.Y, G:i", $zap['added']);
$kolor++;
if(is_int($kolor / 2))
$bgcolor = $config['site']['lightborder'];
else
$bgcolor = $config['site']['darkborder'];
$nick = $SQL->query("SELECT `name`, `id` FROM `players` WHERE `id` =".$zap['admin_id']."")->fetch();
if($zap['admin_id'] >= "1")
$ban = "<a href=?subtopic=characters&name=".urlencode($nick['name'])."><b>".$nick['name']."</b></a>";
else
$ban = "ServerName System";
$tresc .= '<TR BGCOLOR='.$bgcolor.'><TD><center><b>'.$zap['name'].'</b> ('.$zap['warnings'].')</TD><TD><center>'.$zap['comment'].'</TD><TD><center>'.$ban.' ('.$data.')</TD></TR>';
}
$main_content .= '<center><hr/><b>Last 20 notations on '.$config['server']['serverName'].'.</b><hr/><br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white WIDTH=25%><b><center>Who?</center></b></TD><TD class="white" WIDTH=35%><b><center>Commands</center></b></TD><TD class="white" WIDTH=40%><b><center>By</center></b></TD></TR>'.$tresc.'</TABLE>';
///Don't delete this! Please respect my work! I am counting on reputation.
$main_content .= '<div align="right"><small><b>Author of script: <a href="http://otland.net/members/aleh/">Aleh</a></b></small></div><br />';
///Don't delete this! Please respect my work! I am counting on reputation.
}
if($action == "") {
PHP:
?>
PHP:
}
Screen:
Thanks, REP ++!