<?php
	session_start();

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

	
	include("connect.php");
	date_default_timezone_set("Asia/Kolkata");
	$mdate= date('Y-m-d H:i:s');
	
	$umid = $_SESSION['umid'];
	$dmrejectremark = $_POST['dmrejectremark'];
	$appeovestatus = $_POST['appeovestatus'];
	
	if($appeovestatus == 1)
	{
				 $eve1 = "update res_dmdesign_master set aprovedby=$umid,aprovedon='$mdate',appeovestatus=$appeovestatus where dmdmid=".$_POST['dmdmid'];
	}else{
		
				 $eve1 = "update res_dmdesign_master set submittedby=0,appeovestatus=$appeovestatus,dmrejectremark='$dmrejectremark' where dmdmid=".$_POST['dmdmid'];
	}
	
				
				$re1 = mysqli_query($conn, $eve1);
			
	$_SESSION['msg'] = "Design Approved";
	
	
		header('Location: dmdesign.php');
	
?>