WIP Refactor-Moyo #52
|
@ -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 :
|
||||
|
||||
|
|
|
@ -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) $submittedx <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) $submittedx <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';
|
||||
?>
|
||||
|
||||
|
||||
|
|
38
Courses.php
38
Courses.php
|
@ -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) <i class='fa fa-check-circle'></i> $Status <a href='~\..\Course.php?url=$url' class='btn-sm btn-primary'> Open</a>
|
||||
($code) - $name <br>($url) <i class='bi bi-check-circle-fill'></i> $Status <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>
|
||||
";
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -1,4 +0,0 @@
|
|||
<br><br><br><br><br><br><br><br><br>
|
||||
<div style="background-color:white;width:100%di">
|
||||
|
||||
</div>
|
102
Header.php
102
Header.php
|
@ -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 " <i class=\"fa fa-cog\" style=\"color:#fff;\"> </i> <a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin </a>";
|
||||
echo " <i class=\"bi bi-gear-fill\" style=\"color:#fff;\"> </i> <a style='color:#fff !important' href=\"~\..\Admin.php\" id=\"admin_tab\">Admin </a>";
|
||||
}
|
||||
?>
|
||||
|
||||
<i class="fa fa-user" style="color:#fff;"> </i>
|
||||
<i class="bi bi-person-fill" style="color:#fff;"> </i>
|
||||
<a href="#" style='color:#fff !important' onclick="updatePass(<?php echo $_SESSION['user_id']; ?>)">Update password</a>
|
||||
<i class="fa fa-lock" style="color:#fff;"> </i> <a style='color:#fff !important' href="~\..\logout.php">Logout </a>
|
||||
<i class="bi bi-lock-fill" style="color:#fff;"> </i> <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) {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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>
|
|
@ -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
161
css/main.css
161
css/main.css
|
@ -9,3 +9,164 @@
|
|||
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;
|
||||
}
|
|
@ -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 = '';
|
||||
?>
|
||||
|
|
174
index.php
174
index.php
|
@ -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
|
||||
|
||||
<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>
|
||||
if (isset($_SESSION['wrong_pass'])) {
|
||||
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['wrong_pass'] . '</div>';
|
||||
$_SESSION['wrong_pass'] = null;
|
||||
}
|
||||
|
||||
<?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;
|
||||
}
|
||||
|
||||
error_reporting(E_ALL);
|
||||
if (isset($_SESSION['infoChangePassword'])) {
|
||||
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['infoChangePassword'] . '</div>';
|
||||
$_SESSION['infoChangePassword'] = null;
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
|
||||
if(isset($_SESSION['info_login'])) {
|
||||
echo '<hr><div class="alert alert-danger" role="alert">'.$_SESSION['info_login'].'</div>';
|
||||
$_SESSION['info_login']=null;
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
// 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;
|
||||
}
|
||||
?>
|
||||
<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>
|
||||
|
||||
</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'
|
||||
?>
|
|
@ -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>
|
||||
|
|
14
signup.php
14
signup.php
|
@ -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>
|
Loading…
Reference in New Issue