Deploy on 2026-06-05 15:42:41

This commit is contained in:
Hamza-Ayed
2026-06-05 15:42:41 +03:00
parent e7281a53a8
commit 669254ccd2

View File

@@ -1,11 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<html lang="<?= $lang ?? 'en' ?>" dir="<?= ($lang ?? 'en') === 'ar' ? 'rtl' : 'ltr' ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $this->escape($title ?? 'Admin') ?> - ScoutIQ</title>
<title><?= $this->escape($title ?? ($t['dashboard'] ?? 'Admin')) ?> - ScoutIQ</title>
<link rel="stylesheet" href="/assets/css/app.css">
<link rel="stylesheet" href="/assets/css/admin.css">
<?php if (($lang ?? 'en') === 'ar'): ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.rtl.min.css">
<style>
.sidebar { border-right: none; border-left: 1px solid rgba(255,255,255,0.05); }
.nav-menu { padding-right: 0; }
.nav-item a svg { margin-right: 0; margin-left: 12px; }
.top-bar { flex-direction: row-reverse; }
body { font-family: 'Tajawal', 'Inter', sans-serif; }
.form-label { text-align: right; }
.detail-row { flex-direction: row-reverse; }
.detail-row span:first-child { text-align: right; }
</style>
<?php endif; ?>
<link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
@@ -19,44 +33,57 @@
<nav style="flex: 1;">
<ul class="nav-menu">
<li class="nav-item active">
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/dashboard') ? 'active' : '' ?>">
<a href="/admin/dashboard">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="9"></rect><rect x="14" y="3" width="7" height="5"></rect><rect x="14" y="12" width="7" height="9"></rect><rect x="3" y="16" width="7" height="5"></rect></svg>
<span>Dashboard</span>
<span><?= $t['dashboard'] ?? 'Dashboard' ?></span>
</a>
</li>
<li class="nav-item">
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/organizations') ? 'active' : '' ?>">
<a href="/admin/organizations">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>
<span>Organizations</span>
<span><?= $t['organizations'] ?? 'Organizations' ?></span>
</a>
</li>
<li class="nav-item">
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/contacts') ? 'active' : '' ?>">
<a href="/admin/contacts">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
<span>Contacts</span>
<span><?= $t['contacts'] ?? 'Contacts' ?></span>
</a>
</li>
<li class="nav-item">
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/opportunities') ? 'active' : '' ?>">
<a href="/admin/opportunities">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>
<span>Opportunities</span>
<span><?= $t['opportunities'] ?? 'Opportunities' ?></span>
</a>
</li>
<li class="nav-item">
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/sources') ? 'active' : '' ?>">
<a href="/admin/sources">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
<span>Data Sources</span>
<span><?= $t['sources'] ?? 'Data Sources' ?></span>
</a>
</li>
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/settings') ? 'active' : '' ?>">
<a href="/admin/settings">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
<span><?= $t['settings'] ?? 'Settings' ?></span>
</a>
</li>
</ul>
</nav>
<div class="nav-menu">
<!-- Language Toggle -->
<li class="nav-item">
<a href="/admin/lang/<?= ($lang ?? 'en') === 'ar' ? 'en' : 'ar' ?>" style="color: var(--accent);">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>
<span><?= ($lang ?? 'en') === 'ar' ? 'English' : 'العربية' ?></span>
</a>
</li>
<li class="nav-item">
<a href="/logout" style="color: var(--error);">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
<span>Logout</span>
<span><?= $t['logout'] ?? 'Logout' ?></span>
</a>
</li>
</div>
@@ -67,7 +94,7 @@
<!-- Top bar -->
<header class="top-bar">
<div style="color: var(--text-muted); font-size: 0.9rem;">
Platform Mode: <span style="color: var(--accent); font-weight: 600; text-transform: uppercase;"><?= $this->escape($_ENV['APP_ENV'] ?? 'local') ?></span>
<?= $t['platform_mode'] ?? 'Platform Mode' ?>: <span style="color: var(--accent); font-weight: 600; text-transform: uppercase;"><?= $this->escape($_ENV['APP_ENV'] ?? ($t['local'] ?? 'local')) ?></span>
</div>
<div class="user-info">
<span style="font-weight: 500; font-size: 0.95rem;"><?= $this->escape($user['name'] ?? 'User') ?></span>
@@ -84,4 +111,4 @@
</main>
</div>
</body>
</html>
</html>