Auto commit: 2026-01-04T09:27:56.364Z

This commit is contained in:
Flatlogic Bot 2026-01-04 09:27:56 +00:00
parent bda7319921
commit 45c3a6c25b
6 changed files with 287 additions and 146 deletions

93
assets/css/style.css Normal file
View File

@ -0,0 +1,93 @@
:root {
--main-bg-color: #F8F9FA;
--primary-color: #0F2A44;
--secondary-color: #1F7A5A;
}
body {
font-family: 'Poppins', sans-serif;
background-color: var(--main-bg-color);
}
#wrapper {
overflow-x: hidden;
}
#sidebar-wrapper {
min-height: 100vh;
margin-left: -15rem;
transition: margin 0.25s ease-out;
}
#sidebar-wrapper .sidebar-heading {
color: white;
}
#sidebar-wrapper .list-group {
width: 15rem;
}
#page-content-wrapper {
min-width: 100vw;
}
#wrapper.toggled #sidebar-wrapper {
margin-left: 0;
}
#sidebar-wrapper .list-group-item {
border: none;
color: #ced4da;
}
#sidebar-wrapper .list-group-item:hover {
background: rgba(255, 255, 255, 0.1);
color: white;
}
#sidebar-wrapper .list-group-item.active {
background-color: var(--secondary-color) !important;
color: white;
font-weight: bold;
border-left: 5px solid white;
}
.primary-text {
color: white;
}
.second-text {
color: var(--primary-color);
}
.card {
border-radius: 0.5rem;
border: none;
}
.form-control, .form-select {
border-radius: 0.5rem;
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
border-radius: 0.5rem;
}
.btn-primary:hover {
background-color: #0b1f33;
border-color: #0b1f33;
}
.login-container {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.login-card {
width: 100%;
max-width: 450px;
}

229
index.php
View File

@ -1,150 +1,87 @@
<?php <?php
declare(strict_types=1); require_once 'auth.php';
@ini_set('display_errors', '1'); check_auth();
@error_reporting(E_ALL);
@date_default_timezone_set('UTC'); include 'partials/header.php';
include 'partials/sidebar.php';
$role = $_SESSION['role'] ?? 'guest';
$welcome_message = "Welcome to your dashboard!";
$cards = [];
if ($role === 'accountant') {
$cards = [
'Total Fees Expected' => ['value' => '$1,250,000', 'icon' => 'bi-cash-stack', 'color' => 'success'],
'Total Fees Collected' => ['value' => '$980,000', 'icon' => 'bi-check-circle', 'color' => 'info'],
'Outstanding Balances' => ['value' => '$270,000', 'icon' => 'bi-exclamation-triangle', 'color' => 'warning'],
'Term Expenses' => ['value' => '$150,000', 'icon' => 'bi-wallet2', 'color' => 'danger'],
];
} elseif ($role === 'secretary') {
$cards = [
'Total Students' => ['value' => '1,520', 'icon' => 'bi-people-fill', 'color' => 'primary'],
'Total Staff' => ['value' => '85', 'icon' => 'bi-person-badge', 'color' => 'info'],
'Attendance Today' => ['value' => '98%', 'icon' => 'bi-calendar-check', 'color' => 'success'],
'Pending Admissions' => ['value' => '12', 'icon' => 'bi-person-plus', 'color' => 'warning'],
];
} elseif ($role === 'headteacher') {
$cards = [
'Total Students' => ['value' => '1,520', 'icon' => 'bi-people-fill', 'color' => 'primary'],
'Total Staff' => ['value' => '85', 'icon' => 'bi-person-badge', 'color' => 'info'],
'Financial Snapshot' => ['value' => 'On Track', 'icon' => 'bi-pie-chart', 'color' => 'success'],
'Academic Performance' => ['value' => 'Excelling', 'icon' => 'bi-graph-up', 'color' => 'secondary'],
];
}
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
?> ?>
<!doctype html>
<html lang="en"> <div class="row g-3 my-2">
<head> <?php foreach ($cards as $title => $data): ?>
<meta charset="utf-8" /> <div class="col-md-3">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <div class="p-3 bg-white shadow-sm d-flex justify-content-around align-items-center rounded">
<title>New Style</title> <div>
<?php <h3 class="fs-2"><?php echo $data['value']; ?></h3>
// Read project preview data from environment <p class="fs-5"><?php echo $title; ?></p>
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? ''; </div>
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; <i class="<?php echo $data['icon']; ?> fs-1 text-<?php echo $data['color']; ?>"></i>
?> </div>
<?php if ($projectDescription): ?>
<!-- Meta description -->
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
<!-- Open Graph meta tags -->
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<!-- Twitter meta tags -->
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
<?php endif; ?>
<?php if ($projectImageUrl): ?>
<!-- Open Graph image -->
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<!-- Twitter image -->
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
<?php endif; ?>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
<style>
:root {
--bg-color-start: #6a11cb;
--bg-color-end: #2575fc;
--text-color: #ffffff;
--card-bg-color: rgba(255, 255, 255, 0.01);
--card-border-color: rgba(255, 255, 255, 0.1);
}
body {
margin: 0;
font-family: 'Inter', sans-serif;
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
color: var(--text-color);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
text-align: center;
overflow: hidden;
position: relative;
}
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
animation: bg-pan 20s linear infinite;
z-index: -1;
}
@keyframes bg-pan {
0% { background-position: 0% 0%; }
100% { background-position: 100% 100%; }
}
main {
padding: 2rem;
}
.card {
background: var(--card-bg-color);
border: 1px solid var(--card-border-color);
border-radius: 16px;
padding: 2rem;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
.loader {
margin: 1.25rem auto 1.25rem;
width: 48px;
height: 48px;
border: 3px solid rgba(255, 255, 255, 0.25);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.hint {
opacity: 0.9;
}
.sr-only {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap; border: 0;
}
h1 {
font-size: 3rem;
font-weight: 700;
margin: 0 0 1rem;
letter-spacing: -1px;
}
p {
margin: 0.5rem 0;
font-size: 1.1rem;
}
code {
background: rgba(0,0,0,0.2);
padding: 2px 6px;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
footer {
position: absolute;
bottom: 1rem;
font-size: 0.8rem;
opacity: 0.7;
}
</style>
</head>
<body>
<main>
<div class="card">
<h1>Analyzing your requirements and generating your website…</h1>
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
<span class="sr-only">Loading…</span>
</div>
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
<p class="hint">This page will update automatically as the plan is implemented.</p>
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
</div> </div>
</main> <?php endforeach; ?>
<footer> </div>
Page updated: <?= htmlspecialchars($now) ?> (UTC)
</footer> <div class="row my-5">
</body> <h3 class="fs-4 mb-3">Recent Activity (Placeholder)</h3>
</html> <div class="col">
<table class="table bg-white rounded shadow-sm table-hover">
<thead>
<tr>
<th scope="col" width="50">#</th>
<th scope="col">Item</th>
<th scope="col">Details</th>
<th scope="col">Date</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Sample Item 1</td>
<td>Details about the item go here.</td>
<td>01/04/2026</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Sample Item 2</td>
<td>Details about the item go here.</td>
<td>01/04/2026</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Sample Item 3</td>
<td>Details about the item go here.</td>
<td>01/04/2026</td>
</tr>
</tbody>
</table>
</div>
</div>
<?php include 'partials/footer.php'; ?>

5
logout.php Normal file
View File

@ -0,0 +1,5 @@
<?php
session_start();
session_destroy();
header('Location: login.php');
exit();

8
partials/footer.php Normal file
View File

@ -0,0 +1,8 @@
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

15
partials/header.php Normal file
View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Providencia School ERP</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<div class="d-flex" id="wrapper">

83
partials/sidebar.php Normal file
View File

@ -0,0 +1,83 @@
<?php
$role = $_SESSION['role'] ?? 'guest';
$nav_items = [];
if ($role === 'accountant') {
$nav_items = [
'Dashboard' => 'bi-grid-fill',
'Students' => 'bi-people-fill',
'Fees Management' => 'bi-receipt',
'Invoices' => 'bi-file-earmark-text-fill',
'Payments' => 'bi-credit-card-fill',
'Expenses' => 'bi-wallet2',
'Payroll' => 'bi-cash-stack',
'Financial Reports' => 'bi-graph-up',
'Settings' => 'bi-gear-fill',
];
} elseif ($role === 'secretary') {
$nav_items = [
'Dashboard' => 'bi-grid-fill',
'Students' => 'bi-people-fill',
'Admissions' => 'bi-person-plus-fill',
'Classes' => 'bi-collection-fill',
'Staff Management' => 'bi-person-badge',
'Attendance' => 'bi-check-circle-fill',
'Timetable' => 'bi-calendar3',
'Documents' => 'bi-folder-fill',
'Settings' => 'bi-gear-fill',
];
} elseif ($role === 'headteacher') {
$nav_items = [
'Dashboard' => 'bi-grid-fill',
'Academic Management' => 'bi-book-half',
'Staff Oversight' => 'bi-eye-fill',
'Finance Overview' => 'bi-pie-chart-fill',
'Reports & Analytics' => 'bi-bar-chart-line-fill',
'Approvals' => 'bi-check2-square',
'System Settings' => 'bi-sliders',
];
}
?>
<!-- Sidebar -->
<div class="bg-dark" id="sidebar-wrapper">
<div class="sidebar-heading text-center py-4 primary-text fs-4 fw-bold text-uppercase border-bottom">
<i class="bi-building me-2"></i>Providencia
</div>
<div class="list-group list-group-flush my-3">
<?php foreach ($nav_items as $item => $icon): ?>
<a href="#" class="list-group-item list-group-item-action bg-transparent second-text fw-bold <?php echo ($item === 'Dashboard') ? 'active' : ''; ?>">
<i class="<?php echo $icon; ?> me-2"></i><?php echo $item; ?>
</a>
<?php endforeach; ?>
</div>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<nav class="navbar navbar-expand-lg navbar-light bg-transparent py-4 px-4">
<div class="d-flex align-items-center">
<h2 class="fs-2 m-0">Dashboard</h2>
</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle second-text fw-bold" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi-person-circle me-2"></i><?php echo ucfirst($role); ?>
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="#">Profile</a></li>
<li><a class="dropdown-item" href="logout.php">Logout</a></li>
</ul>
</li>
</ul>
</div>
</nav>
<div class="container-fluid px-4">