<?php

ob_start();


//call the session start

session_start();

//collect action if ther is
if(isset($_REQUEST['act']))
{
	//collect the action
	$act = $_REQUEST['act'];
}





//collect quick links if there is
if(isset($_REQUEST['qlk']))
{
	//collect the quick link
	$encripted_qlk = $_REQUEST['qlk'];
}

//includes functions and classes
//include 'includes/functions.php';


//include functions
include ('includes/includes.php');




include_once 'includes/session_timer.php'; // call the session and cookie checkings





//include authenticator
include 'includes/auth.php';




//declare current page to be the base name 
$currentPage = basename($_SERVER['SCRIPT_NAME']);


//get user id first
$user_id = get_user_id();



//redirect accessed if the session / cookie was timed out
//redirect_asset($user_id);



?>

<body>

           
               <?php /*?>
                   <span class="label label-warning pull-right" > <i class="glyphicon glyphicon-info-sign"></i> last login:<?php echo  get_user_last_loggedout($user_id); ?> 
                   </span>&nbsp;&nbsp;
                   <span class="label label-success pull-right"> <i class="glyphicon glyphicon-info-sign"></i> IP: <?php echo get_user_ip($user_id);?> </span>  &nbsp;&nbsp;
                 </div>     
             <?php */?>
                  
				<!-- header goes here -->
                <div id="header">
                	
    					<?php include('includes/header.php');?>
                </div>
                
				<div style="height:4px;"></div>
                
<!-- container -->      
          <div class="">
                
              
                
               
                <div class="col-md-12"><!-- col-md-12-->
                  <!-- profile menu -->
                    <div class="col-md-3">
                    
                   	<?php include 'includes/php/get_student_info.php'; ?>
                        
                  	</div><!-- col-md-3-->
                      
                      <div class="col-md-2">
                      
                      
                      		<?php include 'includes/menu/menu.php'; ?>
                        
                      
                      <br>
                      
                      
                      
                      </div><!-- col -md  - 2 ends -->
                      <div class="col-md-7">
                        <!-- notification layout -->
                        <div class="row">
                            <div style="height:5px; display:block;"> </div> <?php include 'includes/notifications.php';?></div> <!-- /notification -->
                      
                      		<?php include 'includes/switch/switch_.php'; ?>
                      
                      </div><!-- col -md  - 7 ends -->
                      
                
                <!-- footer -->
                <!-- /footer -->
		
			
            
            </div><!-- col-md-12-->
            
            
	
	</div>
    <!-- /container -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    
   
    <?php include 'includes/js_plugins.php';?>
   
	
    
    
  
    
  </body>

	<!-- #########################plugins for the ric text editor############################################ -->
    <?php include 'includes/jquery.rte.plugins.php';?>
    <!-- ##########################plugins for rich text editor################################### -->
    
   
    <!-- tracker -->
    <?php  //set_user_log($user_id, $act);?>
	
    






	
<!-- passport Modal -->
<div class="modal fade" id="myModall" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Upload your passport</h4>
      </div>
      <div class="modal-body">
			<div class="col-md-5" style="padding-right:0px">
			
			<form action="dashboard.php" method="post" enctype="multipart/form-data">
				<?php if(get_user_image($user_id) == ''){ ?>
				 <a href="#" class="btn btn-default" data-toggle="modal" data-target="#myModall"> <img class="thumbnail img-responsive text-center" style="height:170px;"  src="images/bg.jpg" ></img></a>
                 
				<?php }else{ ?>
                       <a href="#" class="btn btn-default" data-toggle="modal" data-target="#myModall"> <img class="thumbnail img-responsive text-center" style="height:170px;"  src="../uploads/pictures/<?php echo get_user_image($user_id); ?>" alt="Click here to upload image"></img></a><!-- passed mymodall for upload -->
                                   
                
                <?php } ?>

				 <input type="file" name="image" />
                 
               
               
                   
		</center>
			</div>
			<div class="col-md-7" style="padding-left:0px">
				<div class="list-group">
				<div class="form-group">
					<div class="list-group">
					<div><h4 class="alert alert-danger">Instructions</h4></div>
						Your picture to be uploaded MUST conform with the following:<br/>
                        
                        * Jpeg format ONLY<br/>
                        * Less than 30KB<br/>
                        * Exactly 150px by 150px<br/>
                        * Recent Photograph<br/>
                        * Of good quality<br/>
                        * Of plain white background<br/>
				</div>
		
				</div>
			</div>
      </div>
                <div class="modal-footer">
                 <button type="submit"  class="btn btn-success"  value="Upload Passport">Upload Passport</button>
                <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
			  
                
               </div>
               
                  <input type="hidden" name="act" value="upload_image" />
                  
                  
                
               
            </form>
        
          
               
    </div>
  </div>
