Файл: tortuga/gm_panel/new_ter.php
Строк: 151
<?php
require_once '../core/system.php';
echo gm();
$header = 'GM-Панель!';
require_once '../core/head.php';
if(isset($_GET['add'])){
$count_id = mysql_result(mysql_query("SELECT id FROM tile ORDER BY id DESC LIMIT 1"),0);
$id = $count_id+1;
$map = check($_POST['map']);
$img = check($_POST['img']);
$x = abs(intval($_POST['x']));
$y= abs(intval($_POST['y']));
$go= abs(intval($_POST['go']));
if($id == mysql_query("SELECT count(id) from `tile`")){
echo'Ошибка.';
}else{
echo'Территория добавлена!<br/>';
mysql_query("INSERT INTO `tile` set `go` = '".$go."', `img` = '".$img."', `map` = '".$map."', `y` = '".$y."', `x` = '".$x."', `id` = '".$id."'");
}
}
echo'<form action="?add" method="post"> Карта:<br/><input type="text" name="map" value="1"/><br/>';
echo' Тип:<br/>';
echo'<input type="radio" name="img" value="dust"/> <img src="/img/tile/dust.png">';
echo'<input type="radio" name="img" value="grass"/> <img src="/img/tile/grass.png">';
echo'<input type="radio" name="img" value="grass_dust"/> <img src="/img/tile/grass_dust.png">';
echo'<input type="radio" name="img" value="grass_dust2"/> <img src="/img/tile/grass_dust2.png">';
echo'<input type="radio" name="img" value="grass_dust3"/> <img src="/img/tile/grass_dust3.png">';
echo'<input type="radio" name="img" value="grass_dust4"/> <img src="/img/tile/grass_dust4.png">';
echo'<input type="radio" name="img" value="grass_dust5"/> <img src="/img/tile/grass_dust5.png">';
echo'<input type="radio" name="img" value="grass_dust6"/> <img src="/img/tile/grass_dust6.png">';
echo'<input type="radio" name="img" value="grass_dust7"/> <img src="/img/tile/grass_dust7.png">';
echo'<input type="radio" name="img" value="grass_dust8"/> <img src="/img/tile/grass_dust8.png">';
echo'<input type="radio" name="img" value="grass_flowers"/> <img src="/img/tile/grass_flowers.png">';
echo'<input type="radio" name="img" value="grass_flowers2"/> <img src="/img/tile/grass_flowers2.png">';
echo'<input type="radio" name="img" value="grass_ground"/> <img src="/img/tile/grass_ground.png">';
echo'<input type="radio" name="img" value="grass_ground2"/> <img src="/img/tile/grass_ground2.png">';
echo'<input type="radio" name="img" value="grass_ground3"/> <img src="/img/tile/grass_ground3.png">';
echo'<input type="radio" name="img" value="grass_ground4"/> <img src="/img/tile/grass_ground4.png">';
echo'<input type="radio" name="img" value="grass_ground5"/> <img src="/img/tile/grass_ground5.png">';
echo'<input type="radio" name="img" value="grass_ground6"/> <img src="/img/tile/grass_ground6.png">';
echo'<input type="radio" name="img" value="grass_ground7"/> <img src="/img/tile/grass_ground7.png">';
echo'<input type="radio" name="img" value="grass_ground8"/> <img src="/img/tile/grass_ground8.png">';
echo'<input type="radio" name="img" value="grass_ground9"/> <img src="/img/tile/grass_ground9.png">';
echo'<input type="radio" name="img" value="ground"/> <img src="/img/tile/ground.png">';
echo'<input type="radio" name="img" value="water"/> <img src="/img/tile/water.png">';
echo'<input type="radio" name="img" value="water_dust_grass"/> <img src="/img/tile/water_dust_grass.png">';
echo'<input type="radio" name="img" value="water_dust_grass2"/> <img src="/img/tile/water_dust_grass2.png">';
echo'<input type="radio" name="img" value="water_dust_grass3"/> <img src="/img/tile/water_dust_grass3.png">';
echo'<input type="radio" name="img" value="water_dust_grass5"/> <img src="/img/tile/water_dust_grass5.png">';
echo'<input type="radio" name="img" value="water_dust_grass6"/> <img src="/img/tile/water_dust_grass6.png">';
echo'<input type="radio" name="img" value="water_dust_grass7"/> <img src="/img/tile/water_dust_grass7.png">';
echo'<input type="radio" name="img" value="water_dust_grass8"/> <img src="/img/tile/water_dust_grass8.png">';
echo'<input type="radio" name="img" value="water_dust_grass9"/> <img src="/img/tile/water_dust_grass9.png">';
echo'<input type="radio" name="img" value="water_dust_grass10"/> <img src="/img/tile/water_dust_grass10.png">';
echo'<input type="radio" name="img" value="water_dust_grass11"/> <img src="/img/tile/water_dust_grass11.png">';
echo'<input type="radio" name="img" value="water_dust_grass12"/> <img src="/img/tile/water_dust_grass12.png">';
echo'<input type="radio" name="img" value="water_dust_grass4"/> <img src="/img/tile/water_dust_grass4.png"><br/>';
echo'
X:<br/><input type="text" name="x" value=""/><br/>
Y:<br/><input type="text" name="y" value=""/><br/>
Go:<br/><input type="text" name="go" value="1"/><br/>
<input type="submit" value="Добавить"/></form>';
echo "<div class='mini-line'></div>";
echo "<div class='player menuList'>";
echo "<li><a href='/gm_panel/'><img src='/images/icon/arrow.png'>GM-Панель</a></li>";
echo "</div>";
require_once H.'core/foot.php';
?>