   
<div class="row">
    <div class="col-sm-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h6 class="panel-title"><i class="fa fa-table"></i> Teacher Information</h6>
                <a href="<?php echo site_url('everbright/teacher_add'); ?>" class="pull-right btn btn-circle btn-xs btn-default"><i class="fa fa-plus"></i>Add</a>
            </div>
            <div class="datatable">
                <table class="table table-bordered table-hover">
                    <thead><tr>
                        <th>Serial</th>                        
                        <th>Name</th> 
						<th>Picture</th> 						
						<th>Designation</th>
						<th>Education</th>
						<th>Teaching Subject</th>
						<th>Contact Number</th>
                        <th>Edit</th>
                    </tr></thead>
                    <tbody>
                        <?php 
                        $query = $this->main_model->teacher();
                        foreach($query as $row):
                        ?>
                        <tr>
                            <td><?php echo $row['serial']; ?></td>
							<td><?php echo $row['name']; ?></td>
                            <td><img width="80" src="<?php echo base_url();?>uploads/<?php echo $row['image']; ?>"></td>
							<td>
							
								<?php 
									$query111 = $this->main_model->desig();
									foreach($query111 as $row123):
								?>
								<?php if($row['designation']==$row123['did']): ?><?php echo $row123['name']; ?><?php endif; ?>
                            <?php endforeach; ?>
							
							
							
							</td>
							<td><?php echo $row['education']; ?></td>
							<td><?php echo $row['t_department']; ?></td>
                            <td><?php echo $row['contact']; ?></td>
                           <td class="center">
                                <a href="<?php echo site_url('everbright/teacher_edit/'.$row['tid']); ?>" class="btn btn-icon"><i class="fa fa-edit"></i> Info</a>
                                <a href="<?php echo site_url('everbright/teacher_edit_picture/'.$row['tid']); ?>" class="btn btn-icon"><i class="fa fa-edit"></i> Picture</a>
								<a href="<?php echo site_url('everbright/teacher_delete/'.$row['tid']); ?>" class="btn btn-icon"><i class="fa fa-try"></i> Delete</a>
                            </td>
                        </tr>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>