2 include_once("../conf.php");
3 include_once("zone_tables.php");
5 mysql_connect($config['hostname'],$config['username'],$config['password']) OR DIE("Не возможно создать соеденение с базой сервера.".mysql_error());
6 mysql_select_db($config['dbName']) or die(mysql_error());
8 $id = intval(@$_REQUEST['id']);
9 $where = @$_REQUEST['where'];
10 $map = intval(@$_REQUEST['map']);
11 $x = intval(@$_REQUEST['x']);
12 $y = intval(@$_REQUEST['y']);
13 if ($map!=0 AND $map!=1 AND $map != 530)
15 include("instance.php");
19 echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";
20 $areaName=get_map_name($map);
21 $zone =get_zone($map,$x,$y);
24 echo "<center><table valign=\"bottom\"><tr><td><img src=\"../images/wowd.jpg\"></td></tr><tr><td><center>Неизвестная зона</center></td></tr></table></center>";
27 $area = get_Area($zone[5]);
30 echo "<center><table valign=\"bottom\"><tr><td><img src=\"../images/wowd.jpg\"></td></tr><tr><td><center>Карта не найденна(</center></td></tr></table></center>";
33 $background = "img/map_image/$areaName/$area[3].jpg";
47 <meta http
-equiv
=Content
-Type content
=text
/html
; charset
=utf
-8>
49 <style type
="text/css">
57 background
-color
: #000000;
73 $tableWidth = $imageY+
$tableBorder*2+
8;
74 echo "<TABLE border=$tableBorder width=$tableWidth>";
75 echo "<TBODY><TR><TD align = center>$areaName - $zone[4]</TD></TR>";
76 echo "<TR><TD width=$sizeX height=$sizeY align=left valign=top>";
77 echo "<SPAN style=\"position: relative; border: 0px; left: 0; top: 0;\"> ";
78 echo "<IMG src=$background width=$imageY height=$imageX style=\"position: absolute; border: 0px; left: 0; top: 0;\">";
81 $x=round($imageX*($x - $areaX1)/($areaX2-$areaX1)-8,0);
82 $y=round($imageY*($y - $areaY1)/($areaY2-$areaY1)-8,0);
83 echo "<img src=\"img/gps_icon.png\" style=\"position: absolute; border: 0px; left: $y; top: $x;\">\n";
87 if ($where == "gameobject")
89 $res = mysql_query("SELECT * FROM `gameobject_template` WHERE entry = '$id' LIMIT 1") or die(mysql_error());
90 $row = mysql_fetch_array($res);
91 mysql_free_result($res);
92 $res2 = mysql_query("SELECT * FROM `gameobject` WHERE id = '$id'") or die(mysql_error());
93 while ($row2=mysql_fetch_array($res2))
96 $posx = $row2['position_x'];
97 $posy = $row2['position_y'];
99 if ($areaX1 > $posx && $areaX2 < $posx &&
100 $areaY1 > $posy && $areaY2 < $posy && $mapID == $map)
102 if ($type == 3) {$img = "img/iron.gif"; $centerImage = 4; }
103 else {$img = "img/gps_icon.png"; $centerImage = 8; }
104 $type = $row['type'];
105 $time = get_time_text($row2['spawntimesecs']);
107 $x=round($imageX*($posx - $areaX1)/($areaX2-$areaX1)-$centerImage,0);
108 $y=round($imageY*($posy - $areaY1)/($areaY2-$areaY1)-$centerImage,0);
109 $name = validateTextForMap($row['name']);
110 echo "<a href=\"map.php?id=$id&where=$where&x=$posx&y=$posy&map=$row2[map]\">";
111 echo "<img src=\"$img\" style=\"position: absolute; border: 0px; left: $y; top: $x;\"onmouseover=\"this.T_TITLE='<div align=center>$name</div>';return escape('Респавн: $time<br>GUID $row2[guid]<br>$posy $posx $row2[position_z] $row2[map]')\"></a>\n";
117 $res = mysql_query("SELECT * FROM `creature_template` WHERE entry = '$id' LIMIT 1") or die(mysql_error());
118 $row = mysql_fetch_array($res);
119 mysql_free_result($res);
121 $res2 = mysql_query("SELECT * FROM `creature` WHERE id = '$id'") or die(mysql_error());
122 while ($row2=mysql_fetch_array($res2))
125 $posx = $row2['position_x'];
126 $posy = $row2['position_y'];
128 if ($areaX1 > $posx && $areaX2 < $posx &&
129 $areaY1 > $posy && $areaY2 < $posy && $mapID == $map)
131 if ($row2['id']==$id){$img = "img/gps_icon.png"; $centerImage = 8;}
132 else {$img = "img/green.gif"; $centerImage = 2;}
134 $row['name']=str_replace("'","`",$row['name']);
135 $row['name']=str_replace("\"","`",$row['name']);
136 $type = $row['type'];
137 $time = get_time_text($row2['spawntimesecs']);
139 $x=round($imageX*($posx - $areaX1)/($areaX2-$areaX1)-$centerImage,0);
140 $y=round($imageY*($posy - $areaY1)/($areaY2-$areaY1)-$centerImage,0);
142 $name = validateTextForMap($row['name']);
143 echo "<a href=\"map.php?id=$id&where=$where&x=$posx&y=$posy&map=$row2[map]\">";
144 echo "<img src=\"$img\" style=\"position: absolute; border: 0px; left: $y; top: $x;\"onmouseover=\"this.T_TITLE='<div align=center>$name</div>';return escape('Уровень: $row[maxlevel]<br>Тип: $NPCType[$type]<br>Жизнь: $row2[curhealth]<br>Урон: $row[mindmg] - $row[maxdmg]<br>Респавн: $time<br>GUID $row2[guid]<br>$posy $posx $row2[position_z] $row2[map]')\"></a>\n";
150 echo "</TD></TR></TBODY>";
155 <script language
="JavaScript" type
="text/javascript" src
="wz_tooltip.js"></script
>
156 <script language
="JavaScript" type
="text/javascript"></script
>