<input type="hidden" id="baseurl" value="<?php echo base_url(); ?>" >
<div class="row">
    <div class="col-md-12">
        <div class="hs_heading medium">
            <h3>Testimonial (<?php if(!empty($all_testimonial)){ echo count($all_testimonial); }else{ echo 0; } ?>) <a href="<?= base_url('admin/testimonial') ?>" class="btn">Add new</a></h3>
        </div>
        <div class="hs_datatable_wrapper">
            <table class="hs_datatable table table-bordered">
                <thead>
                    <tr>
                        <th>#</th>
                        <th>Name</th>
                        <th>Designation</th>
                        <th>Message</th>
						<th>Image</th>
                        <th>Status</th>
			            <th>Action</th>
                    </tr>
                </thead>
                <tbody>
				<?php
				$i= 0;
				if(!empty($all_testimonial)){ 
				   foreach($all_testimonial as $testimonial){
				?>
				 <tr>
                        <td><?php echo ++$i; ?></td>
                        <td width="200">
                            <div class="hs_user">
                                <div class="user_name">
                                    <p><?php echo $testimonial->testi_name; ?></p>
								</div>
                            </div>
                        </td>
                        <td><?php echo $testimonial->testi_desig; ?></td>
                        <td><?php echo $testimonial->testi_msg; ?></td>
						<td>
							<div class="test_simg"><img src="<?php echo base_url().$testimonial->testi_image; ?>" alt="icon"></div>
						</td>
						<td>
							<label class="switch">
								<input id="testistatus_<?php echo $testimonial->testi_id; ?>" onclick="change_testimonial_status(<?php echo $testimonial->testi_id; ?>);"   type="checkbox" value="" <?php if($testimonial->testi_status == 1){ echo "checked"; } ?> >
								<span class="slider"></span>
							</label>
                         </td>
						<td width="200">
                            <a href="<?php echo base_url().'admin/update_testimonial/'.$testimonial->testi_id;  ?>" class="btn" title="Edit"><i class="fa fa-pencil" aria-hidden="true"></i></a>
                            <a href="<?php echo base_url().'admin/delete_testimonial/'.$testimonial->testi_id;  ?>" class="btn" title="Delete" onclick="return delete_confirmation()"><i class="fa fa-trash" aria-hidden="true"></i></a>
                        </td>
				</tr>   
                <?php 
					}
				 }
                ?>				
                </tbody>
            </table>
        </div>
    </div>
</div>
