<?
define('PROTECTOR', 1);

$headmod = 'karta';//фикс. места

$textl='Админ-панель';
include('files/db.php');
include('files/auth.php');
include('files/func.php');
include('files/core.php');
include('files/head.php');
include('files/zag.php');

switch($_GET[mod]){
default:
$req = mysql_query("SELECT * FROM `world` WHERE `city`='$udata[city]' and `portal`='1'");
$citys = mysql_fetch_array($req);

  
echo"<center><font color='#f4d06e'>Вы можете перейти:</br></font></center></div><div class='m_bg'>";
////////////////////////////
$avto=mysql_num_rows($req);
if($avto>=1){
While($mag = mysql_fetch_array($req))
{
echo"<b>$mag[name](X:$mag[x];Y:$mag[y])</b> [<a href=\"karta.php?mod=go&amp;x=$mag[x]&amp;y=$mag[y]\">Перейти</a>]<br/>";}
break;
}
case 'go':
mysql_query("UPDATE `mesto` SET `x` = '$_GET[x]',`y` = '$_GET[y]' WHERE `usr` = '$log'"); 
if($udata[mp]>=5){mysql_query("UPDATE `users` SET `mp` = '$udata[mp]'-'5' WHERE `usr` = '$log'");}else{

mysql_query("UPDATE `users` SET `money` = '$udata[money]'-'5' WHERE `usr` = '$log'");}
echo"<a href=\"okrestnosti.php\">Перейти</a>";
}

include('files/down.php');

?>