source: trunk/pages/blokovani.php

Last change on this file was 690, checked in by george, 15 years ago
  • Přidáno: Zavedení systému pěkných URL. Přejmenováno mnoho stránek.
  • Přidáno: Skript pro generování SERVERALERT aktualit pro klienta.
File size: 2.2 KB
Line 
1<?php
2
3echo('<center><table border="0">
4<tr><td><center><font color="green" face="verdana" size="3"><b>Kontrola IP adresy</b></font></center></td></tr>
5<tr><td><center><font color="blue" face="verdana" size="1">Zadejte prosím vaší IP adresu</font></center></td></tr>
6<tr><td><form action="'.$html->Link('/blokovani-adresy/').'" method="post"><input type="text" name="ip" value="127.0.0.1"><input type="submit" name="odeslat" value="zkontroluj"></form></td></tr>
7<tr><td><center>');
8
9$ipcko = getenv('REMOTE_ADDR');
10if($ipcko != false)
11{
12 echo('<font color="red" size="1" face="verdana">Vaše IP adresa je: '.$ipcko.'</font>');
13}
14
15echo('</center></td></tr>
16</table></center>
17<br />
18<center><table border="0">
19<tr><td><center><font color="green" face="verdana" size="3"><b>Kontrola účtu</b></font></center></td></tr>
20<tr><td><center><font color="blue" face="verdana" size="1">Zadejte prosím jméno účtu</font></center></td></tr>
21<tr><td><form action="'.$html->Link('/blokovani-uctu/').'" method="post"><input type="text" name="jmeno" value="name"><input type="submit" name="odeslat" value="zkontroluj"></form></td></tr>
22</table></center>
23<center><font face="verdana" size="1" color="red">váš <span style="color: red">předpokládaný</span> účet je:');
24
25
26$db->select_db($Config['Mangos']['DatabaseRealmd']);
27
28$DbResult = $db->query('SELECT * FROM `account` WHERE `last_ip` = "'.$ipcko.'" ORDER BY `last_login` DESC LIMIT 3');
29while($DbRow = $DbResult->fetch_assoc())
30{
31 $i = $DbRow['username'];
32 echo($i.', ');
33}
34
35echo('</font></center>
36<br /><center>
37<h2>Seznam banů</h2>');
38
39$sqldata = $db->query('SELECT `account`.`last_ip`,`ip_banned`.`bandate`,`ip_banned`.`unbandate`,`ip_banned`.`bannedby`,`ip_banned`.`banreason` FROM `account` INNER join `ip_banned` ON `account`.`last_ip`=`ip_banned`.`ip`');
40
41echo('<table class="BaseTable">');
42echo('<tr><th>IP</th><th>Od</th><th>Do</th><th>Banoval</th><th>Důvod</th></tr>');
43
44while($row = $sqldata->fetch_assoc())
45{
46 $start = Date('d-m-Y H:i:s', $row['bandate']);
47 $end = Date('d-m-Y H:i:s', $row['unbandate']);
48
49 echo('<tr><td>'.$row['last_ip'].'</td><td>'.$start.'</td><td>'.$end.'</td><td>'.$row['bannedby'].'</td><td>'.$row['banreason'].'</td></tr>');
50}
51echo('</table>');
52
53?>
Note: See TracBrowser for help on using the repository browser.