73 lines
1.9 KiB
PHP
73 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* Configuración general del sistema de mantenimiento
|
|
*/
|
|
|
|
if (!defined('DB_HOST')) {
|
|
define('DB_HOST', 'localhost');
|
|
}
|
|
if (!defined('DB_NAME')) {
|
|
define('DB_NAME', 'mantenimiento_campamento');
|
|
}
|
|
if (!defined('DB_USER')) {
|
|
define('DB_USER', 'root');
|
|
}
|
|
if (!defined('DB_PASS')) {
|
|
define('DB_PASS', 'R3m4st3r');
|
|
}
|
|
if (!defined('DB_CHARSET')) {
|
|
define('DB_CHARSET', 'utf8mb4');
|
|
}
|
|
|
|
/** Ruta en el servidor (sin barra final). Ej: /camp/mtto_record */
|
|
if (!defined('APP_BASE_PATH')) {
|
|
define('APP_BASE_PATH', '/camp/mtto_record');
|
|
}
|
|
|
|
if (file_exists(__DIR__ . '/config.production.php')) {
|
|
require_once __DIR__ . '/config.production.php';
|
|
}
|
|
|
|
if (file_exists(__DIR__ . '/config.local.php')) {
|
|
require_once __DIR__ . '/config.local.php';
|
|
}
|
|
|
|
if (!defined('APP_ENV')) {
|
|
define('APP_ENV', file_exists(__DIR__ . '/config.local.php') ? 'local' : 'production');
|
|
}
|
|
|
|
/**
|
|
* URL pública de la aplicación (sin barra final).
|
|
* Producción: https://penasquitoapps.newmont.com/camp/mtto_record
|
|
* Desarrollo: copie config.local.example.php → config.local.php
|
|
*/
|
|
if (!defined('BASE_URL')) {
|
|
define('BASE_URL', 'https://penasquitoapps.newmont.com/camp/mtto_record');
|
|
}
|
|
|
|
if (!defined('APP_NAME')) {
|
|
define('APP_NAME', 'Mantenimiento Campamento');
|
|
}
|
|
if (!defined('APP_VERSION')) {
|
|
define('APP_VERSION', '1.0.0');
|
|
}
|
|
|
|
date_default_timezone_set('America/Hermosillo');
|
|
|
|
if (APP_ENV === 'production') {
|
|
ini_set('display_errors', '0');
|
|
ini_set('display_startup_errors', '0');
|
|
error_reporting(E_ALL);
|
|
ini_set('log_errors', '1');
|
|
|
|
if (session_status() === PHP_SESSION_NONE) {
|
|
ini_set('session.cookie_httponly', '1');
|
|
ini_set('session.cookie_secure', '1');
|
|
ini_set('session.use_strict_mode', '1');
|
|
ini_set('session.cookie_samesite', 'Lax');
|
|
}
|
|
} else {
|
|
ini_set('display_errors', '1');
|
|
ini_set('display_startup_errors', '1');
|
|
error_reporting(E_ALL);
|
|
}
|