Файл: DARK WARS/dark_war/go.php
Строк: 7
<?php
include_once 'start.php';
$doc = new document();
if (isset($_GET['top'])) {
$top = $player->h + 2;
if ($top >= 785) {
$top = 785;
}
mysql_query("UPDATE `dark_war_users` SET `h` = '".$top."' WHERE `id` = '".$player->id."' ");
}
if (isset($_GET['bot'])) {
$bot = $player->h - 2;
if ($bot <= 0) {
$bot = 0;
}
mysql_query("UPDATE `dark_war_users` SET `h` = '".$bot."' WHERE `id` = '".$player->id."' ");
}
if (isset($_GET['left'])) {
$left = $player->w - 2;
if ($left <= 0) {
$left = 0;
}
mysql_query("UPDATE `dark_war_users` SET `w` = '".$left."' WHERE `id` = '".$player->id."' ");
}
if (isset($_GET['right'])) {
$right = $player->w + 2;
if ($right >= 985) {
$right = 985;
}
mysql_query("UPDATE `dark_war_users` SET `w` = '".$right."' WHERE `id` = '".$player->id."' ");
}
echo "<a href='?top'>В перед</a><br />";
echo "<a href='?bot'>Назад</a><br />";
echo "<a href='?left'>В лево</a><br />";
echo "<a href='?right'>В право</a><br />";
echo "<center><img src='/dark_war/all_img/go.jpg' alt='!' /></center><br />";
?>