<?php
include("common/connection.php");
 $update=$_REQUEST['par2'];
 $tnaid=$_REQUEST['par3'];
 $sql_check=mysqli_fetch_array(mysqli_query($con,"select * from roster_master where Treatment_Service_Date='".$update."' and TNA_Name='".$tnaid."'"));
 if($sql_check['Duty_Hour_Start_Time']=='0000-00-00 00:00:00')
 {
 $updatedel=mysqli_fetch_array(mysqli_query($con,"delete from roster_master where Treatment_Service_Date='".$update."' and TNA_Name='".$tnaid."'"));
 }
 else
 {
	$update_roster=mysqli_query($con,"update roster_master set Offday='0',Active='0' where Treatment_Service_Date='".$update."' and TNA_Name='".$tnaid."'"); 
 }
 if($sql['Offday']=='0')
 {
 echo '1';
 }
?>