Changeset 579 for trunk/pages/banacc.php
- Timestamp:
- Apr 30, 2009, 8:10:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/banacc.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( "jmeno", $_POST))5 if(array_key_exists('jmeno', $_POST)) 8 6 { 7 $name = $_POST['jmeno']; 9 8 10 $name = addslashes($_POST["jmeno"] ); 9 $str = $db->query('select * from `account` inner join `account_banned` on `account`.`id` = `account_banned`.`id` where `username` = "'.$name.'"'); 10 $str_end = $str->fetch_assoc(); 11 11 12 $str=mysql_query("select * from `account` inner join `account_banned` on `account`.`id` = `account_banned`.`id` where `username` = '$name'"); 13 $str_end=mysql_fetch_array($str); 14 15 if($str_end['id']== ""){ 16 17 echo "<center><font color=\"blue\" face=\"verdana\" size=\"2\">tento ucet <span style=\"color: red\">neni</span> zabanovan</font></center>"; 18 19 } else { 20 21 $reason=$str_end['banreason']; 22 echo "<center><font color=\"blue\" face=\"verdana\" size=\"2\">ucet: <span style=\"color: red\">$name</span> je zabanovan, duvod: <span style=\"color: red\">$reason</span></font></center>"; 23 24 } 12 if($str_end['id'] == '') 13 { 14 echo('<center><font color="blue" face="verdana" size="2">tento účet <span style="color: red">není</span> zabanován</font></center>'); 15 } else 16 { 17 $reason = $str_end['banreason']; 18 echo('<center><font color="blue" face="verdana" size="2">účet: <span style="color: red">'.$name.'</span> je zabanován, 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.