<?php
/**
 * Main Configuration
 */

// Error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Timezone
date_default_timezone_set('Asia/Dhaka');

// App settings
define('APP_NAME', 'Homoeopathy System');
define('APP_VERSION', '1.0.0');
define('APP_URL', 'https://' . ($_SERVER['HTTP_HOST'] ?? 'localhost'));
define('APP_PATH', dirname(__DIR__));

// Database credentials (CHANGE THESE)
define('DB_HOST', 'localhost');
define('DB_NAME', 'drmdferdous_kent');
define('DB_USER', 'drmdferdous_kent');
define('DB_PASS', 'drmdferdous_kent');
define('DB_CHARSET', 'utf8mb4');

// Session settings (only if session not active)
if (session_status() === PHP_SESSION_NONE) {
    ini_set('session.cookie_httponly', 1);
    ini_set('session.use_only_cookies', 1);
    ini_set('session.gc_maxlifetime', 7200);
}

// Load required files (order matters!)
require_once __DIR__ . '/constants.php';
require_once __DIR__ . '/database.php';
require_once __DIR__ . '/auth.php';
require_once __DIR__ . '/../includes/functions.php';
?>