:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/www/crm/quatation/**
:: Editing File: vcard_social_links_list.php
<?php // =============================== // PAGE TITLE // =============================== $page_title = "VCard Social Links"; 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 Social Links</h2> </div> </div> <!-- =============================== ADD BUTTON =============================== --> <div class="col-sm-2"> <div class="card-header pb-0 card-no-border text-end"> <a href="vcard_social_links_add.php" class="btn btn-primary btn-sm"> <i class="fa fa-plus"></i> Add Social Link </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>Platform</th> <th>URL</th> <th>Icon</th> <th>Sort Order</th> <th>Status</th> <th>Created At</th> <th>Action</th> </tr> </thead> <tbody> <?php $sr = 1; $sql = " SELECT sl.*, v.full_name FROM vcard_social_links sl LEFT JOIN vcards v ON v.id = sl.vcard_id ORDER BY sl.sort_order ASC, sl.created_at DESC "; $result = mysqli_query($conn, $sql); if ($result && mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { // Status badge $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['platform']) . "</td>"; echo "<td> <a href='" . htmlspecialchars($row['url']) . "' target='_blank'> " . htmlspecialchars($row['url']) . " </a> </td>"; echo "<td> <i class='" . htmlspecialchars($row['icon']) . "'></i> <small class='text-muted ms-1'>" . htmlspecialchars($row['icon']) . "</small> </td>"; echo "<td>{$row['sort_order']}</td>"; echo "<td>{$status}</td>"; echo "<td>{$row['created_at']}</td>"; echo "<td class='text-center'> <a href='vcard_social_links_edit.php?id={$row['id']}' class='btn btn-info btn-sm me-1'> <i class='fa fa-pencil'></i> </a> <a href='vcard_social_links_delete.php?id={$row['id']}' class='btn btn-danger btn-sm' onclick=\"return confirm('Are you sure you want to delete this social link?');\"> <i class='fa fa-trash'></i> </a> </td>"; echo "</tr>"; $sr++; } } else { echo "<tr> <td colspan='9' class='text-center text-muted'> No social links found </td> </tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?>