Viewing file: allrecordsshow.php (5.48 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html> <html lang="en">
<?php include 'head.php';?>
<body>
<!-- ======= Header ======= --> <?php include 'menubar.php';?>
<?php include 'sidebar.php';?>
<main id="main" class="main">
<div class="pagetitle"> <h1>Dashboard</h1> <nav> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="index.html">Home</a></li> <li class="breadcrumb-item active">Dashboard</li> </ol> </nav> </div><!-- End Page Title --> <section class="section dashboard"> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Certificate Generation List</title> <style> .responsive-table { width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; margin-top: 20px; }
.responsive-table th, .responsive-table td { border: 1px solid #ccc; padding: 10px; text-align: center; word-wrap: break-word; }
.responsive-table th { background-color: #004080; color: white; }
.responsive-table tr:hover { background-color: #f0f8ff; }
.responsive-table img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; border: 2px solid #ccc; }
.search-container { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.search-container input[type="text"] { padding: 8px; font-size: 16px; width: 250px; max-width: 100%; border: 1px solid #ccc; border-radius: 5px; }
@media (max-width: 768px) { .responsive-table thead { display: none; }
.responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
.responsive-table tr { margin-bottom: 15px; border-bottom: 2px solid #eee; }
.responsive-table td { text-align: left; padding-left: 50%; position: relative; }
.responsive-table td::before { position: absolute; top: 10px; left: 10px; width: 45%; padding-right: 10px; white-space: nowrap; font-weight: bold; }
.responsive-table td:nth-child(1)::before { content: "Serial"; } .responsive-table td:nth-child(2)::before { content: "Photo"; } .responsive-table td:nth-child(3)::before { content: "Roll No"; } .responsive-table td:nth-child(4)::before { content: "Student Name"; } .responsive-table td:nth-child(5)::before { content: "Father"; } .responsive-table td:nth-child(6)::before { content: "Course"; } .responsive-table td:nth-child(7)::before { content: "Admission Date"; } .responsive-table td:nth-child(8)::before { content: "Mobile"; } .responsive-table td:nth-child(9)::before { content: "Certificate Date"; } } </style> </head> <body>
<div class="search-container"> <input type="text" id="searchInput" placeholder="Search by Name, Roll No, Course..." onkeyup="filterTable()"> </div>
<?php include 'connect.php';
// Fetch students who do NOT have a certificate issued $sql = "SELECT a.* FROM admission a LEFT JOIN certificate c ON a.enrollment = c.Enrollment WHERE c.Enrollment IS NULL ORDER BY a.ID DESC";
if ($result = mysqli_query($link, $sql)) { if (mysqli_num_rows($result) > 0) { echo "<table class='responsive-table' id='dataTable'>"; echo "<thead> <tr> <th>SERIAL</th> <th>PHOTO</th> <th>ROLL NO</th> <th>STUDENT NAME</th> <th>FATHER</th> <th>COURSE NAME</th> <th>ADMISSION DATE</th> <th>MOBILE</th> <th>GENERATE CERTIFICATE</th> </tr> </thead><tbody>";
$sr = 0; while ($row = mysqli_fetch_array($result)) { $sr++; $photoPath = str_replace(' ', '%20', $row['photo']); $photoHTML = "<img src='http://itce.co.in/data/files/$photoPath' alt='Student Photo' width='60'>";
echo "<tr> <td>$sr</td> <td>$photoHTML</td> <td>{$row['enrollment']}</td> <td>{$row['name']}</td> <td>{$row['fatherName']}</td> <td>{$row['course']}</td> <td>{$row['regDate']}</td> <td>{$row['mobile']}</td> <td><a href='certificate_form.php?ID={$row['ID']}'>Generate Certificate</a></td> </tr>"; } echo "</tbody></table>";
mysqli_free_result($result); } else { echo "<p>✅ All students already have certificates issued!</p>"; } } else { echo "<p style='color:red;'>ERROR: Could not execute $sql. " . mysqli_error($link) . "</p>"; }
mysqli_close($link); ?>
</main><!-- End #main -->
<?php include 'footer.php';?>
</body>
</html>
|