Advertisement
Guest User

Untitled

a guest
Mar 17th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. <html>
  2. <table style="width:100%">
  3. <tr>
  4. <th align="center">ID</th>
  5. <th align="center">Admin</th>
  6. <th align="center">Bans</th>
  7. <th align="center">Gags</th>
  8. <th align="center">Mutes</th>
  9. </tr>
  10.  
  11. <?php
  12. error_reporting(0);
  13.  
  14. $dbhost = 'localhost';
  15. $dbuser = 'sourcebans';
  16. $dbpass = 'sourcebans';
  17. $dbdb = 'sourcebans';
  18. $conn = mysqli_connect($dbhost, $dbuser, $dbpass,$dbdb);
  19. if (mysqli_connect_errno())
  20. {
  21. echo "Failed to connect to MySQL: " . mysqli_connect_error();
  22. }
  23.  
  24.  
  25.  
  26. $gatherall = mysqli_query($conn,"SELECT aid,type,aid,user FROM sb_comms, sb_admins INNER JOIN sb_admins ON sb_comms.aid GROUP BY aid ASC");
  27.  
  28.  
  29. while ($res = mysqli_fetch_array($gatherall)):
  30. $aid = $res['aid'];
  31. //$bid = $res['bid'];
  32. $name = $res['user'];
  33. $type = $res['type'];
  34.  
  35.  
  36. $countmutes = mysqli_query($conn,"SELECT aid,type FROM sb_comms WHERE type='1' AND aid='$aid'");
  37. $mutestotal = mysqli_num_rows($countmutes);
  38.  
  39.  
  40. $countgags = mysqli_query($conn,"SELECT aid,type FROM sb_comms WHERE type='2' AND aid='$aid'");
  41. $gagstotal = mysqli_num_rows($countgags);
  42.  
  43.  
  44.  
  45.  
  46.  
  47. ?>
  48.  
  49. <tr>
  50. <th><?php echo $aid;?></th>
  51. <th><?php echo $name;?></th>
  52. <th>BANS</th>
  53. <th><?php echo $gagstotal;?></th>
  54. <th><?php echo $mutestotal;?></th>
  55. </tr>
  56.  
  57. <?php endwhile;?>
  58. </table>
  59.  
  60. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement