<?php

include_once 'includes/functions.php';

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



?>

<!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 full slider CSS here -->
	<link href="full-slider/css/full-slider.css" rel="stylesheet">
    
    
     <!-- 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>
    
    
    
   
	<script language="javascript">
    
	
	//login javascript starts here
	  $(function()
	  {
		  
		
		//hide all the loaders
		$("#error_alert").hide();
		
		
        $("#login_form").submit(function(e)
		{
			
			
			
			//remove all the class add the messagebox classes and start fading
			$("#msgbox").removeClass().addClass('messagebox').text('Validating....').fadeIn(1000);
			
						
			//check the username exists or not from ajax
			$.post("login/php/ajax_login.php",{ username:$('#username').val(),password:$('#password').val(),rand:Math.random() } ,function(data)
			{
			  if(data=='yes') //if correct login detail
			  {
				$("#msgbox").fadeTo(200,0.1,function()//start fading the messagebox
				{ 
				  //add message and change the class of the box and start fading
				  $(this).html('Login successful. Please wait.....').addClass('messageboxok').fadeTo(900,1,function()
				  { 
					 //redirect to secure page
					 window.location='dashboard.php';
				  });
				  
				});
			  }
			  else 
			  {
				$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
				{ 
				  //add message and change the class of the box and start fading
				  $(this).html('Oops! Passed credentials does not match with the one on system...').addClass('messageboxerror').fadeTo(900,1);
				  
				 
				  //$("#error_alert").fadeIn(900,1);

				});		
			  }
					
			});
			return false; //not to post the  form physically
		
		e.preventDefault();
		});
		//now call the ajax also focus move from 
		$("#password").blur(function()
		{
			$("#login_form").trigger('submit');
		});
		
		 
    });
    </script>
    
    
    
     <!-- front full slider index page slider -->
     <style type="text/css">
		/* red bg caption position */
		.blue_float_position
		{
			background-image:url(images/bluebgsm.png);
			box-shadow: 0 0 10px #000;
			position:absolute; 
			top:70px; left:60%; 
			max-width:500px; 
			max-height:150px;
			font-size:78px;
			
			
		}
		
		
		.black_float_position
		{
			background-image:url(images/blackbgsm.png);
			box-shadow: 0 0 10px #000;
			position:absolute; top:225px; 
			left:60%; 
			max-width:421px; 
			max-height:100px;  
			
			
		}

	
	</style>
    
    
    <style type="text/css">
	
	.messagebox{
		position:absolute;
		width:100px;
		margin-left:30px;
		border:1px solid #c93;
		background:#ffc;
		padding:3px;
	}
	.messageboxok{
		position:absolute;
		width:auto;
		margin-left:30px;
		border:1px solid #349534;
		background:#C9FFCA;
		padding:3px;
		font-weight:bold;
		color:#008000;
		
	}
	.messageboxerror{
		position:absolute;
		width:auto;
		margin-left:30px;
		border:1px solid #CC0000;
		background:#F7CBCA;
		padding:3px;
		font-weight:bold;
		color:#CC0000;
	}
	
	</style>


    <center><h1 class="text-info">Maintenace Mode</h1></center>





     
     
     
    <!-- 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';?>
   
        
     <!-- Script to Activate the Carousel full slider -->
    <script>
    $('.carousel').carousel({
        interval: 5000 //changes the speed
    })
    </script>  
    
    
    <?php include 'includes/hide_notification.php'; ?>
    
  </body>
</html>

