
 
  <div class="container-fluid">
 
 <div class="row">
  
  
 
  <div class="col-xs-12 col-sm-6 col-lg-12">
  
 <div class="panel panel-primary" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				View all registered users
            	</div>
            </div>
			<div class="panel-body">

			
					
<div class="row">
	<div class="col-md-12">
		
			<div class="panel-body">

 <div class="col-md-12">
        <?php 
        $attr = array("class" => "form-horizontal", "role" => "form", "id" => "search", "name" => "search");
        echo form_open("admin/searchallstudents", $attr);?>
            <div class="form-group">
			
                <div class="col-md-5">
                    <input class="form-control" id="searchterm" name="searchterm" placeholder="Search for student.." type="text" value="<?php echo set_value('searchterm'); ?>" />
                </div>
                <div class="col-md-4">
                    <input id="btn_search" name="btn_search" type="submit" class="btn btn-success" value="Search" />
                    <a href="<?php echo base_url(). "/admin/viewstudents"; ?>" class="btn btn-primary">Refresh</a>
                </div>
				   <div class="col-md-3">
				   		<p style="color:red; font-size:20px"><?php  echo $total_rows. "   records found. " ;?></p>

               </div>
            </div>
        <?php echo form_close(); ?>
        </div>
			
			  
<table id="example" border="0" class="table  table" >
             <thead>
         <tr>
    
    <th>Id Number</th>

    <th>Surname</th>    

    <th>Other Names</th>    
      <th>	Gender</th>   

<!---
<th>Nation </th> 

 <th>Province</th>   
<th>County </th>  -->
<th>Date created </th> 
<th>Phone</th> 
<th>Status </th> 

                 </tr>
             </thead>

			 
			 
			 <?php

 if(!is_array($students)) 

 {


echo "<tr>";
  echo "<td colspan='10'>";
    
       echo '<div class="alert alert-danger text-center">There is no such Data found. click here to :'?> <a href="<?php echo base_url(). "/admin/viewstudents"; ?>" class="btn btn-primary">Refresh Data</a> <?php '.</div>';
  echo "</td>";
  echo "</tr>";
    }else {
?>
   
             <?php foreach ($students as $c): 
        $status=$c->status;
        

             ?>

             <tr>
                
                 <td><?php echo $c->idno; ?></td>
                 <td><?php echo $c->surname; ?></td>
                     <td><?php echo $c->firstname; ?></td>   
                     <td><?php echo $c->gender;?></td>  
                  <!---  <td><?php echo $c->nationality; ?></td>  
                  <td><?php echo $c->bp_province; ?></td>  
          <td><?php echo $c->pr_county; ?></td>  -->
            <td><?php echo $c->createddate; ?></td>  
              <td><?php echo $c->phone; ?></td>   <td> 
<?php


 echo $c->status;


  ?> </td>
 
             </tr>

             <?php 
			
			
			 endforeach;  }?>

        </table>
		
			 <div class="row">
        <div class="col-md-12 text-center">
		<p style="color:red; font-size:20px"><?php  echo $total_rows. "   records found. " ;?></p>
            <?php echo $links; ?>
        </div>
    </div>

			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
        </div>
    </div>
</div>

			
			
			
			
			
			
			
			
			</div>
		</div>
  
  </div>

</div>