Вход Регистрация
Файл: rusalc/apedit_car_exhibition.php
Строк: 191
<?
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 `exhibition` WHERE `id` = '".intval($_GET['id'])."'"),0)!=0)

$ank=mysql_fetch_array(mysql_query("SELECT * FROM `exhibition` WHERE `id`='".intval($_GET['id'])."'"));

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 brown-header"><tbody><tr><td align="left">Редактировать:</td></tr></tbody></table>';

if(isset(
$_POST['on']))
{
mysql_query("UPDATE `exhibition` SET `view` = '1'  WHERE `id` = '".$ank['id']."' LIMIT 1");
header("Location: /rusalc/apedit_car_exhibition.php?id=".$ank['id']."");
}
if(isset(
$_POST['off']))
{
mysql_query("UPDATE `exhibition` SET `view` = '0'  WHERE `id` = '".$ank['id']."' LIMIT 1");
header("Location: /rusalc/apedit_car_exhibition.php?id=".$ank['id']."");
}




if(isset(
$_POST['edit']))
{
$power=htmlspecialchars($_POST['power']);
$remaining=htmlspecialchars($_POST['remaining']);
$number=htmlspecialchars($_POST['number']);
$price_baks=htmlspecialchars($_POST['price_baks']);
$price_money=htmlspecialchars($_POST['price_money']);
$price_turnir_money=htmlspecialchars($_POST['price_turnir_money']);
$price_sell=htmlspecialchars($_POST['price_sell']);
$price_sell_baks=htmlspecialchars($_POST['price_sell_baks']);

mysql_query("UPDATE `exhibition` SET `power` = '$power',`remaining` = '$remaining',`number` = '$number',`price_baks` = '$price_baks',`price_money` = '$price_money',`price_turnir_money` = '$price_turnir_money',`price_sell` = '$price_sell',`price_sell_baks` = '$price_sell_baks'  WHERE `id` = '".$ank['id']."' LIMIT 1");
header("Location: #");
exit;
}


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><input style='height:25px' type='text' name='name' maxlength='90' value='$ank[name]'></td></tr>";
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='power' maxlength='90' value='$ank[power]'></td></tr>";
echo 
"<tr><td>Осталось:</td><td><input style='height:25px' type='text' name='remaining' maxlength='90' value='$ank[remaining]'></td></tr>";
echo 
"<tr><td>Количество:</td><td><input style='height:25px' type='text' name='number' maxlength='90' value='$ank[number]'></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_turnir_money' maxlength='90' value='$ank[price_turnir_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>";

if(
$ank['view']==0){
echo 
"<tr><td>Статус:</td><td><form action='' method='post'><button style='background: none;border: 0;cursor: pointer;' type='text' name='on'><img src='http://stracingstat1.stracing.mobi/race/img/off-btn.png' height='20px' style='padding-top:4px;'></button></form></td></tr>";
}else{
echo 
"<tr><td>Статус:</td><td><form action='' method='post'><button style='background: none;border: 0;cursor: pointer;' type='text' name='off'><img src='http://stracingstat1.stracing.mobi/race/img/on-btn.png' height='20px' style='padding-top:4px;'></button></form></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/exhibition.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");
}
?>
Онлайн: 1
Реклама