
<H2>Administrare - blocare conturi </h2>
<?php
mysql_connect('178.157.96.54', 'root', '@#$%^&&@') or die('Conexiunea la baza de date a esuat!');
mysql_select_db('player');
if($_SESSION['user_admin']>=$adminRights['banlist']) {

function fix($stringa){
	$stringa=str_replace("'","",$stringa);
	$stringa=str_replace('"','',$stringa);
	$stringa=str_replace(';','',$stringa);
	$stringa=str_replace('--','',$stringa);
	$stringa=str_replace('+','',$stringa);
	$stringa=str_replace('(','',$stringa);
	$stringa=str_replace(')','',$stringa);
	$stringa=str_replace('=','',$stringa);
	$stringa=str_replace('>','',$stringa);
	$stringa=str_replace('<','',$stringa);
	$stringa=str_replace('*','',$stringa);
	$stringa=str_replace('#','',$stringa);
	$stringa=str_replace('%','',$stringa);
	$stringa=str_replace('&','',$stringa);
	$stringa=str_replace('$','',$stringa);
	$stringa=str_replace('|','',$stringa);
	$stringa=str_replace('/','',$stringa);
	$stringa=str_replace('`','',$stringa);
	$stringa=str_replace('union','',$stringa);
	return $stringa;
}

if(isset($_POST['pg']) && ($_POST['motivo']) && ($_POST['ora'])){

$pg = mysql_real_escape_string($_POST['pg']);

$pg = fix($pg);

$motivo = mysql_real_escape_string($_POST['motivo']);

$motivo = fix($motivo);

$giorno = mysql_real_escape_string($_POST['giorno']);

$giorno = fix($giorno);

$ora = mysql_real_escape_string($_POST['ora']);

$ora = fix($ora);

$minut = mysql_real_escape_string($_POST['minut']);

$minut = fix($minut);

$secunda = mysql_real_escape_string($_POST['secunda']);

$secunda = fix($secunda);

$mese = mysql_real_escape_string($_POST['mese']);

$mese = fix($mese);

$oraban = "2011-$mese-$giorno $ora:$minut:$secunda";

$query2 = mysql_query("SELECT * FROM player WHERE name = '$pg';");
$rows = mysql_fetch_array($query2);
$id = $rows['account_id'];
if(mysql_num_rows($query2)){
if($rows){
mysql_select_db('account');
mysql_query("UPDATE account SET status='$motivo', availDt='$oraban' WHERE ID = '$id';");
echo "<br/>&nbsp;&nbsp;Jucatorul: $pg a fost banat!<br>&nbsp;&nbsp;Banul dureaza pana la data de : $oraban<br>&nbsp;&nbsp;Motiv : $motivo<br><br>";}
}
else{echo "<br/>&nbsp;&nbsp;Jucatorul $pg Nu exista!";}
}else{
?>
<center><form action='index.php?s=admin&a=ban_tool' method='post'>
<br>
Numele Caracterului : <br><input type='text' name='pg'><br><br>
Motiv : <br><input name='motivo'><br><br>
Pana in luna : <br><select class="input" name='mese'><br><br>
<option value='01'>Ianuarie</option>
<option value='02'>Februarie</option>
<option value='03'>Martie</option>
<option value='04'>Aprile</option>
<option value='05'>Mai</option>
<option value='06'>Iunie</option>
<option value='07'>Iulie</option>
<option value='08'>August</option>
<option value='09'>Septembrie</option>
<option value='10'>Octombrie</option>
<option value='11'>Noiembrie</option>
<option value='12'>Decembrie</option>
</select><br>
<br>Ziua : <br><select class="input" name='giorno'><br><br>
<option value='01'>1</option>
<option value='02'>2</option>
<option value='03'>3</option>
<option value='04'>4</option>
<option value='05'>5</option>
<option value='06'>6</option>
<option value='07'>7</option>
<option value='08'>8</option>
<option value='09'>9</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
<option value='13'>13</option>
<option value='14'>14</option>
<option value='15'>15</option>
<option value='16'>16</option>
<option value='17'>17</option>
<option value='18'>18</option>
<option value='19'>19</option>
<option value='20'>20</option>
<option value='21'>21</option>
<option value='22'>22</option>
<option value='23'>23</option>
<option value='24'>24</option>
<option value='25'>25</option>
<option value='26'>26</option>
<option value='27'>27</option>
<option value='28'>28</option>
<option value='29'>29</option>
<option value='30'>30</option>
<option value='31'>31</option>
</select><br>
<br>Ora : ex. 2 pentru ora 2 <br><input name='ora'><br><br>
Min. : ex. 20 pentru 20 de min.<br><input name='minut'><br><br>
Sec. : ex. 20 pentru 20 de sec.<br><input name='secunda'><br><br>
<div style="position=:center; margin-left:192px;"><input type='submit' value='Ban!' class='button'><br/><br/><br/></div>
</form></center>

<?php
}
?>
<?PHP

  }

  else {

    echo'<p class="meldung">Nu ave&#355;i acces la aceast&#259; zon&#259;!</p>';

  }

?><div style="position=:center; margin-left:10px;"><a href="javascript: history.go(-1)" class="back-btn-news" rel="nofollow">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#206;napoi</a></div>