<?php
	session_start();

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

	include("connect.php");
	
	$tmid=(int)mysqli_real_escape_string($conn,$_GET['id']);
	$mumid=$_SESSION['latcmumid']; 
	$query="delete from res_ticket_master where tmid=$tmid";
	if ($conn->query($query) === TRUE)
	{
			$_SESSION['msg'] = "Record deleted successfully";
	}
	else{
		$_SESSION['msg1'] = "Error!";
	}
	header('Location: ticket.php');
	
?>