daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $username = 'bansyste_owcheck';
  3. $db = 'bansyste_owchecker';
  4. $hb = '127.0.0.1'; //localhost
  5. $pass = '';
  6.  
  7. $connection = new mysqli($hb, $username, $pass, $db);
  8. if ($connection->connect_error) {
  9.     die($connection->connect_error);
  10. }
  11.  ?>
  12. <html lang="en">
  13. <head>
  14.     <meta charset="utf-8">
  15.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16.     <title>Banned Accounts</title>
  17.  
  18.     <link rel="stylesheet" type="text/css" href="dashboard/bootstrap/css/bootstrap.min.css" />
  19.     <link rel="stylesheet" type="text/css" href="dashboard/font-awesome/css/font-awesome.min.css" />
  20.     <link rel="stylesheet" type="text/css" href="dashboard/css/local.css" />
  21.     <link rel="stylesheet" type="text/css" href="dashboard/css/util.css">
  22.  
  23.     <link rel="stylesheet" type="text/css" href="dashboard/vendor/animate/animate.css">
  24.   <!--===============================================================================================-->
  25.     <link rel="stylesheet" type="text/css" href="dashboard/vendor/select2/select2.min.css">
  26.   <!--===============================================================================================-->
  27.     <link rel="stylesheet" type="text/css" href="dashboard/vendor/perfect-scrollbar/perfect-scrollbar.css">
  28.  
  29.     <script type="text/javascript" src="dashboard/js/jquery-1.10.2.min.js"></script>
  30.     <script type="text/javascript" src="dashboard/bootstrap/js/bootstrap.min.js"></script>
  31.     <script type="text/javascript" src="dashboard/vendor/bootstrap/js/popper.js"></script>
  32.     <script src="dashboard/vendor/select2/select2.min.js"></script>
  33.     <script src="dashboard/vendor/perfect-scrollbar/perfect-scrollbar.min.js"></script>
  34. </head>
  35. <body>
  36.     <div>
  37.         <div id="page-wrapper">
  38.             <div class="row">
  39.                 <div class="col-lg-12">
  40.                     <h3>Banned Accounts</h3>
  41.                 </div>
  42.             </div>
  43.             <div class="row">
  44.                 <div class="col-lg-12">
  45.                   <div class="table100 ver3 m-b-110">
  46.                     <div class="table100-head">
  47.                       <table>
  48.                         <thead>
  49.                           <tr class="row100 head">
  50.                             <th class="cell100 column1">Name</th>
  51.                             <th class="cell100 column2">Ban Date</th>
  52.                             <th class="cell100 column3">Profile</th>
  53.                             <th class="cell100 column4">Status</th>
  54.                           </tr>
  55.                         </thead>
  56.                       </table>
  57.                     </div>
  58.                     <?php
  59.                     $query = "SELECT SteamID, steamName, Avatar, BanDate FROM steamaccount WHERE banDate IS NOT NULL ORDER BY banDate DESC";
  60.                     $stmt = $connection->prepare($query);
  61.                     $stmt->bind_result($steamid, $name, $avatar, $BanDate);
  62.                     $stmt->execute();
  63.  
  64.                     $content = [];
  65.                     $tempi = 0;
  66.                     while ($stmt->fetch()) {
  67.                         $content[$tempi]['steamID'] = $steamid;
  68.                         $content[$tempi]['steamName'] = $name;
  69.                         $content[$tempi]['avatarLink'] = $avatar;
  70.                         $content[$tempi]['banState'] = 1;
  71.                         $content[$tempi]['banDate'] = $BanDate;
  72.                         $tempi++;
  73.                     }
  74.  
  75.                     displayAccounts($content);
  76.  
  77.                     function displayAccounts($data)
  78.                     {
  79.                         $output = "<div class=\"table100-body js-pscroll\">
  80.                      <div class=\"table100-body js-pscroll\">
  81.                      <div class=\"table100-body js-pscroll\">
  82.                      <table>
  83.                      <tbody>";
  84.  
  85.                         foreach ($data as $key => $var) {
  86.                             $output .= "<tr class=\"row100 body\">";
  87.                             $output .= "<td class=\"cell100 column1\"><img src=\"" . $var['avatarLink'] . "\" height=64 width=64 ></img> " . $var['steamName'] . "</td>";
  88.                             $output .= "<td class=\"cell100 column2\">" . $var['banDate'] . "</td>";
  89.                             $output .= "<td class=\"cell100 column3\"><a href=\"https://steamcommunity.com/profiles/" . $var['steamID'] . "\">" . $var['steamID'] . "</a></td>";
  90.                             $output .= "<td class=\"cell100 column4\" " . ($var['banState'] == 0 ? 'id="notbanned"' : 'id="banned"') .">" . ($var['banState'] == 0 ? 'Not banned' : 'Banned') . "</td>";
  91.                             $output .= "</tr>";
  92.                         }
  93.  
  94.                         $output .= "</tbody>";
  95.                         $output .= "</table>";
  96.                         $output .= "</div>";
  97.                         $output .= "</div>";
  98.                         $output .= "</div>";
  99.                         echo $output;
  100.                     }
  101.                     ?>
  102.                   </div>
  103.                 </div>
  104.             </div>
  105.         </div>
  106.     </div>
  107.     <!-- /#wrapper -->
  108. </body>
  109. <script src="dashboard/js/main.js"></script>
  110. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top