<?php 
	session_start();
	include("../../php_crud/my_class.php");
	$obj = new my_class();
	extract($_REQUEST);
	$date = date("d-M-y");
	$user_id = $_SESSION['LOGIN_USERID'];
	if($operation=='insert'){
		$form_data['PROBLEMTYPE']="'$problem_type_name'";
		$form_data['FLAG']="'A'";
		$form_data['CREATEBY']="'$user_id'";
		$form_data['CREATEDATE']="'$date'";
		$table_name='AQUATIC.TBLGWH_PROBLEMTYPE@AQUATIC227';
		//$where_clause="USER_ID='$user_id'";	
		$insert = $obj->Insert_Data($table_name, $form_data);
		if($insert){
			echo "1";
		}
		else{
			echo "Error";
		}
	} else if($operation=='update'){
		$form_data['PROBLEMTYPE']="'$problem_type_name'";
		$form_data['FLAG']="'$status'";
		$form_data['UPDATEBY']="'$user_id'";
		$form_data['UPDATEDATE']="'$date'";
		$table_name='AQUATIC.TBLGWH_PROBLEMTYPE@AQUATIC227';
		$where_cond="ID='$id'";	
		$insert = $obj->Update_Data($table_name, $form_data,$where_cond);
		if($insert){
			echo "1";
		}
		else{
			echo "Error";
		}
	} else if($operation=='delete'){
		$form_data['FLAG']="'D'";
		$form_data['UPDATEBY']="'$user_id'";
		$form_data['UPDATEDATE']="'$date'";
		$table_name='AQUATIC.TBLGWH_PROBLEMTYPE@AQUATIC227';
		$where_cond="ID='$id'";	
		$insert = $obj->Update_Data($table_name, $form_data,$where_cond);
		if($insert){
			echo "1";
		}
		else{
			echo "Error";
		}
	}
?>