diff --git a/admin/assets/css/style.css b/admin/assets/css/style.css new file mode 100644 index 0000000..5beb9ae --- /dev/null +++ b/admin/assets/css/style.css @@ -0,0 +1,85 @@ +body { + font-size: .875rem; +} + +.feather { + width: 16px; + height: 16px; + vertical-align: text-bottom; +} + +/* + * Sidebar + */ + +.sidebar { + position: fixed; + top: 0; + bottom: 0; + left: 0; + z-index: 100; /* Behind the navbar */ + padding: 48px 0 0; /* Height of navbar */ + 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; /* Scrollable contents if viewport is shorter than content. */ +} + +.sidebar .nav-link { + font-weight: 500; + color: #333; +} + +.sidebar .nav-link .feather { + margin-right: 4px; + color: #727272; +} + +.sidebar .nav-link.active { + color: #2470dc; +} + +.sidebar .nav-link:hover .feather, +.sidebar .nav-link.active .feather { + color: inherit; +} + +.sidebar-heading { + font-size: .75rem; + text-transform: uppercase; +} + +/* + * Navbar + */ + +.navbar-brand { + padding-top: .75rem; + padding-bottom: .75rem; + font-size: 1rem; + background-color: rgba(0, 0, 0, .25); + box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25); +} + +.navbar .form-control { + padding: .75rem 1rem; + border-width: 0; + border-radius: 0; +} + +.form-control-dark { + color: #fff; + background-color: rgba(255, 255, 255, .1); + border-color: rgba(255, 255, 255, .1); +} + +.form-control-dark:focus { + border-color: transparent; + box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); +} \ No newline at end of file diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..4592b00 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/admin/partials/footer.php b/admin/partials/footer.php new file mode 100644 index 0000000..f88213e --- /dev/null +++ b/admin/partials/footer.php @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/admin/partials/header.php b/admin/partials/header.php new file mode 100644 index 0000000..772893f --- /dev/null +++ b/admin/partials/header.php @@ -0,0 +1,40 @@ + + + + + + <?php echo isset($pageTitle) ? htmlspecialchars($pageTitle) : "Admin"; ?> - OldHelp + + + + + + + +
+
+ + +
diff --git a/admin/users.php b/admin/users.php new file mode 100644 index 0000000..aeedee9 --- /dev/null +++ b/admin/users.php @@ -0,0 +1,51 @@ +query('SELECT id, name, email, role FROM users'); +$users = $stmt->fetchAll(); +?> + +
+
+

User Management

+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
#NameEmailRoleActions
+ + +
+
+
+ + \ No newline at end of file diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..6244d5e --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,55 @@ + +body { + background-color: #f8f9fa; + font-family: 'Verdana', 'Arial', sans-serif; +} + +.hero { + background: linear-gradient(135deg, #f8f9fa, #e9ecef); + padding: 4rem 2rem; + border-bottom: 1px solid #dee2e6; +} + +.hero h1 { + font-size: 3rem; + font-weight: bold; +} + +.hero p { + font-size: 1.25rem; + color: #6c757d; +} + +.action-card { + border: none; + border-radius: 0.5rem; + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); + transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; + cursor: pointer; + padding: 2rem; + text-align: center; + background-color: #ffffff; +} + +.action-card:hover { + transform: translateY(-5px); + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); +} + +.action-card .icon { + font-size: 4rem; + color: #007bff; +} + +.action-card .card-title { + font-size: 1.5rem; + font-weight: bold; + margin-top: 1rem; +} + +.toast-container { + position: fixed; + top: 20px; + right: 20px; + z-index: 1055; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..640dc89 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,39 @@ + +document.addEventListener('DOMContentLoaded', function () { + const actionCards = document.querySelectorAll('.action-card'); + const toastContainer = document.querySelector('.toast-container'); + + const showToast = (message) => { + const toastEl = document.createElement('div'); + toastEl.className = 'toast show'; + toastEl.setAttribute('role', 'alert'); + toastEl.setAttribute('aria-live', 'assertive'); + toastEl.setAttribute('aria-atomic', 'true'); + + toastEl.innerHTML = ` +
+ OldHelp Assistant + +
+
+ ${message} +
+ `; + + toastContainer.appendChild(toastEl); + + const toast = new bootstrap.Toast(toastEl, { delay: 5000 }); + toast.show(); + + toastEl.addEventListener('hidden.bs.toast', () => { + toastEl.remove(); + }); + }; + + actionCards.forEach(card => { + card.addEventListener('click', () => { + const task = card.getAttribute('data-task'); + showToast(`Help for ${task} is on the way!`); + }); + }); +}); diff --git a/db/migrate.php b/db/migrate.php new file mode 100644 index 0000000..96ed9fb --- /dev/null +++ b/db/migrate.php @@ -0,0 +1,18 @@ +exec($sql); + echo "Migration successful!\n"; +} catch (PDOException $e) { + die("Migration failed: " . $e->getMessage() . "\n"); +} + diff --git a/db/migrations/001_create_users_table.sql b/db/migrations/001_create_users_table.sql new file mode 100644 index 0000000..2b70cf9 --- /dev/null +++ b/db/migrations/001_create_users_table.sql @@ -0,0 +1,13 @@ +CREATE TABLE IF NOT EXISTS `users` ( + `id` INT AUTO_INCREMENT PRIMARY KEY, + `name` VARCHAR(255) NOT NULL, + `email` VARCHAR(255) NOT NULL UNIQUE, + `role` VARCHAR(50) NOT NULL, + `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +-- Insert some dummy data +INSERT INTO `users` (`name`, `email`, `role`) VALUES +('John Doe', 'john.doe@example.com', 'admin'), +('Jane Smith', 'jane.smith@example.com', 'caregiver'), +('Peter Jones', 'peter.jones@example.com', 'elderly'); diff --git a/index.php b/index.php index 7205f3d..a9399b2 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,88 @@ - - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + OldHelp - Your AI Companion + + + + + + + + + + + + + + + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
-
- Page updated: (UTC) -
+ +
+
+

How can I help you today?

+

Click one of the buttons below to get started.

+
+
+ +
+
+
+
+ +

Email

+
+
+
+
+ +

Internet

+
+
+
+
+ +

Video Call

+
+
+
+
+ +

My Files

+
+
+
+
+ +

Computer Health

+
+
+
+
+ +

Live Support

+
+
+
+
+ +
+

© OldHelp. All rights reserved. | Admin

+
+ + +
+ + + + + - + \ No newline at end of file