up. also sometime it show if player was banned and the ban left it still show on the list ;/
<?PHP
$bans = $SQL->query("
SELECT b.comment AS comment, b.expires AS expire, b.added AS added, b.value AS acc, p.name AS byad
FROM bans AS b
INNER JOIN players AS p
ON p.id = b.admin_id
ORDER BY expire DESC LIMIT 50;
");
foreach ($bans as $k=>$v) {
$names = "";
$players = $SQL->query("
SELECT name FROM players WHERE account_id = ". $v[acc] ." ORDER BY name DESC LIMIT 5;"
);
foreach ($players as $l=>$y) {
$names = "$names <a href='index.php?subtopic=characters&name=" . $y[name] . "'>$y[name]</a><br>"
;}
$time = $v[expire] - time();
if ($time > 0){
$baned .="
<TR BGCOLOR=\"".$config['site'][($k % 2 == 1 ? 'light' : 'dark').'border']."\">
<TD>
<center>
<b>
". $names ."
</b>
</center>
</TD>
<TD>
<center>
<b>
<font color ='green'>
{$v[byad]}
</font>
</b>
</center>
</TD>
<TD>
<center>
<b>
<font color ='red'> {$v[comment]}</font>
</b>
</center>
</TD>
<TD>
<center>
<b> <font color ='#2f2f2f'>
".($time > 0 ? ceil($time/60) ." Minutes" : "Ends")."</font>
</b>
</center>
</TD>
</TR>
"
;}
}
$main_content .= '
<center>
<h1>
Bans
</h1>
</center>
';
if(!$baned) {
$main_content .= '
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
<TD CLASS=white>
</TD>
</TR>
<TR BGCOLOR='.$config['site']['darkborder'].'>
<TD>
There are no players banned yet on '.$config['server']['serverName'].'.
</TD>
</TR>
</TABLE>
';
} else {
$main_content .= "
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR=\"{$config['site']['vdarkborder']}\">
<TD CLASS=white width=20%>
<center>
<B>
Player
</B>
</center>
</TD>
<TD CLASS=white width=20%>
<center>
<B>
Banned by
</B>
</center>
</TD>
<TD CLASS=white width=40%>
<center>
<B>
Reason
</B>
</center>
</TD>
<TD CLASS=white width=20%>
<center>
<B>
Time
</B>
</center>
</TD>
</TR>
$baned
</TABLE>
";
}
?>
$ban_reason = array("offensive name", "name containing part of sentence", "name with nonsensical letter combination", "invalid name format", "name not describing person", "name of celebrity", "name reffering to country", "Offtopic (Forum)", "name to fake official position", "offensive statement", "spamming", "advertisement not related to game", "macro use", "<center>--></center>", "off-topic public statement", "inciting rule violation", "bug abuse", "game weakness abuse", "Macro Use", "Destructive Behaviour", "<center>--></center>", "multi-clienting", "account trading", "<center>--></center>", "threatening gamemaster", "pretending to have official position", "pretending to have influence on gamemaster", "false report to gamemaster", "excessive unjustified player killing", "destructive behaviour", "spoiling auction", "invalid paymeny");
$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");
if($player['admin_id'] == "1")
if($player['admin_id'] > "0")
$banby = "Administrator";
$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
Change:Here's a few changes that might be useful for some
Ban reasons for TFS 0.3.2 (Or newer?)
Replace:
withCode:$ban_reason = array("offensive name", "name containing part of sentence", "name with nonsensical letter combination", "invalid name format", "name not describing person", "name of celebrity", "name reffering to country", "Offtopic (Forum)", "name to fake official position", "offensive statement", "spamming", "advertisement not related to game", "macro use", "<center>--></center>", "off-topic public statement", "inciting rule violation", "bug abuse", "game weakness abuse", "Macro Use", "Destructive Behaviour", "<center>--></center>", "multi-clienting", "account trading", "<center>--></center>", "threatening gamemaster", "pretending to have official position", "pretending to have influence on gamemaster", "false report to gamemaster", "excessive unjustified player killing", "destructive behaviour", "spoiling auction", "invalid paymeny");
Code:$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");
Fixing so that all gamemasters' give "Administrator" (Or name) in the "Banned by" list:
Replace:
withCode:if($player['admin_id'] == "1")
Code:if($player['admin_id'] > "0")
Make the "Banned by" row show which gamemaster performed the banishment (With links to their profile and green colored name)
Replace:
withCode:$banby = "Administrator";
Code:$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
Here is the whole code for this
Enjoy
$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
$banby = '<a href="?subtopic=characters&name='.urlencode($gmnick[0]).'"><font color ="green">$gmnick[0]</font></a>';
Change:
with:PHP:$banby = "<a href=?subtopic=characters&name=$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
urlencode or players with nicks like Gesior'Lol could show errorPHP:$banby = '<a href="?subtopic=characters&name='.urlencode($gmnick[0]).'"><font color ="green">$gmnick[0]</font></a>';
<?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();
$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>';
?>
Oh I forgot to add the code after:
Here is the whole code for this
bans.php
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(); $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>'; ?>
Oh I forgot to add the code after:
Here is the whole code for this
bans.php
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(); $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>'; ?>
There are no Players banned on '.$config['server_name'].'
Anyone HERE ABOUT POT Docs For Class OTS_AccountBans_List and Docs For Class OTS_PlayerBans_List
Please learn how to drive.
#Up
PLZ, Gesior AAC using POT then why not coding sub-scripts in POT? PLX.
#Up
AHAA. YES, it true. But if u using this then use POT. In other way, why dont using pot in own projects?