<?php
header ("Content-Type:text/xml");
include "start.php";
echo "<psync>";
//---------------------------------------------------------------------------------------------------------
  
//===========================Product================================================  
           
           
    if($_REQUEST["module"]=="CUSTOMER")
    {
        $query_sync="delete from 
                    t_".$key_table_prefix."_customer
                    where cus_code = '".$_REQUEST["code1"]."'
                    
                    ;
                    ";
				//and client_id = '".$client_id."'
        $result_sync = mysqli_query($dbconn,$query_sync) or die("Error ".mysqli_error($dbconn));
    }
    
    
    if($_REQUEST["module"]=="PRODUCT")
    {
        $query_sync="delete from 
                    t_".$key_table_prefix."_product
                    where pdt_code = '".$_REQUEST["code1"]."'
                    
                    ;
                    ";
				//and client_id = '".$client_id."'
        $result_sync = mysqli_query($dbconn,$query_sync) or die("Error ".mysqli_error($dbconn));
    }
  
  
    if($_REQUEST["module"]=="ADDON")
    {
        $query_sync="delete from 
                    t_".$key_table_prefix."_addon
                    where add_code = '".$_REQUEST["code1"]."'
                    
                    ;
                    ";
				//and client_id = '".$client_id."'
        $result_sync = mysqli_query($dbconn,$query_sync) or die("Error ".mysqli_error($dbconn));
    }
  
   
   
   if($_REQUEST["module"]=="CATEGORY")
    {
        $query_sync="delete from 
                    t_".$key_table_prefix."_category
                    where cat_code = '".$_REQUEST["code1"]."'
                    
                    ;
                    ";
				
				//and client_id = '".$client_id."'
        $result_sync = mysqli_query($dbconn,$query_sync) or die("Error ".mysqli_error($dbconn));
    }
    
    
    if($_REQUEST["module"]=="GST")
    {
        $query_sync="delete from 
                    t_".$key_table_prefix."_gst
                    where gst_code = '".$_REQUEST["code1"]."'
                    
                    ;
                    ";
				//and client_id = '".$client_id."'
        $result_sync = mysqli_query($dbconn,$query_sync) or die("Error ".mysqli_error($dbconn));
    }
    
    
    
    if($_REQUEST["module"]=="PAYMENT_MODE")
    {
        $query_sync="delete from 
                    t_".$key_table_prefix."_payment_mode
                    where pym_code = '".$_REQUEST["code1"]."'
                    
                    ;
                    ";
				//and client_id = '".$client_id."'
        $result_sync = mysqli_query($dbconn,$query_sync) or die("Error ".mysqli_error($dbconn));
    }
    
    
    
                                    
echo "<upload>
";
echo "<status>SUCCESS</status>
";
echo "<message>".str_replace("&","&amp;","Deletion Successful")."</message>
";
echo "</upload>
";

         


//---------------------------------------------------------------------------------------------------------
echo "</psync>";
?>