Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>X-Ray Gaming - Bans</title>
- <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
- <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <link rel="stylesheet" type="text/css" href="style.css"/>
- </head>
- <body>
- <div class="content2">
- <div class="panel panel-primary">
- <div class="panel-heading">
- <center><h3 class="panel-title">X-Ray Gaming - Bans</h3></center>
- </div>
- <div class="panel-body">
- <table class="table table-stripped">
- <thread>
- <tr>
- <div id="section1"> <th>ID</th></div>
- <div id="section2"><th>Name</th></div>
- <div id="section2"><th>SteamID</th></div>
- <div id="section3"><th>Reason</th></div>
- <div id="section4"><th>Ban Status</th></div>
- <div id="section5"> <th>Banned by</th></div>
- </tr>
- </thread>
- <tbody>
- <div id="search">
- <form name="search" action="bans.php" method="post">
- <input type="text" name="search" size="26" placeholder="Enter your Name/SteamID" class="tb2" value="">
- <input type="submit" value="Search"><input onclick="javascript: search_form(1)" type="button" value="Reset">
- </form>
- </div>
- <?php
- $host = "localhost";
- $user = "root";
- $pass = "";
- $dbname = "xray_blacklists";
- $changlog = "";
- $db = mysqli_connect($host, $user, $pass, $dbname);
- $output='';
- if(isset($_POST['search']))
- {
- $searchq = $_POST['search'];
- if($host="localhost")
- {
- $q1 = $db->query("SELECT `id`, `name`, `unban_time`, `steamid`, `reason`, `admin` FROM `bans` WHERE name LIKE '%$searchq%' OR steamid LIKE '%$searchq%'");
- }
- $count = mysqli_num_rows($q1);
- if($count == 0)
- {
- $output = 'There was no search results!';
- }
- else if($count != 0)
- {
- while($row = mysqli_fetch_array($q1))
- {
- $sname = $row['name'];
- $ssteamid = $row['steamid'];
- $output = '<div> '.$sname.' '.$ssteamid.'</div>';
- }
- }
- }
- ?>
- <?php print("$output"); ?>
- <?php
- $host = "localhost";
- $user = "root";
- $pass = "";
- $dbname = "xray_blacklists";
- $changlog = "";
- $db = mysqli_connect($host, $user, $pass, $dbname);
- if($host="localhost"){
- $q1 = $db->query("SELECT `id`, `name`, `unban_time`, `steamid`, `reason`, `admin` FROM `bans`");
- if(!$q1){
- die($db->error);
- }
- $SelectBans = $db->query("SELECT * FROM `bans`");
- foreach($SelectBans as $PrintBans);
- /////////////////////////////////////////////////////////
- function secToHR($seconds)
- {
- global $row;
- $days = floor($seconds/86400);
- $hours = floor($seconds / 3600);
- $minutes = floor(($seconds / 60) % 60);
- $seconds = $seconds % 60;
- if ($row['unban_time'] == '0')
- {
- return "Expired";
- }
- else if ($row['unban_time'] != '0')
- {
- return $hours > 0 ? "$hours hours, $minutes minutes" : ($minutes > 0 ? "$minutes minutes, $seconds seconds" : "$seconds seconds");
- }
- }
- /////////////////////////////////////////////////////////
- while($row = $q1->fetch_assoc()){
- if($row['admin']== '0'){
- echo "<tr class = \"change\">\n";
- }else if($row['unban_time']=='0'){
- echo "<tr class = \"new\">\n";
- }else if($row['name']!='Expired'){
- echo "<tr class = \"remove\">\n";
- }else if($row['timeuntil']=='0'){
- echo "<tr class = \"fix\">\n";
- }else if($row['id']=='CHANGE'){
- echo "<tr class = \"change\">\n";
- }
- echo "<td class=\"trow1\" align=\"center\" width=\"1\">".$row['id']."</td>\n";
- echo "<td class=\"trow1 type\">".$row['name']."</td>\n";
- echo "<td class=\"trow1\" colspan=\"1\">".$row['steamid']."</td>\n";
- echo "<td class=\"trow1 type\">".$row['reason']."</td>\n";
- echo "<td class=\"trow1\ align=\"center\">".secToHR($row['unban_time'])."</td>\n";
- echo "<td class=\"trow1 type\ align=\"center\">".$row['admin']."</td>\n";
- }
- }
- ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <div id="footer">
- <center><b>© Copyright X-Ray Gaming.</a> 2018 | All rights reserved. </b></center>
- <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>
- </div>
- <script defer src="https://use.fontawesome.com/releases/v5.0.8/js/solid.js" integrity="sha384-+Ga2s7YBbhOD6nie0DzrZpJes+b2K1xkpKxTFFcx59QmVPaSA8c7pycsNaFwUK6l" crossorigin="anonymous"></script>
- <script defer src="https://use.fontawesome.com/releases/v5.0.8/js/fontawesome.js" integrity="sha384-7ox8Q2yzO/uWircfojVuCQOZl+ZZBg2D2J5nkpLqzH1HY0C1dHlTKIbpRz/LG23c" crossorigin="anonymous"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement