Файл: tankon.mobi/tanks/adm_user.php
Строк: 146
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
include_once '../sys/inc/thead.php';
title();
err();
aut();
echo '<link rel="stylesheet" href="style.css" type="text/css" />';
include_once 'function.php';
if ($tanks_code['status']>0){
$ank=get_user($_GET['id']);
$tankss_code = mysql_fetch_array(mysql_query("SELECT * FROM `tanks` WHERE `id`='".$ank['id']."'"));
if ($tanks_code['status']>1){
if(isset($_POST['ok'])){
$ank=get_user($_GET['id']);
mysql_query("INSERT INTO `tanks_admin2` (`ban`,`user`,`mail_new`,`nick_new`) VALUES ('".$user['nick']."','".$ank['nick']."','".$_POST['ema']."','".$_POST['nick']."')");
mysql_query("UPDATE `tanks` SET `zolota` = '".$_POST['zol']."',`serrating` = '".$_POST['serrating']."', `serebro` = '".$_POST['ser']."',`nick_pop` = '".$_POST['nick_pop']."', `fuel` = '".$_POST['fuel']."', `ank_mail` = '".$_POST['ema']."', `level` = '".$_POST['lev']."', `rating` = '".$_POST['exp']."', `rubles` = '".$_POST['rub']."' WHERE `id_u` = '".$ank['id']."' LIMIT 1");
mysql_query("UPDATE `user` SET `nick` = '".$_POST['nick']."', `ank_mail` = '".$_POST['ema']."' WHERE `id` = '".$ank['id']."' LIMIT 1");
header ("Location: /adm_user?id=".$_GET['id']."");
}
}elseif ($tanks_code['status']==1) {
if(isset($_POST['ok'])){
$ank=get_user($_GET['id']);
mysql_query("INSERT INTO `tanks_admin2` (`ban`,`user`,`mail_new`,`nick_new`) VALUES ('".$user['nick']."','".$ank['nick']."','".$_POST['ema']."','".$_POST['nick']."')");
mysql_query("UPDATE `tanks` SET `ank_mail` = '".$_POST['ema']."' WHERE `id_u` = '".$ank['id']."' LIMIT 1");
mysql_query("UPDATE `user` SET `nick` = '".$_POST['nick']."', `ank_mail` = '".$_POST['ema']."' WHERE `id` = '".$ank['id']."' LIMIT 1");
header ("Location: /adm_user?id=".$_GET['id']."");
}
}
echo '<div class="trnt-block" style="margin-bottom:3px;">
<div class="wrap1">
<div class="wrap2">
<div class="wrap3">
<div class="wrap4">
<div class="wrap5">
<div class="wrap6">
<div class="wrap7">
<div class="wrap8">
<div class="wrap-content">';
echo "<form method='post'>n";
echo "<div class='white sh_b bold cntr'>Игрок ".$ank['nick']."</div><table><div class='white sh_b bold small'>";
echo "<tr><td>Ник:</td><td style='width:150px;'><input type='text' name='nick' value='".$ank ['nick']."'></td></tr>";
echo "<tr><td>E-mail:</td><td style='width:150px;'><input type='text' name='ema' value='".$ank['ank_mail']."'></td></tr>";
if ($tanks_code['status']==2){
echo "<tr><td>Золота:</td><td style='width:150px;'><input type='text' name='zol' value='".$tankss_code ['zolota']."'></td></tr>";
echo "<tr><td>Сер. опыт:</td><td style='width:150px;'><input type='text' name='serrating' value='".$tankss_code ['serrating']."'></td></tr>";
echo "<tr><td>Серебра:</td><td style='width:150px;'><input type='text' name='ser' value='".$tankss_code ['serebro']."'></td></tr>";
echo "<tr><td>Уровень:</td><td style='width:150px;'><input type='text' name='lev' value='".$tankss_code ['level']."'></td></tr>";
echo "<tr><td>Опыт:</td><td style='width:150px;'><input type='text' name='exp' value='".$tankss_code ['rating']."'></td></tr>";
echo "<tr><td>Рубли:</td><td style='width:150px;'><input type='text' name='rub' value='".$tankss_code ['rubles']."'></td></tr>";
echo "<tr><td>Бензин:</td><td style='width:150px;'><input type='text' name='fuel' value='".$tankss_code ['fuel']."'></td></tr>";
echo "<tr><td>Попыток ника:</td><td style='width:150px;'><input type='text' name='nick_pop' value='".$tankss_code ['nick_pop']."'></td></tr>";
}
echo'</div></table></div>';echo'</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>';
echo'</div><div class="bot">
<span class="input-but border"><span>';
echo "<input name='ok' value="Сохранить" class='w100' type="submit" /></span></span>
</div></form>";}
include_once 'foots.php';
?>