
	<script src="<?php echo base_url(); ?>assets/js/js/jquery.min.js"></script>
	<script src="<?php echo base_url(); ?>assets/js/js/jquery-1.9.0.min.js"></script>

	<script src="<?php echo base_url(); ?>assets/js/js/jquery-ui.min.js"></script>
	

   <script type="text/javascript">
        
        
            $(document).ready(function() { 

                
                $("#campusid").change(function(){
                 	var programid = $("#program").val();
                     /*dropdown post *///
                      $.ajax({
			 		url:"<?php echo base_url();?>apply/populatecoursebyid",
			 		
					 data: {campusid: $(this).val(),programid: programid },

                    type: "POST",
                    success:function(data){
                        
                        $("#courseid").html(data);
                    }
                
                    });

               
                });
		
			
			
				    $("#courseid").change(function(){
                 	
                     /*dropdown post *///
                      $.ajax({
			 		url:"<?php echo base_url();?>apply/populaterequirementbyid",
			 		
					 data: {courseid: $(this).val()},

                    type: "POST",
                    success:function(data){
                        
                        $("#description").html(data);
                    }
                
                    });

               
                });

            });

               $(function () {
        $("#program").change(function () {
            if ($(this).val() == "") {
                $("#campus").hide();
            } 
            else {
                $("#campus").show();
            }
        });
    });
         
        </script>
 
 
 <div class="row">
  
  
 
  <div class="col-xs-12 col-sm-6 col-lg-8">
  
 <div class="panel panel-success" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				Course Details
            	</div>
            </div>
			<div class="panel-body">

			
					
<div class="row">
	<div class="col-md-12">
		
			<div class="panel-body">





				<?PHP

			    

 echo $this->session->flashdata('msg'); 
		
                 echo form_open('viewrequirements' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
					
  <div class="form-group">

    <label for="inputprogram" class="col-sm-2 control-label"> Program </label>
    <div class="col-sm-10">
<select name="program" class="form-control"  id="program" required>
 <option value="" selected >---Select program/level---</option>
		<?php 

$program = $this->programmodel->populateprogram();


if(is_array($program)) {

   foreach($program as $rowprogram){

    ?>
	
    <option value="<?php echo set_value('program',$rowprogram->id); ?> "><?=$rowprogram->name;?></option>
    <?php

}} else {
    echo 'There is no program  available.... try again.';
}

?>
	</select>     <span class="text-danger">Select Program First<?php echo form_error('program'); ?></span>
   </div>
  </div>
  <div class="form-group">
    <label for="inputcampus" class="col-sm-2 control-label">Campus</label>
    <div class="col-sm-10">
<div id="campus" style="display: none">
				  <select name="campusname" class="form-control" id="campusid"  required>
    <option value=""  >---Select Campus of choice---</option>
		<?php 

$campus = $this->campusmodel->populatecampus();
var_dump($campus);

if(is_array($campus)) {

   foreach($campus as $rowcampus){

    ?>
	
    <option value="<?php echo set_value('campus',$rowcampus->id); ?> "><?=$rowcampus->name;?></option>
    <?php

}} else {
    echo 'There is no any campus data available.... try again.';
}

?>
	</select>
       <span class="text-danger">Select campus of your choice <?php echo form_error('campusname'); ?></span>
   </div>
  </div>  </div>
    <div class="form-group">
    <label for="inputcoursename" class="col-sm-2 control-label">Course</label>
    <div class="col-sm-10">
 <select name="coursename" id="courseid" class="form-control" required>
        <option value="">---Select a course---</option>
        </select>    <span class="text-danger">Select the course first<?php echo form_error('coursename'); ?></span>
	</div>
  </div>

  

 
  
  
  

    
  
  
  
  
  
  
  <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  name="btn_viewrequirements"  value="requirements" class="btn btn-success"> View Requirements </button>

    </div>
  </div>
                   






				   
                <?php echo form_close();?>
				
				  <?php
				      echo form_open('/' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
				
				<div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  name="btn_home"  value="home" class="btn btn-info"> Click here to go back to home page </button>

    </div>
  </div>
				
          
                <?php echo form_close();?>     
        </div>
    </div>
</div>

			
			
			
			
			
			
			
			
			</div>
		</div>
  
  </div>
  <div class="col-xs-12 col-sm-6 col-lg-4">
   <div class="panel panel-success" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title"  id="redcolor">
            		<i class="entypo-plus-circled"></i>
				Guidelines
            	</div>
            </div>
			<div class="panel-body">

				1.Select program.<br>
				2.Select Campus.<br>
				3.Select Course.<br>
				
				5.Click "View Requirements".<br>
			</div>
		</div>
  
  </div>
</div>