110 lines
5.0 KiB
PHP
110 lines
5.0 KiB
PHP
<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<tbody>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('to'); ?>:</td>
|
|
<td><?php echo $message->to ?? '-'; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('message'); ?>:</td>
|
|
<td><?php echo htmlspecialchars($message->message ?? ''); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('status'); ?>:</td>
|
|
<td>
|
|
<?php
|
|
$status = $message->status ?? 'unknown';
|
|
$status_badge = 'info';
|
|
if ($status == 'sent') {
|
|
$status_badge = 'success';
|
|
} elseif ($status == 'failed') {
|
|
$status_badge = 'danger';
|
|
}
|
|
?>
|
|
<span class="badge badge-<?php echo $status_badge; ?>">
|
|
<?php echo _l($status); ?>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('message_id'); ?>:</td>
|
|
<td><?php echo $message->message_id ?? '-'; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('response_code'); ?>:</td>
|
|
<td><?php echo $message->response_code ?? '-'; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('rate'); ?>:</td>
|
|
<td><?php echo isset($message->rate) ? app_format_money($message->rate, get_base_currency()) : '-'; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('network'); ?>:</td>
|
|
<td><?php echo $message->network_id ?? '-'; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('sent_by'); ?>:</td>
|
|
<td><?php echo isset($message->sent_by) ? get_staff_full_name($message->sent_by) : '-'; ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('date_sent'); ?>:</td>
|
|
<td><?php echo isset($message->date_sent) ? _dt($message->date_sent) : '-'; ?></td>
|
|
</tr>
|
|
<?php if (isset($message->response_message) && !empty($message->response_message)) { ?>
|
|
<tr>
|
|
<td class="bold"><?php echo _l('response_message'); ?>:</td>
|
|
<td><?php echo $message->response_message; ?></td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (!empty($logs)) { ?>
|
|
<div class="row mtop15">
|
|
<div class="col-md-12">
|
|
<h4 class="bold"><?php echo _l('message_logs'); ?></h4>
|
|
<hr />
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><?php echo _l('status'); ?></th>
|
|
<th><?php echo _l('response_code'); ?></th>
|
|
<th><?php echo _l('response_message'); ?></th>
|
|
<th><?php echo _l('date'); ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($logs as $log) { ?>
|
|
<tr>
|
|
<td>
|
|
<?php
|
|
$status_badge = 'info';
|
|
if ($log['status'] == 'success') {
|
|
$status_badge = 'success';
|
|
} elseif ($log['status'] == 'failed') {
|
|
$status_badge = 'danger';
|
|
}
|
|
?>
|
|
<span class="badge badge-<?php echo $status_badge; ?>">
|
|
<?php echo _l($log['status']); ?>
|
|
</span>
|
|
</td>
|
|
<td><?php echo $log['response_code'] ?? '-'; ?></td>
|
|
<td><?php echo $log['response_message'] ?? '-'; ?></td>
|
|
<td><?php echo isset($log['created_at']) ? _dt($log['created_at']) : '-'; ?></td>
|
|
</tr>
|
|
<?php } ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|