parent
036489041f
commit
24120f1bc4
11
Admin.php
11
Admin.php
|
@ -200,19 +200,24 @@ where course_ta.Course_ID=$c_id");
|
|||
}
|
||||
|
||||
echo "
|
||||
<tr> <td>$code - $name</td> <td>$faculty </td> <td>$lecturer</td><td>$ta</td> <td><form method='get' action='Script.php'> <select name='ta' class=''>";
|
||||
<tr> <td>$code - $name</td> <td>$faculty </td> <td>$lecturer</td><td>$ta</td> <td>";
|
||||
|
||||
$resultx = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='TA'");
|
||||
$resultx = mysqli_query($con, "SELECT * FROM Users_Table WHERE UserType='TA' AND User_ID NOT IN (SELECT `TA` FROM `course_ta`
|
||||
INNER JOIN users_table on users_table.User_ID=course_ta.TA
|
||||
where course_ta.Course_ID=$c_id);");
|
||||
if (mysqli_num_rows($resultx) == 0) {
|
||||
echo "No free TA";
|
||||
} else {
|
||||
echo "<form method='get' action='Script.php'> <select name='ta' class=''>";
|
||||
while ($row = mysqli_fetch_assoc($resultx)) {
|
||||
$id = $row['User_ID'];
|
||||
$name = $row['Full_Name'];
|
||||
echo "<option value='$id'> $name </option>";
|
||||
}
|
||||
echo "</select> <input type='hidden' name='assignTA' value='true'> <input type='hidden' name='id' value='$c_id'> <input type='submit' value='assign'></form>";
|
||||
}
|
||||
|
||||
echo "</select> <input type='hidden' name='assignTA' value='true'> <input type='hidden' name='id' value='$c_id'> <input type='submit' value='assign'></form> </td></tr>
|
||||
echo " </td></tr>
|
||||
";
|
||||
}
|
||||
} ?>
|
||||
|
|
|
@ -95,10 +95,6 @@ if ($_SESSION['user_type'] == "Student") {
|
|||
|
||||
<!----------Delete Course Button----------->
|
||||
<li>
|
||||
<html>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="modal fade" id="delcourse">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
@ -121,6 +117,7 @@ if ($_SESSION['user_type'] == "Student") {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
|
|
@ -23,7 +23,7 @@ if (mysqli_connect_errno()) {
|
|||
<link href="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" /><!-- Font-awesome CSS -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"><!-- Bootstrap CSS -->
|
||||
|
||||
<link href="./css/styles.css" rel="stylesheet" type="text/css" />
|
||||
<link href="./css/Styles.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script src="./css/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||
|
@ -32,6 +32,11 @@ if (mysqli_connect_errno()) {
|
|||
|
||||
<script src="./css/jquery.datetimepicker.min.js" type="text/javascript"></script>
|
||||
<script src="./js/CustomDropdown.js" type="text/javascript"></script>
|
||||
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
|
||||
|
||||
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" />
|
||||
|
||||
<style>
|
||||
.bd-placeholder-img {
|
||||
|
@ -42,6 +47,8 @@ if (mysqli_connect_errno()) {
|
|||
user-select: none;
|
||||
}
|
||||
|
||||
/*Rule to include a block of CSS properties only if a certain condition is true.*/
|
||||
/*https://www.w3schools.com/css/css_rwd_mediaqueries.asp*/
|
||||
@media (min-width: 768px) {
|
||||
.bd-placeholder-img-lg {
|
||||
font-size: 3.5rem;
|
||||
|
|
14
index.php
14
index.php
|
@ -30,20 +30,20 @@ if (isset($_SESSION["user_fullname"])) {
|
|||
<h4 class="list-group-item active" style="font-weight:normal;font-family: Poppins-Regular;"> Sign in </h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post" action="Script.php" name="frm_login">
|
||||
<form method="post" action="Script.php" name="frm_login">
|
||||
<input type="hidden" name="frm_login" value="true"/>
|
||||
Student ID / Instructor Email
|
||||
<p>Student ID / Instructor Email</p>
|
||||
<input type="text" name="user" placeholder="Email / Student Number" class="form-control" required="required" />
|
||||
<br>
|
||||
Password
|
||||
<input type="password" class="form-control" name="password" placeholder="password" required="required" />
|
||||
<p>Password</p>
|
||||
<input type="password" class="form-control" name="password" placeholder="Password" required="required" />
|
||||
<div class="text-center">
|
||||
<br><input type="submit" class="btn btn-primary my-2" value="Login">
|
||||
<br><input type="submit" class="btn btn-primary my-2 btn-lg btn-block" value="Login">
|
||||
</div>
|
||||
<br> <a href="recover_password.php">Reset my password</a>
|
||||
<div class="text-center">
|
||||
<br><span class="txt1">Don't have an account?</span>
|
||||
<a class="txt2" href="signup.php" >Sign Up</a>
|
||||
<br><span >Don't have an account?</span>
|
||||
<a href="signup.php" >Sign Up</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
|
15
signup.php
15
signup.php
|
@ -20,21 +20,22 @@ include 'Header.php';
|
|||
|
||||
<form method="post" action="Script.php">
|
||||
<input type="hidden" name="frm_signup_2" value="true" />
|
||||
Full Name
|
||||
<p>Full Name</p>
|
||||
<input type="text" name="fullname" placeholder="Your full name" class="form-control" value="<?php echo $_SESSION['user_fullname']; ?>" required="required" />
|
||||
|
||||
Student ID
|
||||
<p>Student ID</p>
|
||||
<input type="text" name="user_student_id" placeholder="Entre your student ID" class="form-control" value="<?php echo $_SESSION['user_student_id']; ?>" required="required">
|
||||
|
||||
Email
|
||||
<p>Email</p>
|
||||
<input type="text" name="email" placeholder="Email" class="form-control" value="<?php echo $_SESSION['user_email']; ?>" required="required" />
|
||||
|
||||
Password (<i>must include uppercase and lowercase letters, digits and special characters</i>)
|
||||
<input type="password" class="form-control" name="password" placeholder="Enter password" required="required" />
|
||||
<p>Password (<i>must include uppercase and lowercase letters, digits and special characters</i>)</p>
|
||||
<input id="password" type="password" pattern="^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{4,}$" title="Password must have at least characters that include lowercase letters, uppercase letters, numbers and sepcial characters (e.g., !?.,*^)." class="form-control" name="password" placeholder="Enter password" required="required" onchange="if(this.checkValidity()) form.password_two.pattern = this.value;" />
|
||||
|
||||
Confirm Password
|
||||
<input type="password" class="form-control" name="confirmpassword" placeholder="Confirm password" required="required" />
|
||||
<p>Confirm Password</p>
|
||||
<input id="password_two" type="password" pattern="^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&])[A-Za-z\d@$!%*#?&]{4,}$" title="Password must have at least characters that include lowercase letters, uppercase letters, numbers and sepcial characters" class="form-control" name="confirmpassword" placeholder="Confirm password" required="required" onchange="this.setCustomValidity(this.validity.patternMismatch ? 'Please enter the same Password as above' : '');" />
|
||||
<br>
|
||||
|
||||
<input type="submit" class="btn btn-primary" value="Sign up">
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
|
Loading…
Reference in New Issue