File: application/views/user.php

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra  >  CodeIgniter ion Auth Login  >  application/views/user.php  >  Download  
File: application/views/user.php
Role: Example script
Content type: text/plain
Description: Example script
Class: CodeIgniter ion Auth Login
Manage user records in a database with CodeIgniter
Author: By
Last change:
Date: 4 years ago
Size: 1,761 bytes
 

Contents

Class file image Download
<div class="container">
        <h2>Users</h2>
        <table class="table table-hover table-bordered table-striped">
          <tr>
              <th>
                  Name
              </th>
              <th>
                  User Name
              </th>
              <th>
                  Last Login
              </th>
              <th>
                  Level Name
              </th>
              <th>
                  Status
              </th>
              <th colspan="2">
                  Edit
              </th>
          </tr>
                <?php
                   
foreach($groups as $row)
                    {
                    if(
$row->role == 1){
                       
$rolename = "Admin";
                    }elseif(
$row->role == 2){
                       
$rolename = "Author";
                    }elseif(
$row->role == 3){
                       
$rolename = "Editor";
                    }elseif(
$row->role == 4){
                       
$rolename = "Subscriber";
                    }
                   
                    echo
'<tr>';
                    echo
'<td>'.$row->first_name.'</td>';
                    echo
'<td>'.$row->email.'</td>';
                    echo
'<td>'.$row->last_login.'</td>';
                    echo
'<td>'.$rolename.'</td>';
                    echo
'<td>'.$row->status.'</td>';
                    echo
'<td><a href="'.site_url().'main/changelevel"><button type="button" class="btn btn-primary">Role</button></a></td>';
                    echo
'<td><a href="'.site_url().'main/deleteuser/'.$row->id.'"><button type="button" class="btn btn-danger">Delete</button></a></td>';
                    echo
'</tr>';
                    }
               
?>
</table>
    </div>

For more information send a message to info at phpclasses dot org.