   
<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> Download Info.</h6>
                <a href="<?php echo site_url('everbright/download_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>S/L</th> 
                        <th>Date</th>
                        <th>Title</th>                        
						<th>File Type</th>
						<th>View File</th> 
                        <th>Edit</th>
                    </tr></thead>
                    <tbody>
                        <?php
								$i=1;
						$this->db->order_by("date", "desc");
                        $query = $this->main_model->download();
                        foreach($query as $row):
                        ?>
                        <tr>
                             <td><?php echo $i; ?></td>
                             <td><?php echo $row['date']; ?></td>
							<td><?php echo $row['title']; ?></td>
                            <td><?php echo $row['page']; ?></td>
							<td><a href="<?php echo base_url();?>uploads/<?php echo $row['thumb_image']; ?>">Click to View</a></td>
                            <td class="center">
                                <a href="<?php echo site_url('everbright/download_edit/'.$row['id']); ?>" class="btn btn-icon"><i class="fa fa-edit"></i> Info</a>
                                <a href="<?php echo site_url('everbright/download_edit_file/'.$row['id']); ?>" class="btn btn-icon"><i class="fa fa-edit"></i> File</a>
								<a href="<?php echo site_url('everbright/download_delete/'.$row['id']); ?>" class="btn btn-icon"><i class="fa fa-desktop"></i> Delete</a>
                            </td>
                        </tr>
						<?php $i=$i+1; ?>
                        <?php endforeach; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>