From 5926dbfc546fb740bc0bc3c1155c474354c1b0f0 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Tue, 2 Sep 2025 19:37:21 +0000 Subject: [PATCH] main part --- add_course.php | 19 +++++ add_instructor.php | 18 ++++ add_student.php | 18 ++++ courses.php | 82 +++++++++++++++++++ custom.css | 61 ++++++++++++++ data/courses.json | 11 +++ data/discussion_boards.json | 1 + data/enrollments.json | 1 + data/instructors.json | 6 ++ data/students.json | 1 + footer.php | 13 +++ header.php | 37 +++++++++ index.php | 158 ++++++++++-------------------------- instructors.php | 70 ++++++++++++++++ students.php | 70 ++++++++++++++++ 15 files changed, 453 insertions(+), 113 deletions(-) create mode 100644 add_course.php create mode 100644 add_instructor.php create mode 100644 add_student.php create mode 100644 courses.php create mode 100644 custom.css create mode 100644 data/courses.json create mode 100644 data/discussion_boards.json create mode 100644 data/enrollments.json create mode 100644 data/instructors.json create mode 100644 data/students.json create mode 100644 footer.php create mode 100644 header.php create mode 100644 instructors.php create mode 100644 students.php diff --git a/add_course.php b/add_course.php new file mode 100644 index 0000000..a7dd67f --- /dev/null +++ b/add_course.php @@ -0,0 +1,19 @@ + $_POST['name'], + 'description' => $_POST['description'], + 'instructor' => $_POST['instructor'], + ]; + + $courses[] = $new_course; + + file_put_contents('data/courses.json', json_encode($courses, JSON_PRETTY_PRINT)); + + header('Location: courses.php'); + exit; +} +?> diff --git a/add_instructor.php b/add_instructor.php new file mode 100644 index 0000000..7c60d3d --- /dev/null +++ b/add_instructor.php @@ -0,0 +1,18 @@ + $_POST['name'], + 'email' => $_POST['email'], + ]; + + $instructors[] = $new_instructor; + + file_put_contents('data/instructors.json', json_encode($instructors, JSON_PRETTY_PRINT)); + + header('Location: instructors.php'); + exit; +} +?> diff --git a/add_student.php b/add_student.php new file mode 100644 index 0000000..82d76d5 --- /dev/null +++ b/add_student.php @@ -0,0 +1,18 @@ + $_POST['name'], + 'email' => $_POST['email'], + ]; + + $students[] = $new_student; + + file_put_contents('data/students.json', json_encode($students, JSON_PRETTY_PRINT)); + + header('Location: students.php'); + exit; +} +?> diff --git a/courses.php b/courses.php new file mode 100644 index 0000000..674dc05 --- /dev/null +++ b/courses.php @@ -0,0 +1,82 @@ + + +
+

Courses

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

+

Instructor:

+
+
+
+ +
+
+
+

No courses found. Click 'Add New Course' to get started!

+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/custom.css b/custom.css new file mode 100644 index 0000000..fa5b0a2 --- /dev/null +++ b/custom.css @@ -0,0 +1,61 @@ +/* custom.css */ + +:root { + --primary-color: #6a11cb; + --secondary-color: #2575fc; + --background-color: #f4f7f6; + --font-color: #333; + --card-bg-color: #ffffff; + --shadow: 0 4px 8px 0 rgba(0,0,0,0.2); + --transition: all 0.3s ease; +} + +body { + font-family: 'Poppins', sans-serif; + background-color: var(--background-color); + color: var(--font-color); +} + +.navbar { + background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); + box-shadow: var(--shadow); +} + +.jumbotron { + background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); + color: white; + border-radius: 15px; +} + +.card { + border: none; + border-radius: 15px; + box-shadow: var(--shadow); + transition: var(--transition); +} + +.card:hover { + transform: translateY(-5px); + box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); +} + +.card-header { + background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); + color: white; + border-top-left-radius: 15px; + border-top-right-radius: 15px; +} + +.btn-primary { + background-color: var(--primary-color); + border: none; + transition: var(--transition); +} + +.btn-primary:hover { + background-color: var(--secondary-color); +} + +.modal-content { + border-radius: 15px; +} diff --git a/data/courses.json b/data/courses.json new file mode 100644 index 0000000..d5231c6 --- /dev/null +++ b/data/courses.json @@ -0,0 +1,11 @@ +[ + { + "name": "test ", + "description": "test" + }, + { + "name": "CSV Test", + "description": "CSV TestCSV TestCSV TestCSV TestCSV TestCSV TestCSV TestCSV Test", + "instructor": "Alex" + } +] \ No newline at end of file diff --git a/data/discussion_boards.json b/data/discussion_boards.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/data/discussion_boards.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/data/enrollments.json b/data/enrollments.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/data/enrollments.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/data/instructors.json b/data/instructors.json new file mode 100644 index 0000000..5363e54 --- /dev/null +++ b/data/instructors.json @@ -0,0 +1,6 @@ +[ + { + "name": "Alex", + "email": "Blarior@gmail.com" + } +] \ No newline at end of file diff --git a/data/students.json b/data/students.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/data/students.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..753b7ab --- /dev/null +++ b/footer.php @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/header.php b/header.php new file mode 100644 index 0000000..7b9846f --- /dev/null +++ b/header.php @@ -0,0 +1,37 @@ + + + + + + Online Learning Platform + + + + + + + +
diff --git a/index.php b/index.php index 9d8f280..91e86dd 100644 --- a/index.php +++ b/index.php @@ -1,115 +1,47 @@ - -$phpVersion = PHP_VERSION; -$now = date('Y-m-d H:i:s'); -?> - - - - - - New Style - - - - - - -
-
-

Welcome!

-

Your project is ready to conquer the peaks.

-

PHP version:

+
+

Welcome to the Future of Learning!

+

Your all-in-one platform for managing courses, students, and instructors.

+
+

Seamlessly manage every aspect of your educational experience from a single dashboard.

+ Explore Courses +
+ +
+
+
+ Courses +
+ +
Courses
+

Create, edit, and manage your course offerings.

+ Manage Courses +
+
-
-
- Page updated: (UTC) -
- - \ No newline at end of file +
+
+ Students +
+ +
Students
+

Track student progress and manage enrollments.

+ Manage Students +
+
+
+
+
+ Instructors +
+ +
Instructors
+

Maintain profiles for all your teaching staff.

+ Manage Instructors +
+
+
+
+ + diff --git a/instructors.php b/instructors.php new file mode 100644 index 0000000..1649184 --- /dev/null +++ b/instructors.php @@ -0,0 +1,70 @@ + + +
+

Instructors

+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
Instructor NameEmail
No instructors found.
+
+
+ + + + + \ No newline at end of file diff --git a/students.php b/students.php new file mode 100644 index 0000000..6b9b3de --- /dev/null +++ b/students.php @@ -0,0 +1,70 @@ + + +
+

Students

+ +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
Student NameEmail
No students found.
+
+
+ + + + + \ No newline at end of file