<br />
<br />
<script type="text/javascript">
  var type_id;
</script>
<section class="content-header">
            <h1>Qualified Students </h1>
            <ol class="breadcrumb">
                <li class="breadcrumb-item pt-1"><a href="dashboard"><i class="fa fa-fw fa-home"></i> Dashboard</a>
                </li>

            </ol>
        </section>
        <!-- Main content -->
        <section class="content p-l-r-15">
            <div class="row">
                <div class="col-12">
                    <div class="card border-primary ">
                        <div class="card-header text-white  bg-primary">
                            <h4 class="card-title d-inline">
                                <i class="fa fa-fw fa-News"></i> Students List
                            </h4>
                        </div>
                        <div class="card-body">
                          <div class="tab">
  <button class="tablinks active" onclick="openCity(event, 'prence');setTypeID(1)">PRENCE</button>
  <button class="tablinks" onclick="openCity(event, 'nce');setTypeID(2)">NCE</button>
  <button class="tablinks" onclick="openCity(event, 'abu');setTypeID(3)">DUAP (ABU)</button>
  <button class="tablinks" onclick="openCity(event, 'udus');setTypeID(4)">DUAP (UDUS)</button>
  <button class="tablinks" onclick="openCity(event, 'summer');setTypeID(5)">SUMMER</button>
  <button class="tablinks" onclick="openCity(event, 'lvsp');setTypeID(6) ">LVSP</button>
</div>

<div id="prence" class="tabcontent active">
  <h3>PRENCE STUDENTS LIST</h3>
  <p>
    <div class="table-responsive table-responisve-lg table-responsive-xl">
        <table class="table table-bordered" id="table1">
            <thead>
            <tr class="filters">
                <th width="5%"><a href="#" class="button button-3d button-primary button-rounded btn_3d" data-toggle="modal" data-target="#myModal">+
</a></th>


            <th > NAME </th>

            <th > MATRIC </th>

            <th> PROGRAMME </th>

            <th > PHONE NUMBER </th>
            <th >STATE</th>
            <th > LGA </th>
            <th > LEVEL</th>
            <th > GENDER </th>

             <th>Status</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>

<?php




$select= "SELECT CONCAT_WS(' ', first_name, middle_name, other_names) as name, students_prence.id AS id,
phone_number,number,gender,state.title AS state,lga.title AS lga,
application_number, programmes.title AS programme, students_prence.level as LEVEL
FROM state, lga, students_prence, programmes  WHERE students_prence.programme_id=programmes.id AND
students_prence.state_id = state.id AND students_prence.lga_id = lga.id
AND students_prence.hostel_allocation='0'
ORDER BY number ASC";
$sql_select = mysqli_query($conn_1,$select);
$num_rows=mysqli_num_rows($sql_select);
if($num_rows > 0){
$sn=1;

while($row=mysqli_fetch_array($sql_select)){


$id=$row['id'];
$name=$row['name'];
$matric_number=$row['number'];
$programme=$row['programme'];
$phone_no=$row['phone_number'];
$state=$row['state'];
$lga=$row['lga'];
$LEVEL=$row['LEVEL'];
$gender = $row['gender'];

    $status='Qualified';


  echo $tr = '<tr>
        <td><center>'.$sn.'</center></td>
        <td>'.$name.'</td>
        <td>'.$matric_number.'</td>
        <td>'.$programme.'</td>
        <td>'.$phone_no.'</td>
        <td>'.$state.'</td>
        <td>'.$lga.'</td>
        <td>'.$LEVEL.'</td>
        <td>'.$gender.'</td>
        <td>'.$status.'</td>



        <td><a href="#" class="edit_qualified" id="'.$id.'"><i
            class="fa fa-fw fa-pencil text-primary actions_icon " title="New Allocation"></i></a>
            <a
            href="#"
            id="'.$id.'"
            data-toggle="modal"

            class="delete_qualified"
            ><i
            class="fa fa-fw fa-times text-danger actions_icon" title="Delete Student"></i>
        </a></td>

      </tr>';
      $sn++;





}


}

?>
            </tbody>
        </table>

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

<div id="nce" class="tabcontent">
  <h3>NCE STUDENTS LIST</h3>
  <p>
    <div class="table-responsive table-responisve-lg table-responsive-xl">
        <table class="table table-bordered" id="table">
            <thead>
            <tr class="filters">
                <th width="5%"><a href="#" class="button button-3d button-primary button-rounded btn_3d" data-toggle="modal" data-target="#myModal">+
</a></th>


            <th > NAME </th>

            <th > MATRIC </th>

            <th> PROGRAMME </th>

            <th > PHONE NUMBER </th>
            <th >STATE</th>
            <th > LGA </th>
            <th > LEVEL</th>
            <th > GENDER </th>

             <th>Status</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>

<?php




$select= "SELECT CONCAT_WS(' ', first_name, middle_name, other_names) as name, students_nce.id AS id,
phone_number,number,gender,state.title AS state,lga.title AS lga,
application_number, programmes.title AS programme, students_nce.level as LEVEL
FROM state, lga, 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.hostel_allocation='0'
ORDER BY number ASC";
$sql_select = mysqli_query($conn_1,$select);
$num_rows=mysqli_num_rows($sql_select);
if($num_rows > 0){
$sn=1;

while($row=mysqli_fetch_array($sql_select)){


$id=$row['id'];
$name=$row['name'];
$matric_number=$row['number'];
$programme=$row['programme'];
$phone_no=$row['phone_number'];
$state=$row['state'];
$lga=$row['lga'];
$LEVEL=$row['LEVEL'];
$gender = $row['gender'];

    $status='Qualified';



  echo $tr = '<tr>
        <td><center>'.$sn.'</center></td>
        <td>'.$name.'</td>
        <td>'.$matric_number.'</td>
        <td>'.$programme.'</td>
        <td>'.$phone_no.'</td>
        <td>'.$state.'</td>
        <td>'.$lga.'</td>
        <td>'.$LEVEL.'</td>
        <td>'.$gender.'</td>
        <td>'.$status.'</td>



        <td><a href="#" class="edit_qualified" id="'.$id.'"><i
            class="fa fa-fw fa-pencil text-primary actions_icon " title="New Allocation"></i></a>
            <a
            href="#"
            id="'.$id.'"
            data-toggle="modal"

            class="delete_qualified"
            ><i
            class="fa fa-fw fa-times text-danger actions_icon" title="Delete Student"></i>
        </a></td>

      </tr>';
      $sn++;





}


}

?>
            </tbody>
        </table>

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

<div id="abu" class="tabcontent">
  <h3>DUAP (ABU) STUDENTS LIST</h3>
  <p>
    <div class="table-responsive table-responisve-lg table-responsive-xl">
        <table class="table table-bordered" id="table">
            <thead>
            <tr class="filters">
                <th width="5%"><a href="#" class="button button-3d button-primary button-rounded btn_3d" data-toggle="modal" data-target="#myModal">+
</a></th>


            <th > NAME </th>

            <th > MATRIC </th>

            <th> PROGRAMME </th>

            <th > PHONE NUMBER </th>
            <th >STATE</th>
            <th > LGA </th>
            <th > LEVEL</th>
            <th > GENDER </th>

             <th>Status</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>

<?php




$select= "SELECT CONCAT_WS(' ', first_name, middle_name, other_names) as name, students_nce.id AS id,
phone_number,number,gender,state.title AS state,lga.title AS lga,
application_number, programmes.title AS programme, students_nce.level as LEVEL
FROM state, lga, 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.hostel_allocation='0'
ORDER BY number ASC";
$sql_select = mysqli_query($conn_2,$select);
$num_rows=mysqli_num_rows($sql_select);
if($num_rows > 0){
$sn=1;

while($row=mysqli_fetch_array($sql_select)){


$id=$row['id'];
$name=$row['name'];
$matric_number=$row['number'];
$programme=$row['programme'];
$phone_no=$row['phone_number'];
$state=$row['state'];
$lga=$row['lga'];
$LEVEL=$row['LEVEL'];
$gender = $row['gender'];

    $status='Qualified';



  echo $tr = '<tr>
        <td><center>'.$sn.'</center></td>
        <td>'.$name.'</td>
        <td>'.$matric_number.'</td>
        <td>'.$programme.'</td>
        <td>'.$phone_no.'</td>
        <td>'.$state.'</td>
        <td>'.$lga.'</td>
        <td>'.$LEVEL.'</td>
        <td>'.$gender.'</td>
        <td>'.$status.'</td>



        <td><a href="#" class="edit_qualified" id="'.$id.'"><i
            class="fa fa-fw fa-pencil text-primary actions_icon " title="New Allocation"></i></a>
            <a
            href="#"
            id="'.$id.'"
            data-toggle="modal"

            class="delete_qualified"
            ><i
            class="fa fa-fw fa-times text-danger actions_icon" title="Delete Student"></i>
        </a></td>

      </tr>';
      $sn++;





}


}

?>
            </tbody>
        </table>

    </div>
  </p>
</div>
<div id="udus" class="tabcontent">
  <h3>DUAP (UDUS) STUDENTS LIST</h3>
  <p>
    <div class="table-responsive table-responisve-lg table-responsive-xl">
        <table class="table table-bordered" id="table">
            <thead>
            <tr class="filters">
                <th width="5%"><a href="#" class="button button-3d button-primary button-rounded btn_3d" data-toggle="modal" data-target="#myModal">+
</a></th>


            <th > NAME </th>

            <th > MATRIC </th>

            <th> PROGRAMME </th>

            <th > PHONE NUMBER </th>
            <th >STATE</th>
            <th > LGA </th>
            <th > LEVEL</th>
            <th > GENDER </th>

             <th>Status</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>

<?php




$select= "SELECT CONCAT_WS(' ', first_name, middle_name, other_names) as name, id,
phone_no,number,gender,	application_number, level, programme_applied_for FROM students_udus  WHERE
students_udus.programme_applied_for=0 AND students_udus.hostel_allocation='0'
ORDER BY number ASC";
$sql_select = mysqli_query($conn_2,$select);
$num_rows=mysqli_num_rows($sql_select);
if($num_rows > 0){
$sn=1;

while($row=mysqli_fetch_array($sql_select)){


$id=$row['id'];
$name=$row['name'];
$matric_number=$row['number'];
$programme=$row['programme_applied_for'];
$phone_no=$row['phone_no'];

$LEVEL=$row['level'];
$gender = $row['gender'];

    $status='Qualified';



  echo $tr = '<tr>
        <td><center>'.$sn.'</center></td>
        <td>'.$name.'</td>
        <td>'.$matric_number.'</td>
        <td>'.$programme.'</td>
        <td>'.$phone_no.'</td>
        <td>Nil</td>
        <td>Nil</td>
        <td>'.$LEVEL.'</td>
        <td>'.$gender.'</td>
        <td>'.$status.'</td>



        <td><a href="#" class="edit_qualified" id="'.$id.'"><i
            class="fa fa-fw fa-pencil text-primary actions_icon " title="New Allocation"></i></a>
            <a
            href="#"
            id="'.$id.'"
            data-toggle="modal"

            class="delete_qualified"
            ><i
            class="fa fa-fw fa-times text-danger actions_icon" title="Delete Student"></i>
        </a></td>

      </tr>';
      $sn++;





}


}

?>
            </tbody>
        </table>

    </div>
  </p>
</div>
<div id="summer" class="tabcontent">
  <h3>SUMMER STUDENTS LIST</h3>
  <p>
    <div class="table-responsive table-responisve-lg table-responsive-xl">
        <table class="table table-bordered" id="table">
            <thead>
            <tr class="filters">
                <th width="5%"><a href="#" class="button button-3d button-primary button-rounded btn_3d" data-toggle="modal" data-target="#myModal">+
</a></th>


            <th > NAME </th>

            <th > MATRIC </th>

            <th> PROGRAMME </th>

            <th > PHONE NUMBER </th>
            <th >STATE</th>
            <th > LGA </th>
            <th > LEVEL</th>
            <th > GENDER </th>

             <th>Status</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>

<?php




