Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /***
- ** Authors: iC0D3, Abnant
- ** Date: Nov 2014
- ** Usage: Displays the two punishment tables for the staff panel.
- ***/
- $server = "";
- $username = "";
- $password = "";
- $dbname = "";
- $limit = $Paginator->printQL();
- $conn = new mysqli($server, $username, $password, $dbname);
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- require_once 'Paginator.php';
- $result = $db->query("SELECT COUNT(id) FROM punishments");
- while ($row = $db->fetch_array($result))
- $total = $row["COUNT(id)"];
- $Paginator = new Paginator($total, 50, 7);
- $Paginator->paginate();
- $punishmentCounter = $Paginator->PrintLB();
- $serversResult = $db->query("SELECT * FROM punishments ORDER BY `id` DESC" . $Paginator->printQL());
- $sql = "SELECT * FROM punish.punishments ORDER BY ID DESC LIMIT {$limit}";
- $result = $conn->query($sql);
- if ($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- echo "Report ID: " . $row["ID"]. "
- <br /> Type: " . $row["TYPE"]. "
- <br /> Date: " . $row["DATE"]. "
- <br /> Player Name: " . $row["PLAYER"]. "
- <br /> Player IP: " . $row["PLAYER_IP"]. "
- <br /> Staff Name: " . $row["STAFF"]. "
- <br /> Reason: " . $row["REASON"]. "
- <br><hr />";
- }
- } else {
- echo "No reports in the punishments table.";
- }
- echo $Paginator->PrintPageLinks(); echo $Paginator->PrintIPPList(array(25, 50, 75, 100));
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement