<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td bgcolor="#003366"><font color="#FFFFFF" size="2"><strong>Item Catalog
:: <font size="1"><a href="#General">General</a> <a href="#Class">Class</a></font></strong></font></td>
</tr>
<tr>
<td bgcolor="#003366">
<form action="" method="post" name="formSearch" id="formSearch">
<input name="txtSearch" type="text" id="txtSearch" value="<?php echo $txtSearch; ?>" size="35">
<input name="Search" type="submit" id="Search" value="Search">
</form></td>
</tr>
</table>
<?php
$Search = $_POST[Search];
if(isset($Search)) {
?>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="4" bgcolor="#003366"><font color="#CCCCCC" size="1" face="Tahoma"><strong>Search
Results</strong></font></td>
</tr>
<tr>
<td width="60%" bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Item
Name</font></strong></u></td>
<td width="15%" bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Slot</font></strong></u></td>
<td width="5%" bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Value</font></strong></u></td>
<td width="20%" bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Note</font></strong></u></td>
</tr>
<?php
$txtSearch = $_POST[txtSearch];
$sql = $db->query("SELECT * FROM dkp_items WHERE name LIKE \"%$txtSearch%\" OR value LIKE \"$txtSearch\" ORDER BY id ASC");
if($db->count_rows($sql) > 0) {
while($row = mysql_fetch_array($sql)) {
$slotid = $row[slot];
$itemname = $row[name];
$itemslot = @mysql_result($db->query("SELECT name FROM dkp_itemtypes WHERE id=\"$slotid\""), 0);
$itemvalue = $row[value];
$itemnote = $row[note];
$color1 = "#CCCCCC";
$color2 = "#D7D7D7";
$row_color = ($row_count % 2) ? $color1 : $color2;
$row_count++;
?>
<tr bgcolor="<?php echo $row_color; ?>">
<td><strong><font color="#000000" size="1" face="Tahoma"><?php echo $itemname; ?></font></strong></td>
<td><strong><font color="#000000" size="1" face="Tahoma"><?php echo $itemslot; ?></font></strong></td>
<td><strong><font color="#000000" size="1" face="Tahoma"><?php echo $itemvalue; ?></font></strong></td>
<td><strong><font color="#000000" size="1" face="Tahoma"><?php echo $itemnote; ?></font></strong></td>
</tr>
<tr>
<?php
}
}
else {
?>
<td colspan="4" bgcolor="#CCCCCC"><font color="#000000" size="1" face="Tahoma"><strong>No
data could be located based on your query.</strong></font></td>
</tr>
<?php
}
?>
</table>
<?php
}
else {
?>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="4" bgcolor="#003366"><font color="#CCCCCC" size="1"><strong><a name="General">General
Items</a></strong></font></td>
</tr>
<tr>
<td width="60%" bgcolor="#999999"><strong><font size="1"><u>Item Name</u></font></strong></td>
<td width="15%" bgcolor="#999999">
<div align="left"><u><strong><font size="1">Slot</font></strong></u></div></td>
<td width="5%" bgcolor="#999999"> <div align="left"><u><strong><font size="1">Value</font></strong></u></div></td>
<td width="20%" bgcolor="#999999">
<div align="left"><u><strong><font size="1">Note</font></strong></u></div></td>
</tr>
<?php
$sql = $db->query("SELECT * FROM dkp_items WHERE type='0' ORDER BY slot ASC, name ASC");
if($db->count_rows($sql) > 0) {
while($row = mysql_fetch_array($sql)) {
$slotid = $row[slot];
$itemname = $row[name];
$itemslot = @mysql_result($db->query("SELECT name FROM dkp_itemtypes WHERE id=\"$slotid\""), 0);
$itemvalue = $row[value];
$itemnote = $row[note];
$color1 = "#CCCCCC";
$color2 = "#D7D7D7";
$row_color = ($row_count % 2) ? $color1 : $color2;
$row_count++;
?>
<tr bgcolor="<?php echo $row_color; ?>" onmouseover="this.style.backgroundColor='#BEBEBE';" onmouseout="this.style.backgroundColor='<?php echo $row_color; ?>';">
<td><font color="#000000" size="1"><strong><?php echo $itemname; ?></strong></font></td>
<td><div align="left"><font color="#000000" size="1"><strong><?php echo $itemslot; ?></strong></font></div></td>
<td><div align="left"><font color="#000000" size="1"><strong><?php echo $itemvalue; ?></strong></font></div></td>
<td><div align="left"><font color="#000000" size="1"><strong><?php echo $itemnote; ?></strong></font></div></td>
</tr>
<?php
}
}
else {
?>
<tr bgcolor="#CCCCCC">
<td colspan="4"><img src="images/arrow.gif" width="20" height="10"> <strong><font size="1">No
items are currently recorded in this category.</font></strong></td>
</tr>
<?php
}
?>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="4" bgcolor="#003366"><font color="#CCCCCC" size="1"><strong><a name="Class">Class
Items</a></strong></font></td>
</tr>
<tr bgcolor="#999999">
<td width="60%"><u><strong><font size="1">Item Name</font></strong></u></td>
<td width="15%">
<div align="left"><u><strong><font size="1">Slot</font></strong></u></div></td>
<td width="5%">
<div align="left"><u><strong><font size="1">Value</font></strong></u></div></td>
<td width="20%">
<div align="left"><u><strong><font size="1">Note</font></strong></u></div></td>
</tr>
<?php
$sql = $db->query("SELECT * FROM dkp_items WHERE type='1' ORDER BY slot ASC, name ASC");
if($db->count_rows($sql) > 0) {
while($row = mysql_fetch_array($sql)) {
$slotid = $row[slot];
$itemname = $row[name];
$itemslot = @mysql_result($db->query("SELECT name FROM dkp_itemtypes WHERE id=\"$slotid\""), 0);
$itemvalue = $row[value];
$itemnote = $row[note];
$color1 = "#CCCCCC";
$color2 = "#D7D7D7";
$row_color = ($row_count % 2) ? $color1 : $color2;
$row_count++;
?>
<tr bgcolor="<?php echo $row_color; ?>" onmouseover="this.style.backgroundColor='#BEBEBE';" onmouseout="this.style.backgroundColor='<?php echo $row_color; ?>';">
<td><font color="#000000" size="1"><strong><?php echo $itemname; ?></strong></font></td>
<td><div align="left"><font color="#000000" size="1"><strong><?php echo $itemslot; ?></strong></font></div></td>
<td><div align="left"><font color="#000000" size="1"><strong><?php echo $itemvalue; ?></strong></font></div></td>
<td><div align="left"><font color="#000000" size="1"><strong><?php echo $itemnote; ?></strong></font></div></td>
</tr>
<?php
}
}
else {
?>
<tr>
<td colspan="4" bgcolor="#CCCCCC"><img src="images/arrow.gif" width="20" height="10">
<strong><font size="1">No items are currently recorded in this category.</font></strong></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>