<?php  
	require "commonincludefiles.php";
	
	if($_SESSION["VedantnrCollegeId"]!="" && isset($_SESSION["VedantnrCollegeId"]))
	{
		$objRouteMgmt = new RouteMgmt();
		$objRouteMgmt->route_id	= $_POST['route_id'];
		$objRouteMgmt->route_name = $_POST['route_name'];
		$objRouteMgmt->route_area = $_POST['route_area'];
		$objRouteMgmt->route_fees = $_POST['route_fees']; 
		
		
		if($objRouteMgmt->route_id == 0){
			$objRouteMgmt->addroute();
		}
		else{			
			if($_REQUEST['act'] == "del")
				$objRouteMgmt->deleteroute();
			else
				$objRouteMgmt->editroute();
		}
		echo '{"success":"true"}';
	}
	else
	{
		echo '{"success":"false","msg":"session expiry"}';
	}
?>