From dc05abd36fdce133289a79a72204df8d6257e6a2 Mon Sep 17 00:00:00 2001 From: Dasun Nethsara Date: Mon, 11 Sep 2023 22:49:03 +0530 Subject: [PATCH] Pages updated --- pages/admin/add-class.php | 403 +++++------ pages/admin/add-grades.php | 278 ++++---- pages/admin/add-students.php | 280 ++++---- pages/admin/add-subject.php | 293 ++++---- pages/admin/add-teacher.php | 392 +++++------ pages/admin/admin-dashboard.php | 49 +- pages/admin/analytics.php | 292 ++++---- pages/admin/assign-students-to-class.php | 518 +++++++------- pages/admin/assign-to-class.php | 516 +++++++------- pages/admin/change-subjects.php | 329 ++++----- pages/admin/class-reports.php | 534 +++++++------- pages/admin/delete-student.php | 48 +- pages/admin/delete_teacher.php | 48 +- pages/admin/edit-students.php | 434 ++++++------ pages/admin/edit_teacher.php | 650 +++++++++--------- pages/admin/filter-assigned-subjects.php | 122 ++-- pages/admin/filter-subjects.php | 56 +- pages/admin/filtered-marks-details.php | 374 +++++----- pages/admin/get-class-name.php | 26 +- pages/admin/get-class.php | 40 +- pages/admin/get-class2.php | 26 +- pages/admin/get-grade.php | 48 +- pages/admin/get-grades.php | 44 +- pages/admin/get-stream-class.php | 22 +- pages/admin/get-subjects.php | 38 +- pages/admin/get-table-data.php | 150 ++-- pages/admin/get-terms.php | 46 +- pages/admin/individual-reports.php | 292 ++++---- pages/admin/left-side-bar.php | 224 +++--- pages/admin/load-charts.php | 134 ++-- pages/admin/profile.php | 566 +++++++-------- pages/admin/show-marks.php | 515 +++++++------- pages/admin/upgrade.php | 233 +++---- pages/admin/view-all-classes.php | 330 ++++----- pages/admin/view-all-grades.php | 273 ++++---- pages/admin/view-all-students.php | 274 ++++---- pages/admin/view-all-teachers.php | 424 ++++++------ pages/admin/view-filterd-class-report.php | 410 +++++------ pages/admin/view-filtered-marks.php | 320 ++++----- pages/admin/view-student-info.php | 435 ++++++------ pages/admin/view-teacher-info.php | 547 ++++++++------- pages/footer.php | 26 +- pages/principal/class-reports.php | 524 +++++++------- pages/principal/filter-assigned-subjects.php | 122 ++-- pages/principal/filter-subjects.php | 56 +- pages/principal/filtered-marks-details.php | 428 ++++++------ pages/principal/get-table-data.php | 150 ++-- pages/principal/individual-reports.php | 270 ++++---- pages/principal/left-side-bar.php | 214 +++--- pages/principal/principal-dashboard.php | 261 +++---- pages/principal/profile.php | 566 +++++++-------- pages/principal/show-marks.php | 515 +++++++------- pages/principal/view-all-classes.php | 330 ++++----- pages/principal/view-all-grades.php | 273 ++++---- pages/principal/view-all-students.php | 270 ++++---- pages/principal/view-all-teachers.php | 422 ++++++------ pages/principal/view-filterd-class-report.php | 320 ++++----- pages/principal/view-filtered-marks.php | 320 ++++----- pages/principal/view-student-info.php | 435 ++++++------ pages/principal/view-teacher-info.php | 556 ++++++++------- pages/students/analytics.php | 276 ++++---- pages/students/calendar.php | 92 +-- pages/students/get-marks-data.php | 374 +++++----- pages/students/left-side-bar.php | 110 +-- pages/students/load-charts.php | 156 ++--- pages/students/profile.php | 433 ++++++------ pages/students/settings.php | 276 ++++---- pages/students/show-marks.php | 304 ++++---- pages/students/student-dashboard.php | 169 ++--- pages/teachers/analytics.php | 292 ++++---- pages/teachers/calendar.php | 92 +-- pages/teachers/class-marksheet.php | 374 +++++----- pages/teachers/edit-students.php | 360 +++++----- pages/teachers/enter-marks.php | 298 ++++---- pages/teachers/filtered-marks-details.php | 392 +++++------ pages/teachers/get-grades.php | 44 +- pages/teachers/get-report.php | 25 + pages/teachers/get-subjects.php | 38 +- pages/teachers/individual-reports.php | 274 ++++---- pages/teachers/left-side-bar.php | 142 ++-- pages/teachers/load-charts.php | 130 ++-- pages/teachers/profile.php | 566 +++++++-------- pages/teachers/settings.php | 282 ++++---- pages/teachers/teacher-dashboard.php | 163 ++--- pages/teachers/view-all-students.php | 316 +++++---- pages/teachers/view-filterd-class-report.php | 286 ++++---- pages/teachers/view-filtered-marks.php | 320 ++++----- pages/teachers/view-student-info.php | 435 ++++++------ pages/top-navbar.php | 125 ++-- 89 files changed, 12325 insertions(+), 11910 deletions(-) create mode 100644 pages/teachers/get-report.php diff --git a/pages/admin/add-class.php b/pages/admin/add-class.php index 8a2c33b..a0ee02e 100644 --- a/pages/admin/add-class.php +++ b/pages/admin/add-class.php @@ -1,201 +1,204 @@ - - - - - - - - - - - - - Add Classes - Admin - - - - - - - - - - - -
- - - -
-

Add New Class

- - -
- - - - - - - - - - - - - - -
- - - -
- - -
- -
- - -
- -
- -
- - - -
-
- -
- - -
- - -
- -
- -
- - - - - - - -
- - - - - - - - - - + + + + + + + + + + + + Add Classes - Admin + + + + + + + + + + + +
+ + + +
+

Add New Class

+ + +
+ + + + + + + + + + + + + + +
+ + + +
+ + +
+ +
+ + +
+ +
+ +
+ + + +
+
+ +
+ + +
+ + +
+ +
+ +
+ + + + + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/add-grades.php b/pages/admin/add-grades.php index 37a02a9..1cc21b7 100644 --- a/pages/admin/add-grades.php +++ b/pages/admin/add-grades.php @@ -1,139 +1,141 @@ - - - - - - - - - - - - - Add Grades - Admin - - - - - - - - - - - - -
- - -
-

Add Grades

- - - -
- - - - - - - - - - - - - - -
- - -
- - -
- -
- - -
- - -
-
-

- - - -
- - - - - - - - - + + + + + + + + + + + + Add Grades - Admin + + + + + + + + + + + + +
+ + +
+

Add Grades

+ + + +
+ + + + + + + + + + + + + + +
+ + +
+ + +
+ +
+ + +
+ + +
+
+

+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/pages/admin/add-students.php b/pages/admin/add-students.php index 8d49c99..cec3bf3 100644 --- a/pages/admin/add-students.php +++ b/pages/admin/add-students.php @@ -1,139 +1,143 @@ - - - - - - - - - - - - - Add a New Student - Admin - - - - - - - - - - - -
- - -
-

Add a New Student

- - - -
- - - - - - - - - - - - -
-

Fill all the Data

-
-
- - -
-
- - -
-
- - -
-
- -
- -
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- - - -
-

- - - - - - -
-
- - - - - - - - - + + + + + + + + + + + + Add a New Student - Admin + + + + + + + + + + + +
+ + +
+

Add a New Student

+ + + +
+ + + + + + + + + + + + +
+

Fill all the Data

+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + + +
+

+ + + + + + +
+
+ + + + + + + + + \ No newline at end of file diff --git a/pages/admin/add-subject.php b/pages/admin/add-subject.php index 0e613e0..f23a8e6 100644 --- a/pages/admin/add-subject.php +++ b/pages/admin/add-subject.php @@ -1,143 +1,152 @@ - - - - - - - - - - - - - Add New Subjects - Admin - - - - - - - - - - - -
- - -
-

Add New Subjects

- - - -
- - - - - - - - - - - - - - -
- - - -
- - -
- -
- - -
- - - -
-
- - - -
-

Registered Subjects

- -
- - - - - - - - - - - - - - - - - - -
#Subject NameSubject Code
- - - -
- - -

- - - - - - -
- - - - - - - - - + + + + + + + + + + + + Add New Subjects - Admin + + + + + + + + + + + +
+ + +
+

Add New Subjects

+ + + +
+ + + + + + + + + + + + + + +
+ + + +
+ + +
+ +
+ + +
+ + + +
+
+ + + +
+

Registered Subjects

+ +
+ + + + + + + + + + + + + + + + + + +
#Subject NameSubject Code
+ + + + + +
+ + + +
+ + +

+ + + + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/pages/admin/add-teacher.php b/pages/admin/add-teacher.php index de1db58..e90783c 100644 --- a/pages/admin/add-teacher.php +++ b/pages/admin/add-teacher.php @@ -1,197 +1,197 @@ - - - - - - - - - - - - - Add New Staff Members - Admin - - - - - - - - - - - -
- - -
-

Add New Staff Members

- - - -
- - - - - - - - - - - - - - -
-

Fill all the Data

-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- -
- - -
-
- - -
-
- - -
- -
- -
- -
-
- -
- - -
- -
- - -
- -
- - -
- Please select only a png or jpeg image for your profile picture. -
-
- - -
-

- - - - - - -
-
- - - - - - - - - + + + + + + + + + + + + Add New Staff Members - Admin + + + + + + + + + + + +
+ + +
+

Add New Staff Members

+ + + +
+ + + + + + + + + + + + + + +
+

Fill all the Data

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ Please select only a png or jpeg image for your profile picture. +
+
+ + +
+

+ + + + + + +
+
+ + + + + + + + + \ No newline at end of file diff --git a/pages/admin/admin-dashboard.php b/pages/admin/admin-dashboard.php index e5a5e19..f169aaf 100644 --- a/pages/admin/admin-dashboard.php +++ b/pages/admin/admin-dashboard.php @@ -1,7 +1,7 @@ + ?> @@ -10,7 +10,9 @@ - + Dashboard - Admin @@ -35,7 +37,9 @@

Dashboard