$select= "SELECT CONCAT_WS(' ', first_name, middle_name, other_names) as name, summer_students.id AS id,
phone_number,number,gender,	application_number, programmes.title AS programme, summer_students.level as LEVEL,
summer_students.hostel_allocation='0' FROM summer_students, programmes  WHERE
summer_students.programme_id=programmes.id AND summer_students.hostel_allocation='0'
ORDER BY number ASC";
$sql_select = mysqli_query($conn_1,$select);
$num_rows=mysqli_num_rows($sql_select);
if($num_rows > 0){
$sn=1;

while($row=mysqli_fetch_array($sql_select)){


$id=$row['id'];
$name=$row['name'];
$matric_number=$row['number'];
$programme=$row['programme'];
$phone_no=$row['phone_number'];
//$state=$row['state'];
//$lga=$row['lga'];
$LEVEL=$row['LEVEL'];
$gender = $row['gender'];

    $status='Qualified';



  echo $tr = '<tr>
        <td><center>'.$sn.'</center></td>
        <td>'.$name.'</td>
        <td>'.$matric_number.'</td>
        <td>'.$programme.'</td>
        <td>'.$phone_no.'</td>
        <td>Nil</td>
        <td>Nil</td>
        <td>'.$LEVEL.'</td>
        <td>'.$gender.'</td>
        <td>'.$status.'</td>



        <td><a href="#" class="edit_qualified" id="'.$id.'"><i
            class="fa fa-fw fa-pencil text-primary actions_icon " title="New Allocation"></i></a>
            <a
            href="#"
            id="'.$id.'"
            data-toggle="modal"

            class="delete_qualified"
            ><i
            class="fa fa-fw fa-times text-danger actions_icon" title="Delete Student"></i>
        </a></td>

      </tr>';
      $sn++;





}


}

?>
            </tbody>
        </table>

    </div>
  </p>
</div>
<div id="lvsp" class="tabcontent">
  <h3>LVSP STUDENTS LIST</h3>
  <p>
    <div class="table-responsive table-responisve-lg table-responsive-xl">
        <table class="table table-bordered" id="table">
            <thead>
            <tr class="filters">
                <th width="5%"><a href="#" class="button button-3d button-primary button-rounded btn_3d" data-toggle="modal" data-target="#myModal">+
</a></th>


            <th > NAME </th>

            <th > MATRIC </th>

            <th> PROGRAMME </th>

            <th > PHONE NUMBER </th>
            <th >STATE</th>
            <th > LGA </th>
            <th > LEVEL</th>
            <th > GENDER </th>

             <th>Status</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>

<?php




$select= "SELECT CONCAT_WS(' ', first_name, middle_name, other_names) as name, summer_students.id AS id,
phone_number,number,gender,	application_number, programmes.title AS programme, summer_students.level as LEVEL,
summer_students.hostel_allocation='0' FROM summer_students, programmes  WHERE
summer_students.programme_id=programmes.id AND summer_students.hostel_allocation='0'
ORDER BY number ASC";
$sql_select = mysqli_query($conn_1,$select);
$num_rows=mysqli_num_rows($sql_select);
if($num_rows > 0){
$sn=1;

while($row=mysqli_fetch_array($sql_select)){


$id=$row['id'];
$name=$row['name'];
$matric_number=$row['number'];
$programme=$row['programme'];
$phone_no=$row['phone_number'];
//$state=$row['state'];
//$lga=$row['lga'];
$LEVEL=$row['LEVEL'];
$gender = $row['gender'];

    $status='Qualified';



  echo $tr = '<tr>
        <td><center>'.$sn.'</center></td>
        <td>'.$name.'</td>
        <td>'.$matric_number.'</td>
        <td>'.$programme.'</td>
        <td>'.$phone_no.'</td>
        <td>Nil</td>
        <td>Nil</td>
        <td>'.$LEVEL.'</td>
        <td>'.$gender.'</td>
        <td>'.$status.'</td>



        <td><a href="#" class="edit_qualified" id="'.$id.'"><i
            class="fa fa-fw fa-pencil text-primary actions_icon " title="New Allocation"></i></a>
            <a
            href="#"
            id="'.$id.'"
            data-toggle="modal"

            class="delete_qualified"
            ><i
            class="fa fa-fw fa-times text-danger actions_icon" title="Delete Student"></i>
        </a></td>

      </tr>';
      $sn++;





}


}

?>
            </tbody>
        </table>

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

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

                <div class="modal fade" id="delete" tabindex="-1" role="dialog" aria-labelledby="Heading"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h4 class="modal-title custom_align" id="Heading">Delete Faculty</h4>
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                            </div>
                            <div class="modal-body">
                                <div class="alert alert-warning">
                                    <span class="fa fa-exclamation-triangle"></span> Are you sure you want to
                                    delete this Faculty?
                                </div>
                            </div>
                            <div class="modal-footer" id="delete_footer">

                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                </div>

				<div class="modal fade" id="edit_faculty" tabindex="-1" role="dialog" aria-labelledby="Heading"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h4 class="modal-title custom_align" id="Heading">New Allocation</h4>
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                            </div>
                            <div class="modal-body">
                                <div class="alert alert-warning">
                                    <span class="fa fa-exclamation-triangle"></span> Are you sure you want to
                                    Allocate ?
                                </div>
                            </div>
                            <div class="modal-footer" id="edit_footer">

                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                </div>


            </div>
            <!-- row-->

        </section>

 <!-- The Modal -->
  <div class="modal fade" id="myModal">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">

        <!-- Modal Header -->
        <div class="modal-header">
          <h2 class="modal-title"><span class="badge badge-pill badge-danger"> ADD Student </span></h2>
          <button type="button" class="close" data-dismiss="modal">&times;</button>
        </div>

        <!-- Modal body -->
        <div class="modal-body">

          <div class="alert alert-warning">
              <span class="fa fa-exclamation-triangle"></span> You can't Add Student from Here!
          </div>

        </div>

        <!-- Modal footer -->
        <div class="modal-footer">
			<center>
				<div id="output_error">

				</div>
			</center>

        </div>

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



<div class="modal fade" id="edit_loading" tabindex="-1" role="dialog" aria-labelledby="Heading"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h2 class="modal-title custom_align" id="Heading"> <span class="badge badge-pill badge-danger"> New Allocation </span> </h2>
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                            </div>
                            <div class="modal-body" id="edit_modal_body">
							<form method="POST" id="edit_form_faculty" >

							</form>

                            </div>
                            <div class="modal-footer" id="edit_footer">

                            </div>
                        </div>
                        <!-- /.modal-content -->
                    </div>
                </div>
                <style>
                body {font-family: Arial;}

                /* Style the tab */
                .tab {
                  overflow: hidden;
                  border: 1px solid #ccc;
                  background-color: #f1f1f1;
                }

                /* Style the buttons inside the tab */
                .tab button {
                  background-color: inherit;
                  float: left;
                  border: none;
                  outline: none;
                  cursor: pointer;
                  padding: 14px 16px;
                  transition: 0.3s;
                  font-size: 17px;
                }

                /* Change background color of buttons on hover */
                .tab button:hover {
                  background-color: #ddd;
                }

                /* Create an active/current tablink class */
                .tab button.active {
                  background-color: #ccc;
                }

                /* Style the tab content */
                .tabcontent {
                  display: none;
                  padding: 6px 12px;
                  border: 1px solid #ccc;
                  border-top: none;
                }
                </style>

<script type="text/javascript">
var type_id;
function setTypeID(id)
{
  type_id = id;
  //alert(type_id);
}
 function load_edit_faculty(token){
//var id = type_id;
  //alert(type_id);
			$('#edit_faculty').modal('hide');
			$('#edit_loading').modal('show');

			document.getElementById("edit_form_faculty").innerHTML ='<div style="margin-top:10px"><center>loading Data, please wait...<br/><img src="images/ajax-loader1.gif" width="10%"/></center></div>';

			$.post('hub/php/load_edit_qualified.php',{token:token,type_id:type_id},
			function(response,status){

			document.getElementById("edit_form_faculty").innerHTML =response;

			});
}

$(document).ready(function(e){



		$("#form_faculty").submit(function(event){
			event.preventDefault(); //prevent default action
			var post_url = "hub/php/add_faculty.php"; //get form action url
			var request_method = $(this).attr("method"); //get form GET/POST method

			$("#output_error").html('<div style="margin-top:10px"><center>login, please wait...<br/><img src="images/ajax-loader1.gif" width="20%"/></center></div>');
			document.getElementById("button").style.display = "none";
			var form_data = new FormData(this); //Creates new FormData object


				$.ajax({
					url : post_url,
					type: request_method,
					data : form_data,
					contentType: false,
					cache: false,
					processData:false
				}).done(function(response){ //

					if(response==1){

						$('#form_faculty')[0].reset();
						swal("Faculty saved successfully");
						document.getElementById("button").style.display = "block";
						$("#output_error").html("");
						links();

					}else{

					$("#output_error").html(response);
					document.getElementById("button").style.display = "block";

					}
				});

		});




    $("#edit_form_faculty").submit(function(event){

      event.preventDefault(); //prevent default action
      var post_url = "hub/php/allocate.php"; //get form action url
      var request_method = $(this).attr("method"); //get form GET/POST method

      $("#output_error_edit").html('<div style="margin-top:10px"><center>login, please wait...<br/><img src="images/ajax-loader1.gif" width="20%"/></center></div>');
      document.getElementById("button_edit").style.display = "none";
      var form_data = new FormData(this); //Creates new FormData object


        $.ajax({
          url : post_url,
          type: request_method,
          data : form_data,
          contentType: false,
          cache: false,
          processData:false
        }).done(function(response){ //

          if(response==1){

            $('#edit_form_faculty')[0].reset();
            swal("Allocation Successful");
            document.getElementById("button_edit").style.display = "block";
            $("#output_error_edit").html("");
            links();

          }else{

          $("#output_error_edit").html(response);
          document.getElementById("button_edit").style.display = "block";

          }
        });

    });







		// load delete faculty modal
		$(document).on('click','.delete_faculty',function(){
			var token=$(this).attr("id");
			$('#delete').modal('show');
			document.getElementById("delete_footer").innerHTML ='<a href="#" class="btn btn-danger" onclick="delete_faculty('+token+')"><span class="fa fa-check"></span> Yes</a><button type="button" class="btn btn-success" data-dismiss="modal"><span class="fa fa-close"></span> No</button>';


		});
		// delete faculty end

		// load edit faculty start modal
		$(document).on('click','.edit_qualified',function(){
			var token=$(this).attr("id");
			$('#edit_faculty').modal('show');
			document.getElementById("edit_footer").innerHTML ='<a href="#" class="btn btn-danger" onclick="load_edit_faculty('+token+')"><span class="fa fa-check"></span> Yes</a><button type="button" class="btn btn-success" data-dismiss="modal"><span class="fa fa-close"></span> No</button>';


		});
		// edit faculty end




});

function links(){
	location.reload();
 }


  function delete_faculty(token){
			//alert(token);
		 	$.post("hub/php/delete_faculty.php",{token:token},
			function(response,status){

				if(response == 1 ){
					$('#delete').modal('hide');

					  swal("Faculty Deleted");
					  links();


				}else{
					swal(response);
				}


			});
 }

//Var type_id;


function load_block(){




  var campus_id = document.getElementById("campus_id").value;
  var gender = document.getElementById("gender").value;


$.post('hub/php/load_block.php',{campus_id:campus_id,gender:gender},
function(response,status){

document.getElementById("block_id").innerHTML =response;

});
}

function load_room(){




  var block_id = document.getElementById("block_id").value;
//alert(block_id);


$.post('hub/php/load_room.php',{block_id:block_id},
function(response,status){

document.getElementById("room_id").innerHTML =response;

});
}

function openCity(evt, cityName) {
  var i, tabcontent, tablinks;
  tabcontent = document.getElementsByClassName("tabcontent");
  for (i = 0; i < tabcontent.length; i++) {
    tabcontent[i].style.display = "none";
  }
  tablinks = document.getElementsByClassName("tablinks");
  for (i = 0; i < tablinks.length; i++) {
    tablinks[i].className = tablinks[i].className.replace(" active", "");
  }
  document.getElementById(cityName).style.display = "block";
  evt.currentTarget.className += " active";
}
</script>
