<? ob_start();
session_start();
require_once("../dbconnect.php");
if($_POST['catid']!=""){
 $view="Select * from tblcategories where category_id=".$_POST['catid']; 
 $exeview=mysql_query($view);
 $viewrow=mysql_fetch_array($exeview);
 $category=$viewrow['categoryname']; 
 }
if($_POST['subcat']!=""){ 
 $view1="Select * from tblsubcategories where subcat_id=".$_POST['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="jscolor.js"></script>
<script>
 function zing(dig) {
  
 document.getElementById(dig).checked=true;
  
  }
</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">
				Product in Category: "<? echo $category?>  <? echo $subcategory ?> - <? echo $subsubcategory ?>"</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="7" align="center" bgcolor="#D7D6CC" class="cate_pro">Add New Product</td>
                          </tr>
						     <tr>
                          <td width="10%" height="30" align="left">&nbsp;</td>
                          <td width="6%">&nbsp;</td>
                          <td width="16%"><label></label></td>
                          <td  colspan="4"><strong><span id="errorMessage1"></span></strong></td>
                        </tr>
						 <tr>
                          <td width="10%" height="30" align="left">&nbsp;</td>
                          <td width="6%">&nbsp;</td>
                          <td width="16%" align="left"><label><strong>Printing Type:</strong></label></td>
                          <td width="68" colspan="4"><select name="printingtype">
						  <option value="">Please Select</option>
						   <option value="1">Digital Printing</option>
						    <option value="2">Screen Printing</option>
						  </select>
						  
						  </td>
                        </tr>
                        <tr>
                          <td width="10%" height="30" align="left">&nbsp;</td>
                          <td width="6%">&nbsp;</td>
                          <td width="16%" align="left"><label><strong>Color Name:</strong></label></td>
                          <td width="68" colspan="4"><input type="text" name="pname" id="pname" />
						  <input type="hidden" name="catid" value="<? echo $_GET['catid']; ?>" />
						   <input type="hidden" name="subcatid" value="<? echo $_GET['subcat']; ?>" />
						  
						  </td>
                        </tr>
						 <tr>
                          <td width="10%" height="30" align="left">&nbsp;</td>
                          <td width="6%">&nbsp;</td>
                          <td width="16%" align="left"><label><strong>Color Value:</strong></label></td>
                          <td width="68" colspan="4"><input type="text" name="colvalue" id="colvalue" size="15" class="color" value="Choose Color" />
						 
						  
						  </td>
                        </tr>
                        
						<tr>
                          <td height="25" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td align="left">&nbsp;</td>
                          <td colspan="4">&nbsp;</td>
                        </tr>
                       
						   <tr>
                          <td height="30" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td align="left" valign="top"><strong>Invetory:</strong></td>
                          <td colspan="4"><table width="80%" border="1" cellpadding="5" cellspacing="0" bordercolor="#999999" style="border-collapse:collapse;">
                                    <tr>
                                      <td width="16%" valign="top"><input type="checkbox" name="prsize[]" value="YXS-1" id="check1"  /></td>
                                      <td width="24%" valign="top">YXS
                                        <input type="hidden" value="0" name="hidden1" id="hidden1" />									  </td><td width="60%" align="left">Qty Avail:  
                                          <input type="text" name="qty1" size="5" id="bong1" onkeyup="return validatephone(this);" /> 
                                          Single Product Price :  $<input type="text" name="price1" size="5" id="ping1" onkeyup="return validatephone(this);" />
												<!--<p id="parah1">Click below to add more.....</p>
<a href="javascript:addInput()">Add more</a>--></td>
                                    </tr>
                                    <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="YS-2" id="check2" /></td>
                                      <td valign="top">YS<input type="hidden" value="0" name="hidden2" id="hidden2" /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty2" size="5" id="bong2" onkeyup="return validatephone(this);" />&nbsp;Single Product Price :  $<input type="text" name="price2" size="5" id="ping2" onkeyup="return validatephone(this);" /> 
										  <!--<p id="parah2">Click below to add more.....</p>
<a href="javascript:addInput2()">Add more</a>--></td>
                                    </tr>
                                    <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="YM-3" id="check3"  /></td>
                                      <td valign="top">YM<input type="hidden" value="0" name="hidden3" id="hidden3"  /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty3" size="5" id="bong3" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price3" size="5" id="ping3" onkeyup="return validatephone(this);" />  
										  <!--<p id="parah3">Click below to add more.....</p>
<a href="javascript:addInput3()">Add more</a>--></td>
                                    </tr>
                                    <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="YL-4" id="check4"   /></td>
                                      <td valign="top">YL<input type="hidden" value="0" name="hidden4" id="hidden4"  /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty4" size="5" id="bong4" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price4" size="5" id="ping4" onkeyup="return validatephone(this);" /> 
										  <!--<p id="parah4">Click below to add more.....</p>
<a href="javascript:addInput4()">Add more</a>--></td>
                                    </tr>
                                    <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="YXL-5" id="check5"  /></td>
                                      <td valign="top">YXL<input type="hidden" value="0" name="hidden5" id="hidden5"  /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty5" size="5" id="bong5" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price5" size="5" id="ping5" onkeyup="return validatephone(this);" /> 
										  <!--<p id="parah5">Click below to add more.....</p>
<a href="javascript:addInput5()">Add more</a>--></td>
                                    </tr>
                                    <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="S-6" id="check6"  /></td>
                                      <td valign="top">S<input type="hidden" value="0" name="hidden6" id="hidden6" /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty6" size="5" id="bong6" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price6" size="5" id="ping6" onkeyup="return validatephone(this);" /> 
										  <!--<p id="parah6">Click below to add more.....</p>
<a href="javascript:addInput6()">Add more</a>--></td>
                                    </tr>
									
									 <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="M-7" id="check7"  /></td>
                                      <td valign="top">M<input type="hidden" value="0" name="hidden7" id="hidden7" /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty7" size="5" id="bong7" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price7" size="5" id="ping7" onkeyup="return validatephone(this);" />
										  <!--<p id="parah6">Click below to add more.....</p>
<a href="javascript:addInput6()">Add more</a>--></td>
                                    </tr>
									<tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="L-8" id="check8"  /></td>
                                      <td valign="top">L<input type="hidden" value="0" name="hidden8" id="hidden8" /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty8" size="5" id="bong8" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price8" size="5" id="ping8" onkeyup="return validatephone(this);" />  
										  <!--<p id="parah6">Click below to add more.....</p>
<a href="javascript:addInput6()">Add more</a>--></td>
                                    </tr>
                                    <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="XL-9" id="check9"  /></td>
                                      <td valign="top">XL<input type="hidden" value="0" name="hidden9" id="hidden9" /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty9" size="5" id="bong9" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price9" size="5" id="ping9" onkeyup="return validatephone(this);" />  
										  <!--<p id="parah6">Click below to add more.....</p>
<a href="javascript:addInput6()">Add more</a>--></td>
                                    </tr>
									 <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="2XL-10" id="check10"  /></td>
                                      <td valign="top">2XL<input type="hidden" value="0" name="hidden10" id="hidden10" /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty10" size="5" id="bong10" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price10" size="5" id="ping10" onkeyup="return validatephone(this);" />  
										  <!--<p id="parah6">Click below to add more.....</p>
<a href="javascript:addInput6()">Add more</a>--></td>
                                    </tr>
									 <tr>
                                      <td valign="top"><input type="checkbox" name="prsize[]" value="3XL-11" id="check11"  /></td>
                                      <td valign="top">3XL<input type="hidden" value="0" name="hidden11" id="hidden11" /></td>
                                      <td align="left">Qty Avail:  
                                        <input type="text" name="qty11" size="5" id="bong11" onkeyup="return validatephone(this);"/> 
                                        Single Product Price :  $<input type="text" name="price11" size="5" id="ping11" onkeyup="return validatephone(this);" />  
										  <!--<p id="parah6">Click below to add more.....</p>
<a href="javascript:addInput6()">Add more</a>--></td>
                                    </tr>
                                  </table></td>
						   </tr>
						
					                        <tr>
                          <td height="25" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td align="left">&nbsp;</td>
                          <td colspan="4">&nbsp;</td>
                        </tr>

						
						
						
						
						
                        <tr>
                          <td height="25" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td align="left"><strong>Products Image:</strong></td>
                          <td colspan="4"><input name="file" id="file" size="40" type="file" /></td>
                        </tr>
                        
                        <tr>
                          <td height="25" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td colspan="4">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="25" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>
						
        <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>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="25" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td colspan="4">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="25" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td colspan="4">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="25" align="left">&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td colspan="4">&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>
