<form id="" name="" class="form-horizontal" method="post" action="dashboard.php?qlk=<?php echo $encripted_qlk; ?>" enctype="multipart/form-data">

<?php

//i did a programme to switch level that will load automatically
//collect the variables

$school = get_user_school_id($user_id); //get school id if for a user

$dept = get_user_department_id($user_id); //get dept id for user

$programme = get_user_programme_id($user_id); //get programme id if for a user

$level = get_user_level($user_id); //get user level

$programme_type = get_user_programme_type_id($user_id); //programme type

//get current session
$current_session = get_current_session($id = '1');

$sed_prog_id = get_user_sed_prog_id($user_id);


//get current semester
$current_semester = get_current_semester($id = 1);

$semester_t = get_semester_title($current_semester); //semster title




//get total no f cos
$counted_carry_overs = count_carry_overs_per_semester($user_id,$programme, $level, $current_session, $current_semester);




//for test purpose
//if($user_id != '84'){
    if(!has_paid_school_fee($user_id, $current_session, $current_semester) ) //check if the user has paid this session fee
    {
      header('Location: dashboard.php?act=course_registration0');

    }
//}




?>

<div style="height:20px; displat:block;"></div>

  <ul class="breadcrumb">

      <li class="active" ><a href="dashboard.php?act=course_registration0&qlk=<?php echo md5(3); ?>">Course Registration</a> <span class="divider"></span> </li>
      <li >Add new courses <span class="divider"></span> </li>
  </ul>

<div class="well">



 	<ul class="tabs">


    <!-- play with the level tabs small -->

    <?php if($level == 'I') {?>
        <li><a href="#view1">YEAR I COURSES</a></li>
       <!-- <li><a href="#view2">200L COURSES</a></li>
        <li><a href="#view3">300L COURSES</a></li>
        <li><a href="#view4">400L COURSES</a></li>
        <li><a href="#view5">500L COURSES</a></li> -->

     <?php }if($level == 'II'){ ?>
        <li><a href="#view1">YEAR I COURSES</a></li>
        <li><a href="#view2">YEAR II COURSES</a></li>

     <?php }if($level == 'III' ){?>
      <li><a href="#view1">YEAR I COURSES</a></li>
      <li><a href="#view2">YEAR II COURSES</a></li>
      <li><a href="#view3">YEAR III COURSES</a></li>

     <?php }?>




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



        	<!-- play with the tab contents small -->
<?php /*?>            $current_semester <?php */?>
            <?php if($level == 'I') { //if 100 ?>

            <div  id="view1">
              <h3 id="list" class="btn btn-success"> Level I - First <?php //echo $semester_t;  ?> Semester</h3> <br>
              <?php echo courses_to_register($semester = '1', $dept, $programme, $level='I', $programme_type); ?>


              <h3 id="list" class="btn btn-success">Level I  - Second Semester</h3> <br>
              <?php echo courses_to_register($semester = '2', $dept, $programme, $level='I', $programme_type); ?>

            </div> <!-- view1 ends -->
             <?php }if($level == 'II'){ //if 200  ?>

              <div  id="view1">
                  <h3 id="list" class="btn btn-success">Level I - First <?php //echo $semester_t;  ?> Semester</h3> <br>
                  <?php echo courses_to_register($semester = '1', $dept, $programme, $level='I', $programme_type); ?>


                <h3 id="list" class="btn btn-success">Level I - Second Semester</h3> <br>
                <?php echo courses_to_register($semester = '2', $dept, $programme, $level='I', $programme_type); ?>

               </div> <!-- view1 ends -->


              <div  id="view2">
                   <h3 id="list" class="btn btn-warning">Level II - First <?php //echo $semester_t;  ?> Semester</h3> <br>

                  <?php

                     if ($sed_prog_id > 0 || $sed_std ) {
                        //echo $sed_prog_id ;
                        echo courses_to_register($semester = '1', $dept, $sed_prog_id, $level ='II', $programme_type);

                     }else{
                      echo courses_to_register($semester = '1', $dept, $programme, $level ='II', $programme_type);



                     }

                  ?>





                  <h3 id="list" class="btn btn-warning">Level II - Second Semester</h3> <br>
                  <?php


                     if ($sed_prog_id > 0 || $sed_std ) {

                        echo courses_to_register($semester = '2', $dept, $sed_prog_id, $level ='II', $programme_type);

                     }else{
                      echo courses_to_register($semester = '2', $dept, $programme, $level ='II', $programme_type);



                     }


                   ?>

              </div> <!-- /view2 -->


            <?php }if($level == 'III'){ //if 300  ?>

               <div  id="view1">
                <h3 id="list" class="btn btn-success">Level  I -  First <?php //echo $semester_t;  ?> Semester</h3> <br>
                <?php echo courses_to_register($semester = '1', $dept, $programme, $level='I', $programme_type); ?>


              <h3 id="list" class="btn btn-success">Level I - Second Semester</h3> <br>
              <?php echo courses_to_register($semester = '2', $dept, $programme, $level='I', $programme_type); ?>

             </div> <!-- view1 ends -->


            <div  id="view2">
                 <h3 id="list" class="btn btn-warning"> Level II - First <?php //echo $semester_t;  ?> Semester</h3> <br>
                <?php

										//control to show speical education curses cmbined
                    if ($sed_prog_id > 0 || $sed_std ) {

                        echo courses_to_register($semester = '1', $dept, $sed_prog_id, $level ='II', $programme_type);

                     }else{
                      echo courses_to_register($semester = '1', $dept, $programme, $level ='II', $programme_type);



                     }

                ?>



                <h3 id="list" class="btn btn-warning">Level II - Second Semester</h3> <br>
                <?php
                if ($sed_prog_id > 0 || $sed_std ) {

                        echo courses_to_register($semester = '2', $dept, $sed_prog_id, $level ='II', $programme_type);

                     }else{
                      echo courses_to_register($semester = '2', $dept, $programme, $level ='II', $programme_type);



                     }

                 ?>

            </div> <!-- /view2 -->


             <div  id="view3">

                 <h3 id="list" class="btn btn-info"> Level  III - First <?php //echo $semester_t;  ?> Semester</h3> <br>

								<?php

										//check if the student has more than 10 Carry overs

										if($counted_carry_overs > 10 )
										{
											echo '<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; Sorry, you are not qualified to go for Teaching Practice due to the no. of outstanding courses for  '.get_session_title($current_session).' Academic Session.
														</div>';

									 	}
										else {
											// code...


												if ($sed_prog_id > 0 || $sed_std ) {

														echo courses_to_register($semester = '1', $dept, $sed_prog_id, $level ='III', $programme_type);

												 }else{
													echo courses_to_register($semester = '1', $dept, $programme, $level ='III', $programme_type);



												 }
										}

								?>



								<h3 id="list" class="btn btn-warning">Level III - Second Semester</h3> <br>
								<?php
								if ($sed_prog_id > 0 || $sed_std ) {

												echo courses_to_register($semester = '2', $dept, $sed_prog_id, $level ='III', $programme_type);

										 }else{
											echo courses_to_register($semester = '2', $dept, $programme, $level ='III', $programme_type);



										 }

								 ?>


             </div> <!-- /view3 -->


           <?php }  ?>


      </div>




  <div style="height:30px"></div>



<input type="hidden" value="preview_rc" name="act" />
<input type="submit" name="submit" class="btn btn-success" value="Preview" id="submit" data-toggle="tooltip" data-placement="top" title="Click here to see a preview"/>

</div><!-- /well -->

</form>
