<?php
	session_start();
	if(!isset($_SESSION['atcrmsuloginsesion']))
	{
		header('Location: index.php');
		return;
	}
	if($_SESSION['atcrmsutype']!='Superuser'){
			header('Location: index.php');
		return;
	}

	include("connect.php");
	include("connectp.php");
	
	$dmid=(int)mysqli_real_escape_string($conn,$_GET['id']);

	$query = "delete from res_disposition_master where dmid=:dmid and brmid=1";
	$stmt = $db7->prepare($query);
	$stmt->bindParam(':dmid', $dmid);
	if($stmt->execute()==true)
	{
		$_SESSION['msg'] = "Record deleted successfully";
	}
	else{
		$_SESSION['msg1'] = "Error!";
	}
	header('Location: disposition.php');
?>