forked from mrlan/LRR
Header.php: indent code.
parent
933a328b7e
commit
ac6956d58c
266
Header.php
266
Header.php
|
@ -13,155 +13,159 @@ if (mysqli_connect_errno()) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
|
<link href="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
|
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||||
|
|
||||||
<script src="./css/jquery.min.js" type="text/javascript"></script>
|
|
||||||
<script src="./css/bootsrap.min.js" type="text/javascript"></script>
|
|
||||||
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
|
<script src="./css/jquery.min.js" type="text/javascript"></script>
|
||||||
|
<script src="./css/bootsrap.min.js" type="text/javascript"></script>
|
||||||
|
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" style="padding-left:150px;padding-right:150px;margin:auto;">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" style="padding-left:150px;padding-right:150px;margin:auto;">
|
||||||
<a class="navbar-brand" href="~\..\index.php"> <img src="logo.png" style="width:30px;heigh:30px;"> LRR </a>
|
<a class="navbar-brand" href="~\..\index.php"> <img src="logo.png" style="width:30px;heigh:30px;"> LRR </a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarColor02">
|
<div class="collapse navbar-collapse" id="navbarColor02">
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
|
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<!-- <a class='nav-link' href='~\..\Visitors.php'> <i class='fa fa-globe'></i> Visitor Portal <span class='sr-only'>(current)</span></a> -->
|
<!-- <a class='nav-link' href='~\..\Visitors.php'> <i class='fa fa-globe'></i> Visitor Portal <span class='sr-only'>(current)</span></a> -->
|
||||||
</li>
|
</li>
|
||||||
<?php
|
|
||||||
if(isset($_SESSION["user_fullname"]))
|
|
||||||
{
|
|
||||||
|
|
||||||
echo " <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>";
|
|
||||||
?>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<form class="form-inline my-2 my-lg-0" style="color:#fff;">
|
|
||||||
Welcome <b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$c_date= date("Y-m-d H:i");
|
if (isset($_SESSION["user_fullname"])) {
|
||||||
if (isset( $_SESSION['user_student_id']))
|
|
||||||
echo "(". $_SESSION['user_type'] . " - " . $_SESSION['user_student_id'] .") ";
|
echo " <a class='nav-link' href='~\..\Courses.php'><i class='fa fa-book'></i> Courses <span class='sr-only'>(current)</span></a>";
|
||||||
else
|
|
||||||
echo "(". $_SESSION['user_type'] .") ";
|
|
||||||
?>
|
?>
|
||||||
|
</li>
|
||||||
<?php
|
</ul>
|
||||||
if ($_SESSION['user_type'] == "Lecturer") {
|
<form class="form-inline my-2 my-lg-0" style="color:#fff;">
|
||||||
echo " <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i> <a style='color:#fff !important' href=\"~\..\Admin.php\">Admin </a>";
|
Welcome <b> <?php echo $_SESSION['user_fullname']; ?> </b>
|
||||||
}
|
|
||||||
?>
|
<?php
|
||||||
|
$c_date = date("Y-m-d H:i");
|
||||||
<i class="fa fa-user" style="color:#fff;"> </i>
|
if (isset($_SESSION['user_student_id']))
|
||||||
<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id'];?>)">Update password</a>
|
echo "(" . $_SESSION['user_type'] . " - " . $_SESSION['user_student_id'] . ") ";
|
||||||
<i class="fa fa-lock" style="color:#fff;"> </i> <a style='color:#fff !important' href="~\..\logout.php">Logout </a>
|
else
|
||||||
|
echo "(" . $_SESSION['user_type'] . ") ";
|
||||||
<?php
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($_SESSION['user_type'] == "Lecturer") {
|
||||||
|
echo " <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i> <a style='color:#fff !important' href=\"~\..\Admin.php\">Admin </a>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.nav-item{
|
|
||||||
border-color:#00ff66;
|
|
||||||
}
|
|
||||||
.nav-tabs{
|
|
||||||
border-color:#00ff66;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.btn-default{
|
|
||||||
border: 2px solid #00ff66;
|
|
||||||
width: 100%;
|
|
||||||
text-align:left;
|
|
||||||
margin:3px auto;
|
|
||||||
font-weight:bold;
|
|
||||||
font-size:13pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-bordered{
|
|
||||||
padding:5px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert{
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
h1,h2,h3,h4{color:#03407B;}
|
|
||||||
a {
|
|
||||||
color: #03407B;
|
|
||||||
}
|
|
||||||
|
|
||||||
.break-word {
|
<i class="fa fa-user" style="color:#fff;"> </i>
|
||||||
word-wrap: break-word;
|
<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id']; ?>)">Update password</a>
|
||||||
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
|
<i class="fa fa-lock" style="color:#fff;"> </i> <a style='color:#fff !important' href="~\..\logout.php">Logout </a>
|
||||||
white-space: -pre-wrap; /* Opera 4-6 */
|
|
||||||
white-space: -o-pre-wrap; /* Opera 7 */
|
|
||||||
white-space: pre-wrap; /* css-3 */
|
|
||||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
|
||||||
white-space: -webkit-pre-wrap; /* Newer versions of Chrome/Safari*/
|
|
||||||
word-break: break-all;
|
|
||||||
white-space: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.ui-widget-content.ui-dialog
|
|
||||||
{
|
|
||||||
border: 2px solid #03488B;
|
|
||||||
|
|
||||||
}
|
|
||||||
.ui-dialog > .ui-widget-header {background: #03488B; color:white}
|
|
||||||
|
|
||||||
.ui-button{ background: #03488B; color:white }
|
|
||||||
|
|
||||||
</style>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
<script>
|
</div>
|
||||||
function updatePass(id)
|
</nav>
|
||||||
{
|
|
||||||
|
|
||||||
var pass = prompt("Enter your new password : ", "Enter a strong password");
|
|
||||||
|
|
||||||
if(!confirm('Are you sure you want to reset your password?'))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.href="\Script.php\?action=passchange&uid="+id+"&pass="+pass;
|
<style>
|
||||||
|
.nav-item {
|
||||||
|
border-color: #00ff66;
|
||||||
}
|
}
|
||||||
|
|
||||||
function blockUser(id,status)
|
.nav-tabs {
|
||||||
{
|
border-color: #00ff66;
|
||||||
if(!confirm('Are you sure you want to change user status?'))
|
}
|
||||||
{
|
|
||||||
return;
|
.btn-default {
|
||||||
|
border: 2px solid #00ff66;
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
margin: 3px auto;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 13pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-bordered {
|
||||||
|
padding: 5px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4 {
|
||||||
|
color: #03407B;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #03407B;
|
||||||
|
}
|
||||||
|
|
||||||
|
.break-word {
|
||||||
|
word-wrap: break-word;
|
||||||
|
white-space: -moz-pre-wrap !important;
|
||||||
|
/* Mozilla, since 1999 */
|
||||||
|
white-space: -pre-wrap;
|
||||||
|
/* Opera 4-6 */
|
||||||
|
white-space: -o-pre-wrap;
|
||||||
|
/* Opera 7 */
|
||||||
|
white-space: pre-wrap;
|
||||||
|
/* css-3 */
|
||||||
|
word-wrap: break-word;
|
||||||
|
/* Internet Explorer 5.5+ */
|
||||||
|
white-space: -webkit-pre-wrap;
|
||||||
|
/* Newer versions of Chrome/Safari*/
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-widget-content.ui-dialog {
|
||||||
|
border: 2px solid #03488B;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-dialog>.ui-widget-header {
|
||||||
|
background: #03488B;
|
||||||
|
color: white
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-button {
|
||||||
|
background: #03488B;
|
||||||
|
color: white
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function updatePass(id) {
|
||||||
|
|
||||||
|
var pass = prompt("Enter your new password : ", "Enter a strong password");
|
||||||
|
|
||||||
|
if (!confirm('Are you sure you want to reset your password?')) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
window.location.href="\Script.php\?action=statuschange&uid="+id+"&status="+status;
|
|
||||||
}
|
window.location.href = "\Script.php\?action=passchange&uid=" + id + "&pass=" + pass;
|
||||||
</script>
|
}
|
||||||
|
|
||||||
|
function blockUser(id, status) {
|
||||||
|
if (!confirm('Are you sure you want to change user status?')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window.location.href = "\Script.php\?action=statuschange&uid=" + id + "&status=" + status;
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue