• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[GESIOR ACC] Ban List

I think that you could do like this:

If are not players banned on server, tha page shows:



:)

Here you go:

Code:
   <?PHP
//////////////////
/// CREATED BY ///
///   SAMME    ///
/////  FROM  /////
/// OTLAND.NET ///
//////////////////

//Please respect the copyrights!//

$ban_reason = array("Offensive Name", "Invalid Name Format", "Unsuitable Name", "Name Inciting Rule Violation", "Offensive Statement", "Spamming", "Illegal Advertising", "Off-Topic Public Statement", "Non-English Public Statement", "Inciting Rule Violation", "Bug Abuse", "Game Weakness Abuse", "Using Unofficial Software to Play", "Hacking", "Multi-Clienting", "Account Trading or Sharing", "Threatening Gamemaster", "Pretending to Have Influence on Rule Enforcer", "False Report to Gamemaster", "Destructive Behaviour", "Excessive Unjustified Player Killing", "Invalid Payment", "Spoiling Auction");

$players_banned = $SQL->query('SELECT `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC')->fetchAll();
if($players_banned == 0) $main_content .= "There are currently no players banned.";
else{
	$number_of_players = 0;        
	foreach($players_banned as $player) {
		$nick = $SQL->query("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 1")->fetch(); 
		$gmnick = $SQL->query("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."")->fetch(); 
		
		if($player['admin_id'] > "1")
			$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
		else
			$banby = "Auto Ban";
			
		$number_of_players++;
		if(is_int($number_of_players / 2))
			$bgcolor = $config['site']['darkborder'];
		else
			$bgcolor = $config['site']['lightborder'];
		$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=15%><A HREF="?subtopic=characters&name='.$nick['name'].'">'.$nick['name'].'</A></TD><TD WIDTH=5%><font color ="red">'.$ban_reason[$player['reason']].'</font></TD><TD WIDTH=20%>'.$player['comment'].'</TD><TD>'.$banby.'</TD><TD>'.date("d/m/Y, G:i:s", $player['added']).'</TD><TD>'.date("d/m/Y, G:i:s", $player['expires']).'</TD></TR>';
	}
    //list of players
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Banned Player</center></b></TD><TD class="white"><b><center>Reason</center></b></TD><TD class="white"><b><center>Comment</center></b></TD><TD class="white"><b><center>Banned By</center></b></TD><TD class="white"><b><center>Added</center></b></TD><TD class="white"><b><center>Expires</center></b></TD></TR>'.$players_rows.'</TABLE>';
}
    //COPY RIGHTS!! DO NOT DELETE!
    $main_content .= '<br/><p align="right">Scripted by <B>Samme</B><br>Improved by <B>Mindez</B></p>';
?>
 
Update:
If the banishment does not expire (Deletions), it will show "PERMANENT" instead of 01/01/1970, 00:00:00 or whatever.

Code:
   <?PHP
//////////////////
/// CREATED BY ///
///   SAMME    ///
/// AND EDITED ///
//// BY MINDEZ ///
/////  FROM  /////
/// OTLAND.NET ///
//////////////////

//Please respect the copyrights!//

$ban_reason = array("Offensive Name", "Invalid Name Format", "Unsuitable Name", "Name Inciting Rule Violation", "Offensive Statement", "Spamming", "Illegal Advertising", "Off-Topic Public Statement", "Non-English Public Statement", "Inciting Rule Violation", "Bug Abuse", "Game Weakness Abuse", "Using Unofficial Software to Play", "Hacking", "Multi-Clienting", "Account Trading or Sharing", "Threatening Gamemaster", "Pretending to Have Influence on Rule Enforcer", "False Report to Gamemaster", "Destructive Behaviour", "Excessive Unjustified Player Killing", "Invalid Payment", "Spoiling Auction");

$players_banned = $SQL->query('SELECT `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC')->fetchAll();
if($players_banned == 0) $main_content .= "There are currently no players banned.";
else{
	$number_of_players = 0;        
	foreach($players_banned as $player) {
		$nick = $SQL->query("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 1")->fetch(); 
		$gmnick = $SQL->query("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."")->fetch(); 
		
		if($player['admin_id'] > "1")
			$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
		else
			$banby = "Auto Ban";
			
		$number_of_players++;
		
		if(is_int($number_of_players / 2))
			$bgcolor = $config['site']['darkborder'];
		else
			$bgcolor = $config['site']['lightborder'];
		
		if ($player['expires'] == -1) // If the banishment is permanent
			$expires = "PERMANENT";
		else
			$expires = date("d/m/Y, G:i:s", $player['expires']);
		
			
		$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=15%><A HREF="?subtopic=characters&name='.$nick['name'].'">'.$nick['name'].'</A></TD><TD WIDTH=5%><font color ="red">'.$ban_reason[$player['reason']].'</font></TD><TD WIDTH=20%>'.$player['comment'].'</TD><TD>'.$banby.'</TD><TD>'.date("d/m/Y, G:i:s", $player['added']).'</TD><TD>'.$expires.'</TD></TR>';
	}
    //list of players
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Banned Player</center></b></TD><TD class="white"><b><center>Reason</center></b></TD><TD class="white"><b><center>Comment</center></b></TD><TD class="white"><b><center>Banned By</center></b></TD><TD class="white"><b><center>Added</center></b></TD><TD class="white"><b><center>Expires</center></b></TD></TR>'.$players_rows.'</TABLE>';
}
    //COPY RIGHTS!! DO NOT DELETE!
    $main_content .= '<br/><p align="right">Scripted by <B>Samme</B><br>Improved by <B>Mindez</B></p>';
?>
 
Update:
If the banishment does not expire (Deletions), it will show "PERMANENT" instead of 01/01/1970, 00:00:00 or whatever.

Code:
   <?PHP
//////////////////
/// CREATED BY ///
///   SAMME    ///
/// AND EDITED ///
//// BY MINDEZ ///
/////  FROM  /////
/// OTLAND.NET ///
//////////////////

//Please respect the copyrights!//

$ban_reason = array("Offensive Name", "Invalid Name Format", "Unsuitable Name", "Name Inciting Rule Violation", "Offensive Statement", "Spamming", "Illegal Advertising", "Off-Topic Public Statement", "Non-English Public Statement", "Inciting Rule Violation", "Bug Abuse", "Game Weakness Abuse", "Using Unofficial Software to Play", "Hacking", "Multi-Clienting", "Account Trading or Sharing", "Threatening Gamemaster", "Pretending to Have Influence on Rule Enforcer", "False Report to Gamemaster", "Destructive Behaviour", "Excessive Unjustified Player Killing", "Invalid Payment", "Spoiling Auction");

$players_banned = $SQL->query('SELECT `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC')->fetchAll();
if($players_banned == 0) $main_content .= "There are currently no players banned.";
else{
	$number_of_players = 0;        
	foreach($players_banned as $player) {
		$nick = $SQL->query("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 1")->fetch(); 
		$gmnick = $SQL->query("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."")->fetch(); 
		
		if($player['admin_id'] > "1")
			$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
		else
			$banby = "Auto Ban";
			
		$number_of_players++;
		
		if(is_int($number_of_players / 2))
			$bgcolor = $config['site']['darkborder'];
		else
			$bgcolor = $config['site']['lightborder'];
		
		if ($player['expires'] == -1) // If the banishment is permanent
			$expires = "PERMANENT";
		else
			$expires = date("d/m/Y, G:i:s", $player['expires']);
		
			
		$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=15%><A HREF="?subtopic=characters&name='.$nick['name'].'">'.$nick['name'].'</A></TD><TD WIDTH=5%><font color ="red">'.$ban_reason[$player['reason']].'</font></TD><TD WIDTH=20%>'.$player['comment'].'</TD><TD>'.$banby.'</TD><TD>'.date("d/m/Y, G:i:s", $player['added']).'</TD><TD>'.$expires.'</TD></TR>';
	}
    //list of players
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Banned Player</center></b></TD><TD class="white"><b><center>Reason</center></b></TD><TD class="white"><b><center>Comment</center></b></TD><TD class="white"><b><center>Banned By</center></b></TD><TD class="white"><b><center>Added</center></b></TD><TD class="white"><b><center>Expires</center></b></TD></TR>'.$players_rows.'</TABLE>';
}
    //COPY RIGHTS!! DO NOT DELETE!
    $main_content .= '<br/><p align="right">Scripted by <B>Samme</B><br>Improved by <B>Mindez</B></p>';
?>

Doesn't work! Page doesn't show "There are currently no players banned."

Please, if you can, fix it!!
 
Sorry for double post, but i fixed it :):

PHP:
<?PHP
//////////////////
/// CREATED BY ///
///   SAMME    ///
/// AND EDITED ///
//// BY MINDEZ/GNR ///
/////  FROM  /////
/// OTLAND.NET ///
//////////////////

//Please respect the copyrights!//

$ban_reason = array("Offensive Name", "Invalid Name Format", "Unsuitable Name", "Name Inciting Rule Violation", "Offensive Statement", "Spamming", "Illegal Advertising", "Off-Topic Public Statement", "Non-English Public Statement", "Inciting Rule Violation", "Bug Abuse", "Game Weakness Abuse", "Using Unofficial Software to Play", "Hacking", "Multi-Clienting", "Account Trading or Sharing", "Threatening Gamemaster", "Pretending to Have Influence on Rule Enforcer", "False Report to Gamemaster", "Destructive Behaviour", "Excessive Unjustified Player Killing", "Invalid Payment", "Spoiling Auction");

$players_banned = $SQL->query('SELECT `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC')->fetchAll();
if(!$players_banned) {
$main_content .= '<h2><center><b>There are no players banned on '.$config['server']['serverName'].'</b></center></h2>';
} else{
	$number_of_players = 0;        
	foreach($players_banned as $player) {
		$nick = $SQL->query("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 1")->fetch(); 
		$gmnick = $SQL->query("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."")->fetch(); 
		
		if($player['admin_id'] > "1")
			$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
		else
			$banby = "Auto Ban";
			
		$number_of_players++;
		
		if(is_int($number_of_players / 2))
			$bgcolor = $config['site']['darkborder'];
		else
			$bgcolor = $config['site']['lightborder'];
		
		if ($player['expires'] == -1) // If the banishment is permanent
			$expires = "PERMANENT";
		else
			$expires = date("d/m/Y, G:i:s", $player['expires']);
		
			
		$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=15%><A HREF="?subtopic=characters&name='.$nick['name'].'">'.$nick['name'].'</A></TD><TD WIDTH=5%><font color ="red">'.$ban_reason[$player['reason']].'</font></TD><TD WIDTH=20%>'.$player['comment'].'</TD><TD>'.$banby.'</TD><TD>'.date("d/m/Y, G:i:s", $player['added']).'</TD><TD>'.$expires.'</TD></TR>';
	}
    //list of players
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Banned Player</center></b></TD><TD class="white"><b><center>Reason</center></b></TD><TD class="white"><b><center>Comment</center></b></TD><TD class="white"><b><center>Banned By</center></b></TD><TD class="white"><b><center>Added</center></b></TD><TD class="white"><b><center>Expires</center></b></TD></TR>'.$players_rows.'</TABLE>';
}
    //COPY RIGHTS!! DO NOT DELETE!
    $main_content .= '<br/><p align="right">Scripted by <B>Samme</B><br>Improved by <B>Mindez</B> and <B>GNR</B></p>';
?>
 
Sorry for double post, but i fixed it :):

PHP:
<?PHP
//////////////////
/// CREATED BY ///
///   SAMME    ///
/// AND EDITED ///
//// BY MINDEZ/GNR ///
/////  FROM  /////
/// OTLAND.NET ///
//////////////////

//Please respect the copyrights!//

$ban_reason = array("Offensive Name", "Invalid Name Format", "Unsuitable Name", "Name Inciting Rule Violation", "Offensive Statement", "Spamming", "Illegal Advertising", "Off-Topic Public Statement", "Non-English Public Statement", "Inciting Rule Violation", "Bug Abuse", "Game Weakness Abuse", "Using Unofficial Software to Play", "Hacking", "Multi-Clienting", "Account Trading or Sharing", "Threatening Gamemaster", "Pretending to Have Influence on Rule Enforcer", "False Report to Gamemaster", "Destructive Behaviour", "Excessive Unjustified Player Killing", "Invalid Payment", "Spoiling Auction");

$players_banned = $SQL->query('SELECT `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC')->fetchAll();
if(!$players_banned) {
$main_content .= '<h2><center><b>There are no players banned on '.$config['server']['serverName'].'</b></center></h2>';
} else{
	$number_of_players = 0;        
	foreach($players_banned as $player) {
		$nick = $SQL->query("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 1")->fetch(); 
		$gmnick = $SQL->query("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."")->fetch(); 
		
		if($player['admin_id'] > "1")
			$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
		else
			$banby = "Auto Ban";
			
		$number_of_players++;
		
		if(is_int($number_of_players / 2))
			$bgcolor = $config['site']['darkborder'];
		else
			$bgcolor = $config['site']['lightborder'];
		
		if ($player['expires'] == -1) // If the banishment is permanent
			$expires = "PERMANENT";
		else
			$expires = date("d/m/Y, G:i:s", $player['expires']);
		
			
		$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=15%><A HREF="?subtopic=characters&name='.$nick['name'].'">'.$nick['name'].'</A></TD><TD WIDTH=5%><font color ="red">'.$ban_reason[$player['reason']].'</font></TD><TD WIDTH=20%>'.$player['comment'].'</TD><TD>'.$banby.'</TD><TD>'.date("d/m/Y, G:i:s", $player['added']).'</TD><TD>'.$expires.'</TD></TR>';
	}
    //list of players
    $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Banned Player</center></b></TD><TD class="white"><b><center>Reason</center></b></TD><TD class="white"><b><center>Comment</center></b></TD><TD class="white"><b><center>Banned By</center></b></TD><TD class="white"><b><center>Added</center></b></TD><TD class="white"><b><center>Expires</center></b></TD></TR>'.$players_rows.'</TABLE>';
}
    //COPY RIGHTS!! DO NOT DELETE!
    $main_content .= '<br/><p align="right">Scripted by <B>Samme</B><br>Improved by <B>Mindez</B> and <B>GNR</B></p>';
?>
lol, you only added { }? The one I posted works. And adding { } wouldn't change anything anyway, because there's only one line for the if-statement.
 
On the $ban_reason array,the last reason says "invalid paymeny".It should be "invalid payment".
 
Hahaha xD My bad, thanks!

Uh actually it doesn't :/

And why the hell isn't it possible to edit posts...
 
Last edited by a moderator:
Hahaha xD My bad, thanks!

Uh actually it doesn't :/

And why the hell isn't it possible to edit posts...

You have to ask a moderator to edit it for you.You can't edit posts in the downloads section.
 
lol, you only added { }? The one I posted works. And adding { } wouldn't change anything anyway, because there's only one line for the if-statement.

No, your script doesn't show "There are no players banned".

I don't add {} only, look again:

Mine:
PHP:
if(!$players_banned)

Yours:
PHP:
if($players_banned == 0)

Mine have an exclamation mark (!), without this, it will not work.

:)
 
Code:
Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\bans.php on line 13

can someone say how to fix that?
 
Code:
Fatal error: Call to a member function query() on a non-object in C:\xampp\htdocs\bans.php on line 13

can someone say how to fix that?

Your table differs from the standard layout, make sure you have all named on line 13.
 
NOT work in 0.2 ?

Fields.

CREATE TABLE `bans` (
`type` int(11) NOT NULL COMMENT 'this field defines if its ip, accountban or namelock',
`ip` int(10) unsigned NOT NULL default '0',
`mask` int(10) unsigned NOT NULL default '4294967295',
`player` int(10) unsigned NOT NULL default '0',
`account` int(10) unsigned NOT NULL default '0',
`time` int(10) unsigned NOT NULL default '0',
`reason_id` int(11) NOT NULL default '0',
`action_id` int(11) NOT NULL default '0',
`comment` varchar(60) NOT NULL default '',
`banned_by` int(10) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
It won't work in 0.2 because it doesn't use "type" instead of ip/player/account. It's rather easy to convert it but it would take a while :/
 
It won't work in 0.2 because it doesn't use "type" instead of ip/player/account. It's rather easy to convert it but it would take a while :/

I can do it for 0.2. But I suggest to use 0.3. 0.2 blows.
 
its working now
but in table Banned by i get Auto ban why that? i banned this people with my gm...
 
Back
Top