Файл: rusalc/apedit_taxi.php
Строк: 168
<?
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 `taxi` WHERE `id` = '".intval($_GET['id'])."'"),0)!=0)
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `taxi` WHERE `id`='".intval($_GET['id'])."'"));
if(isset($_POST['edit']))
{
$id_lider=htmlspecialchars($_POST['id_lider']);
$name=htmlspecialchars($_POST['name']);
$label=htmlspecialchars($_POST['label']);
$reputation=htmlspecialchars($_POST['reputation']);
$clients=htmlspecialchars($_POST['clients']);
$money=htmlspecialchars($_POST['money']);
$baks=htmlspecialchars($_POST['baks']);
$bonus_level=htmlspecialchars($_POST['bonus_level']);
$bonus_power=htmlspecialchars($_POST['bonus_power']);
$mesto=htmlspecialchars($_POST['mesto']);
$mesta=htmlspecialchars($_POST['mesta']);
$reklama=htmlspecialchars($_POST['reklama']);
mysql_query("UPDATE `taxi` SET `id_lider` = '$id_lider',`name` = '$name',`label` = '$label',`reputation` = '$reputation',`clients` = '$clients',`money` = '$money',`baks` = '$baks',`bonus_level` = '$bonus_level',`bonus_power` = '$bonus_power',`mesto` = '$mesto',`mesta` = '$mesta',`reklama` = '$reklama' WHERE `id` = '".$ank['id']."' LIMIT 1");
header("Location: #");
exit;
}
$taxi_id=intval($_GET['id']);
$taxi=mysql_fetch_assoc(mysql_query("SELECT * FROM `taxi` WHERE `id` = '".$taxi_id."'"));
$taxi_lider=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '".$taxi['id_lider']."' LIMIT 1"));
$k_apply = mysql_result(mysql_query("SELECT COUNT(*) FROM `taxi_apply` WHERE `to_taxi` = '".$taxi['id']."'"),0);
echo "<table class='wdt taxi-header'>";
echo "<tr><td align='left' style='color: #fff'>[$ank[label]] $ank[name]</td>";
echo "</tr></table>";
echo "<table class='wdt taxi-table white'>";
echo "<tr><td align='left' style='vertical-align: top;'>";
echo "<table class='wdt'>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>Основал: $taxi_lider[nick]</td></tr>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>ID такси: <b class='yellow'>$ank[id]</b></td></tr>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'>Репутация такси: <img src='/style/img/icons/reputation.png' alt='ratio'><b>".m_format($ank['reputation'])."</b></td></tr>";
echo "<tr><td style='padding: 0px; padding-bottom: 3px;'><a class='yellow' style='font-weight: normal;' href='/dev/taxi.php?id=".$ank['id']."&statistic'>Статистика</a></td></tr></table></td>";
echo "<td align='right' style='vertical-align: top; width: 20%'><img class='wdt' alt='logo' src='/style/img/avatars/$taxi_lider[avatar].png'></td></tr>";
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>ID главного:</td><td><input style='height:25px' type='text' name='id_lider' maxlength='90' value='$ank[id_lider]'></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='label' maxlength='90' value='$ank[label]'></td></tr>";
echo "<tr><td>Репутация:</td><td><input style='height:25px' type='text' name='reputation' maxlength='90' value='$ank[reputation]'></td></tr>";
echo "<tr><td>Клиенты:</td><td><input style='height:25px' type='text' name='clients' maxlength='90' value='$ank[clients]'></td></tr>";
echo "<tr><td>Монеты:</td><td><input style='height:25px' type='text' name='money' maxlength='90' value='$ank[money]'></td></tr>";
echo "<tr><td>Баксы:</td><td><input style='height:25px' type='text' name='baks' maxlength='90' value='$ank[baks]'></td></tr>";
echo "<tr><td>Ур. Бонуса:</td><td><input style='height:25px' type='text' name='bonus_level' maxlength='90' value='$ank[bonus_level]'></td></tr>";
echo "<tr><td>Бонус:</td><td><input style='height:25px' type='text' name='bonus_power' maxlength='90' value='$ank[bonus_power]'></td></tr>";
echo "<tr><td>Кол. мест:</td><td><input style='height:25px' type='text' name='mesto' maxlength='90' value='$ank[mesto]'></td></tr>";
echo "<tr><td>Места сток:</td><td><input style='height:25px' type='text' name='mesta' maxlength='90' value='$ank[mesta]'></td></tr>";
echo "<tr><td>Реклама:</td><td><input style='height:25px' type='text' name='reklama' maxlength='90' value='$ank[reklama]'></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/taxi.php?id=$ank[id]' method='post'><input class='yes-btn' type='submit' value='Назад'></form></td></tr></table>";
include_once '../sys/inc/tfoot.php';
}
else
{
header("Location: /dev/garage.php");
}
?>