Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Banned List *PHP - OdinMS*

Junior Spellweaver
Joined
Apr 3, 2008
Messages
156
Reaction score
1
Hey there,

ive made this so i can check more easy who got banned for what.
Don't know if it was already released but i did not find anything.

Insert this code to any .php file you want:
PHP:
<?php
include('config.php');
$con = mysql_connect($sql_host, $sql_user, $sql_pass);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_select_db($sql_db, $con);

$result = mysql_query("SELECT name, banreason FROM accounts WHERE banned = 1")
or die(mysql_error());

echo "<table border='1' bordercolor='#000000' style='dashed thin'>";
echo "<tr> <th><span class='Stil2'> Account ID </th>  <th><span class='Stil2'> Reason </th>  </tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result ) ) {
  echo "<tr><td>  ";
    echo $row['name'];
    echo " </td><td> ";
    echo $row['banreason'];
    echo "</td></tr>";
}

echo "</table>";
?>
(You need a config.php for sure)

Have fun with it.
 
Last edited:
Newbie Spellweaver
Joined
Jul 18, 2008
Messages
87
Reaction score
0
Thank ~

i'm Go to Testing .........

Nice Release

~~~~~~~~~~~~
 
Experienced Elementalist
Joined
Jun 22, 2008
Messages
264
Reaction score
0
Sweet :D
im gonna add it to my site now ^^
expect your name to be in my credit section x)
 
Junior Spellweaver
Joined
Apr 3, 2008
Messages
156
Reaction score
1
Well just Upload the new banned.php or do you want this as a link on the side?
 
Junior Spellweaver
Joined
Apr 3, 2008
Messages
156
Reaction score
1
Well you can insert a link on top.php - Check the OriginalMS CMS Thread how to add links there.
 
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
13
Reaction score
0
How would i change the font color of the Names and the ban reasons inside the table?
 
Junior Spellweaver
Joined
Apr 3, 2008
Messages
156
Reaction score
1
PHP:
  echo "<tr><td>  <font color=\"yourColorHere\">";
    echo $row['name'];
    echo "</font> </td><td> <font color=\"your2ndColorHere\">";
    echo $row['banreason'];
    echo "</font></td></tr>";
 
Initiate Mage
Joined
May 25, 2008
Messages
1
Reaction score
0
How come a table isnt showing up and im getting

Code:
Account ID   Reason    accountidhere  reasonhere.

just like that no tables or anything.
 
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
13
Reaction score
0
PHP:
  echo "<tr><td>  <font color=\"yourColorHere\">";
    echo $row['name'];
    echo "</font> </td><td> <font color=\"your2ndColorHere\">";
    echo $row['banreason'];
    echo "</font></td></tr>";

Thanks a lot! :D
 
Newbie Spellweaver
Joined
Jun 5, 2008
Messages
82
Reaction score
3
ROFL. i made my server have a "ban of shame" tab
 
Newbie Spellweaver
Joined
Apr 15, 2008
Messages
5
Reaction score
0
To make it work for tempban, you will have to execute another script:

SELECT name, banreason FROM accounts WHERE tempban > '0000-00-00 00:00:00'
 
Back
Top