<div class="content-header">
    <div class="header-section">
        <h1>
        <i class="fa fa-deaf" aria-hidden="true"></i><strong>Leave Of Absence</strong><br><small>Human Resources Department | &copy; <?php echo SITE_NAME?></small>
        </h1>
    </div>
</div>
<ol class="breadcrumb breadcrumb-top">
  <li><a href="<?php echo SITE_URL?>/index.php"><i class="fa fa-home"></i></a></li>
  <li><a href="<?php echo SITE_URL?>/index.php/loa">Leave of Absence</a></li>
</ol>
<div class="row">
	<div class="col-md-12">
		<div class="block">
			<div class="block-title">
				<h3>Our LOA Policy</h3>
			</div>
			<p>
				<ol>
     					<li>The Pilot is allowed to take a leave up to 90 days, but once the leave period is over, he/she is required to fly.</li>
     					<li>The Pilot can return back to duty at anytime.</li>
     					<li>If the Pilot is free for a brief amount of time and wants to utilize that time for Flying at <?php echo SITE_NAME?>, he/she shall contact the respective hub manager 24 hours in advance.</li>
     					<li>During the Leave time, the pilot has the liberty to visit the iCrewCenter at his/her convenience.</li>
     					<li>Once sanctioned, the Pilot cannot request extension of leave while the current leave preiod is active, however if he/she wishes to extend his/her leave period, he/she may only do so after the current leave period is due!</li>
     				</ol>
			</p>
			<div class="well well-sm text-left">
				<h5 class="list-unstyled">
					<li><strong>Name: </strong><?php echo Auth::$pilot->firstname;?> <?php echo Auth::$pilot->lastname;?></li><br>
					<li><strong>Rank: </strong><?php echo Auth::$pilot->rank?></li><br>
					<li><strong>Pilot ID: </strong><?php echo Auth::$pilot->code; ?><?php echo Auth::$pilot->pilotid;?> </li><br>
					<li><strong>Hub: </strong><?php echo Auth::$pilot->hub;?></li><br>
					<li><strong>Email ID:</strong> <?php echo Auth::$pilot->email; ?></li><br>
					<li><strong>Account Status: </strong>	<?php
					$status = $pilot->retired;
					if ($status < 1)
					{
					 	echo'<span class="label label-success"><i class="fa fa-check"></i> Active </span>';
					}
					else
					{
						echo '<span class="label label-danger"><i class="gi gi-power"></i> On Leave </span>';
					}
					?></li>
				</h5>
			</div>

		</div>
	</div>
	<div class="col-md-12">
		<div class="block">
			<div class="block-title">
				<h3>Leave Form</h3>
			</div>
			<div class="alert alert-danger">
				Details regarding your LOA will be e-mailed to you. Please make sure you have the correct e-mail address, if not, change it from the Settings page.
			</div>
				<form method="post" class="form-horizontal" action="<?php echo url('/loa/submit');?>">
			<div class="form-group">
				<div class="col-md-3">
					<label class="form-group"></label>
				</div>
			</div>
				<div class="form-group">
                    <label class="col-md-3 control-label">Application filed on</label>
                    <div class="col-md-3">
                        <input type="text" class="form-control" placeholder="<?php echo date(DATE_FORMAT); ?>"disabled>
                    </div>
                </div>
                <div class="form-group">

                    <label class="col-md-3 control-label">On Leave till</label>
                    <div class="col-md-3">
                    	<input type="text" id="example-datepicker" name="date" class="form-control input-datepicker" data-date-format="mm/dd/yyyy" placeholder="mm/dd/yyyy">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-3 control-label">Reason for Leave</label>
                    <div class="col-md-3">
                        <textarea name="reason" class="form-control" cols="25" rows="5"></textarea>
                    </div>
                </div>
                <div class="form-group">
                	<div class="col-md-3">

                	</div>
                    <div class="col-md-3">
                       &nbsp;&nbsp; <input type="submit" class="btn btn-info form-group" value="Submit!"/>
                    </div>
                </div>
                </form>
                	</div>
</div>
</div>
	<!--	<td><strong>Start Date: </strong></td>
		<td><?php echo date("Y-m-d"); ?><td>
	</tr>
	<tr>
		<td><strong>End Date: </strong></td>
		<td>
			<select name="month">
			<option value='1'>January</option>
			<option value='2'>February</option>
			<option value='3'>March</option>
			<option value='4'>April</option>
			<option value='5'>May</option>
			<option value='6'>June</option>
			<option value='7'>July</option>
			<option value='8'>August</option>
			<option value='9'>September</option>
			<option value='10'>October</option>
			<option value='11'>November</option>
			<option value='12'>December</option>
			</select>
		<select name="day">
			<?php for($i = 1; $i <=31; $i++) {
				echo "<option value='$i'>$i</option>";
			}?>

</select>
<select name='year'>

		<?php $year = date('Y');
			  $year_end = $year + 5;

				 for($i = $year ; $i < $year_end; $i++) {
				echo "<option value='$i'>$i</option>";
			}?>

	</select>


	</tr>
	<tr>
		<td><strong>Reason: </strong></td>
		<td><textarea name="reason" cols="25" rows="5"></textarea><br></td>
	</tr>
	<tr>
		<td><input type="submit" value="Submit!"/></td>

		</tr></table>


</form>
		</div>
	</div>
<p>

Your Information: <Br/>
<table border="0px" bordercolor="transparent" style="background-color:none"  cellpadding="3" cellspacing="3">
	<tr>
		<td><strong>Name</strong></td>
		<td><?php echo Auth::$userinfo->firstname;  ?><td>
	</tr>
	<tr>
		<td><strong>Surname</strong></td>
		<td><?php echo Auth::$userinfo->lastname;  ?><td>
	</tr>
	<tr>
		<td><strong>Email</strong></td>
		<td><?php echo Auth::$userinfo->email;  ?><td>
	</tr>
	<tr>
		<td><strong>Pilot ID</strong></td>
		<td><?php echo PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid) ?> <td>
	</tr>
</table>
</p>
<p>
LoA Information: <br/>
The LoA starts on the date the form is submitted and ends on the user selected date provided that the date the leave ob absence is not longer than <?php echo $leave_duration; ?> days. After that time you will agian be subjected to the inactivity policy. <br>
<hr />


<table border="0px" bordercolor="transparent" style="background-color:none"  cellpadding="3" cellspacing="3">



</p>-->
<!--&copy <?php echo  date(Y) ?> Sava Markovic - All rights reserved -->
