diff --git a/admin/system.php b/admin/system.php index 6002410..70de9b0 100644 --- a/admin/system.php +++ b/admin/system.php @@ -8,7 +8,9 @@ if (!isAdmin()) { exit; } -$pageTitle = 'Sistema - Admin'; +require_once __DIR__ . '/../includes/i18n.php'; + +$pageTitle = t('Sistema') . ' - Admin'; $dbHost = $_ENV['DB_HOST'] ?? getenv('DB_HOST') ?? 'localhost'; $dbPort = $_ENV['DB_PORT'] ?? getenv('DB_PORT') ?? '3306'; @@ -27,14 +29,14 @@ require_once __DIR__ . '/../templates/header.php'; ?>
-

Sistema

+

-
Base de Datos
+
@@ -42,27 +44,27 @@ require_once __DIR__ . '/../templates/header.php'; - + - + - + - + - + - +
Host / IP / IP
Puerto
Base de Datos
Versión MySQL
Tamaño MB
Tablas
@@ -74,28 +76,28 @@ require_once __DIR__ . '/../templates/header.php';
-
Servidor
+
- + - + - + - + - +
PHP Version
Server Software
Server Name
Document Root
Timezone
diff --git a/create_message.php b/create_message.php index ede545d..94c2a8a 100755 --- a/create_message.php +++ b/create_message.php @@ -6,6 +6,7 @@ require_once __DIR__ . '/includes/message_handler.php'; require_once __DIR__ . '/includes/schedule_helpers.php'; require_once __DIR__ . '/common/helpers/sender_factory.php'; require_once __DIR__ . '/common/helpers/converter_factory.php'; +require_once __DIR__ . '/includes/i18n.php'; function getTranslationButtons(PDO $pdo, string $text): array { @@ -69,7 +70,7 @@ function buildDiscordTranslationButtons(array $languages, string $text): array ]; } -$pageTitle = 'Crear Mensaje - Sistema de Mensajería'; +$pageTitle = t('Crear Mensaje'); $recipients = []; $templates = []; @@ -202,10 +203,10 @@ require_once __DIR__ . '/templates/header.php'; ?>
-

Crear Mensaje

+

@@ -220,14 +221,14 @@ require_once __DIR__ . '/templates/header.php';
-
-
Contenido del Mensaje
+
+
- +
@@ -246,62 +247,62 @@ require_once __DIR__ . '/templates/header.php';
-
-
Destinatario
+
+
- +
- +
-
-
Programación
+
+
- +
@@ -310,9 +311,9 @@ require_once __DIR__ . '/templates/header.php';
- Cancelar +
@@ -323,7 +324,7 @@ require_once __DIR__ . '/templates/header.php'; @@ -46,7 +46,7 @@ $sentToday = count(array_filter($sentMessages, fn($m) => date('Y-m-d', strtotime
- Enviados Hoy +
@@ -64,7 +64,7 @@ $sentToday = count(array_filter($sentMessages, fn($m) => date('Y-m-d', strtotime
$m['platform'] === 'discord')) ?>
- Discord +
@@ -82,7 +82,7 @@ $sentToday = count(array_filter($sentMessages, fn($m) => date('Y-m-d', strtotime
$m['platform'] === 'telegram')) ?>
- Telegram +
@@ -94,20 +94,20 @@ $sentToday = count(array_filter($sentMessages, fn($m) => date('Y-m-d', strtotime
-
Próximos Mensajes
+
-

// NO HAY MENSAJES PROGRAMADOS

+

//

- - - - + + + + @@ -131,7 +131,7 @@ $sentToday = count(array_filter($sentMessages, fn($m) => date('Y-m-d', strtotime 'disabled' => 'secondary', default => 'light' } ?>"> - + @@ -147,18 +147,18 @@ $sentToday = count(array_filter($sentMessages, fn($m) => date('Y-m-d', strtotime
-
Acciones Rápidas
+
diff --git a/login.php b/login.php index c3636be..69942c4 100755 --- a/login.php +++ b/login.php @@ -2,6 +2,9 @@ require_once __DIR__ . '/includes/db.php'; require_once __DIR__ . '/includes/env_loader.php'; require_once __DIR__ . '/includes/auth.php'; +require_once __DIR__ . '/includes/i18n.php'; + +handleLanguageChange(); $domain = $_ENV['APP_URL'] ?? getenv('APP_URL') ?? ''; if ($domain) { @@ -28,6 +31,8 @@ if (isset($_SESSION['user_id'])) { $error = ''; $theme = $_COOKIE['theme'] ?? 'light'; +$currentLang = getCurrentLanguage(); +$activeLanguages = getActiveLanguages(); if ($_SERVER['REQUEST_METHOD'] === 'POST') { $username = $_POST['username'] ?? ''; @@ -39,7 +44,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { header('Location: index.php'); exit; } else { - $error = 'Usuario o contraseña incorrectos'; + $error = t('Usuario o contraseña incorrectos'); } } ?> @@ -270,6 +275,45 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { .corner-tr { top: -2px; right: -2px; border-left: none; border-bottom: none; } .corner-bl { bottom: -2px; left: -2px; border-right: none; border-top: none; } .corner-br { bottom: -2px; right: -2px; border-left: none; border-top: none; } + + .lang-selector-login { + position: absolute; + top: 10px; + right: 10px; + z-index: 10; + } + + .lang-selector-login .btn { + background: transparent; + border: 1px solid var(--military-green); + color: var(--military-sand); + border-radius: 0; + padding: 4px 10px; + font-size: 0.9rem; + } + + .lang-selector-login .btn:hover { + background: rgba(61, 74, 50, 0.5); + border-color: var(--accent-orange); + } + + .lang-selector-login .dropdown-menu { + background: var(--military-dark); + border: 1px solid var(--military-green); + border-radius: 0; + min-width: 120px; + } + + .lang-selector-login .dropdown-item { + color: var(--military-sand); + padding: 8px 12px; + } + + .lang-selector-login .dropdown-item:hover, + .lang-selector-login .dropdown-item.active { + background: rgba(90, 107, 74, 0.4); + color: #fff; + } @@ -282,9 +326,29 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
+ + diff --git a/scheduled_messages.php b/scheduled_messages.php index 90dfe1c..6f0f9db 100755 --- a/scheduled_messages.php +++ b/scheduled_messages.php @@ -5,7 +5,7 @@ checkSession(); require_once __DIR__ . '/includes/message_handler.php'; require_once __DIR__ . '/includes/schedule_actions.php'; -$pageTitle = 'Mensajes Programados'; +$pageTitle = t('Mensajes Programados'); if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) { $scheduleId = (int) $_POST['schedule_id']; @@ -24,32 +24,32 @@ require_once __DIR__ . '/templates/header.php'; ?>
-

Mensajes Programados

+

- Nuevo Mensaje +
-
Mensaje creado exitosamente
+
-

No hay mensajes programados

+

DestinatarioPlataformaFechaEstado
- - - - - - - + + + + + + + @@ -67,9 +67,9 @@ require_once __DIR__ . '/templates/header.php';
IDDestinatarioPlataformaFecha de EnvíoTipoEstadoAcciones
- Recurrente + - Único + @@ -82,7 +82,7 @@ require_once __DIR__ . '/templates/header.php'; 'cancelled' => 'dark', default => 'light' } ?>"> - + @@ -91,7 +91,7 @@ require_once __DIR__ . '/templates/header.php';
-
@@ -99,7 +99,7 @@ require_once __DIR__ . '/templates/header.php';
-
@@ -107,26 +107,26 @@ require_once __DIR__ . '/templates/header.php';
-
-
+ -
-
+ -
diff --git a/templates/header.php b/templates/header.php index 0038c6b..baff972 100755 --- a/templates/header.php +++ b/templates/header.php @@ -2,9 +2,14 @@ session_start(); require_once __DIR__ . '/../includes/session_check.php'; require_once __DIR__ . '/../includes/url_helper.php'; +require_once __DIR__ . '/../includes/i18n.php'; + +handleLanguageChange(); $currentPage = basename($_SERVER['PHP_SELF']); $theme = $_COOKIE['theme'] ?? 'light'; +$currentLang = getCurrentLanguage(); +$activeLanguages = getActiveLanguages(); ?> @@ -607,32 +612,32 @@ $theme = $_COOKIE['theme'] ?? 'light';