@@ -45,7 +49,9 @@
- + + + Classes
@@ -53,7 +59,9 @@
- + + + Staff Members
@@ -62,7 +70,9 @@
- + + + Students
@@ -70,13 +80,14 @@
- + + + Users
- @@ -85,28 +96,10 @@ - + - - diff --git a/pages/admin/analytics.php b/pages/admin/analytics.php index d21144b..b44ef48 100644 --- a/pages/admin/analytics.php +++ b/pages/admin/analytics.php @@ -1,146 +1,148 @@ - - - - - - - - - - - - - Marks Analytics - Admin - - - - - - - - - - - - - -
- - -
-

Marks Analytics

- - -
-
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
- -
- -
- -
-
-
- -
-

Filtered Results

-
-
-
- - -
- - - -
- - - - - - - - - - - - + + + + + + + + + + + + Marks Analytics - Admin + + + + + + + + + + + + + +
+ + +
+

Marks Analytics

+ + +
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+ +
+ +
+
+
+ +
+

Filtered Results

+
+
+
+ + +
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/assign-students-to-class.php b/pages/admin/assign-students-to-class.php index 094f8ad..924eefc 100644 --- a/pages/admin/assign-students-to-class.php +++ b/pages/admin/assign-students-to-class.php @@ -1,269 +1,251 @@ - - - - - - - - - - - - - Assign Students to Class - Admin - - - - - - - - - - - - -
- - -
-

Assign Students to Class

- - - -
- - - - - - - - - - - - - - -
- - - -
-
-
- - -
-
- -
-
- - -
-
- -
-
- - -
-
- -
-
- - -
-
-

- - - -
-

Students

- - - - - - - - - - - 0) { - while ($row = mysqli_fetch_assoc($result1)) { - $admission_no = $row['admission_no']; - $full_name = $row['full_name']; - $std_id = $row['std_id']; - - $sql2 = "SELECT * FROM student_class_tbl WHERE std_id='$std_id'"; - $result2 = mysqli_query($con, $sql2); - if (mysqli_num_rows($result2) < 1) { - echo " - - - - "; - } else { - continue; - } - } - } else { ?> - - - -
Admission No.Full NameAssign
$admission_no$full_name
- - - -
- -
- -
-

Upload Text File

-
- - -
- -
-
-
-
- - -
-
-
- - - - - - - - - - - - - - - + + + + + + + + + + + + Assign Students to Class - Admin + + + + + + + + + + + + +
+ + +
+

Assign Students to Class

+ + + +
+ + + + + + + + + + + + + + +
+ + + +
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+

+ +
+

Students

+ + + + + + + + + + + 0) { + while ($row = mysqli_fetch_assoc($result1)) { + $admission_no = $row['admission_no']; + $full_name = $row['full_name']; + $std_id = $row['std_id']; + + $sql2 = "SELECT * FROM student_class_tbl WHERE std_id='$std_id'"; + $result2 = mysqli_query($con, $sql2); + if (mysqli_num_rows($result2) < 1) { + echo " + + + + "; + } else { + continue; + } + } + } else { ?> + + + +
Admission No.Full NameAssign
$admission_no$full_name
+ + + +
+ +
+ + +
+
+
+
+
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/assign-to-class.php b/pages/admin/assign-to-class.php index 6bda455..3421566 100644 --- a/pages/admin/assign-to-class.php +++ b/pages/admin/assign-to-class.php @@ -1,254 +1,264 @@ - - - - - - - - - - - - - Assign Subjects to Classes - Admin - - - - - - - - - - - -
- - -
-

Assign Subjects to Grades

- - - -
- - - - - - - - - - - - -
- -
- - -
- -
- - -
- -
- - -
- -
- -
-
-
-
- - -
- -
-

Assigned Subjects

- - - - - - - - - - - - - - - - - - - - - - - - - - -
GradeYearSectionAssigned SubjectsOperations
- "; - } - $sub_arr = array_diff($sub_arr, $sub_arr); - ?> - Change
- -
- - -
- - - - - -
- - - - - - - - - - - + + + + + + + + + + + + Assign Subjects to Classes - Admin + + + + + + + + + + + +
+ + +
+

Assign Subjects to Grades

+ + + +
+ + + + + + + + + + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+
+ + +
+ +
+

Assigned Subjects

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
GradeYearSectionAssigned SubjectsOperations
+ + + + + + + "; + } + $sub_arr = array_diff($sub_arr, $sub_arr); + ?> + Change +
+ +
+ + +
+ + + + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/change-subjects.php b/pages/admin/change-subjects.php index a9f2600..afb8f4a 100644 --- a/pages/admin/change-subjects.php +++ b/pages/admin/change-subjects.php @@ -1,162 +1,169 @@ - - - - - - - - - - - - - Change Subjects - Admin - - - - - - - - - - - -
- - -
-

Change Subjects

- - -
- - Go Back - - - - - - - - - - - - -
- -
- - - " required readonly> -
-
- - -
-
- - - -
- -
-
- 0) { - while ($data = mysqli_fetch_assoc($result1)) { - $sub_id = $data['sub_id']; - - // to get the assigned subjects from the db - $sql3 = "SELECT sub_id FROM grade_subject_tbl WHERE grade_id='$grade_id' AND sub_id='$sub_id' AND year='$year'"; - $result3 = mysqli_query($con, $sql3); - $d = mysqli_fetch_assoc($result3); - if (mysqli_num_rows($result3) > 0) { - if ($d['sub_id'] == $sub_id) { - $sql2 = "SELECT sub_name FROM subject_tbl WHERE sub_id='$sub_id'"; - $result2 = mysqli_query($con, $sql2); - $sub_data = mysqli_fetch_assoc($result2); - $sub_name = $sub_data['sub_name']; - - echo ' ' . $sub_name . '
'; - } - } else { - $sql2 = "SELECT sub_name FROM subject_tbl WHERE sub_id='$sub_id'"; - $result2 = mysqli_query($con, $sql2); - $sub_data = mysqli_fetch_assoc($result2); - $sub_name = $sub_data['sub_name']; - - echo ' ' . $sub_name . '
'; - } - } - } - ?> -
- - -
- -
- - - -
- - - - -
- - - - - - - - - - + + + + + + + + + + + + Change Subjects - Admin + + + + + + + + + + + +
+ + +
+

Change Subjects

+ + +
+ + Go Back + + + + + + + + + + + + +
+ +
+ + + " + required readonly> +
+
+ + +
+
+ + + +
+ +
+
+ 0) { + while ($data = mysqli_fetch_assoc($result1)) { + $sub_id = $data['sub_id']; + + // to get the assigned subjects from the db + $sql3 = "SELECT sub_id FROM grade_subject_tbl WHERE grade_id='$grade_id' AND sub_id='$sub_id' AND year='$year'"; + $result3 = mysqli_query($con, $sql3); + $d = mysqli_fetch_assoc($result3); + if (mysqli_num_rows($result3) > 0) { + if ($d['sub_id'] == $sub_id) { + $sql2 = "SELECT sub_name FROM subject_tbl WHERE sub_id='$sub_id'"; + $result2 = mysqli_query($con, $sql2); + $sub_data = mysqli_fetch_assoc($result2); + $sub_name = $sub_data['sub_name']; + + echo ' ' . $sub_name . '
'; + } + } else { + $sql2 = "SELECT sub_name FROM subject_tbl WHERE sub_id='$sub_id'"; + $result2 = mysqli_query($con, $sql2); + $sub_data = mysqli_fetch_assoc($result2); + $sub_name = $sub_data['sub_name']; + + echo ' ' . $sub_name . '
'; + } + } + } + ?> +
+ + +
+ +
+ + + +
+ + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/class-reports.php b/pages/admin/class-reports.php index 40c5f44..9aa7629 100644 --- a/pages/admin/class-reports.php +++ b/pages/admin/class-reports.php @@ -1,268 +1,268 @@ - - - - - - - - - - - - - Class Reports - Admin - - - - - - - - - - - -
- - - -
-

Class Reports

- - -
- - - - - - - - - - -
-

Apply Filters

-
-
-
-
- - -
-
- -
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- - -
- -
- -
-

Filtered Results

-
-
-
-

Grade:

-
-
-

Class: ET - 2

-
-
-

Term:

-
-
-

A/L Year:


-
-
- -
-
- - -
- -
- -
- - - - - - -
- - - - - - + + + + + + + + + + + + Class Reports - Admin + + + + + + + + + + + +
+ + + +
+

Class Reports

+ + +
+ + + + + + + + + + +
+

Apply Filters

+
+
+
+
+ + +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ + +
+ +
+ +
+

Filtered Results

+
+
+
+

Grade:

+
+
+

Class: ET - 2

+
+
+

Term:

+
+
+

A/L Year:


+
+
+ +
+
+ +
+ +
+ +
+ + + + + + +
+ + + + + + \ No newline at end of file diff --git a/pages/admin/delete-student.php b/pages/admin/delete-student.php index 8e141ab..bbb564a 100644 --- a/pages/admin/delete-student.php +++ b/pages/admin/delete-student.php @@ -1,24 +1,24 @@ - - - - - - - - - - - - - Edit Students's Data - Admin - - - - - - - - - - - -
- - -
-

Edit Students's Data

- - - -
- Go Back - - - - - - - - - - - - - -
-

Students's Info

-
-
- - "> -
-
- - "> -
-
- - "> -
-
- -
- -
-
-
- - "> -
-
- - "> -
-
- - "> -
-
- - "> -
-
- - "> -
- - -
- -
-

Change Password

-
-
- - -
-
- -
- - -
-
-
- - -
- -
-

- - - - - -
- - - -
- - - - - - - - - - + + + + + + + + + + + + Edit Students's Data - Admin + + + + + + + + + + + +
+ + +
+

Edit Students's Data

+ + + +
+ Go Back + + + + + + + + + + + + + +
+

Students's Info

+
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+ +
+ +
+
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+ + "> +
+ + +
+ +
+

Change Password

+
+
+ + +
+
+ +
+ + +
+
+
+ + +
+ +
+

+ + + + + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/edit_teacher.php b/pages/admin/edit_teacher.php index 6601bb7..dabca6e 100644 --- a/pages/admin/edit_teacher.php +++ b/pages/admin/edit_teacher.php @@ -1,313 +1,339 @@ - - - - - - - - - - - - - Edit Teacher's Data - Admin - - - - - - - - - - - -
- - -
-

Edit Teacher's Data

- - - -
- Go Back - - - - - - - - - - - - - -
-

Profile Settings

-
- -
-
-
-
- " class="rounded-circle mt-5" width="250px" alt="profile picture" height="250px"> -

-
- -
-
-
-
-
-

Personal Info

-
-
-
- - "> -
-
- - "> -
-
-
-
- - "> -
-
- - "> -
-
- - "> -
-
- - -
-
-
-
-
-
-
-

School Info

-

-
- - "> -

-
- - "> -

-
- - "> -

-
- - -
-
- - -
-
- -
-
-
-
- -
- -
-

Change Password

-
-
- - -
-
- -
- - -
-
-
- - -
- -
-

- - - - - -
- - - -
- - - - - - - - - - + + + + + + + + + + + + Edit Teacher's Data - Admin + + + + + + + + + + + +
+ + +
+

Edit Teacher's Data

+ + + +
+ Go Back + + + + + + + + + + + + + +
+

Profile Settings

+
+ +
+
+
+
+ " class="rounded-circle mt-5" width="250px" + alt="profile picture" height="250px"> +

+ +

+
+ +
+ +
+
+
+
+
+

Personal Info

+
+
+
+ + "> +
+
+ + "> +
+
+
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+ + +
+
+
+
+
+
+
+

School Info

+

+
+ + "> +

+
+ + "> +

+
+ + "> +

+
+ + +
+
+ + +
+
+ +
+
+
+
+ +
+ +
+

Change Password

+
+
+ + +
+
+ +
+ + +
+
+
+ + +
+ +
+

+ + + + + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/filter-assigned-subjects.php b/pages/admin/filter-assigned-subjects.php index 45098f8..d61a871 100644 --- a/pages/admin/filter-assigned-subjects.php +++ b/pages/admin/filter-assigned-subjects.php @@ -1,61 +1,61 @@ - - $grade_name - $stream_name - $year - "; - - $sql2 = "SELECT sub_id FROM grade_subject_tbl WHERE grade_id='" . $row['grade_id'] . "' AND stream_id='" . $row['stream_id'] . "' ORDER BY order_id ASC"; - $result2 = mysqli_query($con, $sql2); - while ($row2 = mysqli_fetch_assoc($result2)) { - array_push($sub_arr, $row2['sub_id']); - } - - foreach ($sub_arr as $sub) { - $sql3 = "SELECT sub_name FROM subject_tbl WHERE sub_id='$sub'"; - $result3 = mysqli_query($con, $sql3); - $row3 = mysqli_fetch_assoc($result3); - $sub = $row3['sub_name']; - echo "•  $sub
"; - } - - - echo " - Change - "; - - $sub_arr = array_diff($sub_arr, $sub_arr); -} + + $grade_name + $stream_name + $year + "; + + $sql2 = "SELECT sub_id FROM grade_subject_tbl WHERE grade_id='" . $row['grade_id'] . "' AND stream_id='" . $row['stream_id'] . "' ORDER BY order_id ASC"; + $result2 = mysqli_query($con, $sql2); + while ($row2 = mysqli_fetch_assoc($result2)) { + array_push($sub_arr, $row2['sub_id']); + } + + foreach ($sub_arr as $sub) { + $sql3 = "SELECT sub_name FROM subject_tbl WHERE sub_id='$sub'"; + $result3 = mysqli_query($con, $sql3); + $row3 = mysqli_fetch_assoc($result3); + $sub = $row3['sub_name']; + echo "•  $sub
"; + } + + + echo " + Change + "; + + $sub_arr = array_diff($sub_arr, $sub_arr); +} diff --git a/pages/admin/filter-subjects.php b/pages/admin/filter-subjects.php index d81a298..c190102 100644 --- a/pages/admin/filter-subjects.php +++ b/pages/admin/filter-subjects.php @@ -1,29 +1,29 @@ - Subjects Subject Order "; - - -if (mysqli_num_rows($result1) > 0) { - echo ""; - $n = mysqli_num_rows($result1); - while ($data = mysqli_fetch_assoc($result1)) { - $sub_id = $data['sub_id']; - $sql2 = "SELECT sub_name FROM subject_tbl WHERE sub_id='$sub_id'"; - $result2 = mysqli_query($con, $sql2); - $sub_data = mysqli_fetch_assoc($result2); - $sub_name = $sub_data['sub_name']; - - echo ' - ' . $sub_name . '
- "; - } - echo ""; + Subjects Subject Order "; + + +if (mysqli_num_rows($result1) > 0) { + echo ""; + $n = mysqli_num_rows($result1); + while ($data = mysqli_fetch_assoc($result1)) { + $sub_id = $data['sub_id']; + $sql2 = "SELECT sub_name FROM subject_tbl WHERE sub_id='$sub_id'"; + $result2 = mysqli_query($con, $sql2); + $sub_data = mysqli_fetch_assoc($result2); + $sub_name = $sub_data['sub_name']; + + echo ' + ' . $sub_name . '
+ "; + } + echo ""; } \ No newline at end of file diff --git a/pages/admin/filtered-marks-details.php b/pages/admin/filtered-marks-details.php index cc3776e..d1970ea 100644 --- a/pages/admin/filtered-marks-details.php +++ b/pages/admin/filtered-marks-details.php @@ -1,187 +1,187 @@ -= 0 && $marks <= 100) { - if ($marks >= 75) { - return "A"; - } elseif ($marks >= 65) { - return "B"; - } elseif ($marks >= 55) { - return "C"; - } elseif ($marks >= 35) { - return "S"; - } else { - return "F"; - } - } else { - return "Invalid"; - } -} - - -$sql1 = "SELECT * FROM student_tbl st INNER JOIN student_class_tbl sct ON (st.std_id = sct.std_id) WHERE st.admission_no='$admission_no'"; -$result1 = mysqli_query($con, $sql1); -if (mysqli_num_rows($result1) == 1) { - $row1 = mysqli_fetch_assoc($result1); - $std_id = $row1['std_id']; - $admission_no = $row1['admission_no']; - $full_name = $row1['full_name']; - // $year = $row1['year']; - - $sql2 = "SELECT * FROM grade_class_tbl gct INNER JOIN student_class_tbl sct ON (gct.grade_class_id = sct.grade_class_id) WHERE sct.std_id='$std_id'"; - $result2 = mysqli_query($con, $sql2); - if (mysqli_num_rows($result2) == 1) { - $row2 = mysqli_fetch_assoc($result2); - $grade_id = $row2['grade_id']; - $class_id = $row2['class_id']; - $year = $row2['year']; - - echo "
-
-
Name: $full_name
-
-
-
Year: $algrade
-
-
-
Term: $term
-
-
"; - - echo " - - - - "; - - echo " "; - echo " - - - - "; - - echo " "; - - $count = 0; - $total = 0; - $sql3 = "SELECT DISTINCT sub_id FROM grade_subject_tbl WHERE year='$year' AND grade_id='$grade_id' ORDER BY order_id ASC"; - $result3 = mysqli_query($con, $sql3); - if (mysqli_num_rows($result3) > 0) { - while ($row3 = mysqli_fetch_assoc($result3)) { - $sub_id = $row3['sub_id']; - // array_push($pre_sub_array, $sub_id); - $sql4 = "SELECT * FROM al_marks_tbl WHERE term='$term' AND sub_id='$sub_id' AND grade_id='$algrade' AND std_id='$std_id' AND year='$year' AND NOT marks=''"; - $result4 = mysqli_query($con, $sql4); - if (mysqli_num_rows($result4) > 0) { - while ($row4 = mysqli_fetch_assoc($result4)) { - $sid = $row4['sub_id']; - $sql4 = "SELECT sub_name, sub_code FROM subject_tbl WHERE sub_id='$sid'"; - $result4 = mysqli_query($con, $sql4); - if (mysqli_num_rows($result4) == 1) { - $sname = mysqli_fetch_assoc($result4); - $sub_name = $sname['sub_name']; - array_push($sub_array, $sname['sub_code']); - echo ""; - - $sql5 = "SELECT marks FROM al_marks_tbl WHERE sub_id='$sid' AND term='$term' AND std_id='$std_id' AND year='$year' AND grade_id='$algrade'"; - $result5 = mysqli_query($con, $sql5); - if (mysqli_num_rows($result5) == 1) { - $m = mysqli_fetch_assoc($result5); - $marks = $m['marks']; - - if ($marks == 0) { - $sql6 = "SELECT * FROM al_absent_tbl WHERE sub_id='$sid' AND term='$term' AND std_id='$std_id' AND year='$year' AND grade_id='$algrade'"; - $result6 = mysqli_query($con, $sql6); - if (mysqli_num_rows($result6) == 1) { - echo " - "; - array_push($marks_array, 0); - } else { - $grade = getGrade($marks); - echo " - "; - } - } elseif ($marks == "") { - echo " - "; - } else { - $grade = getGrade($marks); - array_push($marks_array, $marks); - echo " - "; - $total += $marks; - } - $count += 1; - } else { - // raise an error -> no marks for this term - } - } else { - // raise an error -> no subjects - } - } - } else { - // raise an error -> no marks for this term - } - } - $avg = 0; - if ($total > 0 && $count > 1) { - $avg = round($total / $count, 2); - - echo ""; - echo " - - - "; - echo " - - - "; - // echo " - // "; - - // RANK - // // Execute the SQL query to get the rank of the selected student - // $sql7 = "SELECT std_id, SUM(marks) AS total_marks, (SELECT COUNT(*) FROM (SELECT std_id, SUM(marks) AS total_marks FROM al_marks_tbl - // WHERE term='$term' AND year='$year' GROUP BY std_id) AS ranks WHERE total_marks > (SELECT SUM(marks) FROM - // al_marks_tbl WHERE term='$term' AND year='$year' AND std_id = '$std_id')) + 1 AS rank FROM al_marks_tbl - // WHERE std_id = '$std_id' AND term='$term' AND year='$year'"; - // $result7 = mysqli_query($con, $sql7); - - // // Check if the query was successful - // if (!$result7) { - // die("Query failed: " . mysqli_error($con)); - // } - - // // Get the rank of the selected student from the result set - // if (mysqli_num_rows($result7) > 0) { - // $row = mysqli_fetch_assoc($result7); - // $rank = $row['rank']; - // // echo "The rank of student $std_id in grade class $grade_class_id is $rank"; - // echo " - // "; - // } else { - // // echo "No results found"; - // } - } - echo "
Subjects$term
MarksGrade
$sub_nameab-
0$grade
$marks$grade
Total Marks$total
Average Marks$avg
Rank$rank
"; - } else { - // raise an error -> no subjects assigned for this grade - } - } else { - // raise an error -> no class - } -} else { - // raise an error -> no students -} += 0 && $marks <= 100) { + if ($marks >= 75) { + return "A"; + } elseif ($marks >= 65) { + return "B"; + } elseif ($marks >= 55) { + return "C"; + } elseif ($marks >= 35) { + return "S"; + } else { + return "F"; + } + } else { + return "Invalid"; + } +} + + +$sql1 = "SELECT * FROM student_tbl st INNER JOIN student_class_tbl sct ON (st.std_id = sct.std_id) WHERE st.admission_no='$admission_no'"; +$result1 = mysqli_query($con, $sql1); +if (mysqli_num_rows($result1) == 1) { + $row1 = mysqli_fetch_assoc($result1); + $std_id = $row1['std_id']; + $admission_no = $row1['admission_no']; + $full_name = $row1['full_name']; + // $year = $row1['year']; + + $sql2 = "SELECT * FROM grade_class_tbl gct INNER JOIN student_class_tbl sct ON (gct.grade_class_id = sct.grade_class_id) WHERE sct.std_id='$std_id'"; + $result2 = mysqli_query($con, $sql2); + if (mysqli_num_rows($result2) == 1) { + $row2 = mysqli_fetch_assoc($result2); + $grade_id = $row2['grade_id']; + $class_id = $row2['class_id']; + $year = $row2['year']; + + echo "
+
+
Name: $full_name
+
+
+
Year: $algrade
+
+
+
Term: $term
+
+
"; + + echo " + + + + "; + + echo " "; + echo " + + + + "; + + echo " "; + + $count = 0; + $total = 0; + $sql3 = "SELECT DISTINCT sub_id FROM grade_subject_tbl WHERE year='$year' AND grade_id='$grade_id' ORDER BY order_id ASC"; + $result3 = mysqli_query($con, $sql3); + if (mysqli_num_rows($result3) > 0) { + while ($row3 = mysqli_fetch_assoc($result3)) { + $sub_id = $row3['sub_id']; + // array_push($pre_sub_array, $sub_id); + $sql4 = "SELECT * FROM al_marks_tbl WHERE term='$term' AND sub_id='$sub_id' AND grade_id='$algrade' AND std_id='$std_id' AND year='$year' AND NOT marks=''"; + $result4 = mysqli_query($con, $sql4); + if (mysqli_num_rows($result4) > 0) { + while ($row4 = mysqli_fetch_assoc($result4)) { + $sid = $row4['sub_id']; + $sql4 = "SELECT sub_name, sub_code FROM subject_tbl WHERE sub_id='$sid'"; + $result4 = mysqli_query($con, $sql4); + if (mysqli_num_rows($result4) == 1) { + $sname = mysqli_fetch_assoc($result4); + $sub_name = $sname['sub_name']; + array_push($sub_array, $sname['sub_code']); + echo ""; + + $sql5 = "SELECT marks FROM al_marks_tbl WHERE sub_id='$sid' AND term='$term' AND std_id='$std_id' AND year='$year' AND grade_id='$algrade'"; + $result5 = mysqli_query($con, $sql5); + if (mysqli_num_rows($result5) == 1) { + $m = mysqli_fetch_assoc($result5); + $marks = $m['marks']; + + if ($marks == 0) { + $sql6 = "SELECT * FROM al_absent_tbl WHERE sub_id='$sid' AND term='$term' AND std_id='$std_id' AND year='$year' AND grade_id='$algrade'"; + $result6 = mysqli_query($con, $sql6); + if (mysqli_num_rows($result6) == 1) { + echo " + "; + array_push($marks_array, 0); + } else { + $grade = getGrade($marks); + echo " + "; + } + } elseif ($marks == "") { + echo " + "; + } else { + $grade = getGrade($marks); + array_push($marks_array, $marks); + echo " + "; + $total += $marks; + } + $count += 1; + } else { + // raise an error -> no marks for this term + } + } else { + // raise an error -> no subjects + } + } + } else { + // raise an error -> no marks for this term + } + } + $avg = 0; + if ($total > 0 && $count > 1) { + $avg = round($total / $count, 2); + + echo ""; + echo " + + + "; + echo " + + + "; + // echo " + // "; + + // RANK + // // Execute the SQL query to get the rank of the selected student + // $sql7 = "SELECT std_id, SUM(marks) AS total_marks, (SELECT COUNT(*) FROM (SELECT std_id, SUM(marks) AS total_marks FROM al_marks_tbl + // WHERE term='$term' AND year='$year' GROUP BY std_id) AS ranks WHERE total_marks > (SELECT SUM(marks) FROM + // al_marks_tbl WHERE term='$term' AND year='$year' AND std_id = '$std_id')) + 1 AS rank FROM al_marks_tbl + // WHERE std_id = '$std_id' AND term='$term' AND year='$year'"; + // $result7 = mysqli_query($con, $sql7); + + // // Check if the query was successful + // if (!$result7) { + // die("Query failed: " . mysqli_error($con)); + // } + + // // Get the rank of the selected student from the result set + // if (mysqli_num_rows($result7) > 0) { + // $row = mysqli_fetch_assoc($result7); + // $rank = $row['rank']; + // // echo "The rank of student $std_id in grade class $grade_class_id is $rank"; + // echo " + // "; + // } else { + // // echo "No results found"; + // } + } + echo "
Subjects$term
MarksGrade
$sub_nameab-
0$grade
$marks$grade
Total Marks$total
Average Marks$avg
Rank$rank
"; + } else { + // raise an error -> no subjects assigned for this grade + } + } else { + // raise an error -> no class + } +} else { + // raise an error -> no students +} diff --git a/pages/admin/get-class-name.php b/pages/admin/get-class-name.php index 1a9ce20..3c48660 100644 --- a/pages/admin/get-class-name.php +++ b/pages/admin/get-class-name.php @@ -1,13 +1,13 @@ -= 0 && $grade <= 11) { - $sql = "SELECT * FROM class_tbl WHERE type=0"; -} else { - $sql = "SELECT * FROM class_tbl WHERE type=1"; -} - -$result = mysqli_query($con, $sql); -while ($row = mysqli_fetch_assoc($result)) { - echo ""; -} += 0 && $grade <= 11) { + $sql = "SELECT * FROM class_tbl WHERE type=0"; +} else { + $sql = "SELECT * FROM class_tbl WHERE type=1"; +} + +$result = mysqli_query($con, $sql); +while ($row = mysqli_fetch_assoc($result)) { + echo ""; +} diff --git a/pages/admin/get-class.php b/pages/admin/get-class.php index df909f9..650f5af 100644 --- a/pages/admin/get-class.php +++ b/pages/admin/get-class.php @@ -1,20 +1,20 @@ -= 1 && $exploded_txt[1] <= 11) { - $sql2 = "SELECT * FROM class_tbl WHERE type='0'"; -} else { - $sql2 = "SELECT * FROM class_tbl WHERE type='1'"; -} - -$result2 = mysqli_query($con, $sql2); -while ($row1 = mysqli_fetch_assoc($result2)) { - echo ""; -} += 1 && $exploded_txt[1] <= 11) { + $sql2 = "SELECT * FROM class_tbl WHERE type='0'"; +} else { + $sql2 = "SELECT * FROM class_tbl WHERE type='1'"; +} + +$result2 = mysqli_query($con, $sql2); +while ($row1 = mysqli_fetch_assoc($result2)) { + echo ""; +} diff --git a/pages/admin/get-class2.php b/pages/admin/get-class2.php index c21e908..e8e19b8 100644 --- a/pages/admin/get-class2.php +++ b/pages/admin/get-class2.php @@ -1,14 +1,14 @@ -= 1 && $grade <= 11) { - $sql2 = "SELECT * FROM class_tbl WHERE type='0'"; -} else { - $sql2 = "SELECT * FROM class_tbl WHERE type='1'"; -} - -$result2 = mysqli_query($con, $sql2); -while ($row1 = mysqli_fetch_assoc($result2)) { - echo ""; += 1 && $grade <= 11) { + $sql2 = "SELECT * FROM class_tbl WHERE type='0'"; +} else { + $sql2 = "SELECT * FROM class_tbl WHERE type='1'"; +} + +$result2 = mysqli_query($con, $sql2); +while ($row1 = mysqli_fetch_assoc($result2)) { + echo ""; } \ No newline at end of file diff --git a/pages/admin/get-grade.php b/pages/admin/get-grade.php index 40ee3f9..73aa7e1 100644 --- a/pages/admin/get-grade.php +++ b/pages/admin/get-grade.php @@ -1,24 +1,24 @@ -= 1 && $exploded_txt[1] <= 5) { - $sql2 = "SELECT * FROM grade_tbl WHERE grade_name <= 5"; -} elseif ($exploded_txt[0] >= 6 && $exploded_txt[1] <= 9) { - $sql2 = "SELECT * FROM grade_tbl WHERE grade_name <= 9 AND grade_name >= 6"; -} elseif ($exploded_txt[0] >= 10 && $exploded_txt[1] <= 11) { - $sql2 = "SELECT * FROM grade_tbl WHERE grade_name <= 11 AND grade_name >= 10"; -} else { - $sql2 = "SELECT * FROM grade_tbl WHERE grade_name <= 13 AND grade_name >= 12"; -} - -$result2 = mysqli_query($con, $sql2); -while ($row1 = mysqli_fetch_assoc($result2)) { - echo ""; -} += 1 && $exploded_txt[1] <= 5) { + $sql2 = "SELECT * FROM grade_tbl WHERE grade_name <= 5"; +} elseif ($exploded_txt[0] >= 6 && $exploded_txt[1] <= 9) { + $sql2 = "SELECT * FROM grade_tbl WHERE grade_name <= 9 AND grade_name >= 6"; +} elseif ($exploded_txt[0] >= 10 && $exploded_txt[1] <= 11) { + $sql2 = "SELECT * FROM grade_tbl WHERE grade_name <= 11 AND grade_name >= 10"; +} else { + $sql2 = "SELECT * FROM grade_tbl WHERE grade_name <= 13 AND grade_name >= 12"; +} + +$result2 = mysqli_query($con, $sql2); +while ($row1 = mysqli_fetch_assoc($result2)) { + echo ""; +} diff --git a/pages/admin/get-grades.php b/pages/admin/get-grades.php index a910d5c..eb39a69 100644 --- a/pages/admin/get-grades.php +++ b/pages/admin/get-grades.php @@ -1,22 +1,22 @@ - 0) { - while ($row2 = mysqli_fetch_assoc($result2)) { - $grade = $row2['grade_id']; - echo ""; - } - } else { - } -} else { -} + 0) { + while ($row2 = mysqli_fetch_assoc($result2)) { + $grade = $row2['grade_id']; + echo ""; + } + } else { + } +} else { +} diff --git a/pages/admin/get-stream-class.php b/pages/admin/get-stream-class.php index 7d42a17..57fad6b 100644 --- a/pages/admin/get-stream-class.php +++ b/pages/admin/get-stream-class.php @@ -1,11 +1,11 @@ - 0) { - while ($row = mysqli_fetch_assoc($result)) { - echo ""; - } -} + 0) { + while ($row = mysqli_fetch_assoc($result)) { + echo ""; + } +} diff --git a/pages/admin/get-subjects.php b/pages/admin/get-subjects.php index 2418674..68d5b76 100644 --- a/pages/admin/get-subjects.php +++ b/pages/admin/get-subjects.php @@ -1,19 +1,19 @@ - 0) { - while ($row2 = mysqli_fetch_assoc($result2)) { - echo ""; - } - } -} + 0) { + while ($row2 = mysqli_fetch_assoc($result2)) { + echo ""; + } + } +} diff --git a/pages/admin/get-table-data.php b/pages/admin/get-table-data.php index 1a4a439..6f09bf8 100644 --- a/pages/admin/get-table-data.php +++ b/pages/admin/get-table-data.php @@ -1,75 +1,75 @@ - - " . $grade_name . " - " . $class_name . " - " . $year . " - " . $teacher_name . " - "; - } else { - continue; - } - } else { - if ($grade_name <= 13 && $grade_name >= 12) { - // return grade 6 -11 data - echo " - " . $grade_name . " - " . $class_name . " - " . $year . " - " . $teacher_name . " - "; - } else { - continue; - } - } - } else { - // raise an error -> no record in teacher_tbl - echo ""; - } - } else { - // raise an error -> no record in class_tbl - echo ""; - } - } else { - // raise an error -> no record in grade_tbl - echo ""; - } -} + + " . $grade_name . " + " . $class_name . " + " . $year . " + " . $teacher_name . " + "; + } else { + continue; + } + } else { + if ($grade_name <= 13 && $grade_name >= 12) { + // return grade 6 -11 data + echo " + " . $grade_name . " + " . $class_name . " + " . $year . " + " . $teacher_name . " + "; + } else { + continue; + } + } + } else { + // raise an error -> no record in teacher_tbl + echo ""; + } + } else { + // raise an error -> no record in class_tbl + echo ""; + } + } else { + // raise an error -> no record in grade_tbl + echo ""; + } +} diff --git a/pages/admin/get-terms.php b/pages/admin/get-terms.php index 1590b5a..4024541 100644 --- a/pages/admin/get-terms.php +++ b/pages/admin/get-terms.php @@ -1,23 +1,23 @@ - 0) { - while ($row2 = mysqli_fetch_assoc($result2)) { - $term = $row2['term']; - echo ""; - } - } else { - } -} else { -} + 0) { + while ($row2 = mysqli_fetch_assoc($result2)) { + $term = $row2['term']; + echo ""; + } + } else { + } +} else { +} diff --git a/pages/admin/individual-reports.php b/pages/admin/individual-reports.php index 4177ef8..a361831 100644 --- a/pages/admin/individual-reports.php +++ b/pages/admin/individual-reports.php @@ -1,146 +1,148 @@ - - - - - - - - - - - - - Exam Reports - Admin - - - - - - - - - - - - - -
- - -
-

Exam Reports

- - -
-
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
- -
- -
- -
-
-
- -
-

Filtered Results

-
-
-
- - -
- - - -
- - - - - - - - - - - - + + + + + + + + + + + + Exam Reports - Admin + + + + + + + + + + + + + +
+ + +
+

Exam Reports

+ + +
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+ +
+ +
+
+
+ +
+

Filtered Results

+
+
+
+ + +
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/left-side-bar.php b/pages/admin/left-side-bar.php index dbe3516..66a9862 100644 --- a/pages/admin/left-side-bar.php +++ b/pages/admin/left-side-bar.php @@ -1,113 +1,113 @@ -
- - - \ No newline at end of file diff --git a/pages/admin/load-charts.php b/pages/admin/load-charts.php index edc800d..dc83d35 100644 --- a/pages/admin/load-charts.php +++ b/pages/admin/load-charts.php @@ -1,67 +1,67 @@ - 0) { - $marks_array = array(); - $term_array = array(); - while ($row2 = mysqli_fetch_assoc($result2)) { - $sub_name = $row2['sub_name']; - $term = $row2['term']; - $marks = $row2['marks']; - - - array_push($marks_array, $marks); - array_push($term_array, $term); - } - - $marks2 = json_encode($marks_array); - $terms2 = json_encode($term_array); - -?> - -
- - - - no marks - } -} + 0) { + $marks_array = array(); + $term_array = array(); + while ($row2 = mysqli_fetch_assoc($result2)) { + $sub_name = $row2['sub_name']; + $term = $row2['term']; + $marks = $row2['marks']; + + + array_push($marks_array, $marks); + array_push($term_array, $term); + } + + $marks2 = json_encode($marks_array); + $terms2 = json_encode($term_array); + +?> + +
+ + + + no marks + } +} diff --git a/pages/admin/profile.php b/pages/admin/profile.php index 7a46ca1..c3b727f 100644 --- a/pages/admin/profile.php +++ b/pages/admin/profile.php @@ -1,270 +1,298 @@ - - - - - - - - - - - - - Admin's Profile - Admin - - - - - - - - - - - -
- - -
-

Admin's Profile

- - - -
- Go Back - '>Edit Profile - - - - - - - - - - - - - -
- - -
-
-
-
- " class="rounded-circle mt-5" width="250px" alt="profile picture" height="250px"> -

-
- -
-
-
-
-
-

Personal Info

-
-
-
- - "> -
-
- - "> -
-
-
-
- - "> -
-
- - "> -
-
- - "> -
-
- - -
-
-
-
-
-
-
-

School Info

-

-
- - "> -

-
- - "> -

-
- - "> -

-
- - - - - - - -
-
- - - - -
-
- -
-
-
- -
-

- - - - -
- - - -
-
- - - - - - - - + + + + + + + + + + + + Admin's Profile - Admin + + + + + + + + + + + +
+ + +
+

Admin's Profile

+ + + +
+ Go Back + '>Edit Profile + + + + + + + + + + + + + +
+ + +
+
+
+
+ " class="rounded-circle mt-5" width="250px" + alt="profile picture" height="250px"> +

+ +

+
+ +
+ +
+
+
+
+
+

Personal Info

+
+
+
+ + "> +
+
+ + "> +
+
+
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+ + +
+
+
+
+
+
+
+

School Info

+

+
+ + "> +

+
+ + "> +

+
+ + "> +

+
+ + + + + + + +
+
+ + + + +
+
+ +
+
+
+ +
+

+ + + + +
+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/pages/admin/show-marks.php b/pages/admin/show-marks.php index 8ea81bb..5d1f06b 100644 --- a/pages/admin/show-marks.php +++ b/pages/admin/show-marks.php @@ -1,262 +1,255 @@ - - - - - - - - - - - - - Exam Marks - Admin - - - - - - - - - - - - -
- - - -
-

Exam Marks

- - -
- - - - - - - - - - - - - - -
-

Apply Filters

-
-
-
-
- - -
-
- -
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- - -
- -
- -
-

Filtered Results

-
-
-
-

Grade:

-
-
-

Class: ET - 2

-
-
-

Term:

-
-
-

A/L Year:


-
-
- - - - -
-
- -
- -
- -
- - - - - - - - -
- - - - - - - - - - + + + + + + + + + + + + Exam Marks - Admin + + + + + + + + + + + +
+ + + +
+

Exam Marks

+ + +
+ + + + + + + + + + + + + + +
+

Apply Filters

+
+
+
+
+ + +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ + +
+ +
+ +
+

Filtered Results

+
+
+
+

Grade:

+
+
+

Class: ET - 2

+
+
+

Term:

+
+
+

A/L Year:


+
+
+ + + + +
+
+ +
+ +
+ +
+ + + + + + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/upgrade.php b/pages/admin/upgrade.php index 73fb084..70bd1fa 100644 --- a/pages/admin/upgrade.php +++ b/pages/admin/upgrade.php @@ -1,116 +1,119 @@ - - - - - - - - - - - - - Upgrade - Admin - - - - - - - - - - - - - - - -
- - -
-

Upgrade

- - - - - - - - - - - - - -
- - -
- - -
- -
- -
- - - -
- - - - - - - - - - + + + + + + + + + + + + Upgrade - Admin + + + + + + + + + + + + + + + +
+ + +
+

Upgrade

+ + + + + + + + + + + + + +
+ + +
+ + +
+ +
+ +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/view-all-classes.php b/pages/admin/view-all-classes.php index d206b5f..7989511 100644 --- a/pages/admin/view-all-classes.php +++ b/pages/admin/view-all-classes.php @@ -1,165 +1,167 @@ - - - - - - - - - - - - - All Classes - Admin - - - - - - - - - - - -
- - - -
-

All Classes

- - -
- - -
-
- - -

-
- - - - - - - - - - - - - - - - - - - - "; - } else { - // raise an error -> no record in teacher_tbl - echo ""; - } - } else { - // raise an error -> no record in class_tbl - echo ""; - } - } else { - // raise an error -> no record in grade_tbl - echo ""; - } - } - ?> - -
GradeClassYearClass Teacher
" . $grade_name . "" . $class_name . "" . $year . "" . $teacher_name . "
- - - - -
- -
- - - - - - -
- - - - - - - - - - + + + + + + + + + + + + All Classes - Admin + + + + + + + + + + + +
+ + + +
+

All Classes

+ + +
+ + +
+
+ + +

+
+ + + + + + + + + + + + + + + + + + + + "; + } else { + // raise an error -> no record in teacher_tbl + echo ""; + } + } else { + // raise an error -> no record in class_tbl + echo ""; + } + } else { + // raise an error -> no record in grade_tbl + echo ""; + } + } + ?> + +
GradeClassYearClass Teacher
" . $grade_name . "" . $class_name . "" . $year . "" . $teacher_name . "
+ + + + +
+ +
+ + + + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/view-all-grades.php b/pages/admin/view-all-grades.php index b8018df..a2eb3b5 100644 --- a/pages/admin/view-all-grades.php +++ b/pages/admin/view-all-grades.php @@ -1,145 +1,130 @@ - - - - - - - - - - - - - All Grades - Admin - - - - - - - - - - - -
- - - -
-

All Grades

- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#GradeGrade Head
- - - - -
- -
- - - - - - - -
- - - - - - - - - - + + + + + + + + + + + + All Grades - Admin + + + + + + + + + + + +
+ + + +
+

All Grades

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#GradeGrade Head
+ + + + + +
+ + + + +
+ +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/view-all-students.php b/pages/admin/view-all-students.php index 9c9b55f..b74226e 100644 --- a/pages/admin/view-all-students.php +++ b/pages/admin/view-all-students.php @@ -1,130 +1,146 @@ - - - - - - - - - - - - - All students - Admin - - - - - - - - - - - -
- - -
-

All students

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#Admission No.Full NamePhone - HomeDate of AdmissionOperations
- Profile - Edit - Delete -
- - - - - - -
- - - -
- - - - - - - - - - + + + + + + + + + + + + All students - Admin + + + + + + + + + + + +
+ + +
+

All students

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#Admission No.Full NamePhone - HomeDate of AdmissionOperations
+ + + + + + + + + + + Profile + Edit + Delete +
+ + + + + + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/view-all-teachers.php b/pages/admin/view-all-teachers.php index 926925b..a618dfc 100644 --- a/pages/admin/view-all-teachers.php +++ b/pages/admin/view-all-teachers.php @@ -1,203 +1,223 @@ - - - - - - - - - - - - - All Staff Members - Admin - - - - - - - - - - - - -
- - -
-

All Staff Members

- - Add Staff Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#NameNICStaff No.RoleAppointed SubjectSectionOperations
- Profile - Edit - Delete -
- - - - - - - -
- - - -
- - - - - - - - - - + + + + + + + + + + + + All Staff Members - Admin + + + + + + + + + + + + +
+ + +
+

All Staff Members

+ + Add Staff Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#NameNICStaff No.RoleAppointed SubjectSectionOperations
+ + + + + + + + + + + + + + + Profile + Edit + Delete +
+ + + + + + + +
+ + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/pages/admin/view-filterd-class-report.php b/pages/admin/view-filterd-class-report.php index db8e67c..a943d75 100644 --- a/pages/admin/view-filterd-class-report.php +++ b/pages/admin/view-filterd-class-report.php @@ -1,206 +1,206 @@ -"; - $sql1 = "SELECT sub_id FROM grade_subject_tbl WHERE stream_id='$stream_id' AND year='$year' ORDER BY order_id ASC"; - $result1 = mysqli_query($con, $sql1); - if (mysqli_num_rows($result1) > 0) { - echo "Admission No.Name"; - while ($row1 = mysqli_fetch_assoc($result1)) { - $sub_id = $row1['sub_id']; - array_push($sub_array, $sub_id); - $sql2 = "SELECT * FROM subject_tbl WHERE sub_id='$sub_id'"; - $result2 = mysqli_query($con, $sql2); - $s_name = mysqli_fetch_assoc($result2); - if ($s_name['sub_code'] == "") { - $sub_code = $s_name['sub_name']; - $sub_name = $s_name['sub_name']; - } else { - $sub_name = $s_name['sub_name']; - $sub_code = $s_name['sub_code']; - } - echo "$sub_code"; - } - echo "TotalAverage"; - echo ""; - $sql3 = "SELECT grade_class_id, year FROM grade_class_tbl WHERE grade_id='$grade_id' AND class_id='$class_id'"; - $result3 = mysqli_query($con, $sql3); - if (mysqli_num_rows($result3) == 1) { - $grd_cls = mysqli_fetch_assoc($result3); - $grade_class_id = $grd_cls['grade_class_id']; - $al_year = $grd_cls['year']; - - $user = $_SESSION['username']; - $sql4 = "SELECT * FROM student_tbl st INNER JOIN student_class_tbl sct ON (sct.std_id = st.std_id) WHERE sct.grade_class_id='$grade_class_id'"; - $result4 = mysqli_query($con, $sql4); - if (mysqli_num_rows($result4) > 0) { - while ($row2 = mysqli_fetch_assoc($result4)) { - $admission_no = $row2['admission_no']; - $name_with_init = $row2['name_with_initials']; - $full_name = $row2['full_name']; - $std_id = $row2['std_id']; - echo "$admission_no - $name_with_init"; - - $count = 0; - $total = 0; - $avg = 0; - foreach ($sub_array as $sub_id) { - $sql5 = "SELECT marks FROM al_marks_tbl WHERE sub_id='$sub_id' AND std_id='$std_id' AND term='$term' AND grade_id='$grade_id'"; - $result5 = mysqli_query($con, $sql5); - if (mysqli_num_rows($result5) == 1) { - $m = mysqli_fetch_assoc($result5); - $marks = $m['marks']; - if ($marks == 0) { - $sql6 = "SELECT * FROM al_absent_tbl WHERE sub_id='$sub_id' AND std_id='$std_id' AND term='$term' AND grade_id='$grade_id'"; - $result6 = mysqli_query($con, $sql6); - if (mysqli_num_rows($result6) == 1) { - echo ""; - } else { - echo ""; - } - // echo ""; - } elseif ($marks == '') { - echo ""; - } else { - echo ""; - $total += $marks; - } - // $count += 1; - if ($marks == "") { - continue; - } else { - $count += 1; - } - } else { - echo ""; - } - } - echo ""; - if ($count >= 1 && $total >= 1) { - $avg = round($total / $count, 2); - echo ""; - } else { - echo ""; - } - - // // Execute the SQL query to get the rank of the selected student - // $sql11 = "SELECT std_id, SUM(marks) AS total_marks, (SELECT COUNT(*) FROM (SELECT std_id, SUM(marks) AS total_marks FROM al_marks_tbl - // WHERE term='$term' AND year='$year' GROUP BY std_id) AS ranks WHERE total_marks > (SELECT SUM(marks) FROM - // al_marks_tbl WHERE term='$term' AND year='$year' AND std_id = '$std_id')) + 1 AS rank FROM al_marks_tbl - // WHERE std_id = '$std_id' AND term='$term' AND year='$year'"; - // $result11 = mysqli_query($con, $sql11); - - - // if (mysqli_num_rows($result11) > 0) { - // $row = mysqli_fetch_assoc($result11); - // $rank = $row['rank']; - // // echo "The rank of student $std_id in grade class $grade_class_id is $rank"; - // echo ""; - // } else { - // // echo "No results found"; - // } - echo ""; - } - } else { - // no students assigned to class! - echo ""; - } - } else { - // echo ""; - $sub_array2 = array(); - $std_array2 = array(); - $sql4 = "SELECT DISTINCT std_id FROM al_marks_tbl almt INNER JOIN al_subjects_tbl alst ON (almt.sub_id = alst.sub_id) WHERE almt.term='$term' AND almt.grade_id='$grade_id' AND alst.stream_id='$stream_id' AND almt.year='$year' AND almt.class_id='$class_id'"; - $result4 = mysqli_query($con, $sql4); - if (mysqli_num_rows($result4) > 0) { - while ($row2 = mysqli_fetch_assoc($result4)) { - // array_push($std_array2, $row2['std_id']); - $sid = $row2['std_id']; - // $subID = $row2['sub_id']; - - $sql5 = "SELECT admission_no, full_name, name_with_initials FROM student_tbl WHERE std_id='$sid'"; - $result5 = mysqli_query($con, $sql5); - if (mysqli_num_rows($result5) == 1) { - $row3 = mysqli_fetch_assoc($result5); - $full_name = $row3['full_name']; - $name_init = $row3['name_with_initials']; - $admissionNO = $row3['admission_no']; - echo "$admissionNO - $name_init"; - - $count = 0; - $total = 0; - $avg = 0; - foreach ($sub_array as $subID) { - $sql5 = "SELECT marks FROM al_marks_tbl WHERE sub_id='$subID' AND std_id='$sid' AND term='$term' AND grade_id='$grade_id' AND class_id='$class_id'"; - $result5 = mysqli_query($con, $sql5); - if (mysqli_num_rows($result5) == 1) { - $m = mysqli_fetch_assoc($result5); - $marks = $m['marks']; - if ($marks == 0) { - $sql6 = "SELECT * FROM al_absent_tbl WHERE sub_id='$subID' AND std_id='$sid' AND term='$term' AND grade_id='$grade_id'"; - $result6 = mysqli_query($con, $sql6); - if (mysqli_num_rows($result6) == 1) { - echo ""; - } else { - echo ""; - } - // echo ""; - } elseif ($marks == '') { - echo ""; - } else { - echo ""; - $total += $marks; - } - // $count += 1; - if ($marks == "") { - continue; - } else { - $count += 1; - } - } else { - echo ""; - } - } - } else { - echo ""; - } - echo ""; - if ($count >= 1 && $total >= 1) { - $avg = round($total / $count, 2); - echo ""; - } else { - echo ""; - } - echo ""; - } - // // echo "" . $row2['std_id'] . ""; - // array_push($sub_array2, $row2['sub_id']); - echo ""; - } else { - echo ""; - } - // $sub_array2 = array_unique($sub_array2); - // $std_array2 = array_unique($std_array2); - // foreach ($std_array2 as $sid) { - // } - } - } else { - // no subjects assigned to grades! - echo ""; - } -} else { - header("Location:../../index.php"); - exit; +"; + $sql1 = "SELECT sub_id FROM grade_subject_tbl WHERE stream_id='$stream_id' AND year='$year' ORDER BY order_id ASC"; + $result1 = mysqli_query($con, $sql1); + if (mysqli_num_rows($result1) > 0) { + echo "Admission No.Name"; + while ($row1 = mysqli_fetch_assoc($result1)) { + $sub_id = $row1['sub_id']; + array_push($sub_array, $sub_id); + $sql2 = "SELECT * FROM subject_tbl WHERE sub_id='$sub_id'"; + $result2 = mysqli_query($con, $sql2); + $s_name = mysqli_fetch_assoc($result2); + if ($s_name['sub_code'] == "") { + $sub_code = $s_name['sub_name']; + $sub_name = $s_name['sub_name']; + } else { + $sub_name = $s_name['sub_name']; + $sub_code = $s_name['sub_code']; + } + echo "$sub_code"; + } + echo "TotalAverage"; + echo ""; + $sql3 = "SELECT grade_class_id, year FROM grade_class_tbl WHERE grade_id='$grade_id' AND class_id='$class_id'"; + $result3 = mysqli_query($con, $sql3); + if (mysqli_num_rows($result3) == 1) { + $grd_cls = mysqli_fetch_assoc($result3); + $grade_class_id = $grd_cls['grade_class_id']; + $al_year = $grd_cls['year']; + + $user = $_SESSION['username']; + $sql4 = "SELECT * FROM student_tbl st INNER JOIN student_class_tbl sct ON (sct.std_id = st.std_id) WHERE sct.grade_class_id='$grade_class_id'"; + $result4 = mysqli_query($con, $sql4); + if (mysqli_num_rows($result4) > 0) { + while ($row2 = mysqli_fetch_assoc($result4)) { + $admission_no = $row2['admission_no']; + $name_with_init = $row2['name_with_initials']; + $full_name = $row2['full_name']; + $std_id = $row2['std_id']; + echo "$admission_no + $name_with_init"; + + $count = 0; + $total = 0; + $avg = 0; + foreach ($sub_array as $sub_id) { + $sql5 = "SELECT marks FROM al_marks_tbl WHERE sub_id='$sub_id' AND std_id='$std_id' AND term='$term' AND grade_id='$grade_id'"; + $result5 = mysqli_query($con, $sql5); + if (mysqli_num_rows($result5) == 1) { + $m = mysqli_fetch_assoc($result5); + $marks = $m['marks']; + if ($marks == 0) { + $sql6 = "SELECT * FROM al_absent_tbl WHERE sub_id='$sub_id' AND std_id='$std_id' AND term='$term' AND grade_id='$grade_id'"; + $result6 = mysqli_query($con, $sql6); + if (mysqli_num_rows($result6) == 1) { + echo ""; + } else { + echo ""; + } + // echo ""; + } elseif ($marks == '') { + echo ""; + } else { + echo ""; + $total += $marks; + } + // $count += 1; + if ($marks == "") { + continue; + } else { + $count += 1; + } + } else { + echo ""; + } + } + echo ""; + if ($count >= 1 && $total >= 1) { + $avg = round($total / $count, 2); + echo ""; + } else { + echo ""; + } + + // // Execute the SQL query to get the rank of the selected student + // $sql11 = "SELECT std_id, SUM(marks) AS total_marks, (SELECT COUNT(*) FROM (SELECT std_id, SUM(marks) AS total_marks FROM al_marks_tbl + // WHERE term='$term' AND year='$year' GROUP BY std_id) AS ranks WHERE total_marks > (SELECT SUM(marks) FROM + // al_marks_tbl WHERE term='$term' AND year='$year' AND std_id = '$std_id')) + 1 AS rank FROM al_marks_tbl + // WHERE std_id = '$std_id' AND term='$term' AND year='$year'"; + // $result11 = mysqli_query($con, $sql11); + + + // if (mysqli_num_rows($result11) > 0) { + // $row = mysqli_fetch_assoc($result11); + // $rank = $row['rank']; + // // echo "The rank of student $std_id in grade class $grade_class_id is $rank"; + // echo ""; + // } else { + // // echo "No results found"; + // } + echo ""; + } + } else { + // no students assigned to class! + echo ""; + } + } else { + // echo ""; + $sub_array2 = array(); + $std_array2 = array(); + $sql4 = "SELECT DISTINCT std_id FROM al_marks_tbl almt INNER JOIN al_subjects_tbl alst ON (almt.sub_id = alst.sub_id) WHERE almt.term='$term' AND almt.grade_id='$grade_id' AND alst.stream_id='$stream_id' AND almt.year='$year' AND almt.class_id='$class_id'"; + $result4 = mysqli_query($con, $sql4); + if (mysqli_num_rows($result4) > 0) { + while ($row2 = mysqli_fetch_assoc($result4)) { + // array_push($std_array2, $row2['std_id']); + $sid = $row2['std_id']; + // $subID = $row2['sub_id']; + + $sql5 = "SELECT admission_no, full_name, name_with_initials FROM student_tbl WHERE std_id='$sid'"; + $result5 = mysqli_query($con, $sql5); + if (mysqli_num_rows($result5) == 1) { + $row3 = mysqli_fetch_assoc($result5); + $full_name = $row3['full_name']; + $name_init = $row3['name_with_initials']; + $admissionNO = $row3['admission_no']; + echo "$admissionNO + $name_init"; + + $count = 0; + $total = 0; + $avg = 0; + foreach ($sub_array as $subID) { + $sql5 = "SELECT marks FROM al_marks_tbl WHERE sub_id='$subID' AND std_id='$sid' AND term='$term' AND grade_id='$grade_id' AND class_id='$class_id'"; + $result5 = mysqli_query($con, $sql5); + if (mysqli_num_rows($result5) == 1) { + $m = mysqli_fetch_assoc($result5); + $marks = $m['marks']; + if ($marks == 0) { + $sql6 = "SELECT * FROM al_absent_tbl WHERE sub_id='$subID' AND std_id='$sid' AND term='$term' AND grade_id='$grade_id'"; + $result6 = mysqli_query($con, $sql6); + if (mysqli_num_rows($result6) == 1) { + echo ""; + } else { + echo ""; + } + // echo ""; + } elseif ($marks == '') { + echo ""; + } else { + echo ""; + $total += $marks; + } + // $count += 1; + if ($marks == "") { + continue; + } else { + $count += 1; + } + } else { + echo ""; + } + } + } else { + echo ""; + } + echo ""; + if ($count >= 1 && $total >= 1) { + $avg = round($total / $count, 2); + echo ""; + } else { + echo ""; + } + echo ""; + } + // // echo "" . $row2['std_id'] . ""; + // array_push($sub_array2, $row2['sub_id']); + echo ""; + } else { + echo ""; + } + // $sub_array2 = array_unique($sub_array2); + // $std_array2 = array_unique($std_array2); + // foreach ($std_array2 as $sid) { + // } + } + } else { + // no subjects assigned to grades! + echo ""; + } +} else { + header("Location:../../index.php"); + exit; } \ No newline at end of file diff --git a/pages/admin/view-filtered-marks.php b/pages/admin/view-filtered-marks.php index 25db877..7294b48 100644 --- a/pages/admin/view-filtered-marks.php +++ b/pages/admin/view-filtered-marks.php @@ -1,160 +1,160 @@ - 0) { - echo "Admission No.Name"; - while ($row1 = mysqli_fetch_assoc($result2)) { - $sub_id = $row1['sub_id']; - array_push($sub_array, $sub_id); - $sql3 = "SELECT sub_code FROM subject_tbl WHERE sub_id='$sub_id'"; - $result3 = mysqli_query($con, $sql3); - $s_name = mysqli_fetch_assoc($result3); - $sub_name = $s_name['sub_code']; - - echo "$sub_name"; - } - echo "TotalAverageRank"; - // $sql = "SELECT * FROM user_tbl ut INNER JOIN user_role_tbl urt ON - // (ut.role_id = urt.role_id) WHERE (ut.username = '$uname')"; - $sql4 = "SELECT grade_class_id FROM grade_class_tbl WHERE grade_id='$grade_id' AND class_id='$class_id' AND year='$year'"; - $result4 = mysqli_query($con, $sql4); - if (mysqli_num_rows($result4) == 1) { - $grd_cls = mysqli_fetch_assoc($result4); - $grade_class_id = $grd_cls['grade_class_id']; - - echo ""; - - $sql5 = "SELECT std_id FROM student_class_tbl WHERE grade_class_id='$grade_class_id'"; - $result5 = mysqli_query($con, $sql5); - if (mysqli_num_rows($result5) > 0) { - while ($row2 = mysqli_fetch_assoc($result5)) { - $std_id = $row2['std_id']; - $sql6 = "SELECT std_id, admission_no, full_name FROM student_tbl WHERE status='1' AND std_id='$std_id' ORDER BY admission_no ASC"; - $result6 = mysqli_query($con, $sql6); - if (mysqli_num_rows($result6) == 1) { - $std = mysqli_fetch_assoc($result6); - $admission_no = $std['admission_no']; - $full_name = $std['full_name']; - // $std_id = $std['std_id']; - echo "$admission_no - $full_name"; - $count = 0; - $total = 0; - $avg = 0; - foreach ($sub_array as $sub_id) { - $sql10 = "SELECT * FROM al_marks_tbl WHERE year='$year' AND term='$term' AND grade_class_id='$grade_class_id'"; - $result10 = mysqli_query($con, $sql10); - if (mysqli_num_rows($result10) > 0) { - $sql7 = "SELECT marks FROM al_marks_tbl WHERE sub_id='$sub_id' AND std_id='$std_id' AND year='$year' AND term='$term'"; - $result7 = mysqli_query($con, $sql7); - if (mysqli_num_rows($result7) == 1) { - $m = mysqli_fetch_assoc($result7); - $marks = $m['marks']; - // echo "$marks"; - if ($marks == 0) { - $sql8 = "SELECT * FROM al_absent_tbl WHERE sub_id='$sub_id' AND std_id='$std_id' AND year='$year' AND term='$term'"; - $result8 = mysqli_query($con, $sql8); - if (mysqli_num_rows($result8) == 1) { - echo ""; - } else { - echo ""; - } - // echo ""; - } elseif ($marks == '') { - echo ""; - } else { - echo ""; - $total += $marks; - } - // $count += 1; - if ($marks == "") { - continue; - } else { - $count += 1; - } - } else { - echo ""; - } - } else { - echo ""; - echo ""; - } - } - echo ""; - if ($count >= 1 && $total >= 1) { - $avg = round($total / $count, 2); - echo ""; - } else { - echo ""; - } - - // Execute the SQL query to get the rank of the selected student - $sql11 = "SELECT std_id, SUM(marks) AS total_marks, (SELECT COUNT(*) FROM (SELECT std_id, SUM(marks) AS total_marks FROM al_marks_tbl - WHERE grade_class_id = '$grade_class_id' AND term='$term' AND year='$year' GROUP BY std_id) AS ranks WHERE total_marks > (SELECT SUM(marks) FROM - al_marks_tbl WHERE grade_class_id = '$grade_class_id' AND term='$term' AND year='$year' AND std_id = '$std_id')) + 1 AS rank FROM al_marks_tbl - WHERE grade_class_id = '$grade_class_id' AND std_id = '$std_id' AND term='$term' AND year='$year'"; - $result11 = mysqli_query($con, $sql11); - - - if (mysqli_num_rows($result11) > 0) { - $row = mysqli_fetch_assoc($result11); - $rank = $row['rank']; - // echo "The rank of student $std_id in grade class $grade_class_id is $rank"; - echo ""; - } else { - // echo "No results found"; - } - echo ""; - } else { - // raise an error -> no student record in student_tbl - echo ""; - } - } - echo ""; - } else { - // raise an error -> no records in student_class_tbl - // echo ""; - } - } else { - // raise an error -> no records or multiple items deteced in grade_tbl - // $em = "no records or multiple items deteced in grade_tbl"; - // header("Location: show-marks.php?error=$em"); - // exit; - } - } else { - // no subjects assigned to grades! - echo ""; - } - } else { - // raise an error -> no record in grade_tbl - echo ""; - } -} + 0) { + echo "Admission No.Name"; + while ($row1 = mysqli_fetch_assoc($result2)) { + $sub_id = $row1['sub_id']; + array_push($sub_array, $sub_id); + $sql3 = "SELECT sub_code FROM subject_tbl WHERE sub_id='$sub_id'"; + $result3 = mysqli_query($con, $sql3); + $s_name = mysqli_fetch_assoc($result3); + $sub_name = $s_name['sub_code']; + + echo "$sub_name"; + } + echo "TotalAverageRank"; + // $sql = "SELECT * FROM user_tbl ut INNER JOIN user_role_tbl urt ON + // (ut.role_id = urt.role_id) WHERE (ut.username = '$uname')"; + $sql4 = "SELECT grade_class_id FROM grade_class_tbl WHERE grade_id='$grade_id' AND class_id='$class_id' AND year='$year'"; + $result4 = mysqli_query($con, $sql4); + if (mysqli_num_rows($result4) == 1) { + $grd_cls = mysqli_fetch_assoc($result4); + $grade_class_id = $grd_cls['grade_class_id']; + + echo ""; + + $sql5 = "SELECT std_id FROM student_class_tbl WHERE grade_class_id='$grade_class_id'"; + $result5 = mysqli_query($con, $sql5); + if (mysqli_num_rows($result5) > 0) { + while ($row2 = mysqli_fetch_assoc($result5)) { + $std_id = $row2['std_id']; + $sql6 = "SELECT std_id, admission_no, full_name FROM student_tbl WHERE status='1' AND std_id='$std_id' ORDER BY admission_no ASC"; + $result6 = mysqli_query($con, $sql6); + if (mysqli_num_rows($result6) == 1) { + $std = mysqli_fetch_assoc($result6); + $admission_no = $std['admission_no']; + $full_name = $std['full_name']; + // $std_id = $std['std_id']; + echo "$admission_no + $full_name"; + $count = 0; + $total = 0; + $avg = 0; + foreach ($sub_array as $sub_id) { + $sql10 = "SELECT * FROM al_marks_tbl WHERE year='$year' AND term='$term' AND grade_class_id='$grade_class_id'"; + $result10 = mysqli_query($con, $sql10); + if (mysqli_num_rows($result10) > 0) { + $sql7 = "SELECT marks FROM al_marks_tbl WHERE sub_id='$sub_id' AND std_id='$std_id' AND year='$year' AND term='$term'"; + $result7 = mysqli_query($con, $sql7); + if (mysqli_num_rows($result7) == 1) { + $m = mysqli_fetch_assoc($result7); + $marks = $m['marks']; + // echo "$marks"; + if ($marks == 0) { + $sql8 = "SELECT * FROM al_absent_tbl WHERE sub_id='$sub_id' AND std_id='$std_id' AND year='$year' AND term='$term'"; + $result8 = mysqli_query($con, $sql8); + if (mysqli_num_rows($result8) == 1) { + echo ""; + } else { + echo ""; + } + // echo ""; + } elseif ($marks == '') { + echo ""; + } else { + echo ""; + $total += $marks; + } + // $count += 1; + if ($marks == "") { + continue; + } else { + $count += 1; + } + } else { + echo ""; + } + } else { + echo ""; + echo ""; + } + } + echo ""; + if ($count >= 1 && $total >= 1) { + $avg = round($total / $count, 2); + echo ""; + } else { + echo ""; + } + + // Execute the SQL query to get the rank of the selected student + $sql11 = "SELECT std_id, SUM(marks) AS total_marks, (SELECT COUNT(*) FROM (SELECT std_id, SUM(marks) AS total_marks FROM al_marks_tbl + WHERE grade_class_id = '$grade_class_id' AND term='$term' AND year='$year' GROUP BY std_id) AS ranks WHERE total_marks > (SELECT SUM(marks) FROM + al_marks_tbl WHERE grade_class_id = '$grade_class_id' AND term='$term' AND year='$year' AND std_id = '$std_id')) + 1 AS rank FROM al_marks_tbl + WHERE grade_class_id = '$grade_class_id' AND std_id = '$std_id' AND term='$term' AND year='$year'"; + $result11 = mysqli_query($con, $sql11); + + + if (mysqli_num_rows($result11) > 0) { + $row = mysqli_fetch_assoc($result11); + $rank = $row['rank']; + // echo "The rank of student $std_id in grade class $grade_class_id is $rank"; + echo ""; + } else { + // echo "No results found"; + } + echo ""; + } else { + // raise an error -> no student record in student_tbl + echo ""; + } + } + echo ""; + } else { + // raise an error -> no records in student_class_tbl + // echo ""; + } + } else { + // raise an error -> no records or multiple items deteced in grade_tbl + // $em = "no records or multiple items deteced in grade_tbl"; + // header("Location: show-marks.php?error=$em"); + // exit; + } + } else { + // no subjects assigned to grades! + echo ""; + } + } else { + // raise an error -> no record in grade_tbl + echo ""; + } +} diff --git a/pages/admin/view-student-info.php b/pages/admin/view-student-info.php index 66c457e..7beb2a6 100644 --- a/pages/admin/view-student-info.php +++ b/pages/admin/view-student-info.php @@ -1,210 +1,227 @@ - - - - - - - - - - - - - <?php echo $student['name_with_initials']; ?>'s Profile - Admin - - - - - - - - - - - -
- - -
-

Student Profile

- - - -
- Go Back - '>Edit Profile - - - - - - - - - - - - - -
- - -
-
-
-
- profile picture -

-
Student
- -
-
-
-
-
-

Personal Info

-
-
-
- - "> -
-
- - "> -
-
-
-
- - -
-
- - "> -
-
- - "> -
-
- - "> -
-
-
-
-
-
-
-

School Info

-
-
- - "> -

-
- - "> -

-
- - "> -

-
- -
-
-
- -
-

- - - - -
- - - -
- - - - - - - - - + + + + + + + + + + + + + <?php echo $student['name_with_initials']; ?>'s Profile - Admin + + + + + + + + + + + + +
+ + +
+

Student Profile

+ + + +
+ Go Back + '>Edit Profile + + + + + + + + + + + + + +
+ + +
+
+
+
+ profile picture +

+ +

+
Student
+ +
+
+
+
+
+

Personal Info

+
+
+
+ + "> +
+
+ + "> +
+
+
+
+ + +
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+
+
+
+
+
+

School Info

+
+
+ + "> +

+
+ + "> +

+
+ + "> +

+
+ +
+
+
+ +
+

+ + + + +
+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/pages/admin/view-teacher-info.php b/pages/admin/view-teacher-info.php index bd9af2c..dfa3724 100644 --- a/pages/admin/view-teacher-info.php +++ b/pages/admin/view-teacher-info.php @@ -1,264 +1,285 @@ - - - - - - - - - - - - - <?php echo $teacher['first_name']; ?>'s Profile - Admin - - - - - - - - - - - -
- - -
-

Staff Profile

- - - -
- Go Back - '>Edit Profile - - - - - - - - - - - - - -
- - -
-
-
-
- " class="rounded-circle mt-5" width="250px" alt="profile picture" height="250px"> -

-
- -
-
-
-
-
-

Personal Info

-
-
-
- - "> -
-
- - "> -
-
-
-
- - "> -
-
- - "> -
-
- - "> -
-
- - -
-
-
-
-
-
-
-

School Info

-

-
- - "> -

-
- - "> -

-
- - "> -

-
- - - - - - - -
-
- - - - -
-
- -
-
-
- -
-

- - - - -
- - - -
- - - - - - - - - + + + + + + + + + + + + + <?php echo $teacher['first_name']; ?>'s Profile - Admin + + + + + + + + + + + + +
+ + +
+

Staff Profile

+ + + +
+ Go Back + '>Edit Profile + + + + + + + + + + + + + +
+ + +
+
+
+
+ " class="rounded-circle mt-5" width="250px" alt="profile picture" + height="250px"> +

+ +

+
+ +
+ +
+
+
+
+
+

Personal Info

+
+
+
+ + "> +
+
+ + "> +
+
+
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+ + +
+
+
+
+
+
+
+

School Info

+

+
+ + "> +

+
+ + "> +

+
+ + "> +

+
+ + + + + + + +
+
+ + + + +
+
+ +
+
+
+ +
+

+ + + + +
+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/pages/footer.php b/pages/footer.php index 20b688b..263fb9c 100644 --- a/pages/footer.php +++ b/pages/footer.php @@ -1,14 +1,14 @@ -