<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">All Pages</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">All Pages</li>
            </ol>
         </div>
         <!-- /.col -->
      </div>
      <!-- /.row -->
   </div>
   <!-- /.container-fluid -->
</div>
<!-- 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 Pages</h3>
            <div class="card-tools">
               <a href="<?php echo base_url()?>/admin/front_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/front_setting/update_page/<?php echo $page->id ?>"><i class="fa fa-edit option-icon"></i></a>
                           <?php if($page->id != 1 && $page->id != 2): ?>
                              <a class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')" href="<?php echo base_url() ?>admin/front_setting/delete_page/<?php echo $page->id ?>"><i class="fa fa-trash" aria-hidden="true"></i></a>
                           <?php endif; ?>
                     </td>
                  </tr>
                  <?php $i++; ?>
                  <?php endforeach; ?>
               </tbody>
              
            </table>
         </div>
      </div>
   </div>
</section>
<!-- /.content -->
</div>
