diff --git a/DatabaseAdministration.php b/DatabaseAdministration.php index 3974bcb..020a454 100644 --- a/DatabaseAdministration.php +++ b/DatabaseAdministration.php @@ -1,36 +1,47 @@ connect_error) { die ("Connect Error (".$conn->connect_Errorno.") ".$conn->connect_error); } + // Select schoolenrollment.Students table $sql = "SELECT * FROM schoolenrollment.Students"; $result = $conn -> query($sql); + // Close the database connection $conn -> close(); ?> + + + Admin Dashboard + + +

School Enrollment System

diff --git a/Enroll.php b/Enroll.php index 58d6fdd..fafba6b 100644 --- a/Enroll.php +++ b/Enroll.php @@ -1,12 +1,14 @@ connect_error) { - die ("Connect Error (".$conn->connect_Errorno.") ".$conn->connect_error); -} -$sql = "SELECT * FROM school.course"; -$result = $conn -> query($sql); + // Connecting to mySQL Server + $conn = new mysqli("localhost:3310", "root", "mysql", "school"); + if($conn -> connect_error) { + die ("Connect Error (".$conn->connect_Errorno.") ".$conn->connect_error); + } + // Select school.course table + $sql = "SELECT * FROM school.course"; + $result = $conn -> query($sql); -// ID Automatically Generated in SQL +// Variable Instantiation | ID Automatically Generated in SQL $STU_FNAME = $_REQUEST["FNAME"]; $STU_MI = $_REQUEST["MI"]; $STU_LNAME = $_REQUEST["LNAME"]; @@ -15,21 +17,20 @@ $DEPT_ID = $_REQUEST['DEPT_ID']; $CRS_IDs = $_POST['Courses']; -// TO FIX: Hardcoded values $STU_ID = 106; $ENRL_YEAR = 2022; $CLASS_SEC = "A"; // kailangan ata makuha specialization -$CLASS_LOCATION = "Laboratory"; // ito specific lng for prog and info man. +$CLASS_LOCATION = "Laboratory"; $INSTR_ID = 500; // ito kapag 2 or more prof per course ex. prog maam. sideno at maam. alberto. rand func nlng $EMPL_YEAR = 2010; +//Query: Insert student information values into the student table $add_student_query = "INSERT INTO student(ENRL_YEAR, STU_FNAME, STU_MI, STU_LNAME, STU_BDAY, STU_GENDER, DEPT_ID) VALUES ($ENRL_YEAR, '$STU_FNAME', '$STU_MI', '$STU_LNAME', '$STU_BDAY', '$STU_GENDER', $DEPT_ID)"; - - +// if true | print "Data fetched successfully", and insert values into enrollment and class table if (mysqli_query($conn, $sql) ) { echo "Data fetched successfully"; mysqli_query($conn, $add_student_query); @@ -42,10 +43,12 @@ // echo $add_enrollment_query . "


" . $add_class_query . "

"; } } +// else false | print "Data fetch failed" else { echo "Data fetch failed"; } +// Query: Select course informartion from student table (INNER JOIN) $enrollement_info_query = "SELECT CRS_LEVEL ,d.DEPT_NAME ,CLASS_SEC, CLASS_LOC, CRS_NAME, CRS_DESC, CRS_UNIT, INSTR_FNAME FROM student AS s INNER JOIN enrollment AS e @@ -62,36 +65,46 @@ $enrollment_info_result = $conn -> query($enrollement_info_query); +// Close the database connection $conn -> close(); ?> + + + Enrollment + + +

You have successfully enrolled!

+ @@ -105,6 +118,7 @@ fetch_assoc()) { ?> + @@ -118,6 +132,7 @@
Course Level
+ Return
diff --git a/Landing.html b/Landing.html index 2b90685..7c6f2b6 100644 --- a/Landing.html +++ b/Landing.html @@ -1,16 +1,20 @@ + + Welcome + +
- + Enroll_Now +

Staff member? Click here for the staff portal.

+

Student Login

+ +
+ +
- + +

Staff Login

+ +
+ +
-
\ No newline at end of file diff --git a/StaffAccountCreation.php b/StaffAccountCreation.php index 27bc30b..ae852be 100644 --- a/StaffAccountCreation.php +++ b/StaffAccountCreation.php @@ -1,19 +1,25 @@ connect_error) { die ("Connect Error (".$conn->connect_Errorno.") ".$conn->connect_error); } + // Select school.course table $sql = "SELECT * FROM school.course"; $result = $conn -> query($sql); + // Close the database connection $conn -> close(); ?> + + + Sign up @@ -21,6 +27,7 @@ + +

Join the thomasian team!

+
+ Enter your personal information: @@ -63,6 +75,7 @@ function showDiv(select) {
+ Select your assigned department:
+ Enter your desired password:
+

After registration, kindly wait for our system administrators to validate your account.

+
diff --git a/StaffManagement.php b/StaffManagement.php index c33e059..b7aa394 100644 --- a/StaffManagement.php +++ b/StaffManagement.php @@ -1,36 +1,47 @@ connect_error) { die ("Connect Error (".$conn->connect_Errorno.") ".$conn->connect_error); } + // Select schoolenrollment.students table $sql = "SELECT * FROM schoolenrollment.Students"; $result = $conn -> query($sql); + // Close database connection $conn -> close(); ?> + + + Dashboard + + +

System Dashboard

diff --git a/StudentAccountCreation.php b/StudentAccountCreation.php index 126887b..21bdf57 100644 --- a/StudentAccountCreation.php +++ b/StudentAccountCreation.php @@ -1,26 +1,35 @@ connect_error) { die ("Connect Error (".$conn->connect_Errorno.") ".$conn->connect_error); } + // Select school.course table $sql = "SELECT * FROM school.course"; $result = $conn -> query($sql); + + // Close the database connection $conn -> close(); ?> + + + Sign up + + +

Your journey starts here!

+
+ Enter your personal information: - + - - +
+ Choose a department:
+ Choose a specialization track:
+
+
+
diff --git a/StudentEnrollment.php b/StudentEnrollment.php index a6f5d8f..39487db 100644 --- a/StudentEnrollment.php +++ b/StudentEnrollment.php @@ -1,18 +1,22 @@ connect_error) { die ("Connect Error (".$conn->connect_Errorno.") ".$conn->connect_error); } + // Select school.course table $sql = "SELECT * FROM school.course"; $result = $conn -> query($sql); - $ENRL_YEAR = date("Y"); $STU_ACCT_PASSWORD = $_REQUEST["PASSWORD"]; + + // Query for Inserting values into student_account table $add_stu_acct_query = "INSERT INTO student_account(ENRL_YEAR, STU_ACCT_PASSWORD) VALUES ($ENRL_YEAR, '$STU_ACCT_PASSWORD');"; mysqli_query($conn, $add_stu_acct_query); $STU_ID = $conn->insert_id; + // Variable Instantiation $STU_EMAIL = $_REQUEST["EMAIL"]; $STU_FNAME = $_REQUEST["FNAME"]; $STU_MI = $_REQUEST["MI"]; @@ -22,28 +26,35 @@ $DEPT_ID = $_REQUEST["DEPT_ID"]; $SPEC_ID = $_REQUEST["SPEC_ID"]; + // Query for Inserting values into student table $add_stu_query = "INSERT INTO student(STU_ID, ENRL_YEAR, STU_FNAME, STU_MI, STU_LNAME, STU_BDAY, STU_GENDER, DEPT_ID, SPEC_ID, STU_EMAIL) VALUES ($STU_ID, $ENRL_YEAR, '$STU_FNAME', '$STU_MI', '$STU_LNAME', '$STU_BDAY', '$STU_GENDER', $DEPT_ID, $SPEC_ID, '$STU_EMAIL');"; mysqli_query($conn, $add_stu_query); + // Close the database connection $conn -> close(); ?> + + Enrollment + +
+

's Profile

+ @@ -82,7 +98,7 @@ function closeEnrollForm() { - + @@ -92,6 +108,7 @@ function closeEnrollForm() { @@ -102,6 +119,7 @@ function closeEnrollForm() {
Enrolled Courses
Student ID NameGender Actions
+
+ @@ -111,7 +129,7 @@ function closeEnrollForm() { - + @@ -122,6 +140,7 @@ function closeEnrollForm() {
Course ID Course NameActions
1 ICS2602
+
@@ -131,6 +150,7 @@ function closeEnrollForm() {
Available Courses + @@ -140,6 +160,7 @@ function closeEnrollForm() { fetch_assoc()) { ?> + @@ -151,7 +172,9 @@ function closeEnrollForm() {
+ IDUnits
">
+ +
@@ -160,6 +183,7 @@ function closeEnrollForm() {
+ Enter your personal information: @@ -170,7 +194,9 @@ function closeEnrollForm() {
+ +
diff --git a/StudentHomepage.php b/StudentHomepage.php index 264531a..b85b337 100644 --- a/StudentHomepage.php +++ b/StudentHomepage.php @@ -1,17 +1,22 @@ connect_error) { die("Connect Error (" . $conn->connect_Errorno . ") " . $conn->connect_error); } $STU_ID = substr($_REQUEST["userName"], 4); $ENRL_YEAR = substr($_REQUEST["userName"], 0, 4); + +// Select from school.course table $sql = "SELECT * FROM school.course"; $result = $conn->query($sql); +// Select from student table where $STU_ID and ENROL_YEAR = $ENRL_YEAR $student_info_query = "SELECT * FROM student WHERE STU_ID = $STU_ID AND ENRL_YEAR = $ENRL_YEAR;"; $student_info_result = $conn->query($student_info_query); $student_info_row = $student_info_result->fetch_assoc(); +// Variable Instantiation $STU_EMAIL = $student_info_row["STU_EMAIL"]; $STU_FNAME = $student_info_row["STU_FNAME"]; $STU_MI = $student_info_row["STU_MI"]; @@ -21,6 +26,7 @@ $DEPT_ID = $student_info_row["DEPT_ID"]; $SPEC_ID = $student_info_row["SPEC_ID"]; +// Select from student information from student table (INNER JOIN) $info_query = "SELECT * FROM student AS s INNER JOIN enrollment AS e ON s.STU_ID = e.STU_ID AND s.ENRL_YEAR = e.ENRL_YEAR @@ -39,26 +45,32 @@ $info_query_result = $conn->query($info_query); // $info_query_row = $info_query_result->fetch_assoc(); +// Close the Database Connection $conn->close(); ?> + + Enrollment + +
+

's Profile

+ @@ -101,7 +118,7 @@ function closeEnrollForm() { - + @@ -111,6 +128,7 @@ function closeEnrollForm() { @@ -119,8 +137,10 @@ function closeEnrollForm() {
+ Enrolled Courses
Student ID NameGender Actions
+
+ @@ -133,6 +153,7 @@ function closeEnrollForm() { fetch_assoc()) { ?> + @@ -144,8 +165,9 @@ function closeEnrollForm() { - +
Course Name Course Description
+
@@ -155,6 +177,7 @@ function closeEnrollForm() {
Available Courses + @@ -164,6 +187,7 @@ function closeEnrollForm() { fetch_assoc()) { ?> + @@ -175,7 +199,9 @@ function closeEnrollForm() {
+ IDUnits
">
+ +
@@ -185,16 +211,21 @@ function closeEnrollForm() {
Enter your personal information: + + +
+ +
diff --git a/styles.css b/styles.css index 87a5f6a..80fd45e 100644 --- a/styles.css +++ b/styles.css @@ -1,13 +1,19 @@ + +/* * */ * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } + +/* html */ html { height: 100%; width: 100%; } + +/* body */ body { background-color: black; background: url(images/bgblurred.jpg) no-repeat fixed center; @@ -16,6 +22,8 @@ body { overflow: overlay; padding-bottom: 200px; } + +/* navsection */ .navsection { position: fixed; top: 0; @@ -44,6 +52,8 @@ body { .navsection li { list-style-type: none; } + +/* loginform */ .loginform { position: fixed; width: 30vw; @@ -81,6 +91,8 @@ body { width: 60px; margin: 30px 0 20px 0; } + +/* mainsection */ .mainsection { padding: 100px 150px; width: 100vw; @@ -131,7 +143,7 @@ form input[type="submit"] { float: right; } -/* Styling Table */ +/* Styling table */ table, td, th { border: 1px solid; border-collapse: collapse; @@ -226,7 +238,7 @@ table tbody tr:hover { box-shadow: 0 3px 1px 0 black; cursor: pointer; } -/* update info form popup */ +/* Update info form popup */ .updateinfo-btn { background-color: transparent; border: none; @@ -273,8 +285,7 @@ table tbody tr:hover { cursor: pointer; } - -/* enroll form popup */ +/* Enroll form popup */ #enrollform { position: fixed; width: 90%; @@ -324,11 +335,7 @@ table tbody tr:hover { cursor: pointer; } - - - - -/* Custom Scrollbar */ +/* Custom scrollbar */ ::-webkit-scrollbar { width: 5px; background-color: transparent;