JezK
Edit File: staff.php
<?php include('app/adminfunctions.php'); $superadmin_obj = new adminFunctions(); $users_data=$superadmin_obj->get_userdetails(); $usersdata = ''; //echo "<pre>"; //print_r($users_data); //exit; if($users_data){ $i=1; foreach($users_data as $k=>$val){ $studentstatus="<span style='color:#ff0000;'>Inactive</span>"; if($val['loginstatus']==1) $studentstatus="Active"; $usersdata .= '<tr> <td>'.$i.'</td> <td>'.$val['name'].'</td> <td >'.$val['yearOfEntry'].'</td> <td >'.$val['nativeplace'].'</td> <td>'.$val['telephone'].'</td> <td >'.$val['email'].'</td> <td style="color:#008000;" >'.$studentstatus.'</td> <td><a href="staffview.php?id='.$val['id'].'" class="viewbutton"> View </a></td> </tr>'; $i++; } } ?> <?php include 'header.php';?> <div id="content-wrapper"> <div class="container-fluid"> <!-- Breadcrumbs--> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="#">Staff List</a> </li> <li> </li> </ol> <!-- DataTables Example --> <div class="card mb-3"> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <thead> <tr> <th>S.no</th> <th>Name</th> <th>Year Of Entry</th> <th>Nativeplace</th> <th>contact</th> <th>email</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php echo $usersdata;?> </tbody> </table> </div> </div> </div> </div> <!-- /.container-fluid --> <?php include 'footer.php';?>