:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/www/kreative_crm/quatation/**
:: Editing File: vcards_list.php
<?php // =============================== // PAGE TITLE // =============================== $page_title = "VCards"; 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>VCards List</h2> </div> </div> <!-- =============================== ADD BUTTON =============================== --> <div class="col-sm-2"> <div class="card-header pb-0 card-no-border text-end"> <a href="vcards_add.php" class="btn btn-primary btn-sm"> <i class="fa fa-plus"></i> Add VCard </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>Full Name</th> <th>Designation</th> <th>Phone</th> <th>Email</th> <th>Slug</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php $sr = 1; $sql = " SELECT * FROM vcards ORDER BY created_at DESC "; $result = mysqli_query($conn, $sql); if ($result && mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { /* 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['designation'] ?? 'N/A') . "</td>"; echo "<td>" . htmlspecialchars($row['phone'] ?? 'N/A') . "</td>"; echo "<td>" . htmlspecialchars($row['email'] ?? 'N/A') . "</td>"; echo "<td>" . htmlspecialchars($row['card_slug']) . "</td>"; echo "<td>{$status}</td>"; echo "<td class='text-center'> <a href='{$row['url']}' target='_blank' class='btn btn-primary btn-sm me-1' title='Edit'> <i class='fa fa-eye'></i> </a> <a href='vcards_edit.php?id={$row['id']}' class='btn btn-info btn-sm me-1' title='Edit'> <i class='fa fa-pencil'></i> </a> <a href='vcards_delete.php?id={$row['id']}' class='btn btn-danger btn-sm' title='Delete' onclick=\"return confirm('Delete this VCard?');\"> <i class='fa fa-trash'></i> </a> </td>"; echo "</tr>"; $sr++; } } else { echo "<tr> <td colspan='9' class='text-center text-muted'> No VCards found </td> </tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?>