Advertisement
Guest User

Untitled

a guest
Aug 13th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.44 KB | None | 0 0
  1.  
  2. <html>
  3. <head>
  4. <title>X-Ray Gaming - Bans</title>
  5. <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
  6. <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
  7. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  8. <link rel="stylesheet" type="text/css" href="style.css"/>
  9. </head>
  10. <body>
  11. <div class="content2">
  12. <div class="panel panel-primary">
  13. <div class="panel-heading">
  14. <center><h3 class="panel-title">X-Ray Gaming - Bans</h3></center>
  15. </div>
  16. <div class="panel-body">
  17. <table class="table table-stripped">
  18.  
  19. <thread>
  20. <tr>
  21. <div id="section1"> <th>ID</th></div>
  22. <div id="section2"><th>Name</th></div>
  23. <div id="section2"><th>SteamID</th></div>
  24. <div id="section3"><th>Reason</th></div>
  25. <div id="section4"><th>Ban Status</th></div>
  26. <div id="section5"> <th>Banned by</th></div>
  27. </tr>
  28. </thread>
  29.  
  30. <tbody>
  31.  
  32.  
  33. <div id="search">
  34. <form name="search" action="bans.php" method="post">
  35. <input type="text" name="search" size="26" placeholder="Enter your Name/SteamID" class="tb2" value="">
  36. <input type="submit" value="Search"><input onclick="javascript: search_form(1)" type="button" value="Reset">
  37. </form>
  38. </div>
  39.  
  40. <?php
  41. $host = "localhost";
  42. $user = "root";
  43. $pass = "";
  44. $dbname = "xray_blacklists";
  45.  
  46. $changlog = "";
  47.  
  48. $db = mysqli_connect($host, $user, $pass, $dbname);
  49. $output='';
  50. if(isset($_POST['search']))
  51. {
  52. $searchq = $_POST['search'];
  53.  
  54. if($host="localhost")
  55. {
  56. $q1 = $db->query("SELECT `id`, `name`, `unban_time`, `steamid`, `reason`, `admin` FROM `bans` WHERE name LIKE '%$searchq%' OR steamid LIKE '%$searchq%'");
  57. }
  58. $count = mysqli_num_rows($q1);
  59. if($count == 0)
  60. {
  61. $output = 'There was no search results!';
  62. }
  63. else if($count != 0)
  64. {
  65. while($row = mysqli_fetch_array($q1))
  66. {
  67. $sname = $row['name'];
  68. $ssteamid = $row['steamid'];
  69. $output = '<div> '.$sname.' '.$ssteamid.'</div>';
  70. }
  71.  
  72. }
  73. }
  74.  
  75. ?>
  76. <?php print("$output"); ?>
  77.  
  78. <?php
  79.  
  80. $host = "localhost";
  81. $user = "root";
  82. $pass = "";
  83. $dbname = "xray_blacklists";
  84.  
  85. $changlog = "";
  86.  
  87. $db = mysqli_connect($host, $user, $pass, $dbname);
  88. if($host="localhost"){
  89. $q1 = $db->query("SELECT `id`, `name`, `unban_time`, `steamid`, `reason`, `admin` FROM `bans`");
  90. if(!$q1){
  91. die($db->error);
  92. }
  93. $SelectBans = $db->query("SELECT * FROM `bans`");
  94. foreach($SelectBans as $PrintBans);
  95. /////////////////////////////////////////////////////////
  96. function secToHR($seconds)
  97. {
  98. global $row;
  99. $days = floor($seconds/86400);
  100. $hours = floor($seconds / 3600);
  101. $minutes = floor(($seconds / 60) % 60);
  102. $seconds = $seconds % 60;
  103. if ($row['unban_time'] == '0')
  104. {
  105. return "Expired";
  106. }
  107. else if ($row['unban_time'] != '0')
  108. {
  109. return $hours > 0 ? "$hours hours, $minutes minutes" : ($minutes > 0 ? "$minutes minutes, $seconds seconds" : "$seconds seconds");
  110. }
  111. }
  112.  
  113.  
  114. /////////////////////////////////////////////////////////
  115.  
  116. while($row = $q1->fetch_assoc()){
  117. if($row['admin']== '0'){
  118. echo "<tr class = \"change\">\n";
  119. }else if($row['unban_time']=='0'){
  120. echo "<tr class = \"new\">\n";
  121. }else if($row['name']!='Expired'){
  122. echo "<tr class = \"remove\">\n";
  123. }else if($row['timeuntil']=='0'){
  124. echo "<tr class = \"fix\">\n";
  125. }else if($row['id']=='CHANGE'){
  126. echo "<tr class = \"change\">\n";
  127. }
  128.  
  129.  
  130.  
  131. echo "<td class=\"trow1\" align=\"center\" width=\"1\">".$row['id']."</td>\n";
  132. echo "<td class=\"trow1 type\">".$row['name']."</td>\n";
  133. echo "<td class=\"trow1\" colspan=\"1\">".$row['steamid']."</td>\n";
  134. echo "<td class=\"trow1 type\">".$row['reason']."</td>\n";
  135. echo "<td class=\"trow1\ align=\"center\">".secToHR($row['unban_time'])."</td>\n";
  136. echo "<td class=\"trow1 type\ align=\"center\">".$row['admin']."</td>\n";
  137.  
  138.  
  139.  
  140.  
  141. }
  142. }
  143. ?>
  144.  
  145. </tbody>
  146. </table>
  147. </div>
  148. </div>
  149. </div>
  150. <div id="footer">
  151. <center><b>&copy; Copyright X-Ray Gaming.</a> 2018 | All rights reserved. </b></center>
  152. <center><b>Made with</b> <i class="fas fa-heart"></i> <b>by</b> <a href="http://steamcommunity.com/id/GreekAssassin222" title="Ilias S."><b>Ilias S.</a></b></center>
  153. </div>
  154. <script defer src="https://use.fontawesome.com/releases/v5.0.8/js/solid.js" integrity="sha384-+Ga2s7YBbhOD6nie0DzrZpJes+b2K1xkpKxTFFcx59QmVPaSA8c7pycsNaFwUK6l" crossorigin="anonymous"></script>
  155. <script defer src="https://use.fontawesome.com/releases/v5.0.8/js/fontawesome.js" integrity="sha384-7ox8Q2yzO/uWircfojVuCQOZl+ZZBg2D2J5nkpLqzH1HY0C1dHlTKIbpRz/LG23c" crossorigin="anonymous"></script>
  156. </body>
  157. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement