<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
   <div class="container-fluid">
      <div class="row mb-2">
         <div class="col-sm-6">
            <h1 class="m-0 text-dark"></h1>
         </div>
         <!-- /.col -->
         <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
               <li class="breadcrumb-item"><a href="<?php echo base_url() ?>admin/admin/dashboard">Dashboard</a></li>
               <li class="breadcrumb-item"><a href="#">Frontend Setting</a></li>
               <li class="breadcrumb-item active">Extra Page</li>
            </ol>
         </div>
         <!-- /.col -->
      </div>
      <!-- /.row -->
   </div>
   <!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<?php
   $errors = $this->session->userdata('errors');
   if (isset($errors)) {
       ?>
<script>
   swal ( "Oops" ,  "<?php echo $errors ?>" ,  "error" )
</script>
<?php echo $errors ?>
<?php
   $this->session->unset_userdata('errors');
   }
   $error = $this->session->userdata('error');
   if (isset($error)) {
   ?>
<script>
   swal ( "Oops" ,  "<?php echo $error ?>" ,  "error" )
</script>
<?php
   $this->session->unset_userdata('error');
   }
   $success = $this->session->userdata('success');
   if (isset($success)) {
   ?>
<script>
   swal({
   title: "Done!",
   text: "<?php echo $success ?>",
   icon: "success",
   });
</script>
<?php
   $this->session->unset_userdata('success');
   }
   ?>
<!-- Main content -->
<section class="content">
   <div class="container-fluid">
      <!-- Info boxes -->
     
      <div class="card card-default">
         <div class="card-header">
            <h3 class="card-title">All Extra Page</h3>
            <div class="card-tools">
               <a href="<?php echo base_url()?>/admin/Frontend_setting/add_new_page" class="btn btn-primary btn-sm"><i class="fa fa-eye" aria-hidden="true"></i> Add New Page</a>
            </div>
         </div>
         <!-- /.card-header -->
         <div class="card-body">
            <table id="example1" class="table table-bordered table-striped">
               <thead>
                  <tr>
                     <th>id</th>
                     <th>Image</th>
                     <th>Page Name</th>
    
                     <th>Status</th>
                     <th>Date</th>
                     <th></th>
                  </tr>
               </thead>
               <tbody>
                  <?php $i=1; foreach ($get_all_page as $key => $page):?>
                  <tr>
                     <td><?php echo $i ?></td>
                     <td><img src="<?php echo base_url() ?><?php echo $page->image ?>" width="70px;"></td>
                     <td><?php echo $page->name ?></td>
                  
                     <td><?php if($page->status == 1): ?>
                        <span class="badge badge-success">Active</span>
                       <?php else: ?>
                           <span class="badge badge-danger">Deactive</span>
                       <?php endif; ?>
                     </td>                     
                     <td><?php echo $page->date ?></td>
                     <td>
                           <a class="btn btn-success btn-sm " href="<?php echo base_url() ?>admin/frontend_setting/update_extra_page/<?php echo $page->id ?>"><i class="fa fa-edit option-icon"></i></a>

                          <a class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')" href="<?php echo base_url() ?>admin/frontend_setting/delete_page/<?php echo $page->id ?>"><i class="fa fa-trash" aria-hidden="true"></i></a>
                     </td>
                  </tr>
                  <?php $i++; ?>
                  <?php endforeach; ?>
               </tbody>
              
            </table>
         </div>
      </div>
      <!--/. container-fluid -->
</section>
<!-- /.content -->
</div>
