Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL & ~ E_NOTICE);
- include("config.php");
- $link_sg = mysql_connect($dbhost, $dbuser, $dbpass) or die('Could not connect: ' . mysql_error());
- include("playername.php");
- mysql_select_db($mysql_db) or die('Could not select database (Chat Verlauf)');
- $query = "SELECT * FROM `lb-chat` ORDER BY DATE";
- $result = mysql_query($query) or die('Query failed: ' . mysql_error());
- echo "<table id='stats_sg' class='table'>";
- echo "<thead>";
- echo"".$name."";
- echo "</thead>";
- $RANK = 0;
- while ($line = mysql_fetch_array($result, MYSQL_ASSOC)){
- $RANK = $RANK+1;
- $id = $line['id'];
- $playerid1 = $line['playerid'];
- $date = $line['date'];
- $message = $line['message'];
- echo "<tbody>";
- if ($RANK == 1)
- {
- echo "<tr class='first' height='41px'>";
- echo "<td>".$id.".</td>";
- echo "<td>".$playerid1."</td>";
- echo "<td>".$date."</td>";
- echo "<td>".$message."</td>";
- echo "</tr>";
- }else if ($RANK == 2)
- {
- echo "<tr class='second' height='41px'>";
- echo "<td>".$id.".</td>";
- echo "<td>".$playerid1."</td>";
- echo "<td>".$date."</td>";
- echo "<td>".$message."</td>";
- echo "</tr>";
- }else if ($RANK == 3)
- {
- echo "<tr class='third' height='41px'>";
- echo "<b><td>".$id.".</td></b>";
- echo "<td>".$playerid1."</td>";
- echo "<td>".$date."</td>";
- echo "<td>".$message."</td>";
- echo "</tr>";
- }else{
- echo "<tr height='41px'>";
- echo "<td>".$id.".</td>";
- echo "<td>".$playerid1."</td>";
- echo "<td>".$date."</td>";
- echo "<td>".$message."</td>";
- echo "</tr>";
- }
- echo "</tbody>";
- }
- echo "</table>";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement