Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- 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. -->
- <!--?xml version="1.0" encoding="UTF-8"?-->
- <html>
- <head>
- <meta name="author" content="raveN">
- <title>EvoCity RP - Blacklists</title>
- <!-- Latest compiled and minified CSS -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
- <!-- Optional theme -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
- <!-- Latest compiled and minified JavaScript -->
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
- <style>
- body{
- background-image: url(http://www.evocity.net/images/screenshots/ec2/full/mnbldg.jpg);
- background-repeat: no-repeat;
- background-attachment: fixed;
- background-size: cover;
- text-align: center;
- margin: 100px;
- }
- .short{
- width: 50px;
- }
- .table thead tr{
- background-color: #dbd880;
- }
- .table tbody tr{
- transition: 0.2s;
- background-color: #fff;
- font-size: 12px;
- cursor: default;
- }
- .table tbody tr:hover{
- background-color: #f7f7f7;
- }
- </style>
- </head>
- <body>
- <div class = "container">
- <div style = "font-size: 50px; font-family: Arial; text-shadow: black 0px 0px 10px; padding-bottom: 30px;">
- <b><i><font color = "#fff">Evo</font><font color = "#fff">City</font> <font color = "#7dc3d5">Blacklists</font></i></b>
- </div>
- <form style = "display:inline!important;" action="index.php?search=" method="get" id = "searchform">
- <input type="text" name="search" id = "search">
- <input type="submit" value="Search">
- <input type = "button" onclick = "go_back()" value = "Reset">
- </form>
- <br /><br />
- <?php
- //load database connection
- $host = "";
- $user = "root";
- $password = "";
- $database_name = "cityrp";
- $pdo = new PDO("mysql:host=$host;dbname=$database_name", $user, $password, array(
- PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
- ));
- // Search from MySQL database table
- $search=$_POST['search'];
- $query = $pdo->prepare("select * from bans where _SteamID LIKE '%$search%' OR _Name LIKE '%$search%' LIMIT 0 , 150");
- $query->bindValue(1, "%$search%", PDO::PARAM_STR);
- $query->execute();
- // Display search result
- if (!$query->rowCount() == 0) {
- echo "<table class = 'table table-bordered table-hover'><col span = '1' class = 'short'";
- 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>";
- while ($results = $query->fetch()) {
- echo "<tr><td>";
- echo $results['id'];
- echo "</td><td>";
- echo $results['player'];
- echo "</td><td>";
- echo " ".$results['steamid'];
- echo "</td><td>";
- echo " ".$results['reason'];
- echo "</td><td>";
- echo " ".$results['access'];
- echo "</td><td>";
- echo " ".$results['admin'];
- echo "</td><td>";
- echo " ".$results['time_until'];
- echo "</td></tr>";
- }
- echo "</tbody></table>";
- } else {
- echo 'Nothing found';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement