<?php include("inc/db.php"); ?>
<!DOCTYPE html>
<html lang="en">

    <!-- Basic -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">   
   
    <!-- Mobile Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
 
     <!-- Site Metas -->
    <title>Student Portal</title>  
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Site Icons -->
    <link rel="shortcut icon" href="Image/poly (2).png" type="image/x-icon" />
    <link rel="apple-touch-icon" href="Image/poly (2).png">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Site CSS -->
    <link rel="stylesheet" href="style.css">
    <!-- ALL VERSION CSS -->
    <link rel="stylesheet" href="css/versions.css">
    <!-- Responsive CSS -->
    <link rel="stylesheet" href="css/responsive.css">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="css/custom.css">

    <!-- Modernizer for Portfolio -->
    <script src="js/modernizer.js"></script>

    <!--[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.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body class="host_version"> 

	<?php include("inc/menu.php"); ?>
    <div class="container " style="margin-top:50px;">
        <div class="row">
            <div class="col-md-4">
                <div class="container" >
                    <div class="container matric-section" style="text-align:center;">
                    <?php
                            session_start();

                            if(!isset($_SESSION['sname'])){
                                header("location:validation/index.php");
                                exit();


                            }

                            $sname = $_SESSION["sname"];
                            $query ="SELECT mat, fname, sname, Dept, leveld, passport FROM portal WHERE sname = '$sname'";
                            $query_result = $db->query($query);

                            if($query_result->num_rows == 1){
                                $row = $query_result->fetch_assoc();
                               
                            }
                        ?>
                        <img src="<?php echo $row['envillepoly.jpg']; ?>" width="200px" alt="" />
                        
                        <h5><?php echo $row['mat']; ?></h5>
                    </div>
                    <div class="container fullname-section">
                        <h5><?php echo $row['sname']; ?> <span style="color:#000000;"><?php echo $row['fname']; ?></span></h5>
                        <P style="text-transform:uppercase;"><?php echo $row['Dept']; ?> <span style="text-transform:uppercase;"> (<?php echo $row['leveld']; ?>)</span></P>
                        <hr/>
                    </div>
                   <div class="container">
                        <button type="button" class="btn btn default btn-block btn-style">Download your course materials here</button>
                        <hr/>
                   </div>
                </div>
            </div>
            <div class="col-md-8 content">
                <?php
                    if(isset($_GET['env'])){
                        $env = $_GET['env'];
                    }else{
                        $env = '';
                    }

                    switch($env){
                        case 'dashboard';
                        include 'inc/dashboard.php';
                        break;
                        case 'biodata';
                        include 'inc/biodata.php';
                        break;
                        case 'courses';
                        include 'inc/course-registration.php';
                        break;
                        case 'semester-courses';
                        include 'inc/semester-courses.php';
                        break;
                        case 'hostel';
                        include 'inc/hostel.php';
                        break;
                        case 'register-hostel';
                        include 'inc/register-hostel.php';
                        break;
                        case 'carryover-courses';
                        include 'inc/carryover-course.php';
                        break;
                        case 'print-courses-registered';
                        include 'inc/print-courses-registered.php';
                        break;
                        case 'print-carryover-courses-registered';
                        include 'inc/print-carryover-courses-registered.php';
                        break;
                    }
                ?>
            </div>
        </div>
    </div>
</body>
<script src="js/all.js"></script>
    <!-- ALL PLUGINS -->
    <script src="js/custom.js"></script>
	<script src="js/timeline.min.js"></script>
	<script>
		timeline(document.querySelectorAll('.timeline'), {
			forceVerticalMode: 700,
			mode: 'horizontal',
			verticalStartPosition: 'left',
			visibleItems: 4
		});
	</script>
</html>

