<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
else
{
	$purchId   = isset($_REQUEST['purchId']) && $_REQUEST['purchId'] != '' ? $_REQUEST['purchId'] : 0;	 

    if($purchId > 0)
	{
	  $deleteEntry = "DELETE FROM parchuran
                        WHERE  
					 purchId = ".$purchId; 
	  $insertClientRes = mysql_query($deleteEntry);
	  if(!$insertClientRes)
	  {
	  	echo "Delete Fail";
	  }
	  else
	  {
	    header("Location:purList.php");
	  }
	}  
	include("./bottom.php");
	$smarty->display("purList.tpl");
}
?>