Compare commits

...

9 Commits

Author SHA1 Message Date
MOYO NKOSANA THABO 36d739c923 Separating CSS to reduce LOC in the code 2022-12-24 16:51:19 +08:00
MOYO NKOSANA THABO ec71ad164d Merge remote-tracking branch 'origin/Refactor-Moyo' into Refactor-Moyo 2022-12-19 21:02:15 +08:00
MOYO NKOSANA THABO 47e3eb90d1 Bug 32 CSS slowing things down
Solution taken was to remove font-awesome from the header and replace everything and use bootstrap with performs better than font-awesome as said by
https://downtimemonkey.com/blog/how-we-boosted-page-load-speed.php
font awesome is slow
2022-12-19 17:29:46 +08:00
MOYO NKOSANA THABO b551f6269e Bug 32 CSS slowing things down
Solution taken was to remove font-awesome from the header and replace everything and use bootstrap with performs better than font-awesome as said by
https://downtimemonkey.com/blog/how-we-boosted-page-load-speed.php
font awesome is slow
2022-12-19 17:24:33 +08:00
MOYO NKOSANA THABO 1b31229fb2 Removal of inline CSS in Header.php as it is bad design and moved it to main.css to enable DRY concept
The page header is defined in a single stylesheet so that if you want to change how a page header looks across the entire site, you change the css in one place.
2022-12-19 14:36:43 +08:00
MOYO NKOSANA THABO 77ebd6ac3e Bug 37 has been fixed for the index page as this page is now optimized and dynamic CSS has been used
Applying DRY principles and better coding practices to index.php

Separating the CSS and applying DRY principles to the CSS in index.php so that they are all in main.css
2022-12-19 14:15:40 +08:00
MOYO NKOSANA THABO 518e1eef1a Bug 37 has been fixed for the index page as this page is now optimized and dynamic CSS has been used
Applying DRY principles and better coding practices to index.php

Separating the CSS and applying DRY principles to the CSS in index.php so that they are all in main.css
2022-12-19 14:12:43 +08:00
MOYO NKOSANA THABO deac064cf5 Bug 519 - Typos and grammar errors in the program
Admin.php:
"Intial Password": "Intial" is a typo.

Courses.php:
"Dealine Date/Time": "Dealine" is a typo.

"Ttle" is a typo.
"Invidual" is a typo.

Script.php:
"sepcial" is a typo.
"Inavlid" is a typo.
"Garde" is a typo.  Should be "Grade".

Student.php:
"STUEDNT" is a typo.  Should be "Student".
2022-12-19 12:20:19 +08:00
MOYO NKOSANA THABO 7d56b3df60 Bug 519 - Typos and grammar errors in the program
Admin.php:
"Intial Password": "Intial" is a typo.

Courses.php:
"Dealine Date/Time": "Dealine" is a typo.

"Ttle" is a typo.
"Invidual" is a typo.

Script.php:
"sepcial" is a typo.
"Inavlid" is a typo.
"Garde" is a typo.  Should be "Grade".

Student.php:
"STUEDNT" is a typo.  Should be "Student".
2022-12-19 12:12:25 +08:00
15 changed files with 276 additions and 276 deletions

View File

