<?php
include("db_connection.php");
$Mainclass=new DB_Controller();

$product_category_array=explode("*",$_REQUEST['p_cate']);

$category_id = $product_category_array[0];
$category_code = $product_category_array[1];
$category_name = $product_category_array[2];


$product_size=$Mainclass->real_escapes($_REQUEST['product_size']);

$Date=date('Y-m-d H:i:s');

$Check_Exist=$Mainclass->num_check('gold_product_size_master',"SLN","Category_Id='".$category_id."' and Category_Code='".$category_code."' and Size='".$product_size."'");

if($Check_Exist==0)
{
	$Fields="`Entry_Date`,`Created_By`,`Creation_IP`,`Active`,`Category_Id`,`Category_Code`,`Category_Name`,`Size`";
	$Values="'".$Date."','".$_COOKIE['User_Name']."','".$_SERVER['REMOTE_ADDR']."','Yes','".$category_id."','".$category_code."','".$category_name."','".$product_size."'";
	$Ins=$Mainclass->Insert_Data('gold_product_size_master',$Fields,$Values);
$msg=0;//=====Exist=====//	
}
else{
	$msg=1;//=====Exist=====//
}
echo $msg;
?>