Changeset 579 for trunk/pages/banlist.php
- Timestamp:
- Apr 30, 2009, 8:10:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/banlist.php
r561 r579 1 <center><table border="0"> 2 <tr><td><center><font color="green" face="verdana" size="3"><b>Kontrola ip adresy</b></font></center></td></tr> 3 <tr><td><center><font color="blue" face="verdana" size="1">zadejte prosim vasi IP adresu</font></center></td></tr> 1 <?php 2 3 echo('<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> 4 6 <tr><td><form action="?page=banip" method="post"><input type="text" name="ip" value="127.0.0.1"><input type="submit" name="odeslat" value="zkontroluj"></form></td></tr> 5 <tr><td><center><? 6 $ipcko = getenv ("REMOTE_ADDR"); 7 if ($ipcko != false) { 8 echo "<font color=\"red\" size=\"1\" face=\"verdana\">Vaše IP adresa je: $ipcko</font>"; 7 <tr><td><center>'); 8 9 $ipcko = getenv('REMOTE_ADDR'); 10 if($ipcko != false) 11 { 12 echo('<font color="red" size="1" face="verdana">Vaše IP adresa je: '.$ipcko.'</font>'); 9 13 } 10 ?></center></td></tr> 14 15 echo('</center></td></tr> 11 16 </table></center> 12 17 <br /> 13 18 <center><table border="0"> 14 <tr><td><center><font color="green" face="verdana" size="3"><b>Kontrola accountu</b></font></center></td></tr>15 <tr><td><center><font color="blue" face="verdana" size="1"> zadejte prosim jmeno accountu</font></center></td></tr>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> 16 21 <tr><td><form action="?page=banacc" method="post"><input type="text" name="jmeno" value="name"><input type="submit" name="odeslat" value="zkontroluj"></form></td></tr> 17 22 </table></center> 18 <center><font face="verdana" size="1" color="red">vas <span style="color: red">predpokladany</span> account je: 19 <? 23 <center><font face="verdana" size="1" color="red">váš <span style="color: red">předpokládaný</span> účet je:'); 20 24 21 mysql_connect("$db_server","$db_user","$db_pass");22 mysql_select_db("$db_realmd");23 25 24 $str=mysql_query("select * from `account` where `last_ip` = '$ipcko' order by `last_login` desc limit 3"); 25 while($str_end=MySQL_Fetch_Array($str)){ 26 $i=$str_end["username"]; 27 echo "$i, "; 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'); 29 while($DbRow = $DbResult->fetch_assoc()) 30 { 31 $i = $$DbRow['username']; 32 echo($i.', '); 28 33 } 29 34 30 ?> 31 </font></center> 32 <br><center> 33 <h2>Ban List</h2> 34 <?php 35 mysql_connect("$db_server","$db_user","$db_pass"); 36 mysql_select_db("$db_realmd"); 35 echo('</font></center> 36 <br /><center> 37 <h2>Seznam banů</h2>'); 37 38 38 $sqldata = mysql_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`");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`'); 39 40 40 echo "<table border=1>";41 echo "<tr><th>IP</th><th>Od</th><th>Do</th><th>Banoval</th><th>Důvod</th></tr>";41 echo('<table border="1">'); 42 echo('<tr><th>IP</th><th>Od</th><th>Do</th><th>Banoval</th><th>Důvod</th></tr>'); 42 43 43 while($row = mysql_fetch_array($sqldata)) 44 44 while($row = $sqldata->fetch_assoc()) 45 45 { 46 47 $start = Date('d-m-Y H:i:s',$row[bandate]); 48 $end = Date('d-m-Y H:i:s',$row[unbandate]); 46 $start = Date('d-m-Y H:i:s', $row['bandate']); 47 $end = Date('d-m-Y H:i:s', $row['unbandate']); 49 48 50 51 echo "<tr><td>$row[last_ip]</td> <td>$start</td> <td>$end</td> <td>$row[bannedby]</td><td>$row[banreason]</td></tr>"; 52 49 echo('<tr><td>'.$row['last_ip'].'</td><td>'.$start.'</td><td>'.$end.'</td><td>'.$row['bannedby'].'</td><td>'.$row['banreason'].'</td></tr>'); 53 50 } 54 55 echo "</table>"; 51 echo('</table>'); 56 52 57 53 ?>
Note:
See TracChangeset
for help on using the changeset viewer.