<?php

include_once 'includes/functions.php';

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

// get application no if he she has
if(isset($_GET['appnNSec']))
{
	$appno = $_GET['appnNSec'];
  $mt = $_GET['mt'];
}



?>

<!DOCTYPE html>
<html>
  <head>
    <title>.::NIGER STATE COLLEGE OF EDUCATION, MINNA Portal (NCE) SSPC 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>


    <!-- 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>
	<header class="navbar" role="banner">

            <!-- call the header -->
            <?php include 'includes/header.php'; ?>

		 <div style="border-bottom:green solid 2px"></div>

    </header>




	<div class="container">
			<div class="row">

            <div style="height:10px; display: block;"> .</div>
            <div class="col-lg-12"><!-- feedback message on different kinds of logout -->

            	<?php  if(isset($_REQUEST['msg'])){$msg = $_REQUEST['msg'];} ?>

                <?php
					if($msg == 'ce')
					{
				?> <div class="alert alert-danger notification">
			 			<button class="close" data-dismiss="alert" type="button">
			 				X

    		 			</button>
						<img src="login/img/info.png" />  Oops! Cookie has expired....
                    </div>

                 <?php
					}//end of if cookie expired
				 ?>

                 <?php
					if($msg == 'se')
					{
				 ?> <div class="alert alert-danger notification">
			 			<button class="close" data-dismiss="alert" type="button">
			 				X

    		 			</button>
						<img src="login/img/info.png" />  Oops! Your Session has expired, Please login again.....
                    </div>

                 <?php
					}//end of if session expired
				 ?>

                 <?php
					if($msg == 'lgt')
					{
				 ?> <div class="alert alert-info notification">
			 			<button class="close" data-dismiss="alert" type="button">
			 				X

    		 			</button>
						<img src="login/img/info.png" />  You have been successfully logged out......
                    </div>

                 <?php
					}//end of if log out
				 ?>





            </div><!-- /col lg 12 -->

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


          <?php

						if($appno != '')
						{
						?>
                		<div class="alert alert-info text-center"> <i class="fa fa-2x fa-info-circle" ></i> <br/>

                      <strong><span style="font-size:13px;">  YOUR MAT NO. IS:</span></strong><br/>
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:30px;font-weight:bold;" class="text-info "><?php echo $mt; ?></span></button><br/>



                            <strong><span style="font-size:13px;">  YOUR APP NO IS:</span></strong><br/>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="font-size:30px;font-weight:bold;" class="text-info "><?php echo $appno ?></span></button><br/>

                            <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please copy this no.s for reference purpose.</strong>

                       </div>

                        <?php
						}

						?>


					    <!-- Slider -->
                        <!-- <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> -->
                            <!-- Indicators -->
                            <!-- <ol class="carousel-indicators">
                              <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<!--                              <li data-target="#carousel-example-generic" data-slide-to="1"></li>
-->                            <!--  <li data-target="#carousel-example-generic" data-slide-to="2"></li>
                            </ol> -->

                      <!-- Wrapper for slides -->
                      <!-- <div class="carousel-inner" role="listbox">
                        <div class="item active">
                          <img src="slider/slider1.png" alt="..."  style="width:100%; height:350px;">
                          <div class="carousel-caption">

                          </div>
                        </div> -->
                       <!-- <div class="item">
                          <img src="slider/slider2.png" alt="..." style="width:100%; height:350px;">
                          <div class="carousel-caption">

                          </div>
                        </div>-->
                         <!--<div class="item">
                          <img src="slider/slider3.png" alt="..." style="width:100%; height:350px;">
                          <div class="carousel-caption">

                          </div>
                        </div>-->

                      <!-- </div> -->

                      <!-- Controls -->
                      <!-- <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
                        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                        <span class="sr-only">Previous</span>
                      </a>
                      <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
                        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                        <span class="sr-only">Next</span>
                      </a> -->
                    <!-- </div> <!-- /.generic caroul slide -->
                </div><!-- /.col-lg-4-->



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

               	<!--  <div id="msgbox" style="display:none;"></div>-->


                 <!-- 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">
					<h2 class="form-signin-heading">login here</h2> <hr/>

                      <div class="form-group">
                        <label for="username">Username</label>
					<input class="form-control" type="text" name="username" id="username" autofocus required placeholder="Username (Matric No.:)" value="">

                    </div>


                     <div class="form-group">
                        <label for="Password">Password (Use Application No.)</label>
					    <input class="form-control" type="password" name="password" id="password" required placeholder="Application Number" value="">
                     </div>


                  <div class="form-group">
                    <div class="form-actions">

                        <button class="btn btn-success"  name="act" value="Log-in" type="submit" style="width:100%;"> Login </button><div style="display:block; height:5px;"></div>
                        <button class="btn btn-success" type="reset" style="width:100%;">Clear </button> <div style="display:block; height:5px;"></div>

                        <a class="btn btn-success"  href="../a/"  style="width:100%;">I am Newbie.. </a><div style="display:block; height:5px;"></div>

                        <!-- <button type="button" class="btn btn-success" style="width:100%;" data-toggle="modal" data-target="#myModalForgetPassword">Forgot credentials? <span class="caret"></span></button> -->


                        <input id="token" type="hidden" value="4527" name="token"></input>
                          <h6 style="text-align:center;" > JSP V2.0 - Powered by JD Lab </h6>

                    </div><!-- /.form actions -->

          		</div><!-- form groups end -->
				</form>


                </div><!-- /.col lg 4 -->

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

	<!-- Modal for forgot password-->
<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">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Reset Password</h4>
      </div>
      <div class="modal-body">

			<p class="bg-info">

				<h5><span class="glyphicon glyphicon-arrow-right"></span>NOTE THAT: You can login with the following credentials</h5>

				<table class="table table-hover">
					<tr class="active">
						<td class="active">Username: E.g AS/SCI/16/0001</td>
						<td class="active">Password: E.g 0000</td>
					</tr>
					<!--<tr class="info">
						<td class="info">Your Email</td>
						<td class="info">Your Password</td>
					</tr>
					<tr class="info">
						<td class="active">Your Email</td>
						<td class="active">Your Phone Number</td>
					</tr>
					<tr class="info">
						<td class="active">Your Matric Number</td>
						<td class="active">Your Jamb Registration Number</td>
					</tr>
					<tr class="info">
						<td class="active">Your Matric Number</td>
						<td class="active">Your Phone Number</td>
					</tr>
					<tr class="info">
						<td class="active">Your Jamb Registration Number</td>
						<td class="active">Your Phone Number</td>
					</tr>

                    <tr class="info">
						<td class="active">Your Phone Number</td>
						<td class="active">Either of your firstname or lastname</td>
					</tr>
-->
				</table>
			</p>

      </div>
      <div class="modal-footer">
         <p class="bg-info">If you can not still login, please send text containing your Matric No. to this line 07068401380, <!-- <a href="/reset_password.php" class="label label-primary"> click here </a>-->  &nbsp;to reset your password</p>
      </div>
    </div>
  </div>
</div>












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