:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/public_html/crm/**
:: Editing File: projects_list.php
<?php // ✅ Page title $page_title = "Project List"; // Include common layout include 'header.php'; include 'breadcrumb.php'; include 'menu.php'; /*$result = mysqli_query($conn, "SELECT * FROM projects ORDER BY id DESC");*/ $sql = " SELECT p.*, c.name AS client_name, t.name AS team_name FROM projects p LEFT JOIN clients c ON p.project_name = c.id LEFT JOIN team_members t ON p.assign_to = t.id ORDER BY p.id DESC "; $result = mysqli_query($conn, $sql); ?> <div class="page-body"> <div class="container-fluid"> <div class="card"> <div class="card-header pb-0 d-flex justify-content-between align-items-center"> <h2>Projects List</h2> <a href="projects_add.php" class="btn btn-primary">+ Add New Project</a> </div> <div class="card-body"> <div class="dt-ext table-responsive"> <table class="display" id="export-button"> <thead> <tr> <th>ID</th> <th>Assign To</th> <th>Project Name</th> <!--<th>Task Type</th>--> <th>Start Date</th> <th>Deadline</th> <th>Status</th> <th>Message</th> <th>Action</th> </tr> </thead> <tbody> <?php while ($row = mysqli_fetch_assoc($result)): ?> <?php $today = date('Y-m-d'); $deadline_soon = (strtotime($row['deadline']) - strtotime($today)) <= 30 * 24 * 60 * 60; /*$row_style = $deadline_soon ? 'background-color:#fff3cd;' : '';*/ ?> <tr class="" style="<?= $row_style; ?>"> <td><?= $row['id']; ?></td> <td><?= htmlspecialchars($row['client_name']); ?></td> <td><?= htmlspecialchars($row['team_name']); ?></td> <td><?= htmlspecialchars($row['start_date']); ?></td> <td><?= htmlspecialchars($row['deadline']); ?></td> <td><?= htmlspecialchars($row['status']); ?></td> <td><?= htmlspecialchars($row['description']); ?></td> <td> <a href="projects_edit.php?id=<?= $row['id']; ?>" class='btn btn-warning btn-sm'> <i class='fa fa-edit'></i> Edit </a> <a href="projects_delete.php?id=<?= $row['id']; ?>" class='btn btn-danger btn-sm' onclick=\"return confirm('Are you sure you want to delete this quotation?');\"> <i class='fa fa-trash'></i> Delete </a> </td> </tr> <?php endwhile; ?> </tbody> </table> </div> </div> </div> </div> </div> <?php include 'footer.php'; ?>