2 include_once("../conf.php");
3 include_once("zone_tables.php");
6 echo "<meta http-equiv=Content-Type content=text/html; charset=utf-8>";
7 echo "<title></title>";
8 $id = intval(@$_REQUEST['id']);
9 $where = @$_REQUEST['where'];
11 if ($where == "gameobject")
13 $where = "gameobject";
14 $where_template = "gameobject_template";
19 $where_template = "creature_template";
21 if ($id == "") { echo "<center><table valign=\"bottom\"><tr><td><img src=\"../images/wowd.jpg\"></td></tr><tr><td><center>Отсутствует запрос</center></td></tr></table></center>"; die(); }
23 mysql_connect($config['hostname'],$config['username'],$config['password']) OR DIE("Не возможно создать соеденение с базой сервера. Возможно сервер выключен");
24 mysql_select_db($config['dbName']) or die(mysql_error());
26 // Предварительный выбор карты берётся 1 моб и определяем его местоположение
27 $res2 = mysql_query("SELECT * FROM `$where` WHERE id = '$id'") or die(mysql_error());
28 $count= mysql_num_rows($res2);
31 echo "<center><table valign=\"bottom\"><tr><td><img src=\"../images/wowd.jpg\"></td></tr><tr><td><center>Никого не найдено</center></td></tr></table></center>";
34 $row2=mysql_fetch_array($res2);mysql_data_seek($res2,0);
36 $imageMAP = $row2['map'];
37 $background = "no_map";
39 $scale=2; // Масштаб карты
40 // Моб находится на Азероте или Калимдоре
41 // Карта Азерота и Калимдора на одной картинке
42 if ($row2['map']==0 OR $row2['map']==1)
44 $background = "img/map_image/map.jpg";
47 // Коэффициенты перевода координат для Азерота
51 $image_SX = -1180/18000;
53 $image_SY = -340/5350;
55 // Коэффициенты перевода координат для Калимдора
59 $image_SX = -1270/19100;
61 $image_SY = -570/8850;
64 // Карта Аутлэнда на ней также находятся Острова дреней и блудэльфов
65 else if ($row2['map']==530)
67 // Весь Аутланд находится в этих координатах
68 if ($row2['position_x']< 5333.3333333 AND $row2['position_x'] > -5866.666666 AND
69 $row2['position_y']<10133.3333333 AND $row2['position_y'] > -1066.666666)
71 $background = "img/map_image/Outland_".$scale."x.jpg";
72 $imageX = 5376/$scale;
73 $imageY = 5376/$scale;
74 $image_DX = 2560/$scale;
75 $image_SX = -0.48/$scale;
76 $image_DY = 4864/$scale;
77 $image_SY = -0.48/$scale;
79 // Острова Дреней находятся тут
80 else if ($row2['position_y']<-10075 AND $row2['position_y'] > -14570 AND
81 $row2['position_x']< -758 AND $row2['position_x'] > -5508)
83 $background = "img/map_image/Isle1.jpg";
91 // Острова блудэльфов тут
92 else if ($row2['position_y']<-4487 AND $row2['position_y'] > -9412 AND
93 $row2['position_x']<11041 AND $row2['position_x'] > 6067)
95 $background = "img/map_image/Isle2.jpg";
105 if ($background == "no_map")
107 // echo "<center><table valign=\"bottom\"><tr><td><img src=\"../images/wowd.jpg\"></td></tr><tr><td><center>Нет этой карты</center></td></tr></table></center>";
109 include("instance.php");
115 <style type
="text/css">
123 background
-color
: #000000;
127 <?php
echo " width: $imageX"."px".";\n"?
>
128 <?php
echo " height: $imageY"."px".";\n"?
>
131 <?php
echo " background-image: url($background);\n"?
>
144 $res = mysql_query("SELECT * FROM `$where_template` WHERE entry = '$id'") or die(mysql_error());
145 $row = mysql_fetch_array($res);
146 $row['name']=validateTextForMap($row['name']);
149 $img = "img/red_soft.gif";
150 $x = $image_DY+$image_SY*$posy;
151 $y = $image_DX+$image_SX*$posx;
152 echo "<a href=\"map.php?id=$id&where=$where&x=$posx&y=$posy&map=$row2[map]\">";
153 echo "<img src=\"$img\" style=\"position: absolute; border: 0px; left: $x; top: $y;
154 \"onmouseover=\"this.T_TITLE='<div align=center>$row[name]</div>';
155 return escape('Респавн: $time<br>GUID $row2[guid]<br>$posy $posx $row2[position_z] $row2[map]')\"
161 while ($row2=mysql_fetch_array($res2))
163 if ($where == "gameobject")
165 $posx = $row2['position_x'];
166 $posy = $row2['position_y'];
167 $type = $row['type'];
168 $time = get_time_text($row2['spawntimesecs']);
169 if ($type == "3") {$img = "img/iron.gif"; $centerImage = 4;}
170 else {$img = "img/gps_icon.png";$centerImage = 8;}
174 $posx = $row2['position_x'];
175 $posy = $row2['position_y'];
176 $type = $row['type'];
177 $time = get_time_text($row2['spawntimesecs']);
179 $img = "img/gps_icon.png";$centerImage = 8;
182 $currentMap = $row2['map'];
183 if (($currentMap==0 AND $imageMAP==1) OR ($currentMap==1 AND $imageMAP==0) OR $currentMap==$imageMAP)
188 $image_SX = -1180/18000;
190 $image_SY = -340/5350;
192 // Коэффициенты перевода координат для Калимдора
193 else if ($currentMap==1)
196 $image_SX = -1270/19100;
198 $image_SY = -570/8850;
200 $x = $image_DY+
$image_SY*$posy+
0.5-$centerImage;
201 $y = $image_DX+
$image_SX*$posx+
0.5-$centerImage;
211 $dx+
=8;if ($dx>160){$dx=0;$dy+
=8;}
216 if ($where == "gameobject")
218 echo "<a href=\"map.php?id=$id&where=$where&x=$posx&y=$posy&map=$row2[map]\">";
219 echo "<img src=\"$img\" style=\"position: absolute; border: 0px; left: $x; top: $y;
220 \"onmouseover=\"this.T_TITLE='<div align=center>$row[name]</div>';
221 return escape('Респавн: $time<br>GUID $row2[guid]<br>$posy $posx $row2[position_z] $row2[map]')\"
226 echo "<a href=\"map.php?id=$id&where=$where&x=$posx&y=$posy&map=$row2[map]\">";
227 echo "<img src=\"$img\" style=\"position: absolute; border: 0px; left: $x; top: $y;
228 \"onmouseover=\"this.T_TITLE='<div align=center>$row[name]</div>';
229 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]')\"
237 <script language
="JavaScript" type
="text/javascript" src
="wz_tooltip.js"></script
>
238 <script language
="JavaScript" type
="text/javascript">
240 echo "javascript:scroll($sx,$sy)";