:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/public_html/kreativecrm/**
:: Editing File: qestimations_list.php
<?php // ✅ Page title $page_title = "Estimations"; 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"> <div class="col-sm-10"> <div class="card-header pb-0 card-no-border"> <h2>Estimation Details</h2> </div> </div> <div class="col-sm-2"> <div class="card-header pb-0 card-no-border" style="float:right"> <a href="qestimations_add.php" class="btn btn-primary btn-sm"> <i class="fa fa-plus"></i> Add Estimation </a> </div> </div> <div class="card-body"> <div class="dt-ext table-responsive"> <table class="display" id="export-button"> <thead> <tr> <th>Sr No</th> <th>Client Name</th> <th>Description</th> <th>Area</th> <th>Amount (₹)</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> <?php $sr_no = 1; $sql = "SELECT e.*, c.client_name FROM quotation_estimations as e INNER JOIN quotations c ON c.id = e.c_id ORDER BY id DESC "; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { while ($row = mysqli_fetch_assoc($result)) { $status_badge = $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>" . htmlspecialchars($row['client_name']) . "</td>"; echo "<td>" . htmlspecialchars($row['description']) . "</td>"; echo "<td>" . htmlspecialchars($row['area']) . "</td>"; echo "<td>₹ " . number_format($row['amount'], 2) . "</td>"; echo "<td class='text-center'>{$status_badge}</td>"; echo "<td class='text-center'>"; // Edit Button echo "<a href='qestimations_edit.php?id=" . intval($row['id']) . "' class='btn btn-warning btn-sm me-1'> <i class='fa fa-edit'></i> </a>"; // Delete Button echo "<a href='qestimations_delete.php?id=" . intval($row['id']) . "' class='btn btn-danger btn-sm' onclick=\"return confirm('Are you sure you want to delete this description?');\"> <i class='fa fa-trash'></i> </a>"; echo "</td>"; echo "</tr>"; $sr_no++; } } else { echo "<tr> <td colspan='5' class='text-center text-muted'> No quotation descriptions found </td> </tr>"; } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> <!-- Container-fluid Ends--> </div> <!-- footer start --> <?php include "footer.php"; ?>