<?php $iNew = new iNew_dbConnect(); include 'header.php'; ?> <div class="container-fluid"> <div class="row"> <div class="col-md-4"> <div class="panel panel-info"> <div class="panel-heading"> Welcome </div> <div class="panel-body"> NAME : <?php echo $iNew->esc($_SESSION['fname']) . " " . $iNew->esc($_SESSION['lname']); ?> <br> Account Type : <?php if ($_SESSION['acctype'] == 0) { echo "<font color='#ea6153'>Administrator</font>"; } else { if ($_SESSION['acctype'] == 1) { echo "<font color='#9b59b6'>Professor</font>"; } else { echo "<font color='#2ecc71'>Student</font>"; } } ?> <?php if ($_SESSION['acctype'] == 2) { ?>
<?php include 'includes/config.php'; $iNew = new iNew_dbConnect(); if (!isset($_SESSION['ses_id']) || $_SESSION['acctype'] != 0) { echo "<script>location.href='/';</script>"; exit; } include 'header.php'; ?> <div class="container-fluid"> <div class="row"> <div class="col-md-4"> <div class="panel panel-info"> <div class="panel-heading"> Welcome </div> <div class="panel-body"> NAME : <?php echo $iNew->esc($_SESSION['fname']) . " " . $iNew->esc($_SESSION['lname']); ?> <br> Account Type : <?php if ($_SESSION['acctype'] == 0) { echo "<font color='#ea6153'>Administrator</font>"; } else { if ($_SESSION['acctype'] == 1) { echo "<font color='#9b59b6'>Professor</font>"; } else { echo "<font color='#2ecc71'>Student</font>"; }