<?php declare(strict_types=1); if(!defined('DASHBOARD_ROOT')){http_response_code(403);exit('Direct access denied.');} require_once '/var/www/shared/config_loader.php'; require_once dirname(__DIR__, 2) . '/shared/credentials.php'; $_cfg = CredentialStore::get('config') ?: []; if(is_array($_cfg)){ defined('APP_NAME')||define('APP_NAME',$_cfg['app_name']??'Dashboard'); defined('APP_VERSION')||define('APP_VERSION',$_cfg['app_version']??'2.0.0'); } unset($_cfg); $services_secret_path=PRIVATE_DIR.'/services.secret.php'; if(file_exists($services_secret_path)){require_once $services_secret_path;} unset($services_secret_path); defined('APP_NAME')||define('APP_NAME','Dashboard'); defined('APP_VERSION')||define('APP_VERSION','2.0.0'); defined('DEBUG_MODE')||define('DEBUG_MODE',false); if(DEBUG_MODE){error_reporting(E_ALL);ini_set('display_errors','1');}else{error_reporting(E_ALL&~E_DEPRECATED&~E_NOTICE);ini_set('display_errors','0');ini_set('log_errors','1');} ini_set('session.cookie_httponly','1'); ini_set('session.cookie_secure','1'); ini_set('session.cookie_samesite','Lax'); ini_set('session.use_strict_mode','1'); ini_set('session.gc_maxlifetime','3600'); ini_set('session.cookie_lifetime','0'); define('MAX_UPLOAD_SIZE',10*1024*1024); define('UPLOAD_QUARANTINE_DIR',DASHBOARD_ROOT.'/../public/uploads/quarantine'); define('UPLOAD_PRODUCTS_DIR',DASHBOARD_ROOT.'/../public/uploads/products'); define('UPLOAD_BLOCKS_DIR',DASHBOARD_ROOT.'/../public/uploads/blocks'); define('UPLOAD_CREATIVE_DIR',DASHBOARD_ROOT.'/../public/uploads/creative'); define('PUBLIC_UPLOAD_URL','/uploads/products'); define('RATE_LIMIT_WINDOW',60); define('RATE_LIMIT_MAX_REQUESTS',30); require_once __DIR__.'/icons.php'; 