  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1>All Sliders</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="#">Home</a></li>
              <li class="breadcrumb-item active">All Sliders</li>
            </ol>
          </div>
        </div>
      </div><!-- /.container-fluid -->
    </section>

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-12">
          <div class="card">
            <div class="card-header">
              <h3 class="card-title">All Slides View On This Page You Can Edit Or Delete From This Page</h3>
            </div>
                        <?php
              $success = $this->session->flashdata('success');
               if(isset($success)){  ?>
            <div class="alert alert-success">
              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
              <?php echo $this->session->flashdata('success');?>
          </div>
          <?php } ?>

          <?php
              $same = $this->session->flashdata('same');
               if(isset($same)){  ?>
            <div class="alert alert-warning">
              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
              <?php echo $this->session->flashdata('same');?>
          </div>
          <?php } ?>
          <?php
              $same = $this->session->flashdata('error');
               if(isset($same)){  ?>
            <div class="alert alert-danger">
              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
              <?php echo $this->session->flashdata('error');?>
          </div>
          <?php } ?>
                        <div class="table-responsive">
                            <table id="data-table-basic" class="table table-striped">
                                <thead>
                                    <tr>
                                        <th>Image</th>
                                        <th>Title</th>
                                        <th>Action</th>
                                        
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                        // $count = count($view_all);
                                        if($view_all != 0){
                                            foreach ($view_all as $row) {
                                                

                                    ?>
                                    <tr>
                                        <td><img src="<?php echo base_url('uploads/').$row->img;?>" style=" width: 600px; height: 200px; "></td>
                                        <td><?php echo $row->alt;?></td>
                                        <td>
                                          
                                            <a href="<?php echo base_url('admin/Add_slider/edit/').$row->id; ?>" class="btn btn-info"><span class="fa fa-pencil"></span> EDIT</a>
                                            <a href="<?php echo base_url('admin/Add_slider/delete/').$row->id; ?>" class="btn btn-danger"><span class="fa fa-trash"></span> DELETE</a>
                                        </td>
                                        
                                    </tr>
                                    <?php } }?>
                                    
                                </tbody>
                                <!-- <tfoot>
                                    <tr>
                                        <th>Name</th>
                                        <th>Position</th>
                                        <th>Office</th>
                                        <th>Age</th>
                                        <th>Start date</th>
                                        <th>Salary</th>
                                    </tr>
                                </tfoot> -->
                            </table>
            </div>
            <!-- /.card-body -->
          </div>
		  </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
  </div>
  <script>
  $(function () {
    $("#example1").DataTable();
    $('#example2').DataTable({
      "paging": true,
      "lengthChange": false,
      "searching": false,
      "ordering": true,
      "info": true,
      "autoWidth": false,
    });
  });
</script>
<!-- Bootstrap 4 -->
