:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/public_html/kreativecrm/**
:: Editing File: vcard_service_list.php
<?php // =============================== // PAGE TITLE // =============================== $page_title = "VCard Services"; include 'header.php'; include 'breadcrumb.php'; include 'menu.php'; ?> <div class="page-body"> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="row"> <!-- =============================== PAGE HEADING =============================== --> <div class="col-sm-10"> <div class="card-header pb-0 card-no-border"> <h2>VCard About</h2> </div> </div> <!-- =============================== ADD BUTTON =============================== --> <div class="col-sm-2"> <div class="card-header pb-0 card-no-border text-end"> <a href="vcard_service_add.php" class="btn btn-primary btn-sm"> <i class="fa fa-plus"></i> Add About </a> </div> </div> <!-- =============================== TABLE =============================== --> <div class="card-body"> <div class="dt-ext table-responsive"> <table class="display" id="export-button"> <thead> <tr> <th>#</th> <th>VCard</th> <th>Title</th> <th>Icon</th> <th>Description</th> <th>Sort</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php $sr = 1; $sql = " SELECT s.*, v.full_name, v.card_slug FROM vcard_services s LEFT JOIN vcards v ON v.id = s.vcard_id ORDER BY s.sort_order ASC, s.created_at DESC "; $result = mysqli_query($conn, $sql); if ($result && mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { /* ICON PREVIEW */ $icon = "<span class='text-muted'>N/A</span>"; if (!empty($row['icon']) && !empty($row['card_slug'])) { $icon_url = "uploads/vcard/{$row['card_slug']}/services/{$row['icon']}"; $icon = "<img src='{$icon_url}' style='height:40px;border-radius:6px;'>"; } /* STATUS */ $status = ($row['status'] == 1) ? "<span class='badge bg-success'>Active</span>" : "<span class='badge bg-danger'>Inactive</span>"; echo "<tr>"; echo "<td>{$sr}</td>"; echo "<td>" . htmlspecialchars($row['full_name'] ?? 'N/A') . "</td>"; echo "<td>" . htmlspecialchars($row['title']) . "</td>"; echo "<td>{$icon}</td>"; echo "<td>{$row['description']}</td>"; echo "<td>{$row['sort_order']}</td>"; echo "<td>{$status}</td>"; echo "<td class='text-center'> <a href='vcard_service_edit.php?id={$row['id']}' class='btn btn-info btn-sm me-1'> <i class='fa fa-pencil'></i> </a> <a href='vcard_service_delete.php?id={$row['id']}' class='btn btn-danger btn-sm' onclick=\"return confirm('Delete this service?');\"> <i class='fa fa-trash'></i> </a> </td>"; echo "</tr>"; $sr++; } } else { echo "<tr> <td colspan='8' class='text-center text-muted'> No services found </td> </tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?>