<?php





include("checklogin.php");





include("../includes/inc.php");











if($_POST['part']=='Add_View_ProdAttr_Table_Items') {


  ?>


  <tr>   


  <td width="20%">      


  <input type="text" class="form-control prod_attribute" name="prod_attribute[]" style="text-align:left;width:250px;" value="<?php echo $_POST['prod_attribute']?>">      


  </td>


  <td><input type="text" class="form-control prod_val" name="prod_val[]" value="<?php echo $_POST['prod_val']?>" style="width: 300px;"></td>


  <td>


   <input type="hidden" class="prdslno" name="slno_arr[]" value="0">  


  <span class="float-right ml-2"> <a href="javascript:void" class="RemoveProdAttr"><i class="fa fa-trash text-danger" aria-hidden="true"></i></a></span>  


  </td>  


  </tr>


  <?php


  exit;


}





else if($_POST['part']=='Delete_ProdAttr_Table_Items') {  





  db_query("DELETE FROM product_attribute WHERE slno='".$_REQUEST['prdslno']."' ");





  echo 1;





  exit;





} 





else if($_POST['part']=='Add_View_KeyProd_Table_Items') {  





  ?>





  <tr>   





  <td width="90%">      





  <input type="text" class="form-control product_key_point" name="product_key_point[]" value="<?php echo $_POST['key_point']?>">      





  </td>  











  <td>





  <span class="float-right ml-2"> <a href="javascript:void" class="RemoveKeyProd"><i class="fa fa-trash text-danger" aria-hidden="true"></i></a></span>  





  </td>  





  </tr>





  <?php





  exit;





}





else if($_POST['part']=='Delete_KeyProdE_Table_Items') {  





  db_query("DELETE FROM product_key_point WHERE slno='".$_REQUEST['prdslno']."' ");





  echo 1;





  exit;





} 





else if($_POST['part']=='Add_Color_Table_Items') {  





  //-------------------------Color Details-------------------------





  ?>





  <tr>





  <td width="20%">





  <?php $getRArr =  Get_Fetch_Data('slno', $_POST['color'], 'color_list') ?>





  <select name="color[]" class="form-control color">





  <option value="<?php echo $_POST['color'];?>"><?php echo $getRArr['color_name'];?></option>





  </select>





  </td>





  





  <td width="20%">





  <input type="file" name="colorImg[]" style="width: 72%"><br>  





  <small>(Size:50KB Upload)</small>     





  </td>











  <td width="5%">





  <span class="float-right ml-2"> <a href="javascript:void(0)" class="RemoveColor"><i class="fa fa-trash text-danger" aria-hidden="true"></i></a></span>  





  </td>  





  </tr>





  <?php





  exit;





}





else if($_POST['part']=='Delete_Color_Table_Items') {  





  db_query("DELETE FROM product_color WHERE slno='".$_REQUEST['prdslno']."' ");





  echo 1;





  exit;





}





//-------------------------Color Details------------------------- 











else if($_POST['part']=='Add_Shape_Table_Items') {  





  //-------------------------Shape Details-------------------------





  ?>





  <tr>





  <td width="20%">





  <?php $getRArr =  Get_Fetch_Data('slno', $_POST['shape'], 'shapes_list') ?>





  <select name="shape[]" class="form-control shape">





  <option value="<?php echo $_POST['shape'];?>"><?php echo $getRArr['shapes_name'];?></option>





  </select>





  </td>





  





  <td width="20%">





  <input type="file" name="shapeImg[]" style="width: 72%"><br>  





  <small>(Size:50KB Upload)</small>     





  </td>











  <td width="5%">





  <span class="float-right ml-2"> <a href="javascript:void(0)" class="RemoveShape"><i class="fa fa-trash text-danger" aria-hidden="true"></i></a></span>  





  </td>  





  </tr>





  <?php





  exit;





}





else if($_POST['part']=='Delete_Shape_Table_Items') {  





  db_query("DELETE FROM product_shape WHERE slno='".$_REQUEST['prdslno']."' ");





  echo 1;





  exit;





}





//-------------------------Shape Details-------------------------











else if($_POST['part']=='Add_Size_Table_Items') {  





  //-------------------------Shape Details-------------------------





  ?>





  <tr>





  <td width="20%">





  <?php $getRArr =  Get_Fetch_Data('slno', $_POST['size'], 'size_list') ?>





  <select name="size[]" class="form-control size">





  <option value="<?php echo $_POST['size'];?>"><?php echo $getRArr['size_name'];?></option>





  </select>





  </td>





  





  <td width="20%">





  <input type="file" name="sizeImg[]" style="width: 72%"><br>  





  <small>(Size:50KB Upload)</small>     





  </td>











  <td width="5%">





  <span class="float-right ml-2"> <a href="javascript:void(0)" class="RemoveSize"><i class="fa fa-trash text-danger" aria-hidden="true"></i></a></span>  





  </td>  





  </tr>





  <?php





  exit;





}





else if($_POST['part']=='Delete_Size_Table_Items') {  





  db_query("DELETE FROM product_size WHERE slno='".$_REQUEST['prdslno']."' ");





  echo 1;





  exit;





}





//-------------------------Shape Details-------------------------











?>