Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //--------+ Load Config File #---------------+
- require_once('config.php');
- //--------# Load Style.css #----------------------+
- echo '<link rel="stylesheet" href="style.css">';
- //--------# Connect to Database #-----------------+
- $db = mysqli_connect('localhost', $dbuser, $dbpassword) or die('Could not connect: ' . mysqli_error());
- mysqli_select_db($db, $dbname) or die('Could not select database');
- //--------# Load Table From Database & Display Results #------------+
- echo("<title>Rust Kill Records</title>");
- echo "<center><img src='images/Rust_logo.png' /></center><br>";
- echo "<center><table style='width:800px' class=''>";
- echo "<center><table style='width:1000px' class=''>";
- echo "<tr>";
- echo "<td style='width:0%' class='forumheader4'></td>";
- echo "<td style='width:10%' class='forumheader4'>Name</td>";
- if($playerkills == 'true'){echo "<td style='width:5%' class='forumheader4'>Player Kills</td>";}
- if($chickenkills == 'true'){echo "<td style='width:5%' class='forumheader4'>Chickens</td>";}
- if($boarkills == 'true'){echo "<td style='width:5%' class='forumheader4'>Boar</td>";}
- if($stagkills == 'true'){echo "<td style='width:5%' class='forumheader4'>Stag</td>";}
- if($wolfkills == 'true'){echo "<td style='width:5%' class='forumheader4'>Wolves</td>";}
- if($bearkills == 'true'){echo "<td style='width:5%' class='forumheader4'>Bears</td>";}
- if($scientistkills == 'true'){echo "<td style='width:5%' class='forumheader4'>Scientist</td>";}
- if($tunneldweller == 'true'){echo "<td style='width:5%' class='forumheader4'>Tunnel Dweller</td>";}
- if($lootcontainers == 'true'){echo "<td style='width:5%' class='forumheader4'>Loot Container</td>";}
- if($animalcorpse == 'true'){echo "<td style='width:5%' class='forumheader4'>Animals Harvested</td>";}
- if($bodycorpse == 'true'){echo "<td style='width:5%' class='forumheader4'>Corpse Harvested</td>";}
- if($deaths == 'true'){echo "<td style='width:5%' class='forumheader4'>Deaths</td>";}
- echo "</tr>";
- $i = '0';
- $checkdb = "SELECT * FROM $tablename;";
- $results = mysqli_query($db, $checkdb) or die('Player Data not Received: ' . mysqli_error($db));
- while($row = $results->fetch_assoc()){
- $i++;
- echo "<tr>";
- echo "<td style='' class='forumheader3'>$i.</td>";
- echo "<td style='' class='forumheader3'><a href='https://steamcommunity.com/profiles/".$row['steamid']."/' target='_blank'>".$row['Name']."</a></td>";
- if($playerkills == 'true'){echo "<td style='' class='forumheader3'>".$row['Player']."</td>";}
- if($chickenkills == 'true'){echo "<td style='' class='forumheader3'>".$row['Chicken']."</td>";}
- if($boarkills == 'true'){echo "<td style='' class='forumheader3'>".$row['Boar']."</td>";}
- if($stagkills == 'true'){echo "<td style='' class='forumheader3'>".$row['Stag']."</td>";}
- if($wolfkills == 'true'){echo "<td style='' class='forumheader3'>".$row['Wolf']."</td>";}
- if($bearkills == 'true'){echo "<td style='' class='forumheader3'>".$row['Bear']."</td>";}
- if($scientistkills == 'true'){echo "<td style='' class='forumheader3'>".$row['Scientist']."</td>";}
- if($tunneldweller == 'true'){echo "<td style='' class='forumheader3'>".$row['TunnelDweller']."</td>";}
- if($lootcontainers == 'true'){echo "<td style='' class='forumheader3'>".$row['LootContainer']."</td>";}
- if($animalcorpse == 'true'){echo "<td style='' class='forumheader3'>".$row['Corpse']."</td>";}
- if($bodycorpse == 'true'){echo "<td style='' class='forumheader3'>".$row['Pcorpse']."</td>";}
- if($deaths == 'true'){echo "<td style='' class='forumheader3'>".$row['Deaths']."</td>";}
- echo "</tr>";
- }
- echo "</table></center>";
- //--------------------------------------+
- echo "<br><br><center><small>Rust KillRecords by MACHIN3 - <a href='http://www.skilledsoldiers.net' target='_blank'>www.skilledsoldiers.net</a> - <a href='http://discord.skilledsoldiers.net' target='_blank'>discord.skilledsoldiers.net</a></small></center>";
- //--------------------------------------+
- ?>
Advertisement
Add Comment
Please, Sign In to add comment