Advertisement
cjoyales

list.php

Mar 19th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.26 KB | None | 0 0
  1. <?php
  2.      if (!isset($_SESSION['ACCOUNT_ID'])){
  3.       redirect(web_root."admin/index.php");
  4.      }
  5.  
  6. ?>
  7. <div class="row">
  8.          <div class="col-lg-12">
  9.             <h1 class="page-header">List Faculty Loads  <a href="index.php?view=add" class="btn btn-primary btn-xs  ">  <i class="fa fa-plus-circle fw-fa"></i> New</a>  </h1>
  10.             </div>
  11.             <!-- /.col-lg-12 -->
  12.          </div>
  13.                 <form action="controller.php?action=delete" Method="POST">  
  14.                   <div class="table-responsive">           
  15.                 <table id="dash-table" class="table table-striped table-bordered table-hover table-responsive" style="font-size:12px" cellspacing="0">
  16.                
  17.                
  18.                   <thead>
  19.                     <tr>
  20.                         <th width="5%">IDNO.</th>
  21.                         <th>Employee Name</th>
  22.                         <th>Subject Description</th>
  23.                         <th>DAY</th>
  24.                         <th>TIME</th>
  25.                         <th>ROOM</th>
  26.                         <th>AY</th>
  27.                         <th>Semester</th>
  28.                          <th width="10%" >Action</th>
  29.                     </tr>  
  30.                   </thead>
  31.                   <tbody>
  32.                     <?php
  33.                   //    `INSSUBJ_ID`, `EMPID`, `INSTNAME`, `GRADELEVEL`, `SUBJ_ID`, `SUBJDESCRPTION`, `AY`, `SECTION`
  34.                           $mydb->setQuery("SELECT CLASS_ID,`INST_FULLNAME`,`CLASS_CODE`, `SUBJ_ID`, c.`INST_ID`, `SEMESTER`, `AY`, `DAY`, `C_TIME`, c.`INST_NAME`, `ROOM`, `SECTION` FROM `instructor` i, `class`c WHERE c.`INST_ID` =i.`IDNO`");
  35.                             $rowcountss = $mydb->num_rows();
  36.  
  37.                             if ($rowcountss > 0){
  38.  
  39.                             $cur = $mydb->loadResultList();
  40.  
  41.                                 foreach ($cur as $instSubj) {
  42.                                     echo '<tr>';
  43.  
  44.                                     echo '<td>' . $instSubj->INST_ID.'</a></td>';
  45.                                     echo '<td>'. $instSubj->INST_FULLNAME.'</td>';
  46.                                     echo '<td>'. $instSubj->CLASS_CODE.'</td>';
  47.                                     echo '<td>'. $instSubj->DAY.'</td>';
  48.                                     echo '<td>'. $instSubj->C_TIME.'</td>';
  49.                                     echo '<td>'. $instSubj->ROOM.'</td>';
  50.                                     echo '<td>'. $instSubj->AY.'</td>';    
  51.                                     echo '<td>'. $instSubj->SEMESTER.'</td>';              
  52.                                     echo $active = "";
  53.                                    
  54.                                     echo '<td align="center" >
  55.                                     <a title="View Students" href="index.php?view=viewstudent&id='.$instSubj->SUBJ_ID.'&IDNO='.$instSubj->INST_ID.'" class="btn btn-primary btn-xs" '.$active.'><span class="glyphicon glyphicon-search"></span> </a>
  56.                                     <a title="Edit Schedules" href="index.php?view=time&classid='.$instSubj->CLASS_ID.'&subjid='.$instSubj->SUBJ_ID.'&instid='.$instSubj->INST_ID.'&ay='.$instSubj->AY.'&sem='.$instSubj->SEMESTER.'" class="btn btn-primary btn-xs" '.$active.'><span class="glyphicon glyphicon-edit"></span> </a>
  57.                                     <a title="Print Masterlist" href="index.php?view=print&id='.$instSubj->SUBJ_ID.'&IDNO='.$instSubj->INST_ID.'" class="btn btn-primary btn-xs" '.$active.'><span class="glyphicon glyphicon-edit"></span> </a>
  58.                                                  <a title="Delete" href="controller.php?action=delete&id='.$instSubj->CLASS_ID.'&subjid='.$instSubj->SUBJ_ID.'" class="btn btn-danger btn-xs" '.$active.'><span class="fa fa-trash-o fw-fa"></span> </a>
  59.                                                  </td>';
  60.                                     echo '</tr>';
  61.                                 }
  62.                             }else{
  63.                                         echo '<tr>';
  64.                                         //echo '<td colspan="6">No subjects assigned!</td>';
  65.                                         echo '</tr>';
  66.                             }
  67.  
  68.                                        
  69.                            
  70.                     ?>
  71.                   </tbody>
  72.                  
  73.                 </table>
  74.            
  75.                 </form>
  76.    
  77.  
  78. </div> <!---End of container-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement