<?php
/**
 * Konfigurasi Aplikasi SIAKAD
 * ============================================================
 *
 * LOCALHOST (XAMPP):
 *   BASE_URL  = '/siakad'
 *   IS_PRODUCTION = false
 *
 * HOSTING ROOT DOMAIN (https://siakad.sch.id):
 *   BASE_URL  = ''
 *   IS_PRODUCTION = true
 *
 * HOSTING SUBFOLDER (https://sekolah.sch.id/siakad):
 *   BASE_URL  = '/siakad'
 *   IS_PRODUCTION = true
 * ============================================================
 */

define('APP_NAME',      'SIAKAD');
define('APP_FULL_NAME', 'Sistem Informasi Akademik Sekolah');
define('APP_VERSION',   '1.0.0');

// ⚙️ UBAH SESUAI ENVIRONMENT
// Localhost  : BASE_URL = '/siakad' , IS_PRODUCTION = false
// Hosting    : BASE_URL = ''        , IS_PRODUCTION = true
define('BASE_URL',       '/siakad');      // subfolder hosting
define('IS_PRODUCTION',  true);    // true saat di hosting

define('UPLOAD_PATH', __DIR__ . '/../uploads/');
define('UPLOAD_URL',  BASE_URL . '/uploads/');

// Timezone Indonesia
date_default_timezone_set('Asia/Jakarta');

// Error reporting
if (IS_PRODUCTION) {
    error_reporting(0);
    ini_set('display_errors', 0);
    ini_set('log_errors', 1);
} else {
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
}

// Autoload
require_once __DIR__ . '/database.php';
require_once __DIR__ . '/../helpers/functions.php';