@ -97,7 +97,7 @@ if ($_SESSION['user_type'] != "Lecturer" && $_SESSION['user_type'] != "Admin") {
Email
<input type="text" name="email" placeholder="Email / Student Number" class="form-control" required="">
Passport_Number / ID (Used as Intial Password)
Passport_Number / ID (Used as Initial Password)
<input type="text" class="form-control" name="passport" placeholder="Passport No./ID" required="">
<br> User Type :

View File

@ -280,7 +280,7 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
$id = $row['Lab_Report_ID'];
if( $c_date < $deadline)
{
$submittedx="<a href='~\..\SubmitLab.php?id=$id&url=$url' class='btn-sm btn-default'><i class='fa fa-check-circle'></i> Re-Submit </a>";
$submittedx="<a href='~\..\SubmitLab.php?id=$id&url=$url' class='btn-sm btn-default'><i class='bi bi-check-circle-fill'></i> Re-Submit </a>";
}
$full_link = "<a href='~\..\Lab_Report_Assignments\\$att1'>$att1</a>";
@ -298,7 +298,7 @@ Lab_Report_ID not in (select Lab_Report_ID from lab_report_submissions where (St
echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'>
$title <br> <span style='font-size:8pt'> $ins</span>
<br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline ($marks Marks) &nbsp; &nbsp; $submittedx&nbsp; <span class='btn-sm btn-success' style='margin-left:50px;'><i class='fa fa-Edit-circle'></i> Submitted </span>
<br> <span style='font-size:8pt'>Posted : $posted Deadline : $deadline ($marks Marks) &nbsp; &nbsp; $submittedx&nbsp; <span class='btn-sm btn-success' style='margin-left:50px;'><i class='bi bi-check-lg'></i> Submitted </span>
<br> Submitted files: ";
@ -426,7 +426,7 @@ where Lab_Report_ID=$lab_repo_id and (lab_report_submissions.Student_id='$studen
}
if($status=='Remarking')
{
$remarking="<span style='color:orange'><i class='fa fa-info-circle'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>";
$remarking="<span style='color:orange'><i class='bi bi-info-circle-fill'></i> Remarking Request sent </span> <br> Remarking Reason:<i>$remarking_reason </i> <br>";
}
@ -570,7 +570,7 @@ where course_group_members_table.Course_Group_id=$id");
<?php
}
include 'Footer.php';
include 'Footer.html';
?>

View File

@ -1,36 +1,18 @@
<?php
include 'NoDirectPhpAcess.php';
require 'Header.php';
?>
<?php
$page='Courses';
include 'Header.php';
$user_d = $_SESSION['user_id'];
if( $_SESSION['user_type']=="Lecturer" || $_SESSION['user_type']=="TA")
{
?>
<!-- FOR LECTURER-->
<div class="row" style="width:80%;margin:auto; text-align:left;">
<script src="./css/jquery-1.11.1.min.js"></script>
<script src="./css/jquery-ui.min.js"></script>
<link rel="stylesheet" href="./css/jquery-ui.css" />
?>
<script>
function extend_deadline(id) {
var dropstudents=$("#dropstudents").html();
@ -153,14 +135,14 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
<input type='hidden' name='course_id' value='<?php echo "$id" ?>' required=''/>
<input type='hidden' name='url' value='<?php echo ".$course_url." ?>' required=''/>
Dealine Date/Time
<div class='row'>
Deadline Date/Time
Title <div class='row'>
<div class='col-md-7'><input type='date' id='date' name='deadlinedate' placeholder='' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Date : ""; ?>"> </div>
<div class='col-md-5'> <input type='text' id='time' class='form-control' name='deadlinetime' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Time : ""; ?>"> </div>
</div>
Title
<input type='text' name='title' placeholder='Ttle' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Title : ""; ?>">
<input type='text' name='title' placeholder='Title' class='form-control' required='' value="<?php echo isset($_GET['act']) && $_GET['act']=="edit" ? $Title : ""; ?>">
Instructions
<textarea name='instructions' placeholder='Assignment Instructions' class='form-control' required='' ><?php echo isset($_GET['act']) && $_GET['act']=='edit' ? $Instructions : ''; ?></textarea>
Marks
@ -181,7 +163,7 @@ New Date/Time <br><input type="date" name="date" required=""> <input type="time"
<?php
if ($Type == "Individual") {
echo "Submission Type <input type='radio' name='type' value='Individual' checked /> Invidual <input type='radio' name='type' value='Group' /> Group";
echo "Submission Type <input type='radio' name='type' value='Individual' checked /> Individual <input type='radio' name='type' value='Group' /> Group";
} else {
echo "Submission Type <input type='radio' name='type' value='Individual' /> Invidual <input type='radio' name='type' value='Group' checked> Group";
}
@ -441,7 +423,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
if(mysqli_num_rows($result)==0)
{
echo "<br> <i class='fa fa-info-circle'></i> No Course joining request so far for all your courses <hr>";
echo "<br> <i class='bi bi-info-circle-fill'></i> No Course joining request so far for all your courses <hr>";
} else { while($row = mysqli_fetch_assoc($result)) {
$id=$row['ID'];
@ -599,7 +581,7 @@ if( $_SESSION['user_type']=="Student")
$msg2="Join Course";
if($v>0)
{
$msg="<i class='fa fa-exclamation-circle'></i> Lecturer verification required";
$msg="<i class='bi bi-exclamation-circle-fill'></i> Lecturer verification required";
$msg2="Send Joining Request";
}
@ -622,7 +604,7 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl
if(mysqli_num_rows($result)==0)
{
echo "<i class='fa fa-exclamation-circle'></i> You are not Enrolled in any Course";
echo "<i class='bi bi-exclamation-circle-fill'></i> You are not Enrolled in any Course";
} else {
while($row = mysqli_fetch_assoc($result)) {
$name=$row['Course_Name'];
@ -637,7 +619,7 @@ INNER JOIN course_students_table on course_students_table.Course_ID=courses_tabl
if($Status=="Joined")
{
echo "<a href='~\..\Course.php?url=$url'> <div class='btn btn-default' style='word-wrap:break-word'>
($code) - $name <br>($url) &nbsp;&nbsp;&nbsp; <i class='fa fa-check-circle'></i> $Status &nbsp;&nbsp;&nbsp;&nbsp; <a href='~\..\Course.php?url=$url' class='btn-sm btn-primary'> Open</a>
($code) - $name <br>($url) &nbsp;&nbsp;&nbsp; <i class='bi bi-check-circle-fill'></i> $Status &nbsp;&nbsp;&nbsp;&nbsp; <a href='~\..\Course.php?url=$url' class='btn-sm btn-primary'> Open</a>
<br> <span style='font-size:8pt'>Faculty : $faculty Year : $academic Lecturer :$lecturer </span></div></a>
";
}

3
Footer.html Normal file
View File

@ -0,0 +1,3 @@
<div id="footer">
LRR was originally developed as a <a href="http://lanlab.org/course/2018f/se/homepage.html" style="color:white;">software engineering course project</a> by Mohamed Nor and Elmahdi Houzi. Please submit your suggestions or bug reports to lanhui. Last updated on 18/04/2020 by Ashly. <a href="./homepage" style="color:white;">More information ...</a>
</div>

View File

@ -1,4 +0,0 @@
<br><br><br><br><br><br><br><br><br>
<div style="background-color:white;width:100%di">
</div>

View File

@ -4,7 +4,7 @@ error_reporting(0);
date_default_timezone_set('Asia/Shanghai');
include "get_mysql_credentials.php";
$con = mysqli_connect("localhost", $mysql_username, $mysql_password, "lrr");
$con = mysqli_connect("localhost", "root", "", "lrr");
// Check database connection
if (mysqli_connect_errno()) {
@ -19,16 +19,13 @@ if (mysqli_connect_errno()) {
<head>
<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="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<!-- *this css file can be used across all the websites
and any new css class can be added there.
* The reason is to make the css code reusable.
* the css file is used by submissions.php
-->
<link href = "./css/main.css" rel = "stylesheet" type = "text/css" />
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href=" https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<link href = "./css/main.css" rel = "stylesheet" type = "text/css" />
<script src="./css/jquery-1.11.1.min.js"></script>
<script src="./css/jquery-ui.min.js"></script>
<link rel="stylesheet" href="./css/jquery-ui.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>
@ -37,8 +34,10 @@ if (mysqli_connect_errno()) {
<body>
<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;height:30px;"> LRR </a>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">
<label>LRR</label>
<img src="logo.png" class = "navlogoimage"style="width:30px;height:30px; padding-left: 6px" alt="LRR Logo"> </a>
<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>
</button>
@ -53,7 +52,7 @@ if (mysqli_connect_errno()) {
<?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>";
echo " <a class='nav-link' href='~\..\Courses.php'><i class='bi bi-book-fill'></i> Courses <span class='sr-only'>(current)</span></a>";
?>
</li>
</ul>
@ -70,13 +69,13 @@ if (mysqli_connect_errno()) {
<?php
if ($_SESSION['user_type'] == "Lecturer") {
echo "&nbsp;&nbsp;&nbsp; <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i> &nbsp;<a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin </a>";
echo "&nbsp;&nbsp;&nbsp; <i class=\"bi bi-gear-fill\" style=\"color:#fff;\"> </i> &nbsp;<a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin </a>";
}
?>
&nbsp;&nbsp;&nbsp; <i class="fa fa-user" style="color:#fff;"> </i>
&nbsp;&nbsp;&nbsp; <i class="bi bi-person-fill" style="color:#fff;"> </i>
&nbsp;<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id']; ?>)">Update password</a>
&nbsp;&nbsp;&nbsp; <i class="fa fa-lock" style="color:#fff;"> </i> &nbsp;<a style='color:#fff !important' href="~\..\logout.php">Logout </a>
&nbsp;&nbsp;&nbsp; <i class="bi bi-lock-fill" style="color:#fff;"> </i> &nbsp;<a style='color:#fff !important' href="~\..\logout.php">Logout </a>
<?php
}
@ -85,76 +84,7 @@ if (mysqli_connect_errno()) {
</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 {
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) {

View File

@ -98,7 +98,7 @@ if (!empty($_POST["form_signup"])) {
// check for strong password
if (!$containsAll) {
$_SESSION['info_signup'] = "Password must have at least characters that include lowercase letters, uppercase letters, numbers and sepcial characters (e.g., !?.,*^).";
$_SESSION['info_signup'] = "Password must have at least characters that include lowercase letters, uppercase letters, numbers and special characters (e.g., !?.,*^).";
header("Location: signup.php");
return;
}
@ -147,7 +147,7 @@ if (!empty($_POST["frm_login"])) {
$password = mysqli_real_escape_string($con, $_POST["password"]);
$result = mysqli_query($con, "SELECT * FROM users_table WHERE (Student_ID='$user') OR (Email='$user')");
if (mysqli_num_rows($result) == 0) {
$_SESSION["info_login"] = "Inavlid user name information.";
$_SESSION["info_login"] = "Invalid user name information.";
echo $_SESSION["info_login"];
header("Location: index.php");
} else {
@ -1048,7 +1048,7 @@ WHERE lab_report_submissions.Lab_Report_ID='$lab'";
}
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=$lab_name Garde Sheet.xls");
header("Content-Disposition: attachment; filename=$lab_name Grade Sheet.xls");
header("Pragma: no-cache");
header("Expires: 0");
print "$header\n$data";

View File

@ -9,7 +9,7 @@ include 'Header.php';
<div class="row" style="width:80%;margin:auto;">
<div class="col-md-6">
<h1> STUEDNT Account Created , Now you can Browse Course Portals </h1>
<h1> STUDENT Account Created , Now you can Browse Course Portals </h1>
</div>
</div>

View File

@ -220,7 +220,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked' Order by lab
echo "No Marked submissions for this lab";
} else {
echo "<h3><a href='~\..\Script.php?exportgrade=true&lab=$id&lab_name=$Report_Title'><i class='fa fa-book'></i> Export Grade Sheet </a></h3>";
echo "<h3><a href='~\..\Script.php?exportgrade=true&lab=$id&lab_name=$Report_Title'><i class='bi bi-book-fill'></i> Export Grade Sheet </a></h3>";
while ($row = mysqli_fetch_assoc($result)) {
$title = $row['Title'];
@ -409,7 +409,7 @@ where course_group_members_table.Course_Group_id=$id");
<?php
}
include 'Footer.php';
include 'Footer.html';
?>
<script src="http://118.25.96.118/nor/css/jquery-1.11.1.min.js"></script>

File diff suppressed because one or more lines are too long

View File

@ -8,4 +8,165 @@
user-select: text;
cursor:auto
}
}
/* This is the CSS for the Header. */
.navbar navbar-expand-lg navbar-dark bg-dark{
padding-left:150px;
padding-right:150px;
margin:auto;
}
navlogoimage {
max-width:100%;
height: auto;
position:relative;
right:-95px;
top:1px;
}
.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;
font-weight:normal;
font-family: Poppins-Regular,serif;
}
a {
color: #03407B;
}
.break-word {
word-wrap: break-word;
/*CSS property sets how white space inside an element is handled.*/
white-space: pre-wrap;
word-break: break-all;
}
.ui-widget-content.ui-dialog {
border: 2px solid #03488B;
}
.ui-dialog>.ui-widget-header {
background: #03488B;
color: white
}
.ui-button {
background: #03488B;
color: white
}
.btn-primary {
color: white;
border-radius: 5px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
background: #04519b;
padding:5px 100px;
font-family: Poppins-Regular, serif;;
font-size: 23px;
line-height: 1.5;
}
#footer{
position:fixed;
bottom:0;
left:0;
background-color:#03417C;
color:#FFF;
text-align:center;
width:100%;
}
.txt1 {
font-family: Poppins-Regular, serif;
font-size: 18px;
line-height: 1.5;
color: #666666;
}
.txt2 {
font-family: Poppins-Regular, serif;
font-size: 19px;
line-height: 1.5;
color: #2471A3;
}
/* CSS for the footer */
.footer{
font-weight:normal;
color:#2471A3;
font-family: Poppins-Regular, Serif, serif;
font-size: 17px;
}
/* CSS for index Page */
/* CSS for LRR Word Logo */
.logolabel {
padding-top: 30%;
}
.lrrwordlog {
width:20%;
position:relative;
right:-90px;
font-family: Poppins-Regular, serif;
color: #03407B;
}
.img_lrr_logo_home {
max-width:100%;
height: auto;
position:relative;
right:-95px;
top:1px;
}
/* CSS for Signup */
.signup-form{
margin: 20px;
}
/* Footer */
.footer{
background-color:white;width:100%
}
/* Recover Passwords */
.btn-primary {
color: white;
border-radius: 5px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
background: rgb(75, 184, 240);
padding:5px 102px;
font-family: Poppins-Regular;
font-size: 23px;
line-height: 1.5;
}

View File

@ -1,5 +1,4 @@
<?php
$csv = array_map('str_getcsv', file('./../../lrr_submission/KeepItSafe.txt'));
$mysql_username = $csv[0][0];
$mysql_password = $csv[0][1];
$mysql_username = 'root';
$mysql_password = '';
?>

184
index.php
View File

@ -1,128 +1,86 @@
<?php
$page='Home';
require 'Header.php';
session_start();
$page = 'Home';
require 'Header.php';
session_start();
?>
<?php
// if the user has already logged in, then clicking the LRRS icon should not display the login page (i.e., index.php).
// if the user has already logged in, then clicking the LRR icon should not display the login page (i.e., index.php).
if (isset($_SESSION["user_fullname"])) {
header("Location: Courses.php");
}
?>
<!--Container for the logo label and Signup Form split into two 6columns-->
<div class="container">
<div class="row">
<!--Divide the page by 6 columns for the first section-->
<div class="col">
<br><br><br>
<!---Index Page Logo and Labeling on the left hand side -->
<section class="logolabel">
<div>
<img class="img_lrr_logo_home" src="logo.png" alt="LRR Logo">
</div>
<div>
<h1 class="lrrwordlog">Lab Report Repository</h1>
</div>
</section>
</div>
<div class="row" style="width:85%;margin:auto;">
<div class="col-md-4">
<br><br>
<img src="logo.png" style="width:40%; position:relative; right:-95px; top:1px;">
<br><br>
<div style="width:20%; position:relative; right:-90px; font-family: Poppins-Regular;">
<h1>Lab Report Repository</h1>
<br><br>
</div>
</div>
<br>
<div style = "position:relative; left:240px; top:-2px;">
<h4 class="list-group-item active" style="font-weight:normal;font-family: Poppins-Regular;"> Sign in </h4>
<div class="list-group-item">
<!--Divide the page by 6 columns for the last section-->
<div class="col">
<div class="panel-body">
<!--Index Page Signup form on the right hand side-->
<section class="signup-form">
<h4 class="list-group-item active"> Sign in </h4>
<div class="list-group-item">
<div class="panel-body">
<form method="post" action="Script.php" name="frm_login">
<input type="hidden" name="frm_login" value="true" />
<label>Student ID / Instructor Email</label>
<input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" id="user_name" />
<label>Password</label>
<input type="password" class="form-control" name="password" placeholder="password" required="required" id="user_password" />
<div class="text-center">
<button type="submit" class="btn-primary" name="Login" id="login_btn" style="margin: 20px">Login</button>
<label>
<!---Warning labels-->
<?php
if (isset($_SESSION['wrong_pass'])) {
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['wrong_pass'] . '</div>';
$_SESSION['wrong_pass'] = null;
}
error_reporting(E_ALL);
if (isset($_SESSION['info_login'])) {
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['info_login'] . '</div>';
$_SESSION['info_login'] = null;
}
if (isset($_SESSION['infoChangePassword'])) {
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['infoChangePassword'] . '</div>';
$_SESSION['infoChangePassword'] = null;
}
?>
</label>
</div>
<label class="footer" href="recover_password.php" ">Reset my password</label>
<div class=" text-center">
<br><span class="txt1">Don't have an account?</span>
<a class="txt2" href="signup.php" style="font-weight:normal" id="signup_link">Sign Up</a>
</div>
</form>
</div>
</div>
</section>
</div>
<form method="post" action="Script.php" name="frm_login">
<input type="hidden" name="frm_login" value="true"/>
Student ID / Instructor Email
<input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" id="user_name" />
<br>
Password
<input type="password" class="form-control" name="password" placeholder="password" required="required" id="user_password" />
<div class="text-center">
<br><input type="submit" class="btn-primary" value="Login" id="login_btn">
</div>
<br> <a href="recover_password.php" style="font-weight:normal;color:#2471A3; font-family: Poppins-Regular;
font-size: 17px;">Reset my password</a>
<div class="text-center">
<br><span class="txt1">Don't have an account?</span>
<a class="txt2" href="signup.php" style="font-weight:normal" id="signup_link">Sign Up</a>
</a>
</div>
<?php
error_reporting(E_ALL);
if(isset($_SESSION['info_login'])) {
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>';
$_SESSION['info_login']=null;
}
// wrong pass
if(isset($_SESSION['wrong_pass'])) {
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['wrong_pass'].'</div>';
$_SESSION['wrong_pass']=null;
}
if(isset($_SESSION['infoChangePassword'])) {
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['infoChangePassword'].'</div>';
$_SESSION['infoChangePassword']=null;
}
?>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
LRR was originally developed as a <a href="http://lanlab.org/course/2018f/se/homepage.html" style="color:white;">software engineering course project</a> by Mohamed Nor and Elmahdi Houzi. Please submit your suggestions or bug reports to lanhui. Last updated on 18/04/2020 by Ashly. <a href="./homepage" style="color:white;">More information ...</a>
</div>
</body>
<style>
/*------------------------------------------------------------------
[ Login Button ]*/
.btn-primary {
color: white;
border-radius: 5px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
background: rgb(75, 184, 240);
padding:5px 100px;
font-family: Poppins-Regular;
font-size: 23px;
line-height: 1.5;
}
#footer{
position:fixed;
bottom:0;
left:0;
background-color:#03417C;
color:#FFF;
text-align:center;
width:100%;
}
.txt1 {
font-family: Poppins-Regular;
font-size: 18px;
line-height: 1.5;
color: #666666;
}
.txt2 {
font-family: Poppins-Regular;
font-size: 19px;
line-height: 1.5;
color: #2471A3;
}
</style>
</html>
<?php
include 'footer.html'
?>

View File

@ -43,18 +43,3 @@ if(isset($_SESSION['info_recover_password'])) {
}
?>
<style>
/*------------------------------------------------------------------
[ Login Button ]*/
.btn-primary {
color: white;
border-radius: 5px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
background: rgb(75, 184, 240);
padding:5px 102px;
font-family: Poppins-Regular;
font-size: 23px;
line-height: 1.5;
}
</style>

View File

@ -48,17 +48,3 @@ include 'Header.php';
</div>
</div>
</div>
<style>
/*------------------------------------------------------------------
[ Login Button ]*/
.btn-primary {
color: white;
border-radius: 5px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
background: rgb(75, 184, 240);
padding: 5px 105px;
font-family: Poppins-Regular;
font-size: 23px;
line-height: 1.5;
}
</style>