« Back to History
beam_done_list.php
|
20260722_120325.php
Initial Domain Snapshot
Copy Code
<?php declare(strict_types=1); /* ================= AUTH + CTX ================= */ require_once __DIR__ . '/modules/auth/page_acl.php'; $ctx = page_require_access('beam_done_list'); $pdo = $ctx['pdo']; $company_id = (int)$ctx['company_id']; require_once __DIR__ . '/partials/header.php'; /* ================= DATA ================= */ $sql = " SELECT id, entry_date, installation_date, installation_source, beam_no, taka, meter, tar, quality_id, beam_type, employee_id, created_at FROM beam_entry WHERE company_id = :cid ORDER BY id DESC LIMIT 200 "; $stmt = $pdo->prepare($sql); $stmt->execute([':cid' => $company_id]); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); ?> <div class="card"> <h3>Beam Done Entries</h3> <table class="table"> <thead> <tr> <th>ID</th> <th>Beam No</th> <th>Type</th> <th>Entry Date</th> <th>Install Date</th> <th>Source</th> <th>Taka</th> <th>Meter</th> <th>Tar</th> <th>Quality</th> <th>Employee</th> <th>Action</th> </tr> </thead> <tbody> <?php if (!$rows): ?> <tr> <td colspan="12" class="text-center">No beam entries found</td> </tr> <?php else: ?> <?php foreach ($rows as $r): ?> <tr> <td><?= (int)$r['id'] ?></td> <td><?= h($r['beam_no']) ?></td> <td> <span class="badge <?= $r['beam_type']=='primary'?'success':'info' ?>"> <?= h($r['beam_type']) ?> </span> </td> <td><?= h($r['entry_date']) ?></td> <td><?= h($r['installation_date']) ?></td> <td><?= h($r['installation_source']) ?></td> <td><?= h($r['taka']) ?></td> <td><?= h($r['meter']) ?></td> <td><?= h($r['tar']) ?></td> <td><?= h($r['quality_id']) ?></td> <td><?= h($r['employee_id']) ?></td> <td> <a class="btn small" href="beam_done_edit.php?id=<?= (int)$r['id'] ?>"> Edit </a> </td> </tr> <?php endforeach; ?> <?php endif; ?> </tbody> </table> </div> <?php require_once __DIR__ . '/partials/footer.php'; ?>