<?php
require_once('../config/config.php');
require_once(CLASS_DIR.'dbClass.php');
$obj = new DBClass();
$cupage = 'product';

$sql = "SELECT * FROM ".TBL_PRODUCTS." WHERE id = '".$_GET['id']."'";
$rs = $obj->executeQry($sql,$link);
$row = $obj->fetchrow();

$sql3 = "SELECT * FROM ".TBL_CAT." WHERE id = '".$row['category']."'";
$rs3 = $obj->executeQry($sql3,$link);
$row3 = $obj->fetchrow();

require_once(INCLUDES_DIR.ADMHEADER); 
?>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="29" align="center" class="submenu"><a href="products.php">Manage Products</a></td>
    <td align="center" class="submenu"><a href="add_product.php">Add New Product</a></td>
  </tr>
</table>
<table width="1000" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="17"></td>
  </tr>
  <tr>
    <td><table width="910" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td class="pagehead"><table width="900" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="315" height="35">View Product</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#FFFFFF" class="innermain"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="25">&nbsp;</td>
          </tr>
          <tr>
            <td valign="top" class="bdr4"><table width="800" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td bgcolor="#990066" class="form_head">Product Image</td>
                </tr>
              <tr>
                <td align="left" valign="top" class="form_bg"><table width="500" border="0" cellpadding="0" cellspacing="0" class="form_txt1">
                  <tr>
                    <td align="center"><img src="<?php echo PRODUCT_SHOW.$row['pimage'];?>" border="0" width="200" height="200"></td>
                  </tr>
                  </table></td>
              </tr>
              <tr>
                <td bgcolor="#990066" class="form_head">Product Details</td>
                </tr>
              <tr>
                <td valign="top" class="form_bg"><table width="500" border="0" cellpadding="0" cellspacing="0" class="form_txt1">
                  <tr>
                    <td align="left" width="80">Item No.</td>
			<td align="center" width="5">:</td>
                    <td><? echo $row['item_no'];?></td>
                    </tr>
                  <tr>
                    <td align="left" width="80">Category</td>
			<td align="center" width="5">:</td>
                    <td><? echo $row3['category'];?></td>
                    </tr>
                  <tr>
                    <td align="left" width="80">Product Title</td>
			<td align="center" width="5">:</td>
                    <td><? echo $row['title'];?></td>
                    </tr>
                  <tr>
                    <td align="left" width="80">Price</td>
			<td align="center" width="5">:</td>
                    <td><? echo '$'.$row['price'];?></td>
                    </tr>
                  <tr>
                    <td>Description</td>
			<td>:</td>
                    <td><? echo html_entity_decode(stripslashes($row['description']));?></td>
                    </tr>
                  <tr>
                    <td align="left" width="80">New</td>
			<td align="center" width="5">:</td>
                    <td><? echo ucfirst($row['new']);?></td>
                    </tr>
                  <tr>
                    <td align="left" width="80">Hot</td>
			<td align="center" width="5">:</td>
                    <td><? echo ucfirst($row['hot']);?></td>
                    </tr>
                  <tr>
                    <td align="left" width="80">Closeout</td>
			<td align="center" width="5">:</td>
                    <td><? echo ucfirst($row['closeout']);?></td>
                    </tr>
                  <tr>
                    <td align="left" width="80">Exclusive</td>
			<td align="center" width="5">:</td>
                    <td><? echo ucfirst($row['exclusive']);?></td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td bgcolor="#990066" class="form_head">&nbsp;</td>
              </tr>
              </table></td>
          </tr>
          </table></td>
      </tr>
      </table></td>
  </tr>
  <tr>
    <td height="40">&nbsp;</td>
  </tr>
</table>

<?php require_once(INCLUDES_DIR.ADMFOOTER); ?>
