      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Channellimo
            <small>Preview</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Forms</a></li>
            <li class="active">Brand</li>
          </ol>
        </section>
        
        <section class="content">
        	
           <div class="box">
             <div class="box-header">
               <h3 class="box-title"><a href="<?php echo site_url("admin/management/add");?>">ADD User</a></h3>
             </div><!-- /.box-header -->
             <div class="box-body">
                <table id="example1" class="table table-bordered table-striped">
                    <thead>
                      <tr>
                        <th>ID</th>
                        <th>Name</th>
                        <th>Position</th>
                        <th>Email</th>
                        <th>Last IP</th>
                        <th>Last Login</th>
                        <th>Block</th>
                        <th>Create date</th>
                        <th></th>
                        <th></th>
                      </tr>
                    </thead>
                    <tbody>
                    <?php 
					$i=1;
					foreach($management as $v)
					{
						if($v['banned'] == 1){
					 		$authorize = "Block";
							}elseif($v['banned'] == 0){
					 			$authorize = "Allow";	
								}else{
					 				$authorize = "null";	
						}
						
						if($v['last_ip']=="" OR $v['last_ip']==0 ){
								$last_ip = "Not Found";
							}else{
								$last_ip = $v['last_ip'];		
						}
						if($v['last_ip']=="" OR $v['last_ip']==0){
							
							}else{
								
						}	
					 	echo'
						<tr>
						  <td>'.$i.'</td>
						  <td>'.$v['username'].'</td>
						  <td>'.$v['name'].'</td>
						  <td>'.$v['email'].'</td>
						  <td>'.$last_ip.'</td>
						  <td>'.$v['last_login'].'</td>
						  <td>'.$authorize.'</td>
						  <td>'.$v['createdate'].'</td>
						  <td><a href="'.site_url("admin/management/edit/".$v['userid']."").'"><i class="fa fa-edit"></i></a></td>
						  <td><a href="'.site_url("admin/management/delete/".$v['userid']."").'" class="confirmation"><i class="fa fa-remove"></i></a></td>
						</tr>
						';
						$i++;
					}
					?>
                      
                    </tbody>
                    
                  </table>
                </div><!-- /.box-body -->
             </div><!-- /.box -->
            	
        </section>
       </div>
       
       <?php if($msg = $this->session->flashdata("message")): ?>
	   	<script>
       		alert("<?php echo $msg?>");
       </script>
       <?php endif; ?>
	   