Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <table style="width:100%">
- <tr>
- <th align="center">Admin ID</th>
- <th align="center">Admin name</th>
- <th align="center">Bans</th>
- <th align="center">Gags</th>
- <th align="center">Mutes</th>
- </tr>
- <?php
- //error_reporting(0);
- $dbhost = 'localhost';
- $dbuser = 'root';
- $dbpass = '';
- $dbdb = 'sourcebans';
- $conn = mysqli_connect($dbhost, $dbuser, $dbpass,$dbdb);
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $gatherallq = "SELECT sb_comms.aid, sb_comms.type, sb_admins.aid, sb_admins.user
- FROM sb_comms
- INNER JOIN sb_admins ON sb_comms.aid = sb_admins.aid
- WHERE sb_comms.aid!='0'
- GROUP BY sb_admins.aid ASC";
- $gatherall = mysqli_query($conn,$gatherallq);
- while ($res = mysqli_fetch_array($gatherall)):
- $aid = $res['aid'];
- $name = $res['user'];
- $type = $res['type'];
- $countmutes = mysqli_query($conn,"SELECT aid,type FROM sb_comms WHERE type='1' AND aid='$aid'");
- $mutestotal = mysqli_num_rows($countmutes);
- $countgags = mysqli_query($conn,"SELECT aid,type FROM sb_comms WHERE type='2' AND aid='$aid'");
- $gagstotal = mysqli_num_rows($countgags);
- $joinbans2 = "SELECT sb_admins.aid, sb_admins.user, sb_bans.aid
- FROM sb_admins
- INNER JOIN sb_bans ON sb_admins.aid = sb_bans.aid
- WHERE sb_admins.aid='$aid'";
- $joinbans = mysqli_query($conn,$joinbans2);
- $banstotal = mysqli_num_rows($joinbans);
- ?>
- <tr>
- <th><?php echo $aid;?></th>
- <th><?php echo $name;?></th>
- <th><?php echo $banstotal;?></th>
- <th><?php echo $gagstotal;?></th>
- <th><?php echo $mutestotal;?></th>
- </tr>
- <?php endwhile;?>
- </table>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement