Advertisement
redeye83

Save me

May 14th, 2016
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.64 KB | None | 0 0
  1. <?php
  2.     require ('steamauth/steamauth.php');
  3.     require('config/ranks.php');
  4. ?>
  5. <!DOCTYPE html>
  6. <html lang="en">
  7.   <head>
  8.     <meta charset="utf-8">
  9.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10.     <meta name="viewport" content="width=device-width, initial-scale=1">
  11.     <title>Exodus Gaming - Player Stats - Cicada</title>
  12.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
  13.     <!--[if lt IE 9]>
  14.       <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  15.       <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  16.     <![endif]-->
  17.     <style>
  18.         .table {
  19.             table-layout: fluid;
  20.             word-wrap: break-word;
  21.         }
  22.     </style>
  23.     <script src="https://use.fontawesome.com/6a191e13bf.js"></script>
  24.   </head>
  25.   <body style="background-color: #EEE;">
  26.     <div class="container" style="margin-top: 30px; margin-bottom: 30px; padding-bottom: 10px; background-color: #FFF;">
  27.         <h1>Player Stats</h1>
  28.         <span class="small pull-left" style="padding-right: 10px;">Exodus Gaming - Cicada</span>
  29.         <hr>
  30.         <?php
  31. if(!isset($_SESSION['steamid'])) {
  32.     ?>
  33.     <?php
  34. $servername = "localhost";
  35. $username = "************";
  36. $password = "************";
  37. $dbname = "************";
  38.  
  39. // Create connection
  40. $conn = mysqli_connect($servername, $username, $password, $dbname);
  41. // Check connection
  42. if (!$conn) {
  43.     die("Connection failed: " . mysqli_connect_error());
  44. }
  45. ?>
  46. <div class="col-lg-3">
  47. <div class="content-panel">
  48. <table class="table table-striped table-advanced table-hover table-responsive">
  49.                         <h4>
  50.                             <i class="fa fa-money fa-fw"></i> <?php echo "Cicada Rich List"; ?>
  51.                         </h4>
  52.                         <hr>
  53.                         <thead>
  54.                         <tr>
  55.                             <th><i class="fa fa-user"></i> <?php echo "Name"; ?></th>
  56.                             <th><i class="fa fa-money"></i> <?php echo "Cash"; ?></th>
  57.                             <th><i class="fa fa-bank"></i> <?php echo "Bank Account"; ?></th>
  58.                         </tr>
  59.                         </thead>
  60. <?php                      
  61. $sql = "SELECT `name`, `cash`, `bankacc` FROM `players` ORDER BY `bankacc` DESC, `cash` DESC LIMIT 10";
  62.                      
  63.                         $result = mysqli_query($conn, $sql);
  64.                         while ($row = mysqli_fetch_assoc($result)) {
  65.                             echo "<tr>";
  66.                             echo "<td>" . $row["name"] . "</td>";
  67.                             $cashformat=number_format($row["cash"]);
  68.                             echo "<td>$" . $cashformat . "</td>";
  69.                             $bankformat=number_format($row["bankacc"]);
  70.                             echo "<td>$" . $bankformat . "</td>";
  71.                             echo "</tr>";
  72.                         };
  73. //mysqli_close($conn);
  74.  
  75. ?>
  76. </table>
  77. </div>
  78. </div>
  79. <div class="col-lg-3">
  80. <div class="content-panel">
  81. <table class="table table-striped table-advanced table-hover table-responsive">
  82.                         <h4>
  83.                             <i class="fa fa-gavel fa-fw"></i> <?php echo "Jailed Citizens"; ?>
  84.                         </h4>
  85.                         <hr>
  86.                         <thead>
  87.                         <tr>
  88.                             <th><i class="fa fa-user"></i> <?php echo "Name"; ?></th>
  89.                             <th><i class="fa fa-clock-o"></i> <?php echo "Jail time"; ?></th>
  90.                         </tr>
  91.                         </thead>
  92. <?php                      
  93. $sql = "SELECT `name`, `Jail_Time` FROM `players` WHERE `Jail_Time`> 0 ORDER BY `Jail_Time` DESC, `cash` DESC LIMIT 10";
  94.                      
  95.                         $result = mysqli_query($conn, $sql);
  96.                         while ($row = mysqli_fetch_assoc($result)) {
  97.                             echo "<tr>";
  98.                             echo "<td>" . $row["name"] . "</td>";                          
  99.                             echo "<td>" . $row["Jail_Time"] . " Minute(s)</td>";
  100.                             echo "</tr>";
  101.                         };
  102.  
  103.  
  104. ?>
  105. </table>
  106. </div>
  107. </div>
  108. <div class="col-lg-3">
  109. <div class="content-panel">
  110. <table class="table table-striped table-advanced table-hover table-responsive">
  111.                         <h4>
  112.                             <i class="fa fa-star fa-fw"></i> <?php echo "Sheriff Department"; ?>
  113.                         </h4>
  114.                         <hr>
  115.                         <thead>
  116.                         <tr>
  117.                             <th><i class="fa fa-user"></i> <?php echo "Name"; ?></th>
  118.                             <th><i class="fa fa-star fa-spin"></i> <?php echo "Rank"; ?></th>
  119.                         </tr>
  120.                         </thead>
  121. <?php                      
  122. $sql = "SELECT `name`,`coplevel` FROM `players` WHERE `coplevel` >= '1' ORDER BY `coplevel` DESC LIMIT 10";
  123.                      
  124.                         $result = mysqli_query($conn, $sql);
  125.                         while ($row = mysqli_fetch_assoc($result)) {
  126.                             echo "<tr>";
  127.                             echo "<td>" . $row["name"] . "</td>";                          
  128.                             echo "<td>" . $row["coplevel"] . "</td>";
  129.                             echo "</tr>";
  130.                         };
  131.  
  132.  
  133. ?>
  134. </table>
  135. </div>
  136. </div>
  137. <div class="col-lg-3">
  138. <div class="content-panel">
  139. <table class="table table-striped table-advanced table-hover table-responsive">
  140.                         <h4>
  141.                             <i class="fa fa-heartbeat fa-fw"></i> <?php echo "EMS Department"; ?>
  142.                         </h4>
  143.                         <hr>
  144.                         <thead>
  145.                         <tr>
  146.                             <th><i class="fa fa-user"></i> <?php echo "Name"; ?></th>
  147.                             <th><i class="fa fa-ambulance"></i> <?php echo "Rank"; ?></th>
  148.                         </tr>
  149.                         </thead>
  150. <?php                      
  151. $sql = "SELECT `name`,`mediclevel` FROM `players` WHERE `mediclevel` >= '1' ORDER BY `mediclevel` DESC LIMIT 10";
  152.                      
  153.                         $result = mysqli_query($conn, $sql);
  154.                         while ($row = mysqli_fetch_assoc($result)) {
  155.                             echo "<tr>";
  156.                             echo "<td>" . $row["name"] . "</td>";                          
  157.                             echo "<td>" . $row["mediclevel"] . "</td>";
  158.                             echo "</tr>";
  159.                         };
  160. mysqli_close($conn);
  161.  
  162. ?>
  163. </table>
  164. </div>
  165. </div>
  166. <div class="col-lg-12">
  167. <?php
  168.     echo "<hr>";
  169.    
  170.     echo "<div align='center'>";
  171.     loginbutton();
  172.     echo "</div>";
  173.     }  else {
  174.     include ('steamauth/userInfo.php');
  175.  
  176. ?>
  177. </div>
  178.         <span class="pull-right" style="padding-left: 10px;"><img src='<?=$steamprofile['avatarmedium']?>'></span>
  179.         <div style='float:left;'>
  180.             <a href='http://www.exodusgaming.net/'>
  181.                 <button class='btn btn-success' style='margin: 2px 3px;' type='button'>Homepage</button>
  182.             </a>
  183.            
  184.             <a href='https://www.facebook.com/exodusgamingcommunity/'>
  185.                 <button class='btn btn-warning' style='margin: 2px 3px;' type='button'>Facebook</button>
  186.             </a>
  187.         </div>
  188.         <br>
  189.         <br>
  190.         <h4 style='margin-bottom: 3px; float:left;'><?=$steamprofile['personaname']?> Stats:</h4><span style='float:right;'><?php logoutbutton(); ?></span>
  191.  
  192. <div style='text-align: center;'>COMING SOON!</div><br>
  193. <?php
  194. $rank = array("Deputy", "BMW", "Toyota");
  195. echo "I like " . $rank[0] . ", " . $rank[1] . " and " . $rank[2] . ".";
  196. ?>
  197. <?php
  198.     }
  199. ?>
  200.         <hr>
  201.         <div class="pull-right">
  202.             <i>This page is powered by <a href="http://steampowered.com">Steam</a></i>
  203.         </div>
  204.         Created by Paul Firmin<br>
  205.         Exodus Gaming Founder
  206.     </div>
  207.    
  208.     <!--Version 3.1.1-->
  209.   </body>
  210. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement