<?php session_start();
include("connect.php");

if(isset($_SESSION['stureg_id'])){
	$cam=mysqli_query($con,"select * from student where id='".$_SESSION['stureg_id']."'");
	$stu=mysqli_fetch_assoc($cam);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Student Course Registration Portal :: Inspire Polytechnic</title>
   <meta name="description" content="Inspire Polytechnic, Course Registration Portal" />
<meta name="keyword" content="Inspire Polytechnic,  Course Registration, Portal, Studies,  Education" />
	<meta name="author" content="Dosumu Ololade"/>
    <link rel="icon" href="img/lasu_logo.png">
    
    <link href="assets/css/themify-icons.css" rel="stylesheet">
    <link href="assets/css/flaticon.css" rel="stylesheet">
    <link href="assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="assets/css/animate.css" rel="stylesheet">
    <link href="assets/css/owl.carousel.css" rel="stylesheet">
    <link href="assets/css/owl.theme.css" rel="stylesheet">
    <link href="assets/css/slick.css" rel="stylesheet">
    <link href="assets/css/slick-theme.css" rel="stylesheet">
    <link href="assets/css/swiper.min.css" rel="stylesheet">
    <link href="assets/css/owl.transitions.css" rel="stylesheet">
    <link href="assets/css/jquery.fancybox.css" rel="stylesheet">
    <link href="assets/css/odometer-theme-default.css" rel="stylesheet">
    <link href="assets/css/style.css" rel="stylesheet">

<style>

div#programme_box{
-webkit-transition: width 2s, height 2s, -webkit-transform 2s; /* Safari */
    transition: width 2s, height 2s, transform 2s;
}

div#programme_box:hover{
	transition-duration: 2s;
  -ms-transform: scale(1.15,1.15); /* IE 9 */
    -webkit-transform: scale(1.15,1.15); /* Safari */
    transform: scale(1.09,1.09); /* Standard syntax */
}


section#login {
  background: #ebf0fa; /* For browsers that do not support gradients */
  background: -webkit-linear-gradient(left top,  #ebf0fa, white); /* For Safari 5.1 to 6.0 */
  background: -o-linear-gradient(bottom right,  #ebf0fa, white); /* For Opera 11.1 to 12.0 */
  background: -moz-linear-gradient(bottom right,  #ececf9, white); /* For Firefox 3.6 to 15 */
  background: linear-gradient(to bottom right, #ececf9, white); /* Standard syntax */
}
</style>

</head>

<body>

    <!-- start page-wrapper -->
    <div class="page-wrapper">

        <!-- start preloader -->
        <div class="preloader">
            <div class="angular-shape">
                <div></div>
                <div></div>
                <div></div>
            </div>
            <div class="spinner">
              <div class="double-bounce1"></div>
              <div class="double-bounce2"></div>
            </div>
        </div>
        <!-- end preloader -->

        <!-- Start header -->
        <header id="header" class="site-header header-style-2">

            <nav class="navigation navbar navbar-default">
                <div class="container">
                    
					<div class="logo-wrapper pull-left">
                                <div class="logo">
                                    <a href="index.php"><img style="width:280px; margin-bottom:-25px;" src="assets/images/logo.png" alt></a>
                                </div>
                            </div>

                    <div class="navbar-header">
                        <button type="button" class="open-btn">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                    </div>

                    <div id="navbar" class="navbar-collapse collapse navigation-holder">
                        <button class="close-navbar"><i class="ti-close"></i></button>
                        <ul class="nav navbar-nav">
                            <li><a href="index.php">Home</a></li>
                            <li><a target="_blank" href="https://inspirepolytechnic.edu.ng/">School Website</a></li>
							 <li><a href="mailto:info@inspirepolytechnic.edu.ng" target="_blank">Help</a></li>
							<?php
							if(isset($_SESSION['stureg_id'])){
								echo ' <li><a href="dashboard.php">Dashboard</a></li>
								<li><a href="logout.php">Logout</a></li>';
							}else{
								echo ' <li><a href="#login">Login</a></li>
								<li><a href="signup.php">Create Account</a></li>';
							}
							?>
                        </ul>
                    </div><!-- end of nav-collapse -->

					<?php 
					if(isset($_SESSION['stureg_id'])){
                    echo '<div class="cart-search-contact">
					<div class="header-search-form-wrapper" style="margin-top:5px;">
                            '.ucwords($stu['sname']).'
                        </div>
					
                        <div class="mini-cart">
                            <button class="cart-toggle-btn">  <i class="ti-user"></i> 
							<span style="background:#00cc00; width:10px; height:10px;" class="cart-count"></span></button>
                            <div class="mini-cart-content">
                                <div class="mini-cart-items">
                                    <div class="mini-cart-item clearfix">
                                        <div class="mini-cart-item-des">
                                            <a href="dashboard.php"><i class="ti-light-bulb"></i> Profile</a>
                                        </div>
                                    </div>
                                    <div class="mini-cart-item clearfix">
                                        <div class="mini-cart-item-des">
                                            <a href="logout.php"><i class="ti-power-off"></i> Logout</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>';
					}
					?>
					
					
					
                </div><!-- end of container -->
            </nav>
        </header>
        <!-- end of header -->


        <!-- start of hero -->
        <section class="hero-slider hero-style-2">
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <div class="swiper-slide">
                        <div class="slide-inner slide-bg-image" style="background-size:; background-repeat:no-repeat;" data-background="images/slide1.png">
                            <div class="gradient-overlay"></div>
                            <div class="container">
                                <div data-swiper-parallax="300" class="slide-title">
                                     <h2 class="hidden-sm hidden-xs" style="font-size:50px; color:white; text-shadow: 3px 3px 4px #0d0d26;">Inspire Polytechnic.</h2>
						<!--<p class="hidden-sm hidden-xs" style="font-size:50px; margin-top:-21px; color:white; font-weight:600;"> Student</p>
						<p class="hidden-md hidden-lg" style="font-size:33px; margin-top:-21px; color:white; font-weight:600;">Student</p>-->
						<p style="line-height:1.2; font-size:33px; margin-top:-21px; color:white; font-weight:600;">Course Registration Portal</p>
                                </div>
                                <div data-swiper-parallax="400" class="slide-text">
                                    <p style="font-size:17px;">Inspire Polytechnic is the first of its kind in Nigeria , providing technology based access to students worldwide by taking advantage of state-of-the-art technology...</p>
                                </div>
                                <div class="clearfix"></div>
                                <?php
								if(isset($_SESSION['stureg_id'])){
								echo '<div data-swiper-parallax="500" class="slide-btns">
                                    <a href="dashboard.php" class="theme-btn">My Dashboard</a> 
                                </div> ';
								}else{
									echo '<div data-swiper-parallax="500" class="slide-btns">
                                    <a href="signup.php" class="theme-btn">Start Registration</a> 
                                </div> ';
								}
								?>
                            </div>
                        </div> <!-- end slide-inner --> 
                    </div> <!-- end swiper-slide -->

                </div>
                <!-- end swiper-wrapper -->

                <!-- swipper controls -->
            </div>
        </section>
        <!-- end of hero slider -->


        <!-- start features-section -->
		
		<section class="features-section" style="margin-top:-220px;">
		<div class="container">
		
		<div class="row">
                    <div class="col col-lg-6 col-lg-offset-3">
                        <div class="section-title-s3">
                            <h2>Benefits</h2>
                            <span style="font-size:17px; text-transform:initial; letter-spacing:initial;">Among incredible benefits of using the course registration portal</span>
                        </div>
                    </div>
                </div>
		
		
		<div class="row">
		
					<div class="col-md-4">
					<div style="margin:5px; background-color:white;border-radius:6px; border:2px solid #eef0f6; box-shadow:0 0 0 0 transparent;">
					 <div align="center" style="margin-top:17px; margin-left:16px;">
										<img src="img/v1.png" style="width:90px;" class="img-responsive" alt=""></div>
                                    
                                    
                                <div class="single-product-text" align="center" style="margin-top:-35px; padding:35px; margin-bottom:-20px;">
                                     <h4 style="font-weight:600;font-size:17px; font-family:Arial;">CONVENIENCE</h4>
                     <p style="font-size:13px;margin-top:7px;font-weight:normal;">Departments do not have to deal with influx of students in their offices to register courses.</p>
                                    </div>
                                    
                    </div>
					</div>
		
					<div class="col-md-4">
					<div style="margin:5px; background-color:white;border-radius:6px; border:2px solid #eef0f6; box-shadow:0 0 0 0 transparent;">
					 <div align="center" style="margin-top:17px; margin-left:16px;">
										<img src="img/v3.png" style="width:90px;" class="img-responsive" alt=""></div>
                                    
                                    
                                <div class="single-product-text" align="center" style="margin-top:-35px; padding:35px; margin-bottom:-20px;">
                                     <h4 style="font-weight:600;font-size:17px; font-family:Arial;">DETAILED REPORTING</h4>
                     <p style="font-size:13px;margin-top:7px;font-weight:normal;">Having all of this data allows for more accurate reporting.</p>
                                    </div>
                                    
                    </div>
					</div>
		
					<div class="col-md-4">
					<div style="margin:5px; background-color:white;border-radius:6px; border:2px solid #eef0f6; box-shadow:0 0 0 0 transparent;">
					 <div align="center" style="margin-top:17px; margin-left:16px;">
										<img src="img/v2.png" style="width:90px;" class="img-responsive" alt=""></div>
                                    
                                    
                                <div class="single-product-text" align="center" style="margin-top:-35px; padding:35px; margin-bottom:-20px;">
                                     <h4 style="font-weight:600;font-size:17px; font-family:Arial;">ECO-FRIENDLY</h4>
                     <p style="font-size:13px;margin-top:7px;font-weight:normal;">A practically ecofriendly approach, designed with self dashboard.</p>
                                    </div>
                                    
                    </div>
					</div>
					
					</div>
					</div>
		</section>
		
		
		<?php
		if(!isset($_SESSION['stureg_id'])){ ?>
        <section class="features-section" id="login" style="margin-top:30px;">
            <div class="container">
                <div class="row">
                    <div class="col col-lg-6 col-lg-offset-3">
                        <div class="section-title-s3">
                            <span style="font-size:17px; text-transform:initial; letter-spacing:initial;">Course Registration</span>
                            <h2>Student Login Portal</h2>
                        </div>
                    </div>
                </div>


				
                <div class="row">
                   <div class="col col-md-5 hidden-xs hidden-sm">
                        <div class="feature-grid clearfix" align="center">
						<img src="img/body_banner.png" class="img-responsive" style="border:6px solid white; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
                        </div>
                    </div>
				
                    <div class="col col-md-1"></div>
                    <div class="col col-md-6">
                    <div class="select_prog">
					<h2 style="text-align:center; margin-bottom:29px; font-size:24px;">Select Programme</h2>
					<div class="row" style="border:4px solid #404040; border-radius:0; background-color:white; padding:40px 13px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
					<?php
					$duo=mysqli_query($con,"select * from programme order by name asc");
					while($pro=mysqli_fetch_assoc($duo)){
						$rand = rand(1,6);
						
						if($rand==1){
							$color='#ffb31a';
						}else if($rand==2){
							$color='#0066ff';
						}else if($rand==3){
							$color='#e60000';
						}else if($rand==4){
							$color='#00994d';
						}else if($rand==5){
							$color='#ffb31a';
						}else if($rand==6){
							$color='#cc0066';
						}else{
							$color='#00b2b3';
						}
		
						echo '<div class="col-md-12">
						<div class="panel panel-default card-view pa-0" id="programme_box" style="background-color:; border:2px solid #ff9900; border-radius:7px; ">
							<div class="panel-wrapper collapse in">
								<div class="panel-body pa-0">
									<div class="sm-data-box">
										<div class="container-fluid">
											<div class="row">
												<div class="col-xs-8 text-center pl-0 pr-0 data-wrap-left">
													<span class="txt-dark block counter">
													<span style="font-weight:600; font-size:20px; color:#595959;">'.html_entity_decode($pro['name']).'<br> ('.$pro['description'].')</span></span>
												</div>
												<div class="col-xs-4 text-center  pl-0 pr-0 data-wrap-right">
													<i style="font-size:55px;color:#ffd599; " class="pull-right ti-medall  data-right-rep-icon"></i> <div class="clearfix"></div>
												</div>
										
										</span>
											</div>	
											
											<div class="row" align="center" style="margin-top:10px;">
								<a href="javascript:void()" class="select_programme btn btn-info btn-flat" title="Select" id="'.$pro['id'].'_'.$pro['name'].' ('.$pro['description'].')" style="border:0;">
								 &nbsp; Proceed <i class="ti ti-arrow-right ">&nbsp;</i>
								</a>			
											</div>
											
										</div>
									</div>
								</div>
							</div>
						</div>
						</div>';
					}
					?>
					</div>
					</div>
					
					
						<div class="error"></div>
						<div class="login_container" style="display:none; padding:30px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); background-color:white;">
						<form method="post" id="form_submit">
							<p style="margin-bottom:7px;">Complete the form below </p><hr>
						<input type="hidden" name="student_login" class="sel_prog_id" value="true">
						
						<div class="form-group">
						<label class="control-label mb-5" for="email_de">Matric No</label>
						<input type="text" style="height:46px; border-radius:0;" class="form-control" name="matric_no" placeholder="Your Matriculation Number" required >
						</div>
						
						<div class="form-group">
						<label class="control-label mb-5" for="email_de">Password</label>
						<input type="password" placeholder="Your Account Password" style="height:46px; border-radius:0;" class="form-control" name="log_password" required >
						</div>
						
						
						<div class="form-group">
						<label class="control-label mb-5" for="email_de">Programme</label>
						<input type="text" style="height:46px; border-radius:0; background:white;" class="form-control programme_name" readonly>
						</div>
						
						<!--<div class="checkbox checkbox-primary" align="center">
						<input id="checkbox2" type="checkbox" style="margin-top:6px;" required>
						<label for="checkbox"> <a href="terms.php" target="_blank">I agree to the terms and conditions </a></label>
						</div> -->
						
						<div class="msg"></div>
						
	<a href="index.php" style="font-family:Now; width: 140px; padding: 10px; margin-top: 20px; display: block; margin-left:auto; margin-right: auto; border-radius: 5px;" class="btn-default btn pull-left">Refresh <i class=" ti-reload"></i></a>
	
	 <button class="view-cart-btn btn pull-right" type="submit">Login <i class="ti-angle-double-right"></i></button>
							 <div class="clearfix"></div>
							 
			<br>
			
			<div class="row">
			<div class="col-md-6"><p style="font-size:14px;text-align:left;"> <a href="forgot-password.php">Forgot Password?</a></p></div>
			<div class="col-md-6"><p style="font-size:14px;text-align:right;">Don't have an account? <a href="signup.php">Signup!</a></p></div>
			
			</div>
			
							 
						</form>
                        </div>
						
						
						
						
                    </div>
					
                </div>
            </div> <!-- end container -->
        </section>
        <!-- end features-section -->
		<?php }else{
			echo '<div style="margin-top:; background-color:lavendar; height:26px;"></div> 
			<div class="clearfix"></div>
			';
		} ?>

            

        <!-- start site-footer -->
        <footer class="site-footer">
            <div class="angular-shape">
                <div></div>
                <div></div>
                <div></div>
            </div>

            <div class="upper-footer hidden-xs">
                <div class="container">
                    <div class="row">
                        <div class="col col-lg-3 col-md-3 col-sm-6">
                            <div class="widget about-widget">
                                <div class="logo widget-title">
                                    <img src="assets/images/footer-logo.png" alt>
                                </div>
                                <p style="text-align:justify;">Inspire Polytechnic has been established with a vision to transform lives of youngsters in Nigeria and the first center has been opened at Yaba, Lagos. Inspire Polytechnic is promoted by an international corporate group headquartered in UK.</p>
                            </div>
                        </div>
                        <div class="col col-lg-3 col-md-3 col-sm-6">
                            <div class="widget link-widget">
                                <div class="widget-title">
                                    <h3>Useful Links</h3>
                                </div>
                                <ul>
                                    <li><a href="https://inspirepolytechnic.edu.ng" target="_blank">Official Website</a></li>
                                    <li><a href="https://inspirepolytechnic.edu.ng/contact/" target="_blank">Contact Us</a></li>
                                    <li><a href="https://inspirepolytechnic.edu.ng/how-to-apply/" target="_blank">Application</a></li>
                                </ul>
                                <ul>
                                    <li><a href="https://inspirepolytechnic.edu.ng/about/" target="_blank">About Us </a></li>
                        <li><a href="https://inspirepolytechnic.edu.ng/polytechnic-courses/" target="_blank">Accredited Courses</a></li>
                                    <li><a href="https://inspirepolytechnic.edu.ng/vocational-courses/" target="_blank">Vocational Courses </a></li>
                                </ul>
                            </div>
                        </div>
                        <div class="col col-lg-3 col-md-3 col-sm-6">
                            <div class="widget contact-widget service-link-widget">
                                <div class="widget-title">
                                    <h3>Address Location</h3>
                                </div>
                                <ul>
                                    <li><i class="ti-location-pin"></i> Egbeda Campus: 39/41, Karimu Laka Street, Egbeda, Lagos, Nigeria.</li>
                                    <li><i class="ti-location-pin"></i> Yaba Campus: 3A, Ikorodu Road, Opposite Jibowu Bustop, Yaba Lagos, Nigeria.</li>
                                    <li><i class="ti-comment-alt"></i> Email: info@inspirepolytechnic.edu.ng</li>
                                </ul>
                            </div>
                        </div>
                        <div class="col col-lg-3 col-md-3 col-sm-6">
                            <div class="widget newsletter-widget">
                                <div align="center"><img src="img/lasu_logo.png" style="width:200px;"></div>
                            </div>
                        </div>
                    </div>
                </div> <!-- end container -->
            </div>
            <div class="lower-footer">
                <div class="container">
                    <div class="row">
                        <div class="separator"></div>
                        <div class="col col-xs-12">
                            <p class="copyright">Copyright &copy; <?php echo date("Y");?> Inspire Polytechnic. All rights reserved.</p>
                            <div class="social-icons">
                                <ul>
                          <li><a href="https://www.facebook.com/InspirePolytechnic" target="_blank">Facebook</a></li>
                          <li><a href="https://www.twitter.com/inspirevocation" target="_blank">Twitter</a></li>
                          <li><a href="https://www.instagram.com/inspirepolytechnic/" target="_blank">Instagram</a></li>
                          
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </footer>
        <!-- end site-footer -->




    </div>
    <!-- end of page-wrapper -->



    <!-- All JavaScript files
    ================================================== -->
    <script src="assets/js/jquery.min.js"></script>
	<script>
	jQuery().ready(function(){
		$("a.select_programme").click(function(){
			var select_programme=$(this).attr('id');
			var exp= select_programme.split("_");
			$("input.sel_prog_id").val(exp[0]);
			$("input.programme_name").val(exp[1]);
			
			$("div.select_prog").hide();
			$("div.login_container").fadeIn("slow");
		});
		
				$("form#form_submit").on('submit',(function(e){
					e.preventDefault();
			$("div.msg").html("<p style='color:#202060; font-weight:600; padding:5px; text-align:center;'><i class='ti-infinite'></i> Authenticating Student Data...</p>");
	
				$.ajax({
						type: "POST",
                        url: "operation.php",
                        data: new FormData(this),
						contentType:false,
						processData:false,
                        cache: false,
                        success: function(data){ 
						$("div.msg").html(data);
						}
    });			
	
	
		}));
		
		
	});
	</script>
	
    <script src="assets/js/bootstrap.min.js"></script>

    <!-- Plugins for this template -->
    <script src="assets/js/jquery-plugin-collection.js"></script>

    <!-- Custom script for this template -->
    <script src="assets/js/script.js"></script>
</body>
</html>
