<?php $this->load->view('common/head')?>
<body>
<div class="page-container list-menu-view">
<!--Leftbar Start Here -->
<?php $this->load->view('common/sidebar')?>

    <div class="page-content">
    <!--Topbar Start Here -->
    <?php $this->load->view('common/header') ?>
        <div class="main-container">
            <div class="container-fluid">
                <div class="page-breadcrumb">
                    <div class="row">
                        <div class="col-md-7">
                            <div class="page-breadcrumb-wrap">
                                <div class="page-breadcrumb-info">
                                    
                                    <ul class="list-page-breadcrumb">
                                        <li><a href="#">Home</a>
                                        </li>
                                        <li class="active-page">Slider</li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-5">
                        </div>
                    </div>
                </div>
                
                <?php 
                    if($this->session->flashdata('msg')!=''){
                        echo '<div class="alert alert-success alert-dismissible">
                              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                              <strong>'.$this->session->flashdata('msg').'</strong> 
                            </div>';
                    }
                    if($this->session->flashdata('err')!=''){
                        echo '<div class="alert alert-danger alert-dismissible">
                              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                              <strong>'.$this->session->flashdata('err').'</strong> 
                            </div>';
                    }
                ?>
                                    <div class="box-widget widget-module">
                            <div class="widget-head clearfix">
                                <span class="h-icon"><i class="fa fa-th"></i></span>
                                <h4>Slider</h4>
                            </div>
                            <div class="widget-container">
                                <div class=" widget-block">
                                    <table class="table dt-table">
                                    <thead>
                                    <tr>
                                       
                                        <th>
                                            Image
                                        </th>
                                        <th>
                                            Status
                                        </th>
                                    </tr>
                                    </thead>
                                    
                                    <tbody>
                                        <?php  foreach($slider as $s){?>
                                    <tr>
                                        

                                          <td>
                                            <img src="<?= base_url('uploads/slider/'.$s['image'])?>" style="height:60px;width:60px">
                                        </td>
                                        
                                        <td>
                                            <?php if($s['status']==1){
                                                echo 'active';
                                            }else{
                                                echo "Inactive";
                                            }?>
                                        </td>
                                        <td>
                                            <a class="btn btn-primary" href="<?= base_url('edit_slider/'.$s['id'])?>" ><i class="fa fa-pencil"></i></a>
                                            <a class="btn btn-danger" href="<?= base_url('delete_slider/'.$s['id'])?>" onclick="return confirm('Are You Sure Want to delete')"><i class="fa fa-trash-o"></i></a>
                                        </td>
                                    </tr>
                                    <?php }?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    <!--Footer Start Here -->
     <?php $this->load->view('common/foot'); ?>
    </div>
</div>

<?php $this->load->view('common/footer')?>