Viewing file: numbers.php (2.52 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?= $this->extend(currentTheme() . '/layout'); ?>
<?= $this->section('content'); ?>
<div class="row justify-content-center">
<div class="col-8">
<div class="card">
<div class="card-body">
<table class="table-responsive datatable">
<thead>
<tr>
<th class="text-center">#</th>
<th>Numara</th>
<th>Servis</th>
<th>Onay Kodu</th>
<th class="text-right">Kalan Süre</th>
<th class="text-right">İşlem</th>
</tr>
</thead>
<tbody>
<?php foreach ($numbers as $number) : ?>
<tr>
<td class="text-center"><?= $number['id']; ?></td>
<td><?= $number['number']; ?></td>
<td><i class="<?= $number['categoryIcon']; ?>"></i> | <?= $number['categoryName']; ?> (<?= $number['serviceName']; ?>)</td>
<td><?= $number['message']; ?></td>
<td class="text-right"><?= $number['status'] == '0' ? date('i:s', ($number['created_at'] + 600) - time()) : 'Aktif Değil'; ?></td>
<td class="td-actions text-right">
<?php if ($number['status'] == '0') : ?>
<button type="button" onclick="cancelNumber(<?= $number['id']; ?>)" class="btn btn-danger btn-sm btn-icon">
<i class="tim-icons icon-simple-remove"></i>
</button>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?= $this->endSection('content'); ?>
<?= $this->section('js'); ?>
<script>
function cancelNumber(numberId) {
Swal.showLoading();
$.get('/api/cancelNumber/' + numberId, function(response) {
Swal.fire({
icon: response.type,
text: response.message
});
});
}
setInterval(() => window.location.reload(), 5000);
</script>
<?= $this->endSection('js'); ?>
|