diff --git a/assets/css/custom.css b/assets/css/custom.css
new file mode 100644
index 0000000..e15af5d
--- /dev/null
+++ b/assets/css/custom.css
@@ -0,0 +1,41 @@
+:root {
+ --bs-primary: #005A9C;
+ --bs-secondary: #FDB913;
+}
+
+.btn-primary {
+ background-image: linear-gradient(to bottom, #006bbd, #005A9C);
+ border: 1px solid #004c8b;
+}
+
+.sidebar {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 100;
+ padding: 48px 0 0;
+ box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
+}
+
+.sidebar-sticky {
+ position: relative;
+ top: 0;
+ height: calc(100vh - 48px);
+ padding-top: .5rem;
+ overflow-x: hidden;
+ overflow-y: auto;
+}
+
+.nav-link {
+ color: #333;
+}
+
+.nav-link.active {
+ color: #005A9C;
+ font-weight: 500;
+}
+
+.nav-link .bi {
+ margin-right: 8px;
+}
diff --git a/assets/js/main.js b/assets/js/main.js
new file mode 100644
index 0000000..e69de29
diff --git a/db/config.php b/db/config.php
index cc9229f..ef4bfd1 100644
--- a/db/config.php
+++ b/db/config.php
@@ -1,17 +1,21 @@
PDO::ERRMODE_EXCEPTION,
- PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
- ]);
- }
- return $pdo;
+ $dsn = "mysql:host=$host;dbname=$db;charset=$charset";
+ $options = [
+ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
+ PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
+ PDO::ATTR_EMULATE_PREPARES => false,
+ ];
+ try {
+ return new PDO($dsn, $user, $pass, $options);
+ } catch (PDOException $e) {
+ throw new PDOException($e->getMessage(), (int)$e->getCode());
+ }
}
+?>
\ No newline at end of file
diff --git a/db/migrate.php b/db/migrate.php
new file mode 100644
index 0000000..abdb6c8
--- /dev/null
+++ b/db/migrate.php
@@ -0,0 +1,29 @@
+exec($sql);
+ echo "Applied migration: " . basename($file) . "\n";
+ }
+}
+
+run_migrations();
+
+// Add a default admin user
+$pdo = db_connect();
+$stmt = $pdo->prepare("SELECT id FROM users WHERE email = ?");
+$stmt->execute(['admin@university.com']);
+if (!$stmt->fetch()) {
+ $password = password_hash('password', PASSWORD_DEFAULT);
+ $stmt = $pdo->prepare("INSERT INTO users (email, password, role) VALUES (?, ?, ?)");
+ $stmt->execute(['admin@university.com', $password, 'Super Admin']);
+ echo "Created default admin user.\n";
+}
+
+?>
\ No newline at end of file
diff --git a/db/migrations/001_create_users_table.sql b/db/migrations/001_create_users_table.sql
new file mode 100644
index 0000000..42876f0
--- /dev/null
+++ b/db/migrations/001_create_users_table.sql
@@ -0,0 +1,7 @@
+CREATE TABLE IF NOT EXISTS users (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ email VARCHAR(255) NOT NULL UNIQUE,
+ password VARCHAR(255) NOT NULL,
+ role VARCHAR(50) NOT NULL,
+ created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+);
diff --git a/index.php b/index.php
index 7205f3d..670b549 100644
--- a/index.php
+++ b/index.php
@@ -1,150 +1,136 @@
prepare("SELECT * FROM users WHERE id = ?");
+$stmt->execute([$_SESSION['user_id']]);
+$user = $stmt->fetch();
-$phpVersion = PHP_VERSION;
-$now = date('Y-m-d H:i:s');
?>
-
+
-
-
- New Style
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Dashboard - University Class Scheduling
+
+
+
-
-
-
Analyzing your requirements and generating your website…
-
- Loading…
-
-
= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.
-
This page will update automatically as the plan is implemented.
-
Runtime: PHP = htmlspecialchars($phpVersion) ?> — UTC = htmlspecialchars($now) ?>
+
+
+
+
+
+
+
+
+
Dashboard
+
+
+
+
+
+
+
Welcome, !
+
This is your dashboard. You can manage the university class scheduling from here.
+
+
+
+
+
+
+
-
-
+
+
+
-
+