<?php
include("include/config.inc.php");
if(!isset($_SESSION['s_activId']))
{
  $_SESSION['s_urlRedirectDir'] = $_SERVER['REQUEST_URI'];
  header("Location:checkLogin.php");
}
else
{
	$to        = $_REQUEST['toDtYear']."-".$_REQUEST['toDtMonth']."-".$_REQUEST['toDtDay'];  
	$from      = $_REQUEST['fromDtYear']."-".$_REQUEST['fromDtMonth']."-".$_REQUEST['fromDtDay'];  

    if(isset($_POST['btn']))
	{
	  $deleteEntry = "UPDATE mcx
                         SET status = 'D'
                        	 WHERE transDate BETWEEN   
						  '".$to."' AND '".$from."'";
						   
	  $insertClientRes = mysql_query($deleteEntry);
	  if(!$insertClientRes)
	  {
	  	echo "Update Fail";
	  }
	  else
	  {
	    header("Location:mcxstanding.php");
	  }
	  
	}
	
	include("./bottom.php");
	$smarty->display("mcxstanding.tpl");
}
?>