<?php

include_once 'includes/functions.php';
$tk = md5(rand(10,1000));
//include authenticator
//include_once 'includes/auth.php';


// get application no if he she has
if(isset($_POST['check_btn']))
{
	$appno = clean_data($_POST['appno']);
	$token = clean_data($_POST['token']);
	
	if ( $token !== '' && $appno !== '') {
		//get user id
		$user_id = get_user_id_by_app_no($appno);
		if(is_applicant_admitted($user_id)){

			$msg = '
				<h5 class="alert alert-success">
				 Dear <strong>'.get_user_fullname($user_id).'</strong>, you have been offered admission into
                  <strong>'.strtoupper(show_programme_type(get_user_programme_type_admitted_to($user_id))) .'</strong> 
                  programme to study <strong> '.  strtoupper(get_programme_title(get_user_programme_admitted_to($user_id))) .'</strong> for 
                  <strong>'.get_session_title(get_current_session($id = 1)).'</strong> Academic Session.
                  <br><br>
              		Registration & Screening will commence on 17th Dec.2018 to 15th Feb.2019.
              		<br>
              		Signed: Management. </h5> ';            
		}else{

			$msg = '<h5 class="alert alert-danger">You have NOT been offered Admission yet, please check back later.</h5>';	
		}


	}else{
		$msg = '<h5 class="alert alert-danger">Please re-submit data again!</h5>';
	}

}



?>

<!DOCTYPE html>
<html>
  <head>
    <title>.::NIGER STATE COLLEGE OF EDUCATION, MINNA Portal (NCE) APPLICATION PORTAL::.</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="images/favicon.png" type="image/x-icon" />
    <!-- Bootstrap -->
    
    <!-- call bootstap styles -->
    <link href="bootstrap-3.3.4/css/bootstrap.min.css" rel="stylesheet">
    
    <!-- call custom admin styles -->
	<link href="login/css/signin.css" rel="stylesheet">
	<link href="login/css/docs.css" rel="stylesheet" >
    
     <!-- call the fontawesome cdn file -->
   <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

    
    
    
    
     <!-- call jquery file for ajax login -->
    <script src="login/js/jquery.js" type="text/javascript" language="javascript"></script>
    
     <!-- for full slider index -->
	<script type="text/javascript" src="full-slider/js/jquery-1.10.2.js"></script>

    
    
       
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
  
</head>
<body style="background-image:url(images/IBBUMainGate_0%20opt.jpg); background-repeat:no-repeat; height:100%;width:100%;">
	<header class="navbar" role="banner">
			
            <!-- call the header -->
            <?php //include 'includes/header.php'; ?>
	
    
    </header>


	 
     
	<div class="container">
			<div class="row">
            
            <div style="height:5px; display: block;"> .</div>
            
            <div class="clearfix"></div>
            
            
            <div class="col-lg-4"></div>

            
            <div class="col-lg-4"></div>

            
            <div class="col-lg-12">
				
                    
                <div class="col-lg-4">
                
                
                
                
                </div>
                 
                <div class="col-lg-4 well alert-success">

                <div class="col-lg-12"><!-- <img src="images/login logo nce app opt.png" class="img-responsive" width="auto"  /> -->
                	<h3 class="">Admission Checker</h3>
                </div>
                
               	<!--  <div id="msgbox" style="display:none;"></div>-->
                    <div class="clearfix"></div>
                	<?php
						if(isset($msg) && $msg != ''){
							echo $msg;
						}    
					?>
                	
                 <!-- Notification -->
                    <span id="msgbox" style="display:none"></span>

	               <!-- <div class="alert alert-danger notification" id="error_alert">
			 			<button class="close" data-dismiss="alert" type="button">
			 				X

    		 			</button>
						<img src="login/img/error_icon.png" />  Oops! Invalid credentials..
                    </div>-->
                
                  
                 
                  <form id="login_form" name="log_in" class="form-signin form-horizontal" role="form"  method="post">
					<!--					<h6 class="form-signin-heading alert alert-info"><i class="fa fa-info"></i> Login with Application No. or Phone Number  and one of your Names.</h6> <hr/>
					-->					
                    <div class="form-group">
                      <label for="exampleInputEmail1">APPLICATION NO..</label>
                      <input name="appno" type="text" class="form-control" placeholder="Enter Application Number." required>
                    </div>
                    
					
                    
                   <!--   
                    <input class="form-control" type="text" name="username" id="username" autofocus required placeholder="Username" value="">
					<input class="form-control" type="password" name="password" id="password" required placeholder="Password" value="">
					
                  -->  
                    
                    
                    
                   <div class="form-group">                     
                    <div class="form-actions">
						
                         <div><button class="btn btn-success"  name="check_btn" value="" type="submit" style="width:100%;"> Check Status </button></div> <br/>
                      
                     
                        <input id="token" type="hidden" value="<?php echo $tk ?>" name="token">
                     
                    </div><!-- /.form actions -->
					
          		 </div><!-- form group -->
				</form>
                
                  <span style="text-align:center;"><h5>JD School Portal (JSP) - V2.0</h5></span>

                
                </div><!-- /.col lg 4 -->
                
                
                
                <div class="col-lg-4"></div>
                
                </div><!-- /.col lg 12 -->				
			</div><!-- /.row -->
		</div><!-- container -->
<!-- continer for the copied templates ends ---->


     
     
     
    <!-- JS boostrap -->
    <!-- Include all compiled plugins (below), or include individual files as needed -->
   <!-- <script src="bootstrap-3.3.4/js/bootstrap.min.js"></script>
    
    <script src="bootstrap-3.3.4/js/bootstrap.js"></script>
    -->
    
    
      <?php include 'includes/js_plugins.php';?>
      
      
      
      <!-- Modal for forgot password / not login in-->
<div class="modal fade" id="myModalForgetPassword" 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 text-danger">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Follow these steps if you can't login with your credentials</h4>
      </div>
      <div class="modal-body">
		
			<p class="bg-info">
				
				
				
				<table class="table table-hover">
					
					<tr><td class="info">Send SMS to this number (07068401380) according to the format below</td>	</tr>
					 <tr>	<td class="info">Sms your <b>full name</b>, [space]  <b>phone number</b>,[space] <b>email</b> you used during sign up. </td></tr>
                      <tr>  <td class="success">E.g <b>Abdulkadir Abubakar,  09076306098, youremail@gmail.com</b> </td></tr>
                        
                      <tr>  <td class="danger">Note: This is for applicants that have gotten their application number.</td></tr>
				
					
                    
                   
                    
				</table>
			</p>
            
            		
	
      </div>
      <div class="modal-footer">
        <button type="button" class="close btn-danger" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">Close</span></button>
      </div>
    </div>
  </div>
</div>

<!--- *********************************** not login ***************************************** -->
   
    
    
    <?php include 'includes/hide_notification.php'; ?>
    
  </body>
</html>

