Advertisement
Guest User

Untitled

a guest
Oct 29th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.89 KB | None | 0 0
  1. <!-- Copyright 2016, EvoCity Roleplay. All Rights Reserved. We will take legal action against those who copy our HTML content, CSS style sheets and JavaScript functions. -->
  2. <!--?xml version="1.0" encoding="UTF-8"?-->
  3.  
  4. <html>
  5. <head>
  6. <meta name="author" content="raveN">
  7. <title>EvoCity RP - Blacklists</title>
  8.  
  9. <!-- Latest compiled and minified CSS -->
  10. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  11.  
  12. <!-- Optional theme -->
  13. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
  14.  
  15. <!-- Latest compiled and minified JavaScript -->
  16. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  17. <style>
  18. body{
  19. background-image: url(http://www.evocity.net/images/screenshots/ec2/full/mnbldg.jpg);
  20. background-repeat: no-repeat;
  21. background-attachment: fixed;
  22. background-size: cover;
  23. text-align: center;
  24. margin: 100px;
  25. }
  26. .short{
  27. width: 50px;
  28. }
  29.  
  30. .table thead tr{
  31. background-color: #dbd880;
  32. }
  33. .table tbody tr{
  34. transition: 0.2s;
  35. background-color: #fff;
  36. font-size: 12px;
  37. cursor: default;
  38. }
  39. .table tbody tr:hover{
  40. background-color: #f7f7f7;
  41. }
  42. </style>
  43. </head>
  44. <body>
  45. <div class = "container">
  46.  
  47. <div style = "font-size: 50px; font-family: Arial; text-shadow: black 0px 0px 10px; padding-bottom: 30px;">
  48. <b><i><font color = "#fff">Evo</font><font color = "#fff">City</font> <font color = "#7dc3d5">Blacklists</font></i></b>
  49. </div>
  50.  
  51. <form style = "display:inline!important;" action="index.php?search=" method="get" id = "searchform">
  52. <input type="text" name="search" id = "search">
  53. <input type="submit" value="Search">
  54. <input type = "button" onclick = "go_back()" value = "Reset">
  55. </form>
  56. <br /><br />
  57.  
  58. <?php
  59. //load database connection
  60. $host = "";
  61. $user = "root";
  62. $password = "";
  63. $database_name = "cityrp";
  64. $pdo = new PDO("mysql:host=$host;dbname=$database_name", $user, $password, array(
  65. PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
  66. ));
  67. // Search from MySQL database table
  68. $search=$_GET['search'];
  69. $query = $pdo->prepare("select * from accesslog where steamid LIKE '%$search%' OR player LIKE '%$search%' LIMIT 0 , 150");
  70. $query->bindValue(1, "%$search%", PDO::PARAM_STR);
  71. $query->execute();
  72. // Display search result
  73. if (!$query->rowCount() == 0) {
  74. echo "<table class = 'table table-bordered table-hover'><col span = '1' class = 'short'";
  75. echo "<thead><tr><th>ID</th><th>Name</th><th>Steam ID</th><th>Reason</th><th>Access</th><th>Unblacklist Time</th><th>Blacklisted by</th></tr></thead><tbody>";
  76. while ($results = $query->fetch()) {
  77. if ($results['reason'] == "p"){
  78. $reason = "Physgun"
  79. }elseif ($results['reason'] == "t"){
  80. $reason = "Toolgun"
  81. }elseif ($results['reason'] == "e"){
  82. $reason = "Entities/Props"
  83. }elseif ($results['reason'] == "v"){
  84. $reason = "Vehicles"
  85. }elseif ($results['reason'] == "y"){
  86. $reason = "Advert"
  87. }elseif ($results['reason'] == "n"){
  88. $reason = "President"
  89. }elseif ($results['reason'] == "j"){
  90. $reason = "SWAT"
  91. }elseif ($results['reason'] == "f"){
  92. $reason = "Fireman"
  93. }elseif ($results['reason'] == "l"){
  94. $reason = "Paramedic"
  95. }elseif ($results['reason'] == "k"){
  96. $reason = "Desk Secretary"
  97. }elseif ($results['reason'] == "g"){
  98. $reason = "Gun Dealer"
  99. }elseif ($results['reason'] == "h"){
  100. $reason = "Doctor"
  101. }elseif ($results['reason'] == "r"){
  102. $reason = "Rebel"
  103. }elseif ($results['reason'] == "o"){
  104. $reason = "Police Officer"
  105. }elseif ($results['reason'] == "c"){
  106. $reason = "Corleone"
  107. }elseif ($results['reason'] == "i"){
  108. $reason = "Black Market Dealer"
  109. }elseif ($results['reason'] == "x"){
  110. $reason = "Taxi Driver"
  111. }elseif ($results['reason'] == "z"){
  112. $reason = "Chef"
  113. }elseif ($results['reason'] == "q"){
  114. $reason = "Security Guard"
  115. }elseif ($results['reason'] == "u"){
  116. $reason = "OOC"
  117. }elseif ($results['reason'] == "w"){
  118. $reason = "Weapons"
  119. }elseif ($results['reason'] == "C"){
  120. $reason = "Contraband"
  121. }elseif ($results['reason'] == "N"){
  122. $reason = "NLR Spawning"
  123. }elseif ($results['reason'] == "L"){
  124. $reason = "Mechanic"
  125. }else{
  126. $reason = ""
  127. }
  128. if ($reason !== ""){
  129. echo "<tr><td>";
  130. echo $results['id'];
  131. echo "</td><td>";
  132. echo $results['player'];
  133. echo "</td><td>";
  134. echo " ".$results['steamid'];
  135. echo "</td><td>";
  136. echo " ".$results['reason'];
  137. echo "</td><td>";
  138. echo " ".$results['access'];
  139. echo "</td><td>";
  140. echo " ".$results['admin'];
  141. echo "</td><td>";
  142. echo " ".$results['time_until'];
  143. echo "</td></tr>";
  144. }
  145. }
  146. echo "</tbody></table>";
  147. } else {
  148. echo 'Nothing found';
  149. }
  150. ?>
  151.  
  152. <script>
  153. function go_back(){
  154. window.location.href = 'http://www.evocityrp.com/blacklists/index.php';
  155. }
  156. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement