-
Notifications
You must be signed in to change notification settings - Fork 0
/
quest_search.php
62 lines (52 loc) · 1.96 KB
/
quest_search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* THIS PAGE DOES THE SEARCHING AND THE RESULTS ARE SENT TO
* ITEMS.PHP FOR DISPLAY...
* */
if(isset($_REQUEST['sr']))
$search_param = $_REQUEST['sr'];
//SEE IF THEY ARE SEARCHING OR BROWSING
if(isset($_REQUEST['sr'])){
/** SEARCH MODE **/
// load up the world server
$database = MANGOS_WORLD;include('dbconn.php');
// lookd for the quest name
$sql = "SELECT * FROM `quest_template` WHERE `Title` LIKE '%$search_param%' ORDER BY `minlevel` DESC";
include('dbselect.php');
// loop through any findings
$count=0;//how many did we find
while ($quest = mysql_fetch_array($query) ){
$count++;
//$icon = getIcon($item['displayid']);
//$color = $qualityColor[$item['Quality']];
//BUILD OUR LIST
$display_quest[$count] = "
<tr>
<td>
<a href='index.php?pt=qsv&id=".$quest['entry']."'
onmouseover=\"tooltip.show('".questPInfo($quest)."',300);\"
onmouseout=\"tooltip.hide();\">".$quest['Title']."
</a>
</td>
<td>".questXP($quest)."xp</td>
<td>".moneyStr($quest['RewMoneyMaxLevel'])."</td>
</tr>
";
}
if(!$count){
echo "No records found matching <font color='#00ff00'><b>$search_param</b></font>";
}else{
?>
<table width="100%" class="info">
<tr>
<td width="260">Title</td><td>Experience</td><td>Money</td>
</tr>
<?php
for($i=1; $i <= count($display_quest); $i++){
echo $display_quest[$i].'';
}
echo '</table>';
}
unset($_REQUEST['sr']);
}
?>