Advertisement
Guest User

profile

a guest
Jun 26th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.98 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1">
  7.         <link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet">
  8.     </head>
  9.     <h3>Blog list</h3>
  10.  
  11.     <?php
  12.         if($this->session->flashdata('success_msg')){
  13.     ?>
  14.         <div class="alert alert-success">
  15.             <?php echo $this->session->flashdata('success_msg'); ?>
  16.         </div>
  17.     <?php      
  18.         }
  19.     ?>
  20.  
  21.  
  22.     <?php
  23.         if($this->session->flashdata('error_msg')){
  24.     ?>
  25.         <div class="alert alert-success">
  26.             <?php echo $this->session->flashdata('error_msg'); ?>
  27.         </div>
  28.     <?php      
  29.         }
  30.     ?>
  31.  
  32.     <a href="<?php echo base_url('blog/add'); ?>" class="btn btn-primary">Add New</a>
  33.     <table class="table table-bordered table-responsive">
  34.         <thead>
  35.             <tr>
  36.                 <td>ID</td>
  37.                 <th>Obchod</th>
  38.                 <th>Cas</th>
  39.                 <th>Polozka</th>
  40.                 <th>Druh</th>
  41.                 <th>Akcia</th>
  42.             </tr>
  43.         </thead>
  44.         <tbody>
  45.         <?php
  46.             if($blogs){
  47.                 foreach($blogs as $blog){
  48.         ?>
  49.             <tr>
  50.                 <td><?php echo $blog->id; ?></td>
  51.                 <td><?php echo $blog->title; ?></td>
  52.                 <td><?php echo $blog->description; ?></td>
  53.                 <td><?php echo $blog->created_at; ?></td>
  54.                 <td>
  55.                     <a href="<?php echo base_url('blog/edit/'.$blog->id); ?>" class="btn btn-info">Edit</a>
  56.                     <a href="<?php echo base_url('blog/delete/'.$blog->id); ?>" class="btn btn-danger" onclick="return confirm('Do you want to delete this record?');">Delete</a>
  57.                 </td>
  58.             </tr>
  59.         <?php
  60.                 }
  61.             }
  62.         ?>
  63.         </tbody>
  64.     </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement