<div class="panel panel-default">
	<div class="panel-heading panel-heading-transparent">
		<strong>Search Trainer</strong>
	</div>
	<form method="post" action="trainersearch">
		<div class="row">
			<div class="form-group">

			<div class="col-md-3 col-sm-12">
				<input type="email" class="form-control" name="email" id="demo-email"<?php  if($email){ echo "value=$email";} ?> placeholder="Email" required />
			</div>
			<!-- Break -->
			<div class="col-sm-3 col-sm-12">
				<input type="submit" value="Search" class="form-control btn btn-primary" />
			</div>
		</div>

		</div>
	</form>
<?php
 if($fetched){
 if($trainer){

  ?>


  <div class="panel-body">
		<table id="user" class="table table-bordered table-striped">
			<tbody> 
				<tr>         
					<td width="10%"><b>Name:</b></td>
					<td width="60%"><?php echo $trainer['title'].' '.$trainer['firstName'].' '.$trainer['secondName'].' '.$strainer['surName'] ;       ?></td>
				</tr>
				<tr> 
					<td><b>Qualifications</b></td>
					<td><?php echo $trainer['qualification'];?></td>
				</tr>
				<tr>
					<td><b>Filed</b></td>
					<td><?php echo $trainer['specialization'];  ?></td>
				</tr>
				<tr>
					<td><b>Years of Experience:</b>:</td>
					<td><?php echo $trainer['yearsOfExperience'] ;?></td>
				</tr>
				<tr>
					<td><b>CV</b></td>
					<td><a class="btn btn-blue" href="<?php  echo base_url('public/images/cvs/'.$trainer['cv']) ;   ?>" target="_blank"><i class="fa fa fa-file-pdf-o"></i> View CV</a> </td>
				</tr>
				<tr>
					<td><b>Employer Phone:</b></td>
					<td><?php echo $trainer['phone'];?></td>
				</tr>
				<tr>
					<td><b>Emaployer Email:</b></td>
					<td><?php echo $trainer['email'];?></td>
				</tr>
				<tr>
					<td><b>Personal Comment</b></td>
					<td><?php echo $trainer['comment'];  ?></td>
				</tr>
				<tr>
					<td><strong>Trainer Status:</strong></td>
					<td><span class="label label-success"><i class="fa fa-check"></i> Approved</span></td>
				</tr>
			</tbody>
		</table>
	</div>
</div>
								

<?php
} else{

echo "<p>No details were obtained for email: $email</p>";
}


} ?>