Compare commits

...

1 Commits

Author SHA1 Message Date
Flatlogic Bot
6a5266b17c sgrr erp 2025-11-28 17:45:24 +00:00

357
index.php
View File

@ -1,150 +1,219 @@
<?php <!DOCTYPE html>
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
?>
<!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>New Style</title> <title>School ERP</title>
<?php <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
// Read project preview data from environment <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? ''; <link rel="preconnect" href="https://fonts.googleapis.com">
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
?> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<?php if ($projectDescription): ?> <style>
<!-- Meta description --> :root {
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' /> --bs-primary-rgb: 67, 56, 202;
<!-- Open Graph meta tags --> --bs-primary: #4338CA;
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" /> --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
<!-- Twitter meta tags --> --bs-body-bg: #F3F4F6;
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" /> }
<?php endif; ?> body {
<?php if ($projectImageUrl): ?> font-family: var(--bs-font-sans-serif);
<!-- Open Graph image --> }
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" /> .sidebar {
<!-- Twitter image --> position: fixed;
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" /> top: 0;
<?php endif; ?> left: 0;
<link rel="preconnect" href="https://fonts.googleapis.com"> bottom: 0;
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> width: 260px;
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet"> padding: 1rem;
<style> background-color: #fff;
:root { border-right: 1px solid #dee2e6;
--bg-color-start: #6a11cb; z-index: 1000;
--bg-color-end: #2575fc; }
--text-color: #ffffff; .sidebar-brand {
--card-bg-color: rgba(255, 255, 255, 0.01); font-weight: 700;
--card-border-color: rgba(255, 255, 255, 0.1); font-size: 1.5rem;
} color: var(--bs-primary);
body { }
margin: 0; .sidebar .nav-link {
font-family: 'Inter', sans-serif; color: #495057;
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end)); font-weight: 500;
color: var(--text-color); padding: 0.75rem 1rem;
display: flex; display: flex;
justify-content: center; align-items: center;
align-items: center; }
min-height: 100vh; .sidebar .nav-link i {
text-align: center; margin-right: 0.75rem;
overflow: hidden; font-size: 1.2rem;
position: relative; width: 24px;
} text-align: center;
body::before { }
content: ''; .sidebar .nav-link:hover, .sidebar .nav-link.active {
position: absolute; background-color: rgba(var(--bs-primary-rgb), 0.1);
top: 0; color: var(--bs-primary);
left: 0; border-radius: 0.5rem;
width: 100%; }
height: 100%; .main-content {
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>'); margin-left: 260px;
animation: bg-pan 20s linear infinite; padding: 2rem;
z-index: -1; }
} .header {
@keyframes bg-pan { display: flex;
0% { background-position: 0% 0%; } justify-content: space-between;
100% { background-position: 100% 100%; } align-items: center;
} padding: 1rem 0;
main { border-bottom: 1px solid #dee2e6;
padding: 2rem; margin-bottom: 2rem;
} }
.card { .card {
background: var(--card-bg-color); border: none;
border: 1px solid var(--card-border-color); border-radius: 0.75rem;
border-radius: 16px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
padding: 2rem; }
backdrop-filter: blur(20px); </style>
-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> </head>
<body> <body>
<main> <div class="sidebar">
<div class="card"> <a href="/" class="sidebar-brand d-flex align-items-center justify-content-center mb-4">
<h1>Analyzing your requirements and generating your website…</h1> <i class="bi bi-buildings-fill me-2"></i>
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes"> <span>School ERP</span>
<span class="sr-only">Loading…</span> </a>
</div> <ul class="nav flex-column">
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p> <li class="nav-item"><a href="#" class="nav-link active"><i class="bi bi-grid-1x2-fill"></i><span>Dashboard</span></a></li>
<p class="hint">This page will update automatically as the plan is implemented.</p> <li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-people-fill"></i><span>Student Management</span></a></li>
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p> <li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-person-badge-fill"></i><span>Teacher & Staff</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-calendar-check-fill"></i><span>Attendance</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-calendar3-week-fill"></i><span>Timetable</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-journal-check"></i><span>Exams & Grading</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-receipt-cutoff"></i><span>Fee Management</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-book-half"></i><span>Library</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-truck-front-fill"></i><span>Transport</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-person-workspace"></i><span>Parent Portal</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-laptop-fill"></i><span>LMS</span></a></li>
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-briefcase-fill"></i><span>HR & Payroll</span></a></li>
</ul>
</div> </div>
</main>
<footer> <main class="main-content">
Page updated: <?= htmlspecialchars($now) ?> (UTC) <header class="header">
</footer> <h1 class="h3 mb-0">Admin Dashboard</h1>
<div class="dropdown">
<button class="btn btn-light dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-person-circle me-2"></i> School Admin
</button>
<ul class="dropdown-menu dropdown-menu-end">
<li><a class="dropdown-item" href="#">Profile</a></li>
<li><a class="dropdown-item" href="#">Settings</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Logout</a></li>
</ul>
</div>
</header>
<div class="row g-4">
<div class="col-md-6 col-xl-3">
<div class="card">
<div class="card-body d-flex align-items-center">
<div class="flex-shrink-0 me-3">
<div class="bg-primary-subtle text-primary p-3 rounded-3">
<i class="bi bi-people-fill fs-3"></i>
</div>
</div>
<div class="flex-grow-1">
<h5 class="card-title text-muted fw-normal">Total Students</h5>
<h3 class="fw-bold mb-0">1,254</h3>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xl-3">
<div class="card">
<div class="card-body d-flex align-items-center">
<div class="flex-shrink-0 me-3">
<div class="bg-success-subtle text-success p-3 rounded-3">
<i class="bi bi-person-check-fill fs-3"></i>
</div>
</div>
<div class="flex-grow-1">
<h5 class="card-title text-muted fw-normal">Attendance</h5>
<h3 class="fw-bold mb-0">95.8%</h3>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xl-3">
<div class="card">
<div class="card-body d-flex align-items-center">
<div class="flex-shrink-0 me-3">
<div class="bg-warning-subtle text-warning p-3 rounded-3">
<i class="bi bi-cash-coin fs-3"></i>
</div>
</div>
<div class="flex-grow-1">
<h5 class="card-title text-muted fw-normal">Fees Collected</h5>
<h3 class="fw-bold mb-0">$54,300</h3>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-xl-3">
<div class="card">
<div class="card-body d-flex align-items-center">
<div class="flex-shrink-0 me-3">
<div class="bg-danger-subtle text-danger p-3 rounded-3">
<i class="bi bi-exclamation-triangle-fill fs-3"></i>
</div>
</div>
<div class="flex-grow-1">
<h5 class="card-title text-muted fw-normal">Alerts</h5>
<h3 class="fw-bold mb-0">12</h3>
</div>
</div>
</div>
</div>
</div>
<div class="row g-4 mt-1">
<div class="col-12">
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">Student Enrollment by Grade</h5>
</div>
<div class="card-body">
<canvas id="enrollmentChart"></canvas>
</div>
</div>
</div>
</div>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
const ctx = document.getElementById('enrollmentChart');
new Chart(ctx, {
type: 'bar',
data: {
labels: ['Grade 1', 'Grade 2', 'Grade 3', 'Grade 4', 'Grade 5', 'Grade 6', 'Grade 7', 'Grade 8'],
datasets: [{
label: 'Number of Students',
data: [120, 115, 130, 128, 140, 135, 145, 150],
backgroundColor: 'rgba(67, 56, 202, 0.5)',
borderColor: 'rgba(67, 56, 202, 1)',
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true
}
}
}
});
</script>
</body> </body>
</html> </html>