<?php  
	require "commonincludefiles.php"; 
	
if ($_SESSION['VedantnrCollegeId']!="" && isset($_SESSION['VedantnrCollegeId'])) {
		
		$Objfeedback_que = new feedback_que_masterMgmt();

		$Objfeedback_que->que_id=$_POST['que_id'];
		//$Objfeedback_que->branch_id=$_POST['branch_hidden'];
		//$Objfeedback_que->semester_id=$_POST['semester_hidden'];
		//$Objfeedback_que->subject_id=$_POST['subject_hidden'];		
		$Objfeedback_que->question=$_POST['question'];
		$Objfeedback_que->ans_a=$_POST['ans_a'];
		$Objfeedback_que->ans_b=$_POST['ans_b'];
		$Objfeedback_que->ans_c=$_POST['ans_c'];
		$Objfeedback_que->ans_d=$_POST['ans_d'];		
		
		if($Objfeedback_que->que_id == "0" ||  $Objfeedback_que->que_id== ""){ 
			
			$Objfeedback_que->add();
			echo '{"success":"true","msg":"saved"}';
		} 
		else{
			if($_REQUEST[act] == "del")
			{
				$Objfeedback_que->delete();
				echo '{"success":"true","msg":"deleted"}';
			}
			else{
				$Objfeedback_que->edit();
				echo '{"success":"true","msg":"edited"}';
			}
			
		}
		
		
	} else{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>