<p>&nbsp;</p>
<p style="font-size:14px;  font-weight:bold; text-align:left;">Employee Leave Management</p>
<p>&nbsp;</p>
<?php  $userid1=$s->GetFieldValue('www_users',"id='".$_SESSION['UserID']."'",'empid'); 
 if($userid1!="" && $userid1!=0){
?>
<!--<p align="left" style="margin-top:5px;"><input type="button" value="Apply For Leave" class="search" onclick="showappdiveid()" />&nbsp;&nbsp;<input type="button" value="Leave Approval" class="search" onclick="showapprdiveid()" /></p>-->
 <?php } else{ echo "<p style='font-weight:bold;font-size:14px;color: #FF0000'>This user is not added to the employee master.</p>"; } ?>
<br />
<div id="APPLEAVE">
<?php include('leave_aplication_form_new.php'); ?>
</div>
<div id="APPREAVE" style="display:none;"><?php include('LeaveApproval.php'); ?></div>


<div style="display:none" id="div_id">

</div>
<div style="display:none" id="Apply_div">
<form method="post" id="myform" onsubmit="return validateadd()">
<input type="hidden" name="branchCode" id="branchCode"  />
<div id="fetchdata"></div>		
<table width="100%" border="0" style="border:1px solid #333333;" align="right" cellspacing="0" cellpadding="3">
<tr>
	<td><strong>Leave Type</strong></td>
	<td id="LTYPE"><input type="hidden" name="leave_type" id="leave_type" value="<?php echo $leave_row['id']; ?>" />
	<input type="text" name="leave_type1" id="leave_type1" value="<?php echo $leave_row['leavename']; ?>" /></td>
</tr> 
<tr>
	<td><strong>Leave Period From</strong></td>
	<td><input type="text" name="period_from" id="period_from" class="datepicker"  onchange="return LeaveJoin(this.value,this.id);"></td>
</tr>
<tr>
	<td><strong>Leave Period To</strong></td>
	<td><input type="text" name="period_to" id="period_to" class="datepicker"  onchange="return LeaveTypeValue();" ></td>
</tr>
<tr>
	<td><strong>Leave Request</strong></td>
	<td><input type="text" name="reqleave" id="reqleave" readonly="true"></td>
</tr>
<tr>
	<td><strong>Max Leave Allow</strong></td>
	<td><input type="text" name="NoOfLeaveDays" id="NoOfLeaveDays" readonly="true"></td>
</tr>
<tr>
	<td><strong>Reason of Leave</strong></td>
	<td><textarea name="leave_reason"> <?php echo $leave_reason; ?></textarea></td>
</tr> 
</table>
</form>
</div>


<style>
.main-dialog-class .ui-widget-header{background: url("/Images/your-background.png") repeat-x scroll 34px 42px #a4cf50;font-size:14px;border:0;text-transform:uppercase}
.main-dialog-class .ui-widget-content{background-image:none;background-color:#fff}
.ViewLeaveIcon
 {

  background-image:url(images/view-leave1.png);
  width:103px;
  height:31px;
  border-width:0;
  background-color: transparent;
  cursor: pointer;
 }
 
 .ApplyLeaveIcon
 {

  background-image:url(images/apl.png);
  width:103px;
  height:31px;
  border-width:0;
  background-color: transparent;
  cursor: pointer;
 }
</style>
