<? ob_start();
session_start();
require_once("../dbconnect.php");

/*if($_GET['catid']!=""){
  $view="Select * from tblcategories where category_id=".$_GET['catid']; 
 $exeview=mysql_query($view);
 $viewrow=mysql_fetch_array($exeview);
 $category=$viewrow['categoryname']; 
 }
if($_GET['subcat']!=""){ 
 $view1="Select * from tblsubcategories where subcat_id=".$_GET['subcat']; 
 $exeview1=mysql_query($view1);
 $viewrow1=mysql_fetch_array($exeview1);
 $subsubcategory=$viewrow1['subcat_name'];
 }*/
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Welcome to Sir Box and Plastics</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="valid.js"></script>
<script type="text/javascript" src="controls.js"></script>
<script type="text/javascript" src="controls1.js"></script>
</head>
<body>
<table width="1003" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td><? require_once("header.php"); ?></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="30" class="cate_pro"> </td>
                            <td>&nbsp;</td>
                            <td class="index_text" align="right">&nbsp;</td>
                            <td width="20">&nbsp;</td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="100%" valign="top" style="padding-right:1px;"><form  name="form" method="post" action="productinsert.php?action=add" enctype="multipart/form-data" onsubmit="return validation(this.file);">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
                                  <tr>
                                    <td height="40" colspan="6" align="center" bgcolor="#D7D6CC" class="cate_pro">Add New Units </td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td align="left">&nbsp;</td>
                                    <td colspan="3">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td width="10%" height="30" align="left">&nbsp;</td>
                                    <td width="6%">&nbsp;</td>
                                    <td width="16%"><label><strong>Minimum Quantity:</strong></label></td>
                                    <td  colspan="3"><input type="text" name="minqty" size="30" /></td>
                                  </tr>
								      <tr>
                                    <td width="10%" height="30" align="left">&nbsp;</td>
                                    <td width="6%">&nbsp;</td>
                                    <td width="16%"><label><strong>Minimum Quantity:</strong></label></td>
                                    <td  colspan="3"><input type="text" name="maxqty" size="30" /></td>
                                  </tr>
								      <tr>
                                    <td width="10%" height="30" align="left">&nbsp;</td>
                                    <td width="6%">&nbsp;</td>
                                    <td width="16%"><label><strong>Price:</strong></label></td>
                                    <td  colspan="3"><input type="text" name="price" size="30" /></td>
                                  </tr>
                                
                                  <tr>
                                    <td height="30" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td  colspan="3" align="center"><p id="parah1"  align="left"><span style="padding-left:160px;">Click below to add more.....</span></p>
                                      <a href="javascript:addInput();">Add One More</a></td>
                                  </tr>
                                  <tr>
                                    <td height="30" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td><strong>Color:</strong></td>
                                    <td  colspan="3"><input type="text" name="color[]" id="color"  /></td>
                                  </tr>
                                  <tr>
                                    <td height="30" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td  colspan="3" align="center"><p id="parah2" align="left"><span style="padding-left:160px;">Click below to add more.....</span></p>
                                      <a href="javascript:addInput1()" class="menu7"  style="margin-right:100px;">Add more</a></td>
                                  </tr>
                                  <tr>
                                    <td width="10%" height="30" align="left">&nbsp;</td>
                                    <td width="6%">&nbsp;</td>
                                    <td width="16%"><label><strong>Description:</strong></label></td>
                                    <td  colspan="3"><textarea name="description" rows="10" cols="25" />
                                      </textarea></td>
                                  </tr>
                                  <tr>
                                    <td width="10%" height="30" align="left">&nbsp;</td>
                                    <td width="6%">&nbsp;</td>
                                    <td width="16%"><label><strong>Product Image1:</strong></label></td>
                                    <td  colspan="3"><input type="file" name="prodimg1" id="prodimg1" size="30" /></td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td align="left"><strong>Product Image2:</strong></td>
                                    <td colspan="3"><input name="prodimg2" id="prodimg2" size="30" type="file" /></td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td align="left"><strong>Product Image3:</strong></td>
                                    <td colspan="3"><input name="prodimg3" id="prodimg3" size="30" type="file" /></td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td align="left"><strong>Related Products:</strong></td>
                                    <td colspan="3"><? 
						    $getprod_names = mysql_query("select pid,pname from products");
							if(mysql_num_rows($getprod_names)>=1)
							{
						  ?>
                                      <select name="relatedprods[]" id="relatedprods" multiple="multiple">
                                        <? while($data_get = mysql_fetch_array($getprod_names)) { ?>
                                        <option value="<?=$data_get[pid]?>">
                                        <?=$data_get[pname]?>
                                        </option>
                                        <? } ?>
                                      </select>
                                      <? } else { 
						     echo "No Products Found To Select";
						  } ?></td>
						  <tr>
						  <td>&nbsp;</td>
						  <td>&nbsp;</td>
						  <td><strong>Print</strong></td>
						  <td>Yes:
						  <input type="checkbox" name="checkbox" value="imprint" />
						  No:
						  <input type="checkbox" name="checkbox" value="noprint" />
						  </td>
                                  </tr>
								    <tr>
                                   
                                    <td colspan="3"><strong>How many Units to Show In front End:</strong></td>
                                    <td  colspan="3"><input type="text" name="sqty" id="sqty"  /></td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td colspan="3">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td colspan="2"><input type="hidden" name="firstcnt" id="firstcnt" value="1"  />
                                      <input type="hidden" name="secondcnt" id="secondcnt" value="1"  />
                                      <input type="hidden" name="catid" value="<?=$_GET['catid'] ?>">
                                      <input type="hidden" name="subcat" value="<?=$_GET['subcat']?>">
                                      <a href="<? echo $_SESSION['url'];?>"><img src="images/button_back.gif" border="o"/></a> &nbsp;&nbsp;
                                      <input type="image" src="images/button_insert.gif" name="inserpr" />
                                      &nbsp;&nbsp; <a href="<? echo $_SESSION['url'];?>"><img src="images/button_cancel.gif" border="o"/></a> &nbsp;&nbsp;</td>
                                    <td width="38%">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td colspan="3">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td colspan="3">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left">&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                    <td colspan="3">&nbsp;</td>
                                  </tr>
                                </table>
                              </form></td>
                            <td width="0%" valign="top"><!---->
                              <!----></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><? require_once("footer.php"); ?></td>
              </tr>
              <tr>
                <td height="200">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
