<div class="page-content">
	<div class="page-header position-relative">
		<h1>Display Users</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 $date['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-table1"
				class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th>S.No.</th>
						<th>Email</th>
						<th>Status</th>
						<th>Type</th>
						<th></th>
					</tr>
				</thead>

				<tbody>
										<?php
										$a = 1;
										
										foreach ( $query as $row ) {
											if($row['type']!=1){?>
										<tr>
						<td> <?php echo $a; ?> </td>
						<td> <?php echo $row['email'];?> </td>
						<td> <?php
											
											if ($row ['suspen_id'] == '0') {
												?>
							                    	
							                    		<label class='label label-success'> Active
						</label> <a
							href="<?php echo $link->link('displayuser', Admin, '?deactive_id='.$row[id]);?>">
								&nbsp; Click! To Me To De-Active </a>
								                	
							                    <?php
											
											} else {
												?>
						                    			<label class='label label-warning'>De-Active</label>
							<a
							href="<?php echo $link->link('displayuser', Admin, '?active='.$row[id]); ?>">
								&nbsp; Click! To Me To Active </a>
							                    <?php
											
											}
											?>
						</td>
						<td>
							<?php
											if ($row ['type'] == '0') {
												?>
								<?php
												$privilege = $row ['privilege'];
												$total = explode ( ",", $privilege );
												$z = 1;
												foreach ( $total as $row1 ) {
													if ($row1 == '') {
													
													} else {
													
													}
												}
												?>
									<span class="label label-important arrowed-in">Admin</span>	
								<?php
											
											}
											elseif ($row ['type'] == '2') {
												$privilege = $row ['privilege'];
												$total = explode ( ",", $privilege );
												echo '<span class="label label-info arrowed">HR Manager</span>';
											}
											elseif ($row ['type'] == '3') {
												$privilege = $row ['privilege'];
												$total = explode ( ",", $privilege );
												echo '<span class="label label-warning arrowed">HR Executive</span>';
											}	
											
											?>
						</td>
						<td class="td-actions">
							<div class="hidden-phone visible-desktop action-buttons">


								<a class="green"
									href="<?php echo $link->link('edit_displayuser', Admin, '?edit='.$row[id]);?>">
									<i class="icon-pencil bigger-130"></i>
								</a> <a class="red"
									href="<?php echo $link->link('displayuser', Admin, '?delete='.$row['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
											href="<?php echo $link->link('edit_displayuser', Admin, '?edit='.$row[id]);?>"
											class="tooltip-success" data-rel="tooltip" title="Edit"> <span
												class="green"> <i class="icon-edit bigger-120"></i>
											</span>
										</a></li>

										<li><a
											href="<?php echo $link->link('displayuser', Admin, '?delete='.$row['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-->