Файл: rusalc/apedit_car_autosalon.php
Строк: 183
<?
include_once '../sys/core/start.php';
include_once '../sys/core/compress.php';
include_once '../sys/core/sess.php';
include_once '../sys/core/home.php';
include_once '../sys/core/db_connect.php';
include_once '../sys/core/ipua.php';
include_once '../sys/core/fnc.php';
include_once '../sys/core/user.php';
include_once '../sys/inc/fnc_game.php';
include_once '../sys/inc/thead.php';
include_once '../sys/inc/uhead.php';
only_reg();
if ($user['acces']==765466656)
{
if(isset($_GET['id']) && intval($_GET['id'])!=NULL && mysql_result(mysql_query("SELECT COUNT(*) FROM `autosalon` WHERE `id` = '".intval($_GET['id'])."'"),0)!=0)
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `autosalon` WHERE `id`='".intval($_GET['id'])."'"));
if(isset($_POST['edit']))
{
$level=htmlspecialchars($_POST['level']);
$name=htmlspecialchars($_POST['name']);
$country=htmlspecialchars($_POST['country']);
$marka=htmlspecialchars($_POST['marka']);
$typecar=htmlspecialchars($_POST['typecar']);
$model=htmlspecialchars($_POST['model']);
$class=htmlspecialchars($_POST['class']);
$power=htmlspecialchars($_POST['power']);
$price_baks=htmlspecialchars($_POST['price_baks']);
$price_money=htmlspecialchars($_POST['price_money']);
$price_sell=htmlspecialchars($_POST['price_sell']);
$price_sell_baks=htmlspecialchars($_POST['price_sell_baks']);
mysql_query("UPDATE `autosalon` SET `level` = '$level',`name` = '$name',`country` = '$country',`marka` = '$marka',`typecar` = '$typecar',`model` = '$model',`class` = '$class',`power` = '$power',`price_baks` = '$price_baks',`price_money` = '$price_money',`price_sell` = '$price_sell',`price_sell_baks` = '$price_sell_baks' WHERE `id` = '".$ank['id']."' LIMIT 1");
header("Location: #");
exit;
}
echo "<table class='wdt msg-table'>";
echo "<tr><td align='left' style='vertical-align: top; width: 10%'><img src='/style/img/images/face-mex.png'></td>";
echo "<td align='left' style='vertical-align: top'>Дарова , ".$user['nick']." здесь ты сможешь отредактировать автомобили с автосалона</td></tr></table></td></tr></table>";
echo "<table class='wdt garage-table'><tr><td align='right' style='padding-top: 4px; padding-left: 10px'>";
echo "<table class='wdt'>";
echo "<tr><td style='vertical-align: top;padding-top: 3px;' align='left' rowspan='4'><table>";
echo "</table></td><td align='left' class='white' style='vertical-align: top' width='40%'><b>$mycar[name]</b> <b class='class-$mycar[class] bold-text'>$mycar[class]</b></td></tr>";
echo "<tr><td align='left' class='white' style='font-size: 12px'>Рейтинг: <b class='yellow'><img src='/style/img/icons/rating.png' alt='Rating'> ".m_format($user['rating'])."</b></td></tr>";
echo "<tr><td align='left' style='font-size: 12px'> Бензин: <img src='/style/img/icons/fuel.png' alt='ing'> <b>$user[fuel]/$user[max_fuel]</b></td></tr></table></td></tr><tr><td></td></tr>";
echo "<tr><td><table class='wdt'>";
echo "<tr><td align='center' style='padding-bottom: 0px; padding-left: 10px; padding-right: 10px;' valign='bottom'></br><img class='wdt' src='/style/img/car/$mycar[screen].png' alt='car'>";
if($mycar['neon']!=0){
echo "<img class='wdt' style='margin-top: -19px;' src='/style/img/images/neon/$mycar[neon].png' alt='t'>";
}
else
{
echo "<img class='wdt' style='margin-top: -19px;' src='/style/img/images/car_shadow.png' alt='t'>";
}
echo "</td></tr></table></td></tr></table>";
echo '<table class="wdt brown-header"><tbody><tr><td align="left">Редактировать:</td></tr></tbody></table>';
echo "<table class='wdt gray-table'><tbody><tr><td class='white' align='center' style='padding: 10px;'>";
echo "<form method='post'><table><tbody>";
echo "<tr><td>Картинка:</td><td><img src='../style/img/car/$ank[screen].png' width='100%'></td></tr>";
echo "<tr><td>Уровень:</td><td><input style='height:25px' type='text' name='level' maxlength='90' value='$ank[level]'></td></tr>";
echo "<tr><td>Название:</td><td><input style='height:25px' type='text' name='name' maxlength='90' value='$ank[name]'></td></tr>";
echo "<tr><td>Страна:</td><td><input style='height:25px' type='text' name='country' maxlength='90' value='$ank[country]'></td></tr>";
echo "<tr><td>Марка:</td><td><input style='height:25px' type='text' name='marka' maxlength='90' value='$ank[marka]'></td></tr>";
echo "<tr><td>Кузов:</td><td><input style='height:25px' type='text' name='typecar' maxlength='90' value='$ank[typecar]'></td></tr>";
echo "<tr><td>Модель:</td><td><input style='height:25px' type='text' name='model' maxlength='90' value='$ank[model]'></td></tr>";
echo "<tr><td>Класс:</td><td><input style='height:25px' type='text' name='class' maxlength='90' value='$ank[class]'></td></tr>";
echo "<tr><td>Мощность:</td><td><input style='height:25px' type='text' name='power' maxlength='90' value='$ank[power]'></td></tr>";
echo "<tr><td>Баксы:</td><td><input style='height:25px' type='text' name='price_baks' maxlength='90' value='$ank[price_baks]'></td></tr>";
echo "<tr><td>Монеты:</td><td><input style='height:25px' type='text' name='price_money' maxlength='90' value='$ank[price_money]'></td></tr>";
echo "<tr><td>Баксы продажа:</td><td><input style='height:25px' type='text' name='price_sell_baks' maxlength='90' value='$ank[price_sell_baks]'></td></tr>";
echo "<tr><td>Монеты продажа:</td><td><input style='height:25px' type='text' name='price_sell' maxlength='90' value='$ank[price_sell]'></td></tr>";
echo "<tr><td colspan='2'><input class='yes-btn' type='submit' name='edit' value='Изменить'></td></tr>";
echo "</tbody></table></form></td></tr></tbody></table>";
echo "<table class='wdt gray-table'><tr><td class='white td-cell' align='center' style='height:30px;'><form action ='/dev/autosalon.php' method='post'><input class='yes-btn' type='submit' value='Автосалон'></form></td></tr></table>";
echo "<table class='wdt gray-table'><tr>";
echo "<td width='50%'><form action='/rusalc/apindex.php' method='post'><input class='no-btn' type='submit' value='Админка'></form></td><td>";
echo "<form action='/rusalc/apcars.php' method='post'><input class='no-btn' type='submit' value='Автомобили'></form></td></tr><td></td></tr></table>";
include_once '../sys/inc/tfoot.php';
}
else
{
header("Location: /dev/garage.php");
}
?>