<div class="page-content">
	<div class="page-header position-relative">
		<h1>
			Employees Lists <small> <i class="icon-double-angle-right"></i> With
				Calendar
			</small>

		</h1>

	</div>
	<!--/.page-header-->

	<div class="span7" id="8">
		<form class="form-horizontal" method="post" action="">
			<div class="control-group">
				<label class="control-label">Date Range:</label>
				<div class="controls">
					<div class="row-fluid input-prepend">

						<input class="span6" type="text" name="date[final]"
							id="id-date-range-picker-1"
							placeholder="<?php echo $employeedate['final']; ?>" /> <span
							class="add-on"> <i class="icon-calendar big"></i>
						</span> <input type="hidden" name="check" value="date">
						<button class="btn btn-small btn-purple" name="submit">Show</button>

					</div>
					<!-- .row-fluid input-prepend -->


				</div>
				<!-- /controls -->
			</div>
			<!-- /control-group -->
		</form>
	</div>
	<!-- /control-group -->


	<div class="row-fluid">
		<div class="span12" style="overflow: scroll;">
			<!--PAGE CONTENT BEGINS-->
			<table id="example-table"
				class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
				<thead>
					<tr>
						<th>S.No.</th>
						<th>Employee Code</th>
						<th>Department</th>
						<th>Name</th>
						<th>Surname</th>
						<th>Date Of Birth</th>
						<th></th>
					</tr>
				</thead>

				<tbody>
										<?php
										$a = 1;
										foreach ( $all as $row ) {
										
											?>
						                  <tr>
						<td> <?php echo $a; ?> </td>
						<td> <?php echo $row['e_code']; ?></td>
						<td>
							                     <?php
											$department = $db->get_col ( 'departments', array ('id' => $row ['department'] ), 'name' );
											echo $department [0];
											?> 
						                    </td>
						<td> <?php echo $row['e_name']; ?> </td>
						<td> <?php echo $row['f_name']; ?> </td>
						<td> <?php echo $row['dob']; ?> </td>
						<td class="td-actions">
							<div class="hidden-phone visible-desktop action-buttons">
								<a class="blue" title="Employee Preview"
									href="<?php echo $link->link('employee_preview',Admin, '?id='.$row['e_id']); ?>">
									<i class="icon-zoom-in bigger-130"></i>
								</a> 
								<?php 
									if($usertype[0] == 0)
									{
								?>
								<a class="green" title="View Calendar"
									href="<?php echo $link->link('calendar', Admin, '?id='.$row['e_id']);?>">
									<i class="icon-calendar bigger-130"></i>
								</a> 
								<?php }?>
								<a class="red" title="Delete"
									href="<?php echo $link->link('employee_details',Admin, '?id='.$row['e_id']); ?>">
									<i class="icon-trash bigger-130"></i>
								</a>
							</div>
							<div class="hidden-desktop visible-phone">
								<div class="inline position-relative">
									<button class="btn btn-minier btn-yellow dropdown-toggle"
										data-toggle="dropdown">
										<i class="icon-caret-down icon-only bigger-120"></i>
									</button>

									<ul
										class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">
										<li><a title="Employee Preview"
											href="<?php echo $link->link('employee_preview',Admin, '?id='.$row['e_id']); ?>"
											class="tooltip-info" data-rel="tooltip" title="View"> <span
												class="blue"> <i class="icon-zoom-in bigger-120"></i>
											</span>
										</a></li>
								<?php 
									if($usertype[0] == 0)
									{
								?>
										<li><a title="View Calendar"
											href="<?php echo $link->link('employee_details',Admin, '?id='.$row['e_id']); ?>"
											class="tooltip-success" data-rel="tooltip" title="Edit"> <span
												class="green"> <i class="icon-calendar bigger-120"></i>
											</span>
										</a></li>
								<?php }?>
										<li><a title="Delete"
											href="<?php echo $link->link('calendar', Admin, '?id='.$row['e_id']);?>"
											class="tooltip-error" data-rel="tooltip" title="Delete"> <span
												class="red"> <i class="icon-trash bigger-120"></i>
											</span>
										</a></li>
									</ul>
								</div>
							</div>
						</td>
					</tr>
										  <?php
											$a ++;
										}
										?>       
										

										
										</tbody>
			</table>

			<!--PAGE CONTENT ENDS-->
		</div>
		<!--/.span-->
	</div>
	<!--/.row-fluid-->
</div>
<!--/.page-content-->


</div>
<!--/.main-content-->