<?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 ------------------------------------------------------------------->



	
<!-- Pdf Upload Modal -->
<div class="modal fade" id="myModall_pdf_upload" 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 credentials in Single PDF</h4>
      </div>
      <div class="modal-body">
			
			<form action="dashboard.php" method="post" enctype="multipart/form-data">
			
			       
		
                   
                       
                           
                           <h4 class="alert alert-danger">Instructions</h4>
                               <div class="alert alert-danger">
                              
                                    <p> 
                                    
                                    Please scan all your required documents & 
                                    credentials and convert all into a SINGLE PDF file of not more than 2 MB. 
                                    The single pdf file with all the credentials should then be uploaded. 
                                    
                                    </p>
                                  <br/>
                                    <p>
                                      Click on the choose file button to select your PDF . 
                                      The uploaded PDF MUST conform with the following: 
                                      <li>* Pdf format ONLY</li>
                                      <li>* Must be less than 2MB</li>
                                    </p>
                               </div>
                        
                
                        <input    name="pdf_file" class="form-control" class="form-control" type="file" ></input>
               
                        <input type="hidden" name="act" value="upload_pdf_file" />
                        
                        
                
                 
                 </div>
              
                <div class="modal-footer">
                 <button type="submit"  class="btn btn-success"  value="Upload File">Upload File</button>
                <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
			  
                
               </div>
               
              </form>
        
          
               
    </div>
  </div>
</div>
</div>
<!------------------------------- pdf upload  modal ------------------------------------------------------------------->




<!-- modal for changing password 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"> <img src="images/change_password.png" /> &nbsp;Change Password</h4>
      </div>
      <div class="modal-body">
        <form>
          <div id="feedback_message" class="text-center text-success"></div><!-- feed back message if successful or not -->
          <div class="form-group">
            <label for="recipient-name" class="control-label">Old Password</label>
            <input type="password" class="form-control" id="old_password" name="old_password" required>
            <span class="error_msg_old_pw help-block text-danger"> This field cannot be blank</span>
          </div>
          
          
           <div class="form-group">
            <label for="recipient-name" class="control-label">New Password</label>
            <input type="password" class="form-control" id="new_password" name="new_password" required>
            <span class="error_msg_new_pw help-block text-danger"> This field cannot be blank</span>
          </div>
          
           <div class="form-group">
            <label for="recipient-name" class="control-label">Confirm New Password</label>
            <input type="password" class="form-control" id="confirm_new_password" id="confirm_new_password" required>
            
             <span class="error_msg_cm_pw help-block text-danger">Confirmed Password doesnt match</span>
          </div>
         
        </form>
      </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" >Update</button>
      </div>
      
     
      <div id="flash" class="label label-success pull-right"></div>
      <div style="height:20px;"></div> 
    </div>
  </div>
</div>



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

<?php //ob_end_flush();?>