<?php
// ============================================================
// Global app configuration
// ============================================================
if (session_status() === PHP_SESSION_NONE && !headers_sent()) {
    session_start();
}

date_default_timezone_set('Africa/Lagos');

define('APP_NAME', 'Best Western Plus Yenagoa - Inventory Management');
define('BASE_URL', '/ivm/public/ivm/'); // change if the app lives in a subfolder, e.g. '/ivm/'

// Full URL used to build links inside notification emails, e.g. https://bestwesternplusyenagoa.com/ivm/
define('APP_URL', 'https://web.bestwesternplusyenagoa.com' . BASE_URL);

// Email notifications (uses PHP mail() via your hosting's mail server - works out of the box on cPanel)
define('MAIL_FROM_ADDRESS', 'noreply@bestwesternplusyenagoa.com');
define('MAIL_FROM_NAME', 'Hotel Inventory System');
define('MAIL_NOTIFICATIONS_ENABLED', true); // set to false to disable all outgoing email

require_once __DIR__ . '/mail_config.php';
require_once __DIR__ . '/../includes/SimpleSmtpMailer.php';

// Where uploaded signature images are stored (must be web-writable)
define('SIGNATURE_UPLOAD_DIR', __DIR__ . '/../uploads/signatures/');
define('SIGNATURE_UPLOAD_URL', BASE_URL . 'uploads/signatures/');

require_once __DIR__ . '/db.php';
require_once __DIR__ . '/../includes/functions.php';
require_once __DIR__ . '/../includes/permissions.php';
require_once __DIR__ . '/../includes/auth.php';
