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=$_GET['search'];
- $query = $pdo->prepare("select * from accesslog where steamid LIKE '%$search%' OR player 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()) {
- if ($results['reason'] == "p"){
- $reason = "Physgun"
- }elseif ($results['reason'] == "t"){
- $reason = "Toolgun"
- }elseif ($results['reason'] == "e"){
- $reason = "Entities/Props"
- }elseif ($results['reason'] == "v"){
- $reason = "Vehicles"
- }elseif ($results['reason'] == "y"){
- $reason = "Advert"
- }elseif ($results['reason'] == "n"){
- $reason = "President"
- }elseif ($results['reason'] == "j"){
- $reason = "SWAT"
- }elseif ($results['reason'] == "f"){
- $reason = "Fireman"
- }elseif ($results['reason'] == "l"){
- $reason = "Paramedic"
- }elseif ($results['reason'] == "k"){
- $reason = "Desk Secretary"
- }elseif ($results['reason'] == "g"){
- $reason = "Gun Dealer"
- }elseif ($results['reason'] == "h"){
- $reason = "Doctor"
- }elseif ($results['reason'] == "r"){
- $reason = "Rebel"
- }elseif ($results['reason'] == "o"){
- $reason = "Police Officer"
- }elseif ($results['reason'] == "c"){
- $reason = "Corleone"
- }elseif ($results['reason'] == "i"){
- $reason = "Black Market Dealer"
- }elseif ($results['reason'] == "x"){
- $reason = "Taxi Driver"
- }elseif ($results['reason'] == "z"){
- $reason = "Chef"
- }elseif ($results['reason'] == "q"){
- $reason = "Security Guard"
- }elseif ($results['reason'] == "u"){
- $reason = "OOC"
- }elseif ($results['reason'] == "w"){
- $reason = "Weapons"
- }elseif ($results['reason'] == "C"){
- $reason = "Contraband"
- }elseif ($results['reason'] == "N"){
- $reason = "NLR Spawning"
- }elseif ($results['reason'] == "L"){
- $reason = "Mechanic"
- }else{
- $reason = ""
- }
- if ($reason !== ""){
- 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';
- }
- ?>
- <script>
- function go_back(){
- window.location.href = 'http://www.evocityrp.com/blacklists/index.php';
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement