<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } RBAC::enforce('view.marketing'); ?> <div class="workspace" id="ws-marketing"> <div class="workspace-header"> <h1>Marketing</h1> </div> <div id="marketing-tabs" class="sub-tabs"> <button class="sub-tab active" data-panel="account">Account</button> <button class="sub-tab" data-panel="links">Links</button> <button class="sub-tab" data-panel="cards">Cards</button> <button class="sub-tab" data-panel="creative">Creative</button> <button class="sub-tab" data-panel="editor">Editor</button> <button class="sub-tab" data-panel="campaigns">Campaigns</button> <button class="sub-tab" data-panel="ad_engine">Ad Engine</button> <button class="sub-tab" data-panel="ad_studio">Ad Studio</button> </div> <div id="panel-account" class="panel"></div> <div id="panel-links" class="panel" style="display:none"></div> <div id="panel-cards" class="panel" style="display:none"></div> <div id="panel-creative" class="panel" style="display:none"></div> <div id="panel-editor" class="panel" style="display:none"></div> <div id="panel-campaigns" class="panel" style="display:none"></div> <div id="panel-ad_engine" class="panel" style="display:none"></div> <div id="panel-ad_studio" class="panel" style="display:none"></div> </div><?php require_once __DIR__.'/../modules/marketing/proxy.php'; require_once __DIR__.'/../modules/marketing/facebook.php'; require_once __DIR__.'/../modules/marketing/links_manager.php'; require_once __DIR__.'/../modules/marketing/cards_manager.php'; require_once __DIR__.'/../modules/marketing/creative_panel.php'; require_once __DIR__.'/../modules/marketing/editor_canvas.php'; require_once __DIR__.'/../modules/marketing/campaigns_launcher.php'; require_once __DIR__.'/../modules/marketing/ad_engine.php'; require_once __DIR__.'/../modules/marketing/ad_studio.php'; ?> <script nonce="<?= $cspNonce ?>"> (function(){ var tabs = document.querySelectorAll('#marketing-tabs .sub-tab'); tabs.forEach(function(t){ t.addEventListener('click', function(){ tabs.forEach(function(x){x.classList.remove('active')}); t.classList.add('active'); var panels = document.querySelectorAll('#ws-marketing > .panel'); panels.forEach(function(p){p.style.display='none'}); var target = document.getElementById('panel-'+t.dataset.panel); if(target) target.style.display=''; }); }); })(); </script>