⚝
One Hat Cyber Team
⚝
Your IP:
192.168.31.6
Server IP:
192.168.1.11
Server:
Linux pams 6.1.0-29-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.123-1 (2025-01-02) x86_64
PHP Version:
8.2.28
Buat File
|
Buat Folder
Upload File
Eksekusi
Dir :
~
/
var
/
www
/
lppm
/
Modules
/
Backend
/
Berita
/
Views
/
Edit File: index.php
<!-- Content Header (Page header) --> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1 class="m-0"><?=$title?></h1> </div><!-- /.col --> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="#">Dashboard</a></li> <li class="breadcrumb-item active"><?=$li_1?></li> </ol> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.container-fluid --> </div> <!-- /.content-header --> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header"> <div class="card-tools"> <a class="btn btn-primary rounded-pill px-4 shadow-sm" href="<?=base_url('admin/berita/add')?>"> <i class="bi bi-plus-lg me-2"></i>Tambah Berita </a> </div> </div> <div class="card-body"> <table id="tableBerita" class="table table-hover align-middle nowrap" style="width:100%"> <thead class="bg-light"> <tr> <th class="border-0 text-uppercase small fw-bold text-muted" style="width: 5%;">No</th> <th class="border-0 text-uppercase small fw-bold text-muted">Judul & Headline</th> <th class="border-0 text-uppercase small fw-bold text-muted">Penulis</th> <th class="border-0 text-uppercase small fw-bold text-muted text-center">Dilihat</th> <th class="border-0 text-uppercase small fw-bold text-muted text-center">Status</th> <th class="border-0 text-uppercase small fw-bold text-muted text-center">Tanggal Publish</th> <th class="border-0 text-uppercase small fw-bold text-muted text-center" style="width: 15%;">Aksi</th> </tr> </thead> <tbody> <?php $no = 1; foreach ($berita as $item) : ?> <tr> <td class="text-muted"><?= $no++; ?></td> <td> <div class="fw-bold text-dark mb-1"><?= $item->title; ?></div> <?php if (isset($item->headline) && $item->headline == 1) : ?> <span class="badge rounded-pill bg-info text-white" style="font-size: 10px;"> <i class="bi bi-star-fill me-1"></i> HEADLINE </span> <?php endif; ?> </td> <td> <div class="small fw-bold text-dark"><?= $item->author_name ?: 'Admin'; ?></div> <div class="text-muted" style="font-size: 11px;">ID: <?= $item->author_id ?: '1'; ?></div> </td> <td class="text-center"> <span class="badge bg-light text-dark border px-2 shadow-sm fw-normal"> <i class="bi bi-eye-fill text-muted me-1"></i> <?= number_format($item->reader ?? 0, 0, ',', '.'); ?> </span> </td> <td class="text-center"> <?php if ($item->status == 'published') : ?> <span class="badge bg-success-subtle text-success border border-success-subtle px-3 rounded-pill">Published</span> <?php else : ?> <span class="badge bg-warning-subtle text-warning border border-warning-subtle px-3 rounded-pill">Draft</span> <?php endif; ?> </td> <td class="text-center small text-muted"> <div class="fw-bold text-dark"><?= date('d M Y', strtotime($item->published_at)); ?></div> <div style="font-size: 10px;"><?= date('H:i', strtotime($item->published_at)); ?> WIB</div> </td> <td class="text-center"> <div class="btn-group shadow-sm rounded-pill overflow-hidden"> <a href="<?= base_url('read/' . $item->slug) ?>" target="_blank" class="btn btn-white btn-sm px-3" title="Lihat Preview"> <i class="bi bi-eye text-success"></i> </a> <a href="<?= base_url('admin/berita/edit/' . $item->id) ?>" class="btn btn-white btn-sm px-3" title="Edit"> <i class="bi bi-pencil-square text-primary"></i> </a> <a href="<?= base_url('admin/berita/delete/' . $item->id) ?>" class="btn btn-white btn-sm px-3 btn-delete" title="Hapus"> <i class="bi bi-trash3 text-danger"></i> </a> </div> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <!-- /.card-body --> </div> </div> </div> </div><!-- /.container-fluid --> </section> <!-- /.content --> <script> $(document).ready(function() { $('#tableBerita').DataTable({ "responsive": true, // Aktifkan mode responsif "scrollX": true, // Izinkan scroll horizontal "language": { "url": "//cdn.datatables.net/plug-ins/1.13.6/i18n/id.json" }, "columnDefs": [ { "orderable": false, "targets": [0, 6] } ], "order": [[5, "desc"]] }); }); </script>
Simpan