Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <!-- greportBot Interface: By techkid6 -->
- <head>
- <title>greportBot Web Interface</title>
- </head>
- <body>
- <center><p>greportBot Web Interface</p></center>
- <!-- Main PHP Code -->
- <?php
- //Variables
- $server="";
- $username="";
- $password="";
- $database="";
- $con = mysql_connect($server,$username,$password); //Connect to server
- if (!$con)
- {
- die('Could not connect: ' . mysql_error()); //Connection Failed: Show Error
- }
- @mysql_select_db($database) or die( "Unable to select database"); //Connects to database
- $query="SELECT * FROM greport"; //Grabs All Greports From Database
- $result=mysql_query($query); //Querys the Database
- $num=mysql_query("SELECT COUNT(*) FROM greport"); //Finds number of entries
- $i=0; // Loop
- while ($i < $num) {
- echo "<table border='1'>
- <tr>
- <th>Username</th>
- <th>Block</th>
- <th>X</th>
- <th>Y</th>
- <th>Z</th>
- <th>Comment</th>
- <th>Checked</th>
- </tr>";
- while($row = mysql_fetch_array($result))
- {
- echo "<tr>";
- echo "<td>" . $row['user'] . "</td>";
- echo "<td>" . $row['block'] . "</td>";
- echo "<td>" . $row['x'] . "</td>";
- echo "<td>" . $row['y'] . "</td>";
- echo "<td>" . $row['z'] . "</td>";
- echo "<td>" . $row['comment'] . "</td>";
- echo "<td><a href=/check.php?id=" . $row['id'] . ">Check Off </a></td>";
- echo "</tr>";
- }
- echo "</table>";
- $i++;
- }
- ?>
- </body>
- </html>
Add Comment
Please, Sign In to add comment