<?php
header ("Content-Type:text/xml");
include "start.php";
echo "<psync>";
//---------------------------------------------------------------------------------------------------------
  
//===========================addon================================================  
           
                               
  
    $query_sync="INSERT INTO
                    t_".$key_table_prefix."_addon
                    (
                    add_code,
                    add_name,
                    
                    add_uom,
                    add_price,
                    add_price_2,
                    add_price_3,
                    add_price_4,
                    add_price_5,
                    
                    add_cost,
                    add_gst_code,
                    
                    add_balance,
                    add_status,
                    
                    created_date,
                    modified_date,
                    
                    client_id
                    )
                    VALUES
                    (
                    '".$_REQUEST["code"]."',
                    '".$_REQUEST["name"]."',
                    
                    '".$_REQUEST["uom"]."',
                    '".$_REQUEST["price"]."',
                    '".$_REQUEST["price_2"]."',
                    '".$_REQUEST["price_3"]."',
                    '".$_REQUEST["price_4"]."',
                    '".$_REQUEST["price_5"]."',
                    
                    '".$_REQUEST["cost"]."',
                    '".$_REQUEST["gst_code"]."',
                    
                    
                    '".$_REQUEST["balance"]."',
                    '".$_REQUEST["status"]."',
                    
                    '".$_REQUEST["created_date"]."',
                    '".$_REQUEST["modified_date"]."',
                    
                    '".$client_id."'
                    )
                    ON DUPLICATE KEY UPDATE
                    add_name = '".$_REQUEST["name"]."',
                    
                    add_uom = '".$_REQUEST["uom"]."',
                    add_price = '".$_REQUEST["price"]."',
                    add_price_2 = '".$_REQUEST["price_2"]."',
                    add_price_3 = '".$_REQUEST["price_3"]."',
                    add_price_4 = '".$_REQUEST["price_4"]."',
                    add_price_5 = '".$_REQUEST["price_5"]."',
                    
                    add_cost = '".$_REQUEST["cost"]."',
                    add_gst_code = '".$_REQUEST["gst_code"]."',
                    
                    add_balance = '".$_REQUEST["balance"]."',
                    add_status = '".$_REQUEST["status"]."',
                    created_date = '".$_REQUEST["created_date"]."',
                    modified_date = '".$_REQUEST["modified_date"]."'
                    
                    ;
                    ";
    $result_sync = mysqli_query($dbconn,$query_sync) or die("Error ".mysqli_error($dbconn));
    
                                    
echo "<upload>
";
echo "<status>SUCCESS</status>
";
echo "<message>".str_replace("&","&amp;","Upload Successful")."</message>
";
echo "</upload>
";

         


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