Changeset 579 for trunk/pages/banip.php
- Timestamp:
- Apr 30, 2009, 8:10:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/banip.php
r561 r579 1 <? 2 include("inc/db.php"); 1 <?php 3 2 4 mysql_connect("$db_server", "$db_user", "$db_pass"); 5 mysql_select_db("$db_realmd"); 3 $db->select_db($Config['Mangos']['DatabaseRealmd']); 6 4 7 if(array_key_exists( "ip", $_POST))5 if(array_key_exists('ip', $_POST)) 8 6 { 7 $ipcko = $_POST['ip']; 9 8 10 $ipcko = addslashes($_POST["ip"] ); 9 $str = $db->query('select `banreason` from `ip_banned` where `ip` = "'.$ipcko.'"'); 10 $str_end = $str->fetch_assoc(); 11 11 12 $str=mysql_query("select `banreason` from `ip_banned` where `ip` = '$ipcko'"); 13 $str_end=mysql_fetch_array($str); 14 15 if($str_end['banreason']== ""){ 16 17 echo "<center><font color=\"blue\" face=\"verdana\" size=\"2\">tato ip adresa <span style=\"color: red\">neni</span> zabanovana</font></center>"; 18 19 } else { 20 21 $reason=$str_end['banreason']; 22 echo "<center><font color=\"blue\" face=\"verdana\" size=\"2\">ip adresa: <span style=\"color: red\">$ipcko</span> je zabanovana, duvod: <span style=\"color: red\">$reason</span></font></center>"; 23 24 } 12 if($str_end['banreason'] == '') 13 { 14 echo('<center><font color="blue" face="verdana" size="2">tato IP adresa <span style=\"color: red\">neni</span> zabanovaná</font></center>'); 15 } else 16 { 17 $reason = $str_end['banreason']; 18 echo('<center><font color="blue" face="verdana" size="2">IP adresa: <span style="color: red">'.$ipcko.'</span> je zabanovaná, důvod: <span style="color: red">'.$reason.'</span></font></center>'); 19 } 25 20 } 26 21 27 mysql_close();28 22 ?>
Note:
See TracChangeset
for help on using the changeset viewer.