- recurrentes.php, sent_messages.php, gallery.php - admin/users.php, recipients.php, languages.php, comandos.php - admin/test_discord_connection.php, ia_agent.php - profile.php, set_webhook.php, chat_telegram.php - translate_message.php, admin_send_message.php - telegram/admin/telegram_bot_interactions.php - telegram/admin/telegram_welcome.php
60 lines
2.3 KiB
PHP
Executable File
60 lines
2.3 KiB
PHP
Executable File
<?php
|
|
require_once __DIR__ . '/includes/db.php';
|
|
require_once __DIR__ . '/includes/session_check.php';
|
|
require_once __DIR__ . '/includes/i18n.php';
|
|
checkSession();
|
|
require_once __DIR__ . '/includes/message_handler.php';
|
|
|
|
$pageTitle = t('Mensajes Enviados');
|
|
|
|
$userId = getCurrentUserId();
|
|
$messages = getSentMessages(isAdmin() ? null : $userId, 100);
|
|
|
|
require_once __DIR__ . '/templates/header.php';
|
|
?>
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h2><i class="bi bi-check2-all"></i> <?= t('Mensajes Enviados') ?></h2>
|
|
</div>
|
|
|
|
<div class="card border-0 shadow-sm">
|
|
<div class="card-body">
|
|
<?php if (empty($messages)): ?>
|
|
<p class="text-muted text-center py-4"><?= t('No hay mensajes enviados') ?></p>
|
|
<?php else: ?>
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th><?= t('ID') ?></th>
|
|
<th><?= t('Destinatario') ?></th>
|
|
<th><?= t('Plataforma') ?></th>
|
|
<th><?= t('Fecha de Envío') ?></th>
|
|
<th><?= t('Mensajes Enviados') ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($messages as $msg): ?>
|
|
<tr>
|
|
<td>#<?= $msg['id'] ?></td>
|
|
<td><?= htmlspecialchars($msg['recipient_name']) ?></td>
|
|
<td>
|
|
<?php if ($msg['platform'] === 'discord'): ?>
|
|
<i class="bi bi-discord platform-discord"></i> Discord
|
|
<?php else: ?>
|
|
<i class="bi bi-telegram platform-telegram"></i> Telegram
|
|
<?php endif; ?>
|
|
</td>
|
|
<td><?= date('d/m/Y H:i:s', strtotime($msg['sent_at'])) ?></td>
|
|
<td><?= $msg['message_count'] ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php require_once __DIR__ . '/templates/footer.php'; ?>
|