- Created separate MoneyFlix project directory - Copied Node.js redirector from production server - Added CRM PHP code (Redirects module, Core classes, Config, Routes, Views) - Created comprehensive documentation (README_MONEYFLIX.md) - Added sync script to keep CRM code updated (sync-from-crm.sh) - Configured .gitignore for Node.js and PHP - Set up proper project structure for multi-client isolation This separates MoneyFlix from the main CRM to avoid confusion between different client systems and provides a dedicated environment for MoneyFlix-specific development and maintenance.
127 lines
5.0 KiB
PHP
127 lines
5.0 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use App\Core\View;
|
|
use App\Core\AssetPath;
|
|
|
|
// The $branding variable is passed from the controller
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title><?php echo htmlspecialchars($branding['company_name'] ?? 'Analytics') ?> - Campaign Dashboard</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta content="Public Analytics Dashboard" name="description" />
|
|
<meta content="<?php echo htmlspecialchars($branding['company_name']) ?>" name="author" />
|
|
|
|
<!-- App favicon -->
|
|
<link rel="shortcut icon" href="<?php echo View::asset(htmlspecialchars($branding['favicon_url'])) ?>">
|
|
|
|
<!-- gridjs css -->
|
|
<link rel="stylesheet" href="<?php echo View::asset('assets/libs/gridjs/theme/mermaid.min.css') ?>">
|
|
<link rel="stylesheet" href="<?php echo View::asset('assets/libs/apexcharts/apexcharts.css') ?>">
|
|
<link rel="stylesheet" href="<?php echo View::asset('assets/libs/flatpickr/flatpickr.min.css') ?>">
|
|
|
|
<!-- Bootstrap Css -->
|
|
<link href="<?php echo View::asset('assets/css/bootstrap.min.css') ?>" id="bootstrap-style" rel="stylesheet" type="text/css" />
|
|
<!-- Icons Css -->
|
|
<link href="<?php echo View::asset('assets/css/icons.min.css') ?>" rel="stylesheet" type="text/css" />
|
|
<!-- App Css-->
|
|
<?php
|
|
// Deteção dinâmica do bundle CSS public.*.css
|
|
function getLatestPublicCssBundle(): string {
|
|
$cssPath = 'public/assets/css/';
|
|
$pattern = $cssPath . 'public.*.css';
|
|
$files = glob($pattern);
|
|
if (empty($files)) {
|
|
// Fallback para bundle padrão
|
|
$defaultBundle = $cssPath . 'public.bundle.css';
|
|
if (file_exists($defaultBundle)) {
|
|
return '/assets/css/public.bundle.css';
|
|
}
|
|
return '/assets/css/app.min.css';
|
|
}
|
|
usort($files, function($a, $b) {
|
|
return filemtime($b) - filemtime($a);
|
|
});
|
|
$latestFile = $files[0];
|
|
return str_replace('public', '', $latestFile);
|
|
}
|
|
?>
|
|
<link href="<?php echo View::asset(getLatestPublicCssBundle()); ?>" rel="stylesheet" type="text/css" />
|
|
|
|
<style>
|
|
:root {
|
|
--brand-theme-color: <?php echo htmlspecialchars($branding['theme_color']) ?>;
|
|
}
|
|
body { background-color: #f8f9fa; }
|
|
.main-content { margin-left: 0; }
|
|
.page-content { padding: 24px; }
|
|
.breadcrumb { background-color: transparent; }
|
|
|
|
/* Header escuro como no public-blank.php */
|
|
.public-header {
|
|
box-shadow: 0 4px 16px rgba(0,0,0,0.08);
|
|
border-bottom: 1px solid rgba(0,0,0,0.06);
|
|
z-index: 100;
|
|
}
|
|
.main-content {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
.page-content, .container-fluid {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
.container-fluid {
|
|
height: auto !important;
|
|
min-height: 0 !important;
|
|
}
|
|
.page-content {
|
|
padding-top: 1rem !important;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body data-bs-theme="light">
|
|
<div id="layout-wrapper">
|
|
|
|
<!-- Header público escuro -->
|
|
<header class="public-header"
|
|
style="background: <?php echo htmlspecialchars($branding['header_bg'] ?? 'var(--vz-vertical-menu-bg, #405189)') ?>;
|
|
box-shadow: 0 4px 16px rgba(0,0,0,0.08); border-bottom: 1px solid rgba(0,0,0,0.06);">
|
|
<div class="container-fluid py-4">
|
|
<div class="d-flex flex-column flex-md-row align-items-start align-items-md-center gap-2 gap-md-4">
|
|
<img src="<?php echo htmlspecialchars($branding['logo_url']) ?>" alt="<?php echo htmlspecialchars($branding['company_name']) ?> Logo" height="40" class="me-0 me-md-3 mb-2 mb-md-0">
|
|
<div>
|
|
<span class="fs-2 fw-bold d-block"
|
|
style="color: <?php echo htmlspecialchars($branding['header_text_color'] ?? '#fff') ?>;">
|
|
<?php echo htmlspecialchars($branding['company_name']) ?>
|
|
</span>
|
|
<?php if (!empty($branding['slogan'])): ?>
|
|
<span class="fs-6 fw-normal d-block mt-1" style="color: #e0e0e0;">
|
|
<?php echo htmlspecialchars($branding['slogan']) ?>
|
|
</span>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="main-content">
|
|
<div class="page-content">
|
|
<div class="container-fluid">
|
|
<?php if (isset($page_content) && is_callable($page_content)) {
|
|
$page_content();
|
|
} ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- JAVASCRIPT -->
|
|
<script src="<?= AssetPath::getLatestJsBundle('public') ?>"></script>
|
|
|
|
</body>
|
|
</html>
|