Advertisement
Guest User

Untitled

a guest
Oct 29th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 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=$_POST['search'];
  69. $query = $pdo->prepare("select * from bans where _SteamID LIKE '%$search%' OR _Name 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>Unban Time</th><th>Banned by</th></tr></thead><tbody>";
  76. while ($results = $query->fetch()) {
  77. echo "<tr><td>";
  78. echo $results['id'];
  79. echo "</td><td>";
  80. echo $results['player'];
  81. echo "</td><td>";
  82. echo " ".$results['steamid'];
  83. echo "</td><td>";
  84. echo " ".$results['reason'];
  85. echo "</td><td>";
  86. echo " ".$results['admin'];
  87. echo "</td><td>";
  88. echo " ".$results['time_until'];
  89. echo "</td></tr>";
  90. }
  91. echo "</tbody></table>";
  92. } else {
  93. echo 'Nothing found';
  94. }
  95. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement