Advertisement
Guest User

Untitled

a guest
Feb 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.38 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <link rel="icon" href="/img/favicon.ico" sizes="32x32" />
  6. <title>
  7. Hexmania.eu | CT banlist pro JB
  8. </title>
  9. <style type="text/css">
  10. body {background-color: rgba(16,16,16,1); color: #fff;}
  11. body, td, th, h1, h2 {font-family: sans-serif;}
  12. pre {margin: 0px; font-family: monospace;}
  13. .pg {
  14. text-decoration: none;
  15. display: inline-block;
  16. padding: 8px 16px;
  17. background-color: #3473c1;
  18. color: white;
  19. border: 1px solid #3473c1;
  20. }
  21. .pg:hover {background-color: white;
  22. color: #3473c1;
  23. border: 1px solid #3473c1;
  24. }
  25. table {border-collapse: collapse;}
  26. .center {text-align: center;}
  27. .center table { margin-left: auto; margin-right: auto; text-align: center;}
  28. .center th { text-align: center !important; }
  29. td, th { border: 1px solid #fff; font-size: 75%; vertical-align: baseline;}
  30. h1 {font-size: 150%;}
  31. h2 {font-size: 125%;text-align:center;}
  32. .footer { font-size: 80%;}
  33. .p {text-align: left;}
  34. .e {background-color: #f9f9f9; color: #000000; }
  35. .h {background-color: #a5a2a2; font-weight: bold; color: #000000; font-size: 125%;}
  36. .v {background-color: #e2e2e2; color: #000000; }
  37. .vr {background-color: #cccccc; text-align: right; color: #000000;}
  38. img {float: right; border: 0px;}
  39. hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color:#000000;}
  40. #myInput {
  41. background-image: url('/img/searchicon.png');
  42. background-position: 10px 10px;
  43. background-repeat: no-repeat;
  44. width: 85%;
  45. font-size: 16px;
  46. padding: 12px 20px 12px 40px;
  47. border: 1px solid #ddd;
  48. margin-bottom: 12px;
  49. }
  50. #main {
  51. transition: margin-left .5s;
  52. padding: 16px;
  53. }
  54. @media screen and (max-height: 450px) {
  55. .sidenav {padding-top: 15px;}
  56. .sidenav a {font-size: 18px;}
  57. }
  58. .container {
  59. display: inline-block;
  60. cursor: pointer;
  61. }
  62. .bar1, .bar2, .bar3 {
  63. width: 35px;
  64. height: 5px;
  65. background-color: #333;
  66. margin: 6px 0;
  67. transition: 0.4s;
  68. }
  69. .change .bar1 {
  70. -webkit-transform: rotate(-45deg) translate(-9px, 6px);
  71. transform: rotate(-45deg) translate(-9px, 6px);
  72. }
  73. .change .bar2 {opacity: 0;}
  74.  
  75. .change .bar3 {
  76. -webkit-transform: rotate(45deg) translate(-8px, -8px);
  77. transform: rotate(45deg) translate(-8px, -8px);
  78. }
  79.  
  80. footer {
  81. border-top: 1px solid #932e3e;
  82. background: url(../img/footer.png);
  83. background-repeat: no-repeat;
  84. color: #fff;
  85. width: 100%;
  86. height: 90px;
  87. position: absolute;
  88. left: 0;
  89. bottom: 0;
  90. }
  91.  
  92. .footer-a {
  93. color: #fff;
  94. text-decoration: none;
  95. }
  96.  
  97. .footer-a:hover {
  98. color: #932e3e;
  99. }
  100.  
  101. .a-button {
  102. font-size: 20px;
  103. color: #fff;
  104. padding: 8px 9px 8px 9px;
  105. text-decoration: none;
  106. }
  107.  
  108. .a-button:hover {
  109. font-size: 20px;
  110. color: #932e3e;
  111. border-bottom:3px solid #932e3e;
  112. }
  113. </style>
  114. </head>
  115. <body>
  116. <div id="main">
  117.  
  118. <h2>CT banlist pro Jailbreak servery</h2>
  119. <div class="center">
  120. <div class="container">
  121. <a class="a-button" href="https://hexmania.eu">Domov</a> |
  122. <a class="a-button" href="https://hexmania.eu/servery.php">Servery</a> |
  123. <a class="a-button" href="http://banlistgojb.hexmania.eu">Banlist</a>
  124. </div><br><br>
  125. </div>
  126.  
  127. <div class="center">
  128.  
  129. <input type="text" id="myInput" onkeyup="myFunction()" placeholder="Hledat SID, důvod, název admina nebo název hráče..." title="Type in a SteamID"><br>
  130.  
  131. <script>
  132.  
  133. //Search
  134. function myFunction() {
  135. var input, filter, table, tr, td, i;
  136. input = document.getElementById("myInput");
  137. filter = input.value.toUpperCase();
  138. table = document.getElementById("myTable");
  139. tr = table.getElementsByTagName("tr");
  140. for (i = 0; i < tr.length; i++) {
  141. td = tr[i].getElementsByTagName("td")[0];
  142. td = tr[i].getElementsByTagName("td")[1];
  143. td = tr[i].getElementsByTagName("td")[4];
  144. td = tr[i].getElementsByTagName("td")[5];
  145. td = tr[i].getElementsByTagName("td")[6];
  146. if (td) {
  147. if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
  148. tr[i].style.display = "";
  149. } else {
  150. tr[i].style.display = "none";
  151. }
  152. }
  153. }
  154. }
  155.  
  156. //SideBar
  157. function openNav() {
  158. document.getElementById("mySidenav").style.width = "250px";
  159. document.getElementById("main").style.marginLeft = "250px";
  160. document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
  161. }
  162.  
  163. function closeNav() {
  164. document.getElementById("mySidenav").style.width = "0";
  165. document.getElementById("main").style.marginLeft= "0";
  166. document.body.style.backgroundColor = "#f2f2f2";
  167. }
  168.  
  169. //Menu Button (disabled)
  170. function myButton(x) {
  171. x.classList.toggle("change");
  172. }
  173. </script>
  174.  
  175. <?php
  176.  
  177. $server="db.mysql-01.gsp-europe.net";
  178. $username="sql_4595";
  179. $password="aLUP8PlYfe81fEvmepIZ0jig32ZSkUG";
  180. $database="sql_4595";
  181.  
  182. $table_prefix="jailbreak";
  183. $results_per_page="15";
  184.  
  185. function show_ctban_table($dbh, $query, $results_per_page, $ctbanpage, $table_prefix, $database)
  186. {
  187. $results = mysqli_query($dbh, $query) or die("Chyba query.");
  188.  
  189. if (!empty($results))
  190. {
  191. $countquery = mysqli_fetch_array($results);
  192. $rows = $countquery[0];
  193. $lastpage = ceil($rows/$results_per_page);
  194.  
  195. if ($ctbanpage < 1)
  196. {
  197. $ctbanpage = 1;
  198. }
  199. elseif ($ctbanpage > $lastpage)
  200. {
  201. $ctbanpage = $lastpage;
  202. }
  203.  
  204. echo "<p>";
  205. echo "<br>";
  206. if ($ctbanpage != 1)
  207. {
  208. echo " <a class='pg'; href='{$_SERVER['PHP_SELF']}?ctbanpage=1'> První</a> ";
  209. echo " ";
  210. $previouspage = $ctbanpage - 1;
  211. echo " <a class='pg'; href='{$_SERVER['PHP_SELF']}?ctbanpage=$previouspage'> Předchozí</a> ";
  212. }
  213.  
  214.  
  215.  
  216. if ($ctbanpage != $lastpage)
  217. {
  218. if ($ctbanpage != 1)
  219. {
  220. echo " | ";
  221. }
  222. $nextpage = $ctbanpage + 1;
  223. echo " <a class='pg'; href='{$_SERVER['PHP_SELF']}?ctbanpage=$nextpage'>Další</a> ";
  224. echo " ";
  225. echo " <a class='pg'; href='{$_SERVER['PHP_SELF']}?ctbanpage=$lastpage'>Poslední</a> ";
  226. }
  227.  
  228. echo "</p>";
  229.  
  230. $paginated_query = "SELECT * FROM " . $table_prefix . "CTBan_Log ORDER BY TIMESTAMP DESC LIMIT " .($ctbanpage - 1) * $results_per_page . "," . $results_per_page;
  231. $results = mysqli_query($dbh, $paginated_query) or die ("Unable to execute paginated query");
  232.  
  233. print '<table id="myTable" border="0" cellpadding="10" width=90%>' . "\n";
  234. print "<tr class='h'><th>SteamID</th><th>Jméno</th><th>Time</th><th>Délka</th>"
  235. . "<th>Admin Jméno</th><th>Admin SteamID</th><th>Důvod</th><th>Zbývající čas</th></tr>\n";
  236.  
  237. $counter = 0;
  238.  
  239. while ($row = mysqli_fetch_array($results))
  240. {
  241. $counter = $counter + 1;
  242. if ($counter % 2)
  243. $classtext = "e";
  244. else
  245. $classtext = "v";
  246. $unbanme = "";
  247. if ($row["bantime"] > 0)
  248. {
  249. $bantime = $row["bantime"] . "m";
  250. if ($row["timeleft"] >= 0)
  251. {
  252. $timeleft = $row["timeleft"] . "m";
  253. }
  254. else
  255. $timeleft = "Vypršel";
  256. }
  257. else
  258. {
  259. $bantime = "Permanent";
  260. if ($row["timeleft"] >= 0)
  261. {
  262. $timeleft = "Indefinite";
  263. }
  264. else
  265. $timeleft = "Odbanovaný";
  266. }
  267.  
  268. if ($timeleft > 0)
  269. {
  270. $text_color = "#ff6600";
  271. }
  272. elseif ($timeleft == "Vypršel" or $timeleft == "Odbanovaný")
  273. {
  274. $text_color = "green";
  275. }
  276. elseif ($timeleft == "Permanent")
  277. {
  278. $text_color = "red";
  279. $bantime = "<span style='color:red;'>Permanent</span>";
  280. }
  281.  
  282. print "<tr><td class='" . $classtext ."'>" . $row["perp_steamid"]
  283. . "</td><td class='" . $classtext ."'>" . $row["perp_name"]
  284. . "</td><td class='" . $classtext . "'>" . date('r', $row["timestamp"]) . "</td>"
  285. . "<td class='" . $classtext ."'>" . $bantime
  286. . "</td><td class='" . $classtext . "'>" . $row["admin_name"]
  287. . "</td><td class='" . $classtext . "'>" . $row["admin_steamid"]
  288. . "</td><td class='" . $classtext . "'>" . $row["reason"]
  289. . "</td><td class='" . $classtext . "' style='color:" . $text_color . ";'>" . $timeleft . "</td></tr>\n";
  290. }
  291. print "</table>\n";
  292.  
  293. echo "<br>";
  294. echo "<p>Strana " . strval($ctbanpage) . " z " . $lastpage . "<br><br>";
  295. echo "Celkem CT banů: " . $rows . "</p>";
  296. } else {
  297. print "No results\n";
  298. }
  299. }
  300.  
  301. try
  302. {
  303. $dbh = mysqli_connect($server,$username,$password);
  304. if (!$dbh) {
  305. print "Nelze se připojit k databízi.\n";
  306. } else {
  307. mysqli_select_db($dbh, $database) or die("Nelze načíst databázi.");
  308.  
  309. $query = "SELECT COUNT(*) FROM " . $table_prefix . "CTBan_Log";
  310.  
  311. if (empty($_GET['ctbanpage']))
  312. {
  313. $ctbanpage = 1;
  314. }
  315. else
  316. {
  317. $ctbanpage = $_GET['ctbanpage'];
  318. }
  319. show_ctban_table($dbh, $query, $results_per_page, $ctbanpage, $table_prefix, $database);
  320.  
  321. }
  322. }
  323. catch (Exception $e)
  324. {
  325. die($e);
  326. }
  327.  
  328. mysqli_close($dbh);
  329.  
  330. ?>
  331.  
  332. <footer>
  333. <center>
  334. <div style="width: 500px;">
  335. <br />
  336. <h4>© <span style="color: #932e3e;"><a class="footer-a" href="https://hexmania.eu">Hexmania.eu</a></span> 2017 - 2018</h4> <a style="position: absolute; margin-left: 415px; margin-top: -70px;" href="https://hexmania.eu"><script language="JavaScript" type="text/javascript">
  337. <!--
  338. document.write('<img src="https://toplist.cz/count.asp?id=1776540&logo=mc&http='+
  339. escape(document.referrer)+'&t='+escape(document.title)+
  340. '&wi='+escape(window.screen.width)+'&he='+escape(window.screen.height)+'&cd='+
  341. escape(window.screen.colorDepth)+'" width="88" height="60" border=0 alt="TOPlist" />');
  342. //--></script><noscript><img style="position: absolute;" src="https://toplist.cz/count.asp?id=1776540&logo=mc" border="0"
  343. alt="TOPlist" width="88" height="60" /></noscript></a>
  344.  
  345. </div>
  346. </center>
  347. </footer>
  348.  
  349. </div>
  350. </div>
  351. </body>
  352. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement