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
/
kds
/
views
/
admin
/
Upload File:
files >> /var/www/kds/views/admin/city-manage.php
<?php include 'views/admin/layout/header.php'; ?> <?php include 'views/admin/layout/Sidebar.php'; ?> <?php // Fetch all cities (original query unchanged) $stmt = $db->query("SELECT * FROM cities ORDER BY id DESC"); $cities = $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">Manage Cities</h1> <p class="text-muted mb-0">View and manage all registered cities</p> </div> <a href="city-add" class="btn btn-primary"> <i class="fas fa-plus me-2"></i>Add City </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">City Name</th> <th class="py-3 px-4">State</th> <th class="py-3 px-4 text-center">Status</th> <th class="py-3 px-4 text-center">Actions</th> </tr> </thead> <tbody> <?php if (count($cities) > 0): ?> <?php foreach ($cities as $index => $city): ?> <tr class="align-middle"> <td class="px-4 fw-semibold text-muted"><?= $index + 1 ?></td> <td class="px-4 fw-semibold"><?= htmlspecialchars($city['title']) ?></td> <td class="px-4"> <?php if (!empty($city['state_name'])): ?> <span class="badge bg-info bg-opacity-10 text-info py-2 px-3 rounded-pill"> <?= htmlspecialchars($city['state_name']) ?> </span> <?php else: ?> <span class="badge bg-light text-muted">Not specified</span> <?php endif; ?> </td> <td class="px-4 text-center"> <span class="badge rounded-pill py-2 px-3 <?= $city['status'] == 'active' ? 'bg-success-subtle text-success' : 'bg-secondary-subtle text-secondary' ?>"> <i class="fas fa-circle me-1" style="font-size: 8px;"></i> <?= htmlspecialchars($city['status']) ?> </span> </td> <td class="px-4 text-center"> <div class="d-flex justify-content-center gap-2"> <a href="city-add?edit=<?= $city['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> <!-- <button class="btn btn-sm btn-outline-danger rounded-circle p-1" title="Delete" onclick="confirmDelete(<?= $city['id'] ?>)"> <i class="fas fa-trash-alt" style="width: 16px; height: 16px;"></i> </button> --> </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 cities 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 city?')) { window.location.href = 'delete_city.php?id=' + id; } } </script> <?php include 'views/admin/layout/footer.php'; ?>