</div>
</div>
<!-------------------------------passport modal ------------------------------------------------------------------->




<!-- modal for applciation status s -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">  &nbsp;Application Status</h4>
      </div>
      
         <?php //get admission status
	  
	  		if(is_applicant_admitted($user_id) == '1') //if admitted
			{
				?>
      
      &nbsp;&nbsp;<h3 class="alert alert-info">Congratulations!.</h3>
     
     
     
                <?php
				
			}
			else
			{
	  
	  
	   ?>
       
       &nbsp;&nbsp;<h4 class="alert alert-danger">You have NOT been offered Admission yet, please check back later.</h4>


	  <?php 
	  
			}
      ?>       
             
       
     
      <div class="modal-body">
      
      <?php //get admission status
	  
	  		if(is_applicant_admitted($user_id) == '1') //if admitted
			{
				?>
                
                
               
               
              <h5> You have been  offered Provisional Admission into our 
                  <strong><?php echo strtoupper(show_programme_type(get_user_programme_type_admitted_to($user_id))); ?></strong> 
                  programme to study <strong><?php echo strtoupper(get_programme_title(get_user_programme_admitted_to($user_id))); ?></strong> for 
                  <strong><?php echo get_session_title(get_current_session($id = 1)); ?></strong> Academic Session.
              </h5>
               
               
                <hr/>
                
                <ul class="list-group">
                    <li class="list-group-item list-group-item-danger"><strong>Note to all:</strong></li>
                    <li class="list-group-item">Registration Exercise & School Fee payments starts on Monday 6th August, 2018.</li>
<!--                    <li class="list-group-item">Hold Acceptance Fee of N2,000 and Matriculation Gown Fee of N1,500 to the Screening Center.</li>
-->                    
                   <!-- <li class="list-group-item">At the Screening Center, you will be presented with your Admission Letter.</li>
                    <li class="list-group-item">You are also required to bring  your <b> Application Acknowledgement Slip </b> and all<b> Valid Original Credentials</b> </li>          -->  
                    <li class="list-group-item">For   help,  call 08132100022, 07068401380. Thanks  </li>            
                              
                    
                   <li class="list-group-item"><a class="btn btn-danger"  style="width:100%;" href="create_application_letter.php?u=<?php echo $user_id;?>&c=<?php echo md5('EasyBrother'); ?>" data-toggle="tooltip" target="_blank" data-placement="top" data-original-title="Click here to print your Admission Letter"><i class="glyphicon glyphicon-print"> </i> &nbsp; Click here to print your Notification Letter</a></li>
                	
                  <!--  <li class="list-group-item"><a class="btn btn-info"  style="width:100%;" href="dashboard.php?act=payments&qlk=<?php echo $pf_qlk;?>" data-toggle="tooltip"  data-placement="top" data-original-title="Click here to start Registration"><i class="glyphicon glyphicon-ok"> </i> &nbsp; Click here to start Registration / Generate Invoice</a></li> -->
               
                
                </ul>
                
                
                <?php
				
			}
	  
	  
	   ?>
          
          
           
                    
        
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
       <!-- <button type="button" class="btn btn-success change_password" ></button>-->
      </div>
      
     
          </div>
  </div>
</div>



<?php include 'includes/hide_notification.php'; ?>

<?php //ob_end_flush();?>