<?php
include('../common/db_connection.php');
$Mainclass=new DB_Controller();
$Mainclass->Employee_COOKIE_Check();
$attn_date=base64_decode($_REQUEST['d']);
?>
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
<title>Non Attendance</title>


<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> 

 <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Quicksand:500,700" rel="stylesheet">

<link rel="stylesheet" type="text/css" href="files/bower_components/bootstrap/css/bootstrap.min.css">

<link rel="stylesheet" href="files/assets/pages/waves/css/waves.min.css" type="text/css" media="all">

<link rel="stylesheet" type="text/css" href="files/assets/icon/feather/css/feather.css">

<link rel="stylesheet" type="text/css" href="files/assets/icon/themify-icons/themify-icons.css">

<link rel="stylesheet" type="text/css" href="files/assets/icon/icofont/css/icofont.css">

<link rel="stylesheet" type="text/css" href="files/assets/icon/font-awesome/css/font-awesome.min.css">

<link rel="stylesheet" type="text/css" href="files/assets/css/style.css">
<link rel="stylesheet" type="text/css" href="files/assets/css/pages.css">
 

 <style type="text/css">
#tooltip
{
text-align: center;
color: #fff;
background: #111;
position: absolute;
z-index: 100;
padding: 5px 10px;
font-size:10px !important;
line-height:12px !important;
}

#tooltip:after /* triangle decoration */
{
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #111;
content: '';
position: absolute;
left: 50%;
bottom: -10px;
margin-left: -10px;
}

#tooltip.top:after
{
border-top-color: transparent;
border-bottom: 10px solid #111;
top: -20px;
bottom: auto;
}

#tooltip.left:after
{
left: 10px;
margin: 0;
}

#tooltip.right:after
{
right: 10px;
left: auto;
margin: 0;
}

.message_maindiv{
float:left;
height:auto;
padding:15px;
background-color:#fff8e6;
text-align:left;
font-size:12px;
color:#503a27;
}

.time_border{
 border-right:1px solid #263544;
}

input.form-control{
	border-color:#ccc !important;
	
}
@media only screen and (max-width:480px){
.time_border{
 border-right:0px solid #0066FF;
}
}
 
</style>

<script>
		function check_old()
		{
			var old=$('#old').val();
			
			$.ajax({
	   url:"ajax-check_old_password.php",
	   type:"POST",
	   data:'old='+old,
	   success:function(data)
	   {
	    //alert(data);
		if(data==0)
		{
			$('#chk').show();
		}
		else if(data==1)
		{
			$('#chk').hide();
		}
	      
	   }
	});
		}
		</script>
<script>
function match()
{
	var newpass=$('#newpass').val();
	var confirm=$('#confirm').val();
	if(newpass==confirm)
	{
		$('#pass').hide();
	}
	else
	{
		$('#pass').show();
	}
}
</script>
<script>
function update_pass()
{
	var ADate=$('#ADate').val();
	var reason=$('#reason').val();
	var b=0;
	if(ADate=="")
	{
		$('#ADate').css('border-color','#FF0000');
 	  	b=1;
	}
	if(reason=="")
	{
		$('#reason').css('border-color','#FF0000');
		$('#pass1').show();
 	  	b=1;
	}
	
	if(b==1)
	{
	return false;
	}
 	else
 	{
		$.ajax({
	   url:'ajax-insert-nonattn.php',
	   type:'POST',
	   data:'ADate='+ADate+'&reason='+reason,
	   success:function(data)
	   {
		 //alert(data);  
	    alert('Attendance Request submitted');
	    window.parent.location.href="attendance-historynew.php";  
	   }
	});
}
}
</script>
<script>
	function ActiveColour(per)
{

  $('#'+per).hide();
 
}
</script>         
</head>
<body >



<div id="pcoded" class="pcoded">
<div class="pcoded-overlay-box"></div>
<div class="pcoded-container navbar-wrapper">

<?php //include('register-top-header.php'); ?>





<div class="pcoded-main-container">
<div class="pcoded-wrapper">

<?php //include('register-side-menu.php'); ?>



<div class="pcoded-content">

<div class="page-header card">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">

<div class="d-inline">
<h5 style="text-transform:uppercase; font-size:25px; font-weight:600;">Reason For Non Attendance</h5>

</div>
</div>
</div>

</div>
</div>

<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-wrapper">

<div class="page-body">
<div class="row">
<div class="col-sm-12">

<div class="card">

<div class="card-block">
 
<form method="post" class="row" style="padding-top:10px;">
                               <div class="col-sm-12"> 
							   
							   <div class="row">
							  
                               <div class="col-sm-4">
							   <label>Attendance Date</label>
                                <input name="ADate" id="ADate" type="text" class="form-control fill" style="height: 41px;" placeholder="Date" Value="<?php echo date('d-m-Y',strtotime($attn_date)); ?>" autocomplete="off" readonly>
								 <div id="chk" style="display:none; color:red;">Old password not match</div>
                               </div>
							   
							   <br/><div class="col-sm-4 form-group"><label>Reason For Non Attendance</label>
                                 <input name="reason" id="reason" type="Text" class="form-control" style="height: 80px;" placeholder="Reason for non given attendance"  autocomplete="off" >
								<div id="pass1" style="display:none; color:red;" onkeypress="ActiveColour(pass1)">Please Give Reason</div>
							   </div>
							   
							   
                                            
                               <div class="col-sm-12 form-group"><label>&nbsp;</label>
                                 <input type="button" class="btn btn-custon-rounded-three btn-primary" name="add_service" value="Submit" style="margin-top:10px; float:right;" onclick="update_pass()">
                               </div>    
                                                            
                              </div>
                             </form>
</div>
</div>










</div>
</div>
</div>

</div>
</div>
</div>
</div>

<div id="styleSelector">
</div>
</div>
</div>
</div>
</div>




<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/bower_components/jquery/js/jquery.min.js"></script>
<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/bower_components/jquery-ui/js/jquery-ui.min.js"></script>
<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/bower_components/popper.js/js/popper.min.js"></script>
<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/bower_components/bootstrap/js/bootstrap.min.js"></script>

<script src="../files/assets/pages/waves/js/waves.min.js" type="c3ff8485e8526425ac6f5b03-text/javascript"></script>

<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/bower_components/jquery-slimscroll/js/jquery.slimscroll.js"></script>

<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/bower_components/modernizr/js/modernizr.js"></script>
<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/bower_components/modernizr/js/css-scrollbars.js"></script>
<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/assets/pages/form-validation/validate.js"></script>

<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/assets/pages/form-validation/form-validation.js"></script>
<script src="files/assets/js/pcoded.min.js" type="c3ff8485e8526425ac6f5b03-text/javascript"></script>
<script src="files/assets/js/vertical/vertical-layout.min.js" type="c3ff8485e8526425ac6f5b03-text/javascript"></script>
<script src="files/assets/js/jquery.mCustomScrollbar.concat.min.js" type="c3ff8485e8526425ac6f5b03-text/javascript"></script>
<script type="c3ff8485e8526425ac6f5b03-text/javascript" src="files/assets/js/script.js"></script>


<script src="files/assets/js/rocket-loader.min.js" data-cf-settings="c3ff8485e8526425ac6f5b03-|49" defer=""></script>





</body>
</html>
<script>startTime();</script>