Advertisement
Atore

PHP Ultraban

Apr 24th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.44 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <title>Ultra Banlist</title>
  5. </head>
  6. <body>
  7. <h1>Ultra Banlist</h1>
  8. <?php
  9.  
  10. // change these things
  11.  
  12. $server = "mysql.hicoria.com";
  13. $dbuser = "mysql_4079";
  14. $dbpass = "vCjvxf75";
  15. $dbname = "mysql_4079";
  16.  
  17. mysql_connect($server, $dbuser, $dbpass);
  18. mysql_select_db($dbname);
  19.  
  20. $result = mysql_query("SELECT * FROM banlist ORDER BY id DESC");
  21. //This will display the most recent by id edit this query how you see fit. Limit, Order, ect.
  22. echo "<table width=100% border=1 cellpadding=3 cellspacing=0>";
  23.  
  24. echo "<tr style=\"font-weight:bold\">
  25. <td>Type</td>
  26. <td>Name</td>
  27. <td>Reason</td>
  28. <td>Admin/Mod</td>
  29. <td>Time</td>
  30. <td>TimeTempBan</td>
  31. <td>id</td>
  32.  
  33. </tr>";
  34.  
  35. while($row = mysql_fetch_assoc($result)){
  36.  
  37. if($col == "#eeeeee"){
  38. $col = "#ffffff";
  39. }else{
  40. $col = "#eeeeee";
  41. }
  42. echo "<tr bgcolor=$col>";
  43. if($row['type'] == "5"){
  44. echo "<td>Unban</td>";
  45. }else{
  46. if($row['type'] == "3"){
  47. echo "<td>Kick</td>";
  48. }else{
  49. if($row['type'] == "2"){
  50. echo "<td>Warn</td>";
  51. }else{
  52. if($row['type'] == "0"){
  53. echo "<td>Banned</td>";
  54. }else{
  55. if($row['type'] == "1"){
  56. echo "<td>IPBanned</td>";
  57. }else{
  58. if($row['type'] == "4"){
  59. echo "<td>Fine</td>";
  60. }else{
  61. if($row['type'] == "6"){
  62. echo "<td>Jailed</td>";
  63. }else{
  64. if($row['type'] == "9"){
  65. echo "<td>Perma</td>";
  66. }else{
  67. echo "<td>Unknown</td>";
  68. //Holy Epic If Statement Batman!
  69. }
  70. }
  71. }
  72. }
  73. }
  74. }
  75. }
  76. }
  77. echo "<td>".$row['name']."</td>";
  78. echo "<td>".$row['reason']."</td>";
  79. echo "<td>".$row['admin']."</td>";
  80. //Convert Epoch Time to Standard format
  81. $datetime = date("F j, Y, g:i a", $row['time']);
  82. echo "<td>$datetime</td>";
  83. $dateconvert = date("F j, Y, g:i a", $row['temptime']);
  84. if($row['temptime'] == "0"){
  85. echo "<td>None</td>";
  86. }else{
  87. echo "<td>$dateconvert</td>";
  88. }
  89. echo "<td>".$row['id']."</td>";
  90.  
  91. echo "</tr>";
  92. }
  93.  
  94. echo"</table>";
  95.  
  96. ?>
  97. </div>
  98. Ban database provided by UltraBans.
  99. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement