2 include("../conf.php");
3 include ("zone_tables.php");
4 mysql_connect($config['hostname'],$config['username'],$config['password']) or die("Unable to connect to the database. Maybe the server is down.");
5 mysql_select_db($config['dbName']) or die(mysql_error());
8 <style type
="text/css">
11 background
-color
: #808080;
32 $name = @$_REQUEST['name'];
33 $name = mysql_real_escape_string($name);
34 $entry = intval(@$_REQUEST['entry']);
36 if ($name == "" and $entry=="") { die(); }
37 $background = "map.jpg";
39 echo "<table width=\"100%\" border=\"0\">";
40 echo "<tr>Поиск существ</tr>";
41 if ($name !="") $res = mysql_query("SELECT * FROM `creature_template` WHERE name like '%$name%' ORDER BY `name`") or die(mysql_error());
42 else if ($entry!="") $res = mysql_query("SELECT * FROM `creature_template` WHERE entry = '$entry' ORDER BY `name`") or die(mysql_error());
44 while ($row=mysql_fetch_array($res))
46 $res2 = mysql_query("SELECT * FROM `creature` WHERE id = '$row[entry]'") or die(mysql_error());
47 $count= mysql_num_rows($res2);
48 $row2=mysql_fetch_array($res2);
50 if ($row2['map']==0 OR $row2['map']==1 OR $row2['map']==530)
51 $map = get_zone_name($row2['map'],$row2['position_x'],$row2['position_y']);
53 $map = get_map_name($row2['map']);
55 echo "<td><img src=img/human.gif></td>";
56 echo "<td><$row[minlevel]-$row[maxlevel]></td>";
57 if ($count==0) echo "<td>$row[name]</td>";
58 else echo "<td><a href=\"gps2.php?id=$row[entry]\" target=\"zzz\">$row[name]";
59 if ($map!="") echo "<br><font color=#F0F00F size=-2><$map></font>";
61 echo "<td>$count</td>";
66 echo "<table width=\"100%\" border=\"0\">";
67 echo "<tr>Поиск обьектов</tr>";
69 $res = mysql_query("SELECT * FROM `gameobject_template` WHERE name like '%$name%' ORDER BY `name`") or die(mysql_error());
71 $res = mysql_query("SELECT * FROM `gameobject_template` WHERE entry = '$entry' ORDER BY `name`") or die(mysql_error());
72 while ($row=mysql_fetch_array($res))
74 $row['name']=str_replace("'","",$row['name']);
75 $res2 = mysql_query("SELECT * FROM `gameobject` WHERE id = '$row[entry]'") or die(mysql_error());
76 $count= mysql_num_rows($res2);
78 echo "<td><img src=img/iron.gif></td>";
79 if ($count==0) echo "<td>$row[name]</td>";
80 else echo "<td><a href=\"gps2.php?id=$row[entry]&where=gameobject\" target=\"zzz\">$row[name]</a></td>";
81 echo "<td>($count)</td>";