:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/www/kreative_crm/**
:: Editing File: qitem_list.php
<?php // ========================================== // Quotation Items List // File: qitem_list.php // ========================================== // ✅ Set breadcrumb variables $page_title = "Quotation Items"; include 'header.php'; include 'breadcrumb.php'; include 'menu.php'; ?> <!-- Page Sidebar Ends--> <div class="page-body"> <!-- Container-fluid starts--> <div class="container-fluid"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="row"> <div class="col-sm-10"> <div class="card-header pb-0 card-no-border"> <h2>Quotation Item Details</h2> </div> </div> <div class="col-sm-2"> <div class="card-header pb-0 card-no-border" style="float:right"> <a href="qitem_add.php" class="btn btn-primary btn-sm"> <i class="fa fa-plus"></i> Add Item </a> </div> </div> <div class="card-body"> <div class="dt-ext table-responsive"> <table class="display" id="export-button"> <thead> <tr> <th>#</th> <th>Category</th> <th>Description</th> <th>Item Name</th> <th>Status</th> <th class="text-center">Action</th> </tr> </thead> <tbody> <?php $sr_no = 1; $sql = " SELECT i.id, i.name AS item_name, i.status, d.name AS desc_name, c.name AS category_name FROM quotation_items i INNER JOIN quotation_descriptions d ON d.id = i.desc_id INNER JOIN quotation_categories c ON c.id = d.category_id ORDER BY c.name ASC, d.name ASC, i.name ASC "; $result = mysqli_query($conn, $sql); if ($result && mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { // Status Badge $statusBadge = ($row['status'] == 1) ? "<span class='badge badge-success'>Active</span>" : "<span class='badge badge-danger'>Inactive</span>"; echo "<tr>"; echo "<td class='text-center'>{$sr_no}</td>"; echo "<td>{$row['category_name']}</td>"; echo "<td>{$row['desc_name']}</td>"; echo "<td>{$row['item_name']}</td>"; echo "<td>{$statusBadge}</td>"; echo "<td class='text-center'>"; // Edit echo "<a href='qitem_edit.php?id=" . intval($row['id']) . "' class='btn btn-warning btn-sm me-1'> <i class='fa fa-edit'></i> </a>"; // Delete echo "<a href='qitem_delete.php?id=" . intval($row['id']) . "' class='btn btn-danger btn-sm' onclick=\"return confirm('Are you sure you want to delete this item?');\"> <i class='fa fa-trash'></i> </a>"; echo "</td>"; echo "</tr>"; $sr_no++; } } else { echo "<tr> <td colspan='6' class='text-center text-muted'> No quotation items found </td> </tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <!-- Container-fluid Ends--> </div> <!-- footer start--> <?php include "footer.php"; ?>