<? ob_start();
session_start();
require_once("../dbconnect.php");
//echo "Select * from tblcategories1 where categiry_id=".$_GET['categiry_id'];
 $view="Select * from tblcategories1 where categiry_id=".$_GET['categiry_id']; 
 $exeview=mysql_query($view);
 $viewrow=mysql_fetch_array($exeview);
require_once("sesurl.php");

			  
 ?>

<!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;
}

#wysiwygdescription1{
background-color:#FFFFFF;

}
-->
</style>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="ajaxvalid.js"></script>
<script src="wysiwyg1.js" language="javascript"></script>
</head>
<body>
<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 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="70%" border="0" align="left" cellpadding="0" cellspacing="0">
                    <tbody>
                      <tr>
                        <td class="index_text" align="center" valign="top" width="150">LEGEND: </td>
                        <td class="index_text" align="center" valign="top" width="150">Status OFF <br />
                            <img src="images/icon_red_on.gif" alt="Status - Disabled" title=" Status - Disabled " border="0" /></td>
                        <td class="index_text" align="center" valign="top" width="150">Status ON <br />
                            <img src="images/icon_green_on.gif" alt="Status - Enabled" title=" Status - Enabled " border="0" /></td>
                        <td class="index_text" align="center" valign="top" width="11"><br /></td>
                        <td class="index_text" align="center" valign="top" width="150">Meta Tags Defined:<br />
                          Yes&nbsp;No<br />
                          <img src="images/icon_edit_metatags_on.gif" alt="Meta Tags Defined" title=" Meta Tags Defined " border="0" />&nbsp;<img src="images/icon_edit_metatags_off.gif" alt="Meta Tags Undefined" title=" Meta Tags Undefined " border="0" /></td>
                      </tr>
                    </tbody>
                </table></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td height="30" class="cate_pro">Categories / Products&nbsp;-&nbsp;<? echo $viewrow['categoryname']; ?>&nbsp;</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="65%" align="left" valign="top" style="padding-right:1px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="35" colspan="5"><table border="0" cellpadding="2" cellspacing="0" width="100%">
                            <tr class="dataTableHeadingRow">
                              <td width="37" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">ID</td>
                              <td width="159" bgcolor="#D7D6CC" class="dataTableHeadingContent">Categories / Products</td>
                              <td width="124" align="right" bgcolor="#D7D6CC" class="dataTableHeadingContent">Price/Special/Sale</td>
                              <td width="67" align="right" bgcolor="#D7D6CC" class="dataTableHeadingContent">Quantity&nbsp;&nbsp;&nbsp;</td>
                              <td width="53" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Status</td>
                              <td width="109" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Action&nbsp;</td>
                              </tr>
                            <!---->
                            <?php $cat="Select * from tblsubcategories1 where categiryid='".$_GET['categiry_id']."' order by subcot_name ASC"; 
							$catres=mysql_query($cat);
							 while($catrow=mysql_fetch_array($catres))
										{ ?>
                            <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">
                              <td class="dataTableContent" align="center" width="37"><? echo $catrow['subcot_id'] ?></td>
                              <td class="dataTableHeadingContent" style="padding-left:15px;"><a href="subcategory1.php?categiry_id=<? echo $_GET['categiry_id'] ?>&amp;subcat=<? echo $catrow['subcot_id'] ?>"> <img src="images/folder.gif" alt="Preview" title=" Preview " border="0" /></a> &nbsp;  <a href="subcategory1.php?categiry_id=<? echo $_GET['categiry_id'] ?>&amp;subcat=<? echo $catrow['subcot_id'] ?>" class="top_linkslax"> <?php echo stripslashes($catrow['subcot_name']) ?> </a> </td>
                              <td class="dataTableContent" align="center">&nbsp;</td>
                              <td class="dataTableContent" align="center">&nbsp;</td>
                              <td class="dataTableContent" align="center" width="53">
                              
   
   
     <? if($catrow['status']==0){?>
    <a href="subcategoryinsert1.php?action=status&categiry_id=<? echo $catrow['categiry_id']; ?>&subcat=<? echo $catrow['subcot_id']; ?>&status=1">
			<img src="images/icon_red_on.gif" alt="Status - Disabled" title=" Status - Disabled" border="0" />			</a> 
			<? } else {?>
            
             <a href="subcategoryinsert1.php?action=status&categiry_id=<? echo $catrow['categiry_id']; ?>&subcat=<? echo $catrow['subcot_id']; ?>&status=0">
			<img src="images/icon_green_on.gif" alt="Status - Disabled" title=" Status - Enabled" border="0" />			</a> 
            <? } ?>                               </td>
                              <td class="dataTableContent" align="center"><a href="addsubcategory1.php?edit=edit&amp;categiry_id=<? echo $_GET['categiry_id']?>&amp;subcat=<? echo $catrow['subcot_id'] ?>"> <img src="images/icon_edit.gif" alt="Edit" title=" Edit " border="0" style="padding-left:5px; padding-right:5px;"> </a> <a href="addsubcategory1.php?sdelete=sdelete&amp;categiry_id=<? echo $_GET['categiry_id']?>&amp;subcat=<? echo $catrow['subcot_id'] ?>"> <img src="images/icon_delete.gif" alt="Delete" title=" Delete " border="0" style="padding-left:5px; padding-right:5px;"> </a> 
                                
                                
                               <?php /*?> <? if($catrow['mtitle']==""){?>
                                <a href="addsubcategory1.php?seo=seo&catid=<? echo $catrow['categoryid']; ?>&subcat=<? echo $catrow['subcat_id']; ?>">
                                  <img src="images/icon_edit_metatags_off.gif" alt="Meta Tags Undefined" title=" Meta Tags Undefined " border="0" style="padding-left:5px; padding-right:5px;" />          </a>	
                                <? } else
		  {?>
                                
                                <a href="addsubcategory.php?seoedit=seoedit&catid=<? echo $catrow['categoryid'];?>&subcat=<? echo $catrow['subcat_id']; ?>"><?php */?>
                                  <?php /*?><img src="images/icon_edit_metatags_on.gif" alt="Meta Tags Defined" title="Meta Tags Defined" border="0" style="padding-left:5px; padding-right:5px;" />         </a>
                                <? } ?><?php */?>                               </td>
                              </tr>
                            <? } ?>
                            <!---->
							
							
							
							
							
							
							
                           <?php /*?> <?
	  $sqlpro="Select * from products1 where categeryid=".$_GET['categiry_id']." and subcetid=0";
				 $exesqlpro=mysql_query($sqlpro);
				 
			
				 
				 
		  while($prodrow=mysql_fetch_array($exesqlpro))
			 {		
			
		
                                         
			
		?>
                            <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">
                              <td class="dataTableContent" align="center" width="37">&nbsp;</td>
                              <td class="dataTableHeadingContent" style="padding-left:15px;">&nbsp;</td>
                              <td class="dataTableContent" align="left" style="padding-left:35px;">
							  
					      
							  
							  
							  </td>
                              <td class="dataTableContent" align="center"  style="padding-left:5px;">&nbsp;</td>
                              <td class="dataTableContent" align="center" width="53">&nbsp;</td>
                              <td class="dataTableContent" align="center">&nbsp;</td>
                              </tr>
                            <? }
							
						
							
							?><?php */?>
                            <!---->
                        </table></td>
                      </tr>
                      <tr>
                       
                        <td width="13%" align="center"><a href="addcategory1.php"> <img src="images/button_back.gif" alt="Back" border="0" title="Back" /></a></td>
                        <td width="17%" align="left"><a href="addsubcategory1.php?subcat=subcat&amp;categiry_id=<? echo $_GET['categiry_id'] ?>"> <img src="images/button_new_category1.gif" alt="New SubSub Category" border="0" title="New SubSub Category"/></a></td>
                        <td width="17%">&nbsp;</td>
                        <td width="53%"></td>
                      </tr>
                    </table></td>
                    <td width="30%" valign="top">
				   
			
				   
				   <? if($_GET['subcat']=='subcat')
				    {?>
				    	
 					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
             <form method="post" action="subcategoryinsert1.php?action=add&catid=<? echo $_GET['categiry_id'] ?>" enctype="multipart/form-data" onsubmit="return validatesub(this);">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Add New Sub Category</td>
                        </tr>
                        <tr>
                          <td align="center"><strong><span id="errorMessage"></span></strong>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;"><strong>Sub Category Name:</strong></td>
                        </tr>
                        <tr>
                          <td align="center"><span style="padding-left:25px;">
   <input type="text" name="subcategory" id="subcategory"  
   value="<?php echo htmlspecialchars(stripslashes($_GET['subcategory']),ENT_QUOTES) ?>" size="18" />
                          </span></td>
                        </tr>
                        <tr>
                          <td align="left"><?php if($_GET['error'])
				  {
				  echo "<font color=#FF0000>";
				     echo 'Sub Category Already Exists';
					  echo "</font>";
					 
					 } ?>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><strong>Sub Category Description:</strong></td>
                        </tr>
                        <tr>
                          <td align="center">
				<textarea name="subcatdes"  id="description1" wrap="soft" cols="35" rows="10"></textarea>
				<script language="javascript1.2">
generate_wysiwyg('description1');
</script>
				
				</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
						 <tr>
                          <td height="20" align="center" style="padding-left:5px;"><strong>Sub Category Image:</strong></td>
                        </tr>
                        <tr>
                          <td align="center"><span style="padding-left:25px;">
   <input name="file" id="file"  type="file" />
                          </span></td>
                        </tr>
						  <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><label>
                          <input name="image" type="image" src="images/button_save.gif" width="65" height="22" />
                          </label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
				
					<? }  elseif($_GET['sadd']=='sadd'){?>
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
             <form method="post" action="subcategoryinsert1.php?action=add&categiry_id=<? echo $_GET['categiry_id'] ?>" enctype="multipart/form-data">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Add New Sub Category</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                          <tr>
                          <td height="20" align="center" style="padding-left:5px;"><span class="style2"><img src="images/tick.gif" />Sub Category Added Successfully</span></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><a href="addsubcategory1.php?subcat=subcat&categiry_id=<? echo $_GET['categiry_id'] ?>">	
					<img src="images/button_new_category1.gif" alt="New Sub Category" border="0" title="New Sub Category"/></a></td>
                        </tr>
                    
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
					
					
							<? }  elseif($_GET['padd']=='padd'){?>
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
             <form method="post" action="subcategoryinsert1.php?action=add&catid=<? echo $_GET['categiry_id'] ?>" enctype="multipart/form-data">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Add New Product</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                          <tr>
                          <td height="20" align="center" style="padding-left:5px;"><span class="style2"><img src="images/tick.gif" />Product Added Successfully</span></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><a href="addproduct1.php?catid=<? echo $_GET['catid'] ?>">	
					<img src="images/button_new_product.gif" alt="New Product" border="0" title="New Product" />
					</a></td>
                        </tr>
                    
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
					
					
					<?  }  elseif($_GET['pedit']=='pedit'){?>
					
					
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
             <form method="post" action="subcategoryinsert1.php?action=add&catid=<? echo $_GET['catid'] ?>" enctype="multipart/form-data">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Edit  Product</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                          <tr>
                          <td height="20" align="center" style="padding-left:5px;"><span class="style2"><img src="images/tick.gif" />Product Modified successfully</span></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"></td>
                        </tr>
                    
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
			
					
					<?  } elseif($_GET['edit']=='edit')
			         {
				$sql="Select * from tblsubcategories1 where subcot_id=".$_GET['subcat']; 
					  $sqlexe=mysql_query($sql);
					  $row=mysql_fetch_array($sqlexe);
					  
					?>	
					
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
             <form method="post" action="subcategoryinsert1.php?action=edit" enctype="multipart/form-data" onsubmit="return editvalidatesub(this);">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent"> Edit Sub Category</td>
                        </tr>
                        <tr>
                          <td align="center"><strong><span id="errorMessage"></span></strong>&nbsp;</td>
                        </tr>
                        <tr>
                         <td height="20" align="center" style="padding-left:5px;">
			<span class="style2"><?php if($_GET['suc'])
				  {
				 
				     echo "<img src=\"images/tick.gif\" />";
					 
					 echo 'Modified successfully';
					
					 
					 } ?></span></td>
                        </tr>
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;"><strong>Sub Category Name:</strong></td>
                        </tr>
                        <tr>
                          <td align="center"><span style="padding-left:25px;">
			 <input type="text" name="subcategory" id="subcategory"  
	  value="<?php echo htmlspecialchars(stripslashes($row['subcot_name']),ENT_QUOTES)  ?>" size="22" />
	  
	  <input type="hidden" name="catid" value="<? echo $_GET['categiry_id']; ?>"  />
	  
	   <input type="hidden" name="subcat" value="<? echo $row['subcot_id']; ?>"  />
	  </span></td>
                        </tr>
                        <tr>
                          <td align="left"><?php if($_GET['error'])
				  {
				  echo "<font color=#FF0000>";
				     echo 'Category Already Exists';
					  echo "</font>";
					 
					 } ?>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><strong>Sub Category Description: </strong></td>
                        </tr>
                        <tr>
                          <td align="center">
				<textarea name="subcatdes" id="description1" wrap="soft" cols="35" rows="10"><? echo stripslashes($row['description']); ?></textarea>
				
				<script language="javascript1.2">
generate_wysiwyg('description1');
</script></td>
                        </tr>
                         <tr>
                          <td align="center"><strong>Sub Category Image: </strong></td>
                        </tr>
						
						  <tr>
                          <td align="center"><span style="padding-left:25px;"><input name="file" id="file"  type="file" /></span></td>
                        </tr>
						   <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
						
						     <tr>
                          <td align="center"><img src="../subcat/<? echo $row['subcot_id'];?>.gif" width="100" height="100"  />&nbsp;</td>
                        </tr>
						
						     <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
						
                        <tr>
                          <td align="center"><label>
                          <input name="image" type="image" src="images/button_edit.gif" width="65" height="22" />
                          </label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
					
						<? } elseif($_GET['delete']=='delete')
			      
				   {?>
				
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
               <form method="post" action="productinsert1.php?action=delete" enctype="multipart/form-data">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Delete Product</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">
						  <input type="hidden" name="catid" value="<?  echo $_GET['catid']; ?>"/>
						  
						 
							
							<input type="hidden" name="prodid" value="<? echo $_GET['prodid']; ?>" />
						  
						  &nbsp;</td>
                        </tr>
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;">Are you sure you want to delete this Product?&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">
					   
					  
					   <input type="image" src="images/button_delete.gif" border="0" />
						
						
						
					</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                      
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
						</form>
                    	
                    </table>
					
					<? } elseif($_GET['pdel']=='pdel')
			      
				   {?>
					
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
               
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Delete Product</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><span class="style2"><img src="images/delete.gif"/>Deleted successfully</span></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                      
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
					
                    	
                    </table>
					
					<? } elseif($_GET['sdelete']=='sdelete')
			         {?>
					
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
               <form method="post" action="subcategoryinsert1.php?action=delete" enctype="multipart/form-data">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Delete sub Category</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">
						  <input type="hidden" name="catid" value="<?  echo $_GET['categiry_id']; ?>"/>
						  <input type="hidden" name="subcat" value="<? echo $_GET['subcat']; ?>" />
						  
						  &nbsp;</td>
                        </tr>
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;">Are you sure you want to delete this sub category?&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">
					   
					  
					   <input type="image" src="images/button_delete.gif" border="0" />
						
						
						
					</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                      
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
						</form>
                    	
                    </table>	
					
					<? } elseif($_GET['cdel']=='cdel')
			      
				   {?>
					
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
               
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Delete Sub Category</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><span class="style2"><img src="images/delete.gif"/>Deleted successfully</span></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                      
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
					
                    	
                    </table>
					
					<? } elseif($_GET['seo']=='seo')
					
					{?>
                    
         <!---->   
         <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
     <form method="post" action="subcategoryinsert1.php?action=metatag" enctype="multipart/form-data">
                        <tr>
                          <td height="18" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent"> Categories Meta Tags Definitions</td>
                        </tr>
                        <tr>
                          <td align="center"><strong><span id="errorMessage"></span></strong>&nbsp;</td>
                        </tr>
                       
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left"><span style="padding-left:45px;">
			 <strong>Title:</strong>
			
	  
	  <input type="hidden" name="catid" value="<? echo $_GET['catid']; ?>"  />
       <input type="hidden" name="subcat" value="<? echo $_GET['subcat']; ?>"  />
      
      
                          </span></td>
                        </tr>
						<tr>
                          <td align="right"> <textarea name="mtitle" id="mtitle" cols="35" rows="10" /></textarea></td>
                        </tr>
                        <tr>
                          <td align="left"></td>
                        </tr>
                        <tr>
                          <td align="left" style="padding-left:45px;"><strong>Keywords:</strong> </td>
                        </tr>
                        <tr>
                          <td align="right"><textarea name="mkeywords" id="mkeywords" wrap="soft" cols="35" rows="10"></textarea></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                          <tr>
                          <td align="left" style="padding-left:45px;"><strong>Description: </strong></td>
                        </tr>
                        <tr>
                          <td align="right">
				<textarea name="mdescription" id="mdescription" wrap="soft" cols="35" rows="10"></textarea></td>
                        </tr>


                        <tr>
                          <td align="center">
                            <p>&nbsp;                              </p>
                            <p>
                            <input name="image" type="image" src="images/button_save.gif" width="65" height="22" />
                            
                                         <a href="addsubcategory.php?catid=<? echo $_GET['catid']; ?>"><img src="images/button_cancel.gif"  border="0"/></a>
                              
    
                            
                            </p></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
                    <? } elseif($_GET['seoedit']=='seoedit')
					
					{
						
				  $sql="Select * from tblsubcategories where subcat_id=".$_GET['subcat']; 
					  $sqlexe=mysql_query($sql);
					  $row=mysql_fetch_array($sqlexe);		
						
						
						?>
   <!---->
    
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
     <form method="post" action="subcategoryinsert.php?action=metatag" enctype="multipart/form-data">
                        <tr>
                          <td height="18" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent"> Categories Meta Tags Definitions</td>
                        </tr>
                        <tr>
                          <td align="center"><strong><span id="errorMessage"></span></strong>&nbsp;</td>
                        </tr>
                       
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;"><?php if($_GET['suc'])
				  {
				 
				     echo "<img src=\"images/tick.gif\" />";
					 
					echo 'Meta Tag Added Successfully';
					
					 
					 } ?>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left"><span style="padding-left:45px;">
			 <strong>Title:</strong>
			
	  
		  <input type="hidden" name="catid" value="<? echo $_GET['catid']; ?>"  />
       <input type="hidden" name="subcat" value="<? echo $_GET['subcat']; ?>"  />
                          </span></td>
                        </tr>
						<tr>
                          <td align="right">
                    <textarea name="mtitle" id="mtitle" cols="35" rows="10" /><?php echo htmlspecialchars(stripslashes($row['mtitle']),ENT_QUOTES)  ?></textarea></td>
                        </tr>
                        <tr>
                          <td align="left"></td>
                        </tr>
                        <tr>
                          <td align="left" style="padding-left:45px;"><strong>Keywords:</strong> </td>
                        </tr>
                        <tr>
                          <td align="right">
                    <textarea name="mkeywords" id="mkeywords" wrap="soft" cols="35" rows="10"><? echo stripslashes($row['mkeywords']); ?></textarea></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                          <tr>
                          <td align="left" style="padding-left:45px;"><strong>Description: </strong></td>
                        </tr>
                        <tr>
                          <td align="right">
				<textarea name="mdescription" id="mdescription" wrap="soft" cols="35" rows="10"><? echo stripslashes($row['mdescription']); ?></textarea></td>
                        </tr>


                        <tr>
                          <td align="center">
                            <p>&nbsp;                              </p>
                            <p>
                            
                            
                              <input name="image" type="image" src="images/button_save.gif" width="65" height="22" />
                              
                    <a href="addsubcategory.php?catid=<? echo $_GET['catid']; ?>"><img src="images/button_cancel.gif"  border="0"/></a>
                              
                            </p></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
    
    
    
    	<? } elseif($_GET['seop']=='seop')
					
					{?>
    
    <!---->
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
     <form method="post" action="productinsert.php?action=metatag" enctype="multipart/form-data">
                        <tr>
                          <td height="18" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent"> Categories Meta Tags Definitions</td>
                        </tr>
                        <tr>
                          <td align="center"><strong><span id="errorMessage"></span></strong>&nbsp;</td>
                        </tr>
                       
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left"><span style="padding-left:45px;">
			 <strong>Title:</strong>
			
	  
	  <input type="hidden" name="catid" value="<? echo $_GET['catid']; ?>"  />
       <input type="hidden" name="prodid" value="<? echo $_GET['prodid']; ?>"  />
      
      
                          </span></td>
                        </tr>
						<tr>
                          <td align="right">
                    <textarea name="mtitle" id="mtitle" cols="35" rows="10" /></textarea></td>
                        </tr>
                        <tr>
                          <td align="left"></td>
                        </tr>
                        <tr>
                          <td align="left" style="padding-left:45px;"><strong>Keywords:</strong> </td>
                        </tr>
                        <tr>
                          <td align="right"><textarea name="mkeywords" id="mkeywords" wrap="soft" cols="35" rows="10"></textarea></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                          <tr>
                          <td align="left" style="padding-left:45px;"><strong>Description: </strong></td>
                        </tr>
                        <tr>
                          <td align="right">
				<textarea name="mdescription" id="mdescription" wrap="soft" cols="35" rows="10"></textarea></td>
                        </tr>


                        <tr>
                          <td align="center">
                            <p>&nbsp;                              </p>
                            <p>
                            <input name="image" type="image" src="images/button_save.gif" width="65" height="22" />
                            
                            <a href="addsubcategory.php?catid=<? echo $_GET['catid']; ?>"><img src="images/button_cancel.gif"  border="0"/></a>
                              
    
                            
                            </p></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
    
       <? } elseif($_GET['seopedit']=='seopedit')
					
					{
						
				$sql="select * from products where pid=".$_GET['prodid'];
			 $result = mysql_query($sql) or die('Cannot get product. ' . mysql_error());
			 $row    = mysql_fetch_assoc($result);	
						
						
						?>
   <!---->
    
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
     <form method="post" action="productinsert.php?action=metatag" enctype="multipart/form-data">
                        <tr>
                          <td height="18" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent"> Categories Meta Tags Definitions</td>
                        </tr>
                        <tr>
                          <td align="center"><strong><span id="errorMessage"></span></strong>&nbsp;</td>
                        </tr>
                       
                        <tr>
                          <td height="20" align="center" style="padding-left:5px;"><?php if($_GET['suc'])
				  {
				 
				     echo "<img src=\"images/tick.gif\" />";
					 
					echo 'Meta Tag Added Successfully';
					
					 
					 } ?>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left"><span style="padding-left:45px;">
			 <strong>Title:</strong>
			 
	  
		  <input type="hidden" name="catid" value="<? echo $_GET['catid']; ?>"  />
       <input type="hidden" name="prodid" value="<? echo $_GET['prodid']; ?>"  />
                          </span></td>
                        </tr>
						 <tr>
                          <td align="right">
                    <textarea name="mtitle" id="mtitle" cols="35" rows="10" /><?php echo htmlspecialchars(stripslashes($row['mtitle']),ENT_QUOTES)  ?></textarea></td>
                        </tr>
                        <tr>
                          <td align="left"></td>
                        </tr>
                        <tr>
                          <td align="left" style="padding-left:45px;"><strong>Keywords:</strong> </td>
                        </tr>
                        <tr>
                          <td align="right">
                    <textarea name="mkeywords" id="mkeywords" wrap="virtual" cols="35" rows="10"><? echo stripslashes($row['mkeywords']); ?></textarea></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                          <tr>
                          <td align="left" style="padding-left:45px;"><strong>Description: </strong></td>
                        </tr>
                        <tr>
                          <td align="right">
				<textarea name="mdescription" id="mdescription" wrap="soft" cols="35" rows="10"><? echo stripslashes($row['mdescription']); ?></textarea></td>
                        </tr>


                        <tr>
                          <td align="center">
                            <p>&nbsp;                              </p>
                            <p>
                            
                            
                              <input name="image" type="image" src="images/button_save.gif" width="65" height="22" />
                              
                                  <a href="addsubcategory.php?catid=<? echo $_GET['catid']; ?>"><img src="images/button_cancel.gif"  border="0"/></a>
                              
                            </p></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
    <? }elseif($_GET['action']=='new')
					
					{?>     
					
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
       <form action="import1.php" name="upload" method="post" enctype="multipart/form-data"  onsubmit="return excellvalid(this.csv);">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Upload CSV File</td>
                        </tr>
						 <tr>
                          <td align="center"><strong><span id="errorMessage"></span></strong></td>
                        </tr>
                        <tr>
                          <td>Upload CSV File For Bulk Uploading of Products</td>
                        </tr>
						 <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
						
                          <tr>
                          <td height="20" align="center"><input type="file" name="csv" /></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">
						  <input type="hidden" name="catid" value="<?=$_GET['catid']?>" />
						
						  
						  <input type="image" name="zing" src="images/button_insert.gif" />
						</td>
                        </tr>
                    
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
					<? }  elseif($_GET['msg']!=""){?>
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
             <form method="post" action="subcategoryinsert.php?action=add&catid=<? echo $_GET['catid'] ?>" enctype="multipart/form-data">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">csv file.Data inserted successfully</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                          <tr>
                          <td height="20" align="center" style="padding-left:5px;">Found a total of <? echo $_GET['msg'];  ?>  records in this csv file.Data inserted successfully</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><a href="addsubcategory.php?catid=<?=$_GET['catid']?>&action=new">
<img src="images/uploadcsv.jpg" width="105" height="22" border="0" alt="Upload CSV"  title="Upload CSV"/></a>
					</td>
                        </tr>
                    
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
					
					
					
					
					
					
					<? } elseif($_GET['action']=='edit')
					
					{?>     
					
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
       <form action="editimport1.php" name="upload" method="post" enctype="multipart/form-data"  onsubmit="return excellvalid(this.csv);">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">Edit CSV File</td>
                        </tr>
						 <tr>
                          <td align="center"><strong><span id="errorMessage"></span></strong></td>
                        </tr>
                        <tr>
                          <td>Upload CSV File For Bulk Uploading of Products</td>
                        </tr>
						 <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
						
                          <tr>
                          <td height="20" align="center"><input type="file" name="csv" /></td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center">
						  <input type="hidden" name="catid" value="<?=$_GET['catid']?>" />
						
						  
						  <input type="image" name="zing" src="images/button_insert.gif" />
						</td>
                        </tr>
                    
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
					<? }  elseif($_GET['msg1']!=""){?>
					<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F1EE">
             <form method="post" action="subcategoryinsert.php?action=add&catid=<? echo $_GET['catid'] ?>" enctype="multipart/form-data">
                        <tr>
                          <td height="17" align="center" bgcolor="#D7D6CC" class="dataTableHeadingContent">csv file.Data Edit successfully</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="left">&nbsp;</td>
                        </tr>
                          <tr>
                          <td height="20" align="center" style="padding-left:5px;">Data Edit successfully</td>
                        </tr>
                        <tr>
                          <td align="center">&nbsp;</td>
                        </tr>
                        <tr>
                          <td align="center"><a href="addsubcategory.php?catid=<?=$_GET['catid']?>&action=edit"><img src="images/editcss.jpg" width="105" height="22" border="0" alt="Edit CSV"  title="Edit CSV"/></a>
					</td>
                        </tr>
                    
                        <tr>
                          <td align="center"><label></label></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                    	</form>
                    </table>
					<? }?>
					
					
					
					
					
					
					
					
					
					
					
					
					</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>
