<!-- <div class="well"> -->

      <ul class="tabs">
        <li><a href="#view1">Revoked</a></li>

      </ul>
      <div class="tabcontents">
        <div id="view1" >



          <?php








          $q = "SELECT CONCAT_WS(' ', first_name, other_names) as name, phone_number,number, students_nce.id AS id,
            students_nce.gender AS gender,state.title AS state,lga.title AS lga, hostel_campuses.title AS site,
            application_number, programmes.title AS programme, students_nce.level as LEVEL, hostel_blocks.title AS category,
            hostel_rooms.title AS room FROM state, lga,hostel_campuses, hostel_allocation,hostel_blocks,hostel_rooms, students_nce,
            programmes  WHERE students_nce.programme_id=programmes.id  AND students_nce.state_id = state.id AND students_nce.lga_id = lga.id AND
            students_nce.id = hostel_allocation.student_id AND hostel_allocation.campus_id=hostel_campuses.id AND hostel_allocation.room_id=hostel_rooms.id
            AND hostel_allocation.block_id= hostel_blocks.id AND students_nce.hostel_allocation='1' AND hostel_allocation.status= '1' ORDER BY number ASC ";
          $r = mysqli_query(dbc(), $q);

          if(mysqli_num_rows($r) > 0)
          {//show table


          $output_q =
           '<table id="example" class="user display table-bordered table-hover table-striped" cellspacing="0" width="100%" style="font-size:12px;">
           <thead>
             <th>S/No</th>
             <th>Name</th>
             <th>Matric Number</th>
             <th>Phone Number</th>
             <th>Level</th>
             <th>Application Number</th>
             <th>Gender</th>
             <th>Programme</th>
             <th>State</th>
             <th>LGA</th>
             <th>Campus</th>
             <th>Block</th>
             <th>Room</th>


           </thead>
           <tfoot>
             <th>S/No</th>
             <th>Name</th>
             <th>Matric Number</th>
             <th>Phone Number</th>
             <th>Level</th>
             <th>Application Number</th>
             <th>Gender</th>
             <th>Programme</th>
             <th>State</th>
             <th>LGA</th>
             <th>Campus</th>
             <th>Block</th>
             <th>Room</th>


           </tfoot>

           <tbody>';

           while($row = mysqli_fetch_array($r,MYSQLI_ASSOC))
          {
            $output_q .= "<tr>";
            $output_q .="<td>&nbsp;&nbsp;&nbsp;<input type='checkbox' value='".$row['id']."' name='user[]' id='user' class='checkbox1'/></td>" ;
            $output_q .= "<td> <a href=''>".$row['name']."</a></td>"; //nam eof the user
            $output_q .= "<td>".$row['number']."</td>";
            $output_q .= "<td>".$row['phone_number']."</td>";
            $output_q .= "<td>".$row['LEVEL']."</td>";
            $output_q .= "<td>".$row['application_number']."</td>";
            $output_q .= "<td>".$row['gender']."</td>";
            $output_q .= "<td>".$row['programme']."</td>";

            $output_q .= "<td>".$row['state']."</td>";
            $output_q .= "<td>".$row['lga']."</td>";
            $output_q .= "<td>".$row['site']."</td>";
            $output_q .= "<td>".$row['category']."</td>";
            $output_q .= "<td>".$row['room']."</td>";
            $output_q .= "</tr>";



          }
          }
          else
          {//show the msg

            $output_q =
                 '<div class="alert alert-danger alert-dismissable">
                <button class="close" aria-hidden="true" data-dismiss="alert" type="button">x</button>
                <img src="images/info.png" />&nbsp;&nbsp; No record found in the system.
                 </div>';


          }






           $output_q .=
           '</tbody>
             </table>';

             echo $output_q;

          ?>




        </div>

      </div>
</div>

</form>
