If a user has already logged in, he will not see the login page again after he clicks the LRR logo.
parent
6be0908210
commit
da6ffcf306
11
Courses.php
11
Courses.php
|
@ -358,12 +358,7 @@ WHERE Course_ID=$course_id");
|
||||||
<?php
|
<?php
|
||||||
$user_name=$_SESSION['user_fullname'];
|
$user_name=$_SESSION['user_fullname'];
|
||||||
|
|
||||||
echo " <div class='alert' style='margin-left:20px;border-bottom:2px solid #1D91EF;'> <a href='~\..\Courses.php?course=$url'>
|
echo "<div><b>My courses</b></div>";
|
||||||
Course Portal > $user_name (Lecturer) > Course Listing
|
|
||||||
<br> <span style='font-size:8pt'> </span>
|
|
||||||
</a></div>
|
|
||||||
";
|
|
||||||
|
|
||||||
|
|
||||||
$result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, "
|
$result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, "
|
||||||
. "`Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` , users_table.Full_Name FROM `courses_table` INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID where courses_table.Lecturer_User_ID=$user_d ORDER BY Academic_Year DESC, URL ASC");
|
. "`Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` , users_table.Full_Name FROM `courses_table` INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID where courses_table.Lecturer_User_ID=$user_d ORDER BY Academic_Year DESC, URL ASC");
|
||||||
|
@ -376,8 +371,6 @@ INNER JOIN
|
||||||
course_ta ON course_ta.Course_ID=courses_table.Course_ID where course_ta.TA=$user_d");
|
course_ta ON course_ta.Course_ID=courses_table.Course_ID where course_ta.TA=$user_d");
|
||||||
|
|
||||||
}
|
}
|
||||||
// $result = mysqli_query($con,"SELECT `Course_ID`, `Course_Name`, `Academic_Year`, `Faculty`, `Lecturer_User_ID`, `TA_User_ID`, `Course_Code`, `URL`, `Verify_New_Members` , users_table.Full_Name FROM `courses_table` INNER JOIN users_table ON users_table.User_ID=courses_table.Lecturer_User_ID");
|
|
||||||
|
|
||||||
|
|
||||||
if(mysqli_num_rows($result)==0)
|
if(mysqli_num_rows($result)==0)
|
||||||
{} else { while($row = mysqli_fetch_assoc($result)) {
|
{} else { while($row = mysqli_fetch_assoc($result)) {
|
||||||
|
@ -464,7 +457,7 @@ WHERE Lecturer_User_ID=$lecturer_id and course_students_table.Status='Pending'"
|
||||||
Course code
|
Course code
|
||||||
<input type="text" name="code" placeholder="Course Code" class="form-control" required="">
|
<input type="text" name="code" placeholder="Course Code" class="form-control" required="">
|
||||||
|
|
||||||
URL (Leave blank to use Course Code & Year)
|
URL (leave blank to use course code & year)
|
||||||
<input type="text" name="url" placeholder="Choose Custom URL " class="form-control">
|
<input type="text" name="url" placeholder="Choose Custom URL " class="form-control">
|
||||||
|
|
||||||
Academic year
|
Academic year
|
||||||
|
|
|
@ -18,7 +18,7 @@ if (mysqli_connect_errno()) {
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<title>LRR - Lab Report Repository</title>
|
<title>Lab Report Repository</title>
|
||||||
<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" />
|
||||||
<!-- *this css file can be used across all the websites
|
<!-- *this css file can be used across all the websites
|
||||||
|
|
|
@ -7,7 +7,9 @@ session_start();
|
||||||
<?php
|
<?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 LRRS icon should not display the login page (i.e., index.php).
|
||||||
if (isset($_SESSION["user_fullname"])) {
|
if (isset($_SESSION["user_fullname"])) {
|
||||||
|
echo '<div class="alert alert-info"> You\'ve already logged in.</div>';
|
||||||
header("Location: Courses.php");
|
header("Location: Courses.php");
|
||||||
|
exit();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue