BLACKSITE
:
216.73.216.62
:
147.93.18.13 / vinyasaweddings.com
:
Linux srv667811 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
:
/
var
/
www
/
vkraft
/
views
/
admin
/
Upload File:
files >> /var/www/vkraft/views/admin/state-manage.php
<?php include 'views/admin/layout/header.php'; ?> <?php include 'views/admin/layout/Sidebar.php'; ?> <?php require_once 'config/config.php'; $stmt = $db->query("SELECT * FROM states ORDER BY id DESC"); $states = $stmt->fetchAll(PDO::FETCH_ASSOC); ?> <main class="main-content"> <div class="container-fluid px-4"> <div class="d-flex justify-content-between align-items-center mb-4"> <div> <h1 class="fw-bold mb-0">States Management</h1> <p class="text-muted mb-0">Manage all available states</p> </div> <a href="state-add" class="btn btn-primary"> <i class="fas fa-plus me-2"></i>Add New State </a> </div> <div class="card shadow-sm border-0"> <div class="card-body p-0"> <div class="table-responsive rounded-3"> <table class="table table-hover mb-0"> <thead class="bg-light"> <tr> <th class="py-3 px-4 text-nowrap">#</th> <th class="py-3 px-4">State Name</th> <th class="py-3 px-4 text-center">Status</th> <th class="py-3 px-4 text-center">Created At</th> <th class="py-3 px-4 text-center">Actions</th> </tr> </thead> <tbody> <?php if (count($states) > 0): ?> <?php foreach ($states as $index => $row): ?> <tr class="align-middle"> <td class="px-4 fw-semibold text-muted"><?= $index + 1 ?></td> <td class="px-4"> <h6 class="mb-0 fw-semibold"><?= htmlspecialchars($row['title']) ?></h6> </td> <td class="px-4 text-center"> <?php if (strtolower($row['status']) === 'active'): ?> <span class="badge rounded-pill py-2 px-3 bg-success-subtle text-success"> <i class="fas fa-circle me-1" style="font-size: 8px;"></i> Active </span> <?php elseif (strtolower($row['status']) === 'inactive'): ?> <span class="badge rounded-pill py-2 px-3 bg-secondary-subtle text-secondary"> <i class="fas fa-circle me-1" style="font-size: 8px;"></i> Inactive </span> <?php else: ?> <span class="badge rounded-pill py-2 px-3 bg-dark-subtle text-dark"> <i class="fas fa-circle me-1" style="font-size: 8px;"></i> <?= htmlspecialchars($row['status']) ?> </span> <?php endif; ?> </td> <td class="px-4 text-center text-muted"> <?= date("d M Y, h:i A", strtotime($row['created_at'])) ?> </td> <td class="px-4 text-center"> <div class="d-flex justify-content-center gap-2"> <a href="state-add?edit=<?= $row['id'] ?>" class="btn btn-sm btn-outline-primary rounded-circle p-1" title="Edit"> <i class="fas fa-pencil-alt" style="width: 16px; height: 16px;"></i> </a> </div> </td> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td colspan="5" class="text-center py-4 text-muted"> <i class="fas fa-info-circle me-2"></i>No states found </td> </tr> <?php endif; ?> </tbody> </table> </div> </div> </div> </div> </main> <script> function confirmDelete(id) { if (confirm('Are you sure you want to delete this state?')) { window.location.href = 'delete_state.php?id=' + id; } } </script> <?php include 'views/admin/layout/footer.php'; ?>