<?php  
require "commonincludefiles.php";
if($_SESSION["cCompany_id"]!="" && isset($_SESSION["cCompany_id"]))
{
	$objSupportInquiryMgmt = new clsMgmt();
	
	
	$objSupportInquiryMgmt ->customer_orgname       = $_REQUEST["customer_idhedden"] ;

	$objSupportInquiryMgmt ->cust_id       = $_REQUEST["cust_id"] ;
	$objSupportInquiryMgmt ->date1 = $_REQUEST['date1'] ;
	//$objSupportInquiryMgmt ->customer_orgname = $_REQUEST['customer_orgname'] ;
	$objSupportInquiryMgmt ->address	= $_REQUEST['address'];
	$objSupportInquiryMgmt ->commu_person	= $_REQUEST['commu_person'];	
	$objSupportInquiryMgmt ->mobno	= $_REQUEST['mobno'];	
	$objSupportInquiryMgmt ->problem_det	= $_REQUEST['problem_det'];	
	$objSupportInquiryMgmt ->completed_det	= $_REQUEST['completed_det'];	
	$objSupportInquiryMgmt ->status	= $_REQUEST['status'];
	$objSupportInquiryMgmt ->pending_reason	= $_REQUEST['pending_reason'];
	$objSupportInquiryMgmt ->pending_work	= $_REQUEST['pending_work'];			
	$objSupportInquiryMgmt->userid  	= $_REQUEST["userid"] ;
   // $objSupportInquiryMgmt ->customer_id       = $_REQUEST["customer_id"] ;
   	//$objSupportInquiryMgmt ->customer_id       = $_REQUEST["customer_idhedden"] ;
  // $objEmployee->company_id              		= $_SESSION["cCompany_id"] ;
	
   
   //	if($objSupportInquiryMgmt->cust_id=="0" || $objSupportInquiryMgmt->cust_id==""){
	
	if($objSupportInquiryMgmt->cust_id=="0" || $objSupportInquiryMgmt->cust_id==""){
	
		$objSupportInquiryMgmt->add();
					 				
	}
	else{
		
		$objSupportInquiryMgmt->edit();
		
		
	}						
	echo '{"success":"true","msg":""}';
}
else {
	echo '{"success":"false","msg":"session expiry"}';
}	         
?>