diff --git a/assets/css/custom.css b/assets/css/custom.css index 2e4b83a..b3b50f4 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -4,24 +4,20 @@ :root { --primary-color: #3B82F6; --secondary-color: #10B981; + --info-color: #0EA5E9; --bg-color: #F9FAFB; --surface-color: #FFFFFF; --text-color: #1F2937; --light-gray: #6B7280; - - --primary-color-staff: #3B82F6; - --secondary-color-resident: #10B981; - --text-color-dark: #1F2937; - --text-color-light: #6B7280; - --background-light: #F9FAFB; - --surface-white: #FFFFFF; - --border-color: #E5E7EB; } -body.login-page { - font-family: 'Inter', sans-serif; +body { + font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: var(--bg-color); color: var(--text-color); +} + +.login-page { display: flex; align-items: center; justify-content: center; @@ -44,8 +40,9 @@ body.login-page { } .login-card h1 { - font-weight: 600; - font-size: 1.5rem; + font-family: 'Nunito', sans-serif; + font-weight: 700; + font-size: 1.75rem; margin-bottom: 0.5rem; } @@ -54,33 +51,6 @@ body.login-page { margin-bottom: 2.5rem; } -.btn-block { - display: block; - width: 100%; - padding: 1rem; - font-size: 1rem; - font-weight: 500; - border-radius: 0.5rem; - text-decoration: none; - transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out; -} - -.btn-block:hover { - transform: translateY(-2px); - box-shadow: 0 4px 8px rgba(0,0,0,0.1); -} - -.btn-resident { - background-color: var(--secondary-color); - color: white; - margin-bottom: 1rem; -} - -.btn-staff { - background-color: var(--primary-color); - color: white; -} - .footer-text { text-align: center; margin-top: 2rem; @@ -88,218 +58,49 @@ body.login-page { font-size: 0.875rem; } -/* Landing Page Styles */ -body:not(.login-page) { - font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - background-color: var(--surface-white); - color: var(--text-color-dark); - margin: 0; - line-height: 1.6; -} - -.container { - max-width: 1200px; - margin: 0 auto; - padding: 0 1.5rem; -} - -/* Header */ -.site-header { - background-color: var(--surface-white); - box-shadow: 0 2px 4px rgba(0,0,0,0.05); - padding: 1rem 0; - position: sticky; - top: 0; - z-index: 100; -} - -.site-header .container { - display: flex; - justify-content: space-between; - align-items: center; -} - -.site-header .logo { - font-size: 1.5rem; - font-weight: 700; - color: var(--text-color-dark); - font-family: 'Nunito', sans-serif; -} - -.site-header nav { - display: flex; - align-items: center; - gap: 1.5rem; -} - -.site-header nav a { - text-decoration: none; - color: var(--text-color-light); - font-weight: 600; - transition: color 0.3s ease; -} - -.site-header nav a:hover { - color: var(--primary-color-staff); -} - -.button { - padding: 0.75rem 1.5rem; - border-radius: 0.5rem; - text-decoration: none; - font-weight: 600; - transition: all 0.3s ease; - display: inline-block; -} - -.button-primary { - background-color: var(--primary-color-staff); - color: white; -} - -.button-primary:hover { - background-color: #2563EB; - transform: translateY(-2px); - box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3); -} - -.button-secondary { - background-color: var(--secondary-color-resident); - color: white; -} - -.button-secondary:hover { - background-color: #059669; - transform: translateY(-2px); - box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); -} - - -/* Hero Section */ -.hero { - background: linear-gradient(to right, #EAF4FB, #EAF7EF); - padding: 6rem 0; - text-align: left; -} - -.hero-container { - display: grid; - grid-template-columns: 1fr 1fr; - align-items: center; - gap: 4rem; -} - -.hero-text h1 { - font-family: 'Nunito', sans-serif; - font-size: 3rem; - font-weight: 700; - line-height: 1.2; - margin-bottom: 1rem; - color: var(--text-color-dark); -} - -.hero-text p { - font-size: 1.125rem; - color: var(--text-color-light); - margin-bottom: 2rem; -} - -.hero-buttons { - display: flex; - gap: 1rem; -} - -.hero-image img { - width: 100%; - border-radius: 0.75rem; - box-shadow: 0 10px 25px rgba(0,0,0,0.1); -} - -/* Mission Section */ -.mission-section { - padding: 6rem 0; - background-color: var(--surface-white); -} - -.mission-container { - display: grid; - grid-template-columns: 1fr 1fr; - align-items: center; - gap: 4rem; -} - -.mission-text h2 { - font-family: 'Nunito', sans-serif; - font-size: 2.5rem; - font-weight: 700; - margin-bottom: 1.5rem; - color: var(--text-color-dark); -} - -.mission-text blockquote { - font-size: 1.25rem; - font-style: italic; - color: var(--text-color-light); - border-left: 4px solid var(--secondary-color-resident); - padding-left: 1.5rem; - margin: 0 0 2rem 0; -} - -.cta-link { - font-weight: 600; - color: var(--primary-color-staff); - text-decoration: none; -} - -.cta-link:hover { - text-decoration: underline; -} - -.mission-image img { - width: 100%; - border-radius: 0.75rem; -} - -/* How It Works Section */ -.how-it-works-section { - padding: 6rem 0; - background-color: var(--background-light); - text-align: center; -} - -.how-it-works-section h2 { - font-family: 'Nunito', sans-serif; - font-size: 2.5rem; - font-weight: 700; - margin-bottom: 1rem; -} - -.how-it-works-section p { - font-size: 1.125rem; - color: var(--text-color-light); - max-width: 600px; - margin: 0 auto; -} - -/* Footer */ -.site-footer-main { - background-color: var(--text-color-dark); - color: var(--background-light); - padding: 2rem 0; - text-align: center; -} - -/* Login Form Styles */ -.btn-primary-custom { - background-color: var(--primary-color); +/* General Button Styles */ +.btn-primary-custom, .btn-secondary-custom, .btn-info-custom { color: white; border: none; + padding: 1rem; + font-size: 1rem; + font-weight: 500; + border-radius: 0.5rem; + text-decoration: none; + transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out; +} + +.btn-primary-custom:hover, .btn-secondary-custom:hover, .btn-info-custom:hover { + transform: translateY(-2px); + box-shadow: 0 4px 8px rgba(0,0,0,0.1); + color: white; +} + +.btn-primary-custom { + background-color: var(--primary-color); } .btn-primary-custom:hover { background-color: #2563EB; } +.btn-secondary-custom { + background-color: var(--secondary-color); +} + +.btn-secondary-custom:hover { + background-color: #059669; +} + +.btn-info-custom { + background-color: var(--info-color); +} + +.btn-info-custom:hover { + background-color: #0284C7; +} + + .login-card .form-footer { margin-top: 1.5rem; font-size: 0.9rem; @@ -312,4 +113,46 @@ body:not(.login-page) { .login-card .form-footer a:hover { text-decoration: underline; -} \ No newline at end of file +} + +/* Dashboard Navigation */ +.navbar { + box-shadow: 0 2px 4px rgba(0,0,0,0.05); +} + +/* Dashboard Content */ +.card { + border: 1px solid var(--border-color); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05); +} + +.table-custom { + border-collapse: separate; + border-spacing: 0 0.5rem; +} + +.table-custom thead th { + border-bottom: 2px solid var(--border-color); + padding-bottom: 1rem; +} + +.table-custom tbody tr { + background-color: var(--surface-color); + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); + border-radius: 0.5rem; +} + +.table-custom td, .table-custom th { + vertical-align: middle; + padding: 1rem 1.5rem; +} + +.table-custom tbody tr:hover { + background-color: var(--bg-color); +} + +.btn-sm-custom { + padding: 0.25rem 0.75rem; + font-size: 0.875rem; + border-radius: 0.375rem; +} diff --git a/create_action_plan.php b/create_action_plan.php new file mode 100644 index 0000000..c01764d --- /dev/null +++ b/create_action_plan.php @@ -0,0 +1,117 @@ +prepare("SELECT first_name, last_name FROM residents WHERE id = ?"); +$stmt->execute([$resident_id]); +$resident = $stmt->fetch(PDO::FETCH_ASSOC); + +if (!$resident) { + header("Location: staff_dashboard.php"); + exit; +} + +$error_message = ''; +$success_message = ''; + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + if (empty($_POST['title'])) { + $error_message = 'Please provide a title for the action plan.'; + } else { + try { + $stmt = $pdo->prepare("INSERT INTO action_plans (resident_id, staff_id, title, description, status, due_date) VALUES (?, ?, ?, ?, ?, ?)"); + $stmt->execute([ + $resident_id, + $_SESSION['user_id'], + $_POST['title'], + $_POST['description'] ?? null, + $_POST['status'] ?? 'In Progress', + !empty($_POST['due_date']) ? $_POST['due_date'] : null + ]); + header("Location: resident_view.php?id=" . $resident_id . "&success=1"); + exit; + } catch (PDOException $e) { + $error_message = 'Database error: Could not create action plan. ' . $e->getMessage(); + } + } +} +?> + + + + + + New Action Plan - Continuum of Healing + + + + + + + +
+
+

Create New Action Plan

+ ← Back to Resident View +
+ +

Creating plan for:

+ + +
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/index.php b/index.php index 4c380e6..e64bc68 100644 --- a/index.php +++ b/index.php @@ -1,72 +1,57 @@ prepare("SELECT * FROM users WHERE email = ?"); - $stmt->execute([$_POST['email']]); - $user = $stmt->fetch(); - - if ($user && password_verify($_POST['password'], $user['password'])) { - // Password is correct, start session - $_SESSION['user_id'] = $user['id']; - $_SESSION['user_email'] = $user['email']; - $_SESSION['user_role'] = $user['role']; - - // Redirect to the appropriate dashboard - if ($user['role'] === 'staff') { - header("Location: staff_dashboard.php"); - } else { - header("Location: resident_dashboard.php"); - } - exit; - } else { - $error_message = 'Invalid email or password.'; - } - } catch (PDOException $e) { - $error_message = 'Database error. Please try again later.'; - // In a real app, you would log this error - } - } -} ?> - - Login - Continuum of Healing - + Welcome - Continuum of Healing + - - + + - - + + @@ -75,29 +60,14 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
-
-

Sign In

-

Welcome to the Continuum of Healing™

+