Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet">
- </head>
- <h3>Blog list</h3>
- <?php
- if($this->session->flashdata('success_msg')){
- ?>
- <div class="alert alert-success">
- <?php echo $this->session->flashdata('success_msg'); ?>
- </div>
- <?php
- }
- ?>
- <?php
- if($this->session->flashdata('error_msg')){
- ?>
- <div class="alert alert-success">
- <?php echo $this->session->flashdata('error_msg'); ?>
- </div>
- <?php
- }
- ?>
- <a href="<?php echo base_url('blog/add'); ?>" class="btn btn-primary">Add New</a>
- <table class="table table-bordered table-responsive">
- <thead>
- <tr>
- <td>ID</td>
- <th>Obchod</th>
- <th>Cas</th>
- <th>Polozka</th>
- <th>Druh</th>
- <th>Akcia</th>
- </tr>
- </thead>
- <tbody>
- <?php
- if($blogs){
- foreach($blogs as $blog){
- ?>
- <tr>
- <td><?php echo $blog->id; ?></td>
- <td><?php echo $blog->title; ?></td>
- <td><?php echo $blog->description; ?></td>
- <td><?php echo $blog->created_at; ?></td>
- <td>
- <a href="<?php echo base_url('blog/edit/'.$blog->id); ?>" class="btn btn-info">Edit</a>
- <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>
- </td>
- </tr>
- <?php
- }
- }
- ?>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement