Viewing file: viewregistraion.php (6.66 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html> <html lang="en">
<?php include 'head.php';?> <style> table { border-collapse: collapse; width: 100%; margin-top: 20px; }
table, th, td { border: 1px solid #ddd; }
th, td { padding: 8px; text-align: left; }
th { background-color: #f2f2f2; font-weight: bold; } .custom-image { width: 100px; height: 100px; } </style> <body>
<!-- ======= Header ======= --> <?php include 'menubar.php';?>
<?php include 'sidebar.php';?>
<main id="main" class="main">
<?php include 'connect.php';
$sql = "SELECT * FROM admission order by ID DESC"; $result = $conn->query($sql); ?>
<!DOCTYPE html> <html> <head> <title>View Student Registration</title> <style> body { font-family: Arial, sans-serif; padding: 20px; }
h1 { color: #004080; }
.search-box { margin-bottom: 15px; }
.search-box input { padding: 8px; width: 300px; font-size: 16px; border: 1px solid #ccc; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border: 1px solid #ccc; padding: 10px; text-align: center; vertical-align: middle; }
th { background-color: #004080; color: white; }
tr:hover { background-color: #f1f9ff; }
.custom-image { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; border: 1px solid #aaa; }
@media (max-width: 768px) { table, thead, tbody, th, td, tr { display: block; }
tr { margin-bottom: 15px; }
td { padding-left: 50%; position: relative; text-align: left; }
td::before { position: absolute; top: 10px; left: 10px; width: 45%; white-space: nowrap; font-weight: bold; }
td:nth-child(1)::before { content: "ID"; } td:nth-child(2)::before { content: "Registration"; } td:nth-child(3)::before { content: "Fees Update"; } td:nth-child(4)::before { content: "Photo"; } td:nth-child(5)::before { content: "Name"; } td:nth-child(6)::before { content: "Enrollment"; } td:nth-child(7)::before { content: "Father"; } td:nth-child(8)::before { content: "Mother"; } td:nth-child(9)::before { content: "DOB"; } td:nth-child(10)::before { content: "Address"; } td:nth-child(11)::before { content: "Mobile"; } td:nth-child(12)::before { content: "Secondary Mobile"; } td:nth-child(13)::before { content: "Aadhar"; } td:nth-child(14)::before { content: "Reg Date"; } td:nth-child(15)::before { content: "Reg Month"; } td:nth-child(16)::before { content: "Reg Year"; } td:nth-child(17)::before { content: "Fees Amount"; } td:nth-child(18)::before { content: "Deposit Date"; } td:nth-child(19)::before { content: "Fees Mode"; } } </style> <script> function filterTable() { const input = document.getElementById("searchInput"); const filter = input.value.toLowerCase(); const rows = document.querySelectorAll("#studentTable tbody tr");
rows.forEach(row => { const text = row.innerText.toLowerCase(); row.style.display = text.includes(filter) ? "" : "none"; }); } </script> </head> <body> <h1>View Student Registration</h1>
<div class="search-box"> <input type="text" id="searchInput" onkeyup="filterTable()" placeholder="Search by any field..."> </div>
<table id="studentTable"> <thead> <tr> <th>ID</th> <th>Registration</th> <th>Fees Update</th> <th>Photo</th> <th>Name</th> <th>Enrolment</th> <th>Father</th> <th>Mother</th> <th>Date of Birth</th> <th>Address</th> <th>Mobile</th> <th>Secondary Mobile</th> <th>Aadhar</th> <th>Registration Date</th> <th>Registration Month</th> <th>Registration Year</th> <th>Fees Amount</th> <th>Fees Deposit Date</th> <th>Fees Mode</th> </tr> </thead> <tbody> <?php $serial = 1; if ($result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $getids = $row['ID']; $photo = "https://itce.co.in/data/files/" . $row['photo']; echo "<tr>"; echo "<td>" . $serial . "</td>"; echo "<td>" . $row["student_id"] . "<br><a href='student_batch.php?ID=$getids'>Update</a></td>"; echo "<td>" . $row["student_id"] . "<br><a href='updatefees_from_id.php?ID=" . $row["enrollment"] . "'>Fees Update</a></td>"; echo "<td><img src='" . $photo . "' alt='" . $row["name"] . "' class='custom-image'></td>"; echo "<td>" . $row["name"] . "</td>"; echo "<td>" . $row["enrollment"] . "</td>"; echo "<td>" . $row["fatherName"] . "</td>"; echo "<td>" . $row["motherName"] . "</td>"; echo "<td>" . $row["dob"] . "</td>"; echo "<td>" . $row["address"] . "</td>"; echo "<td>" . $row["mobile"] . "</td>"; echo "<td>" . $row["mobile2"] . "</td>"; echo "<td>" . $row["aadhar"] . "</td>"; echo "<td>" . $row["reg_date"] . "</td>"; echo "<td>" . $row["reg_month"] . "</td>"; echo "<td>" . $row["reg_year"] . "</td>"; echo "<td>" . $row["fees_amount"] . "</td>"; echo "<td>" . $row["fees_deposit_date"] . "</td>"; echo "<td>" . $row["fees_mode"] . "</td>"; echo "</tr>"; $serial++; } } else { echo "<tr><td colspan='19'>No student data available</td></tr>"; } ?> </tbody> </table> </body> </html>
</main><!-- End #main -->
<?php include 'footer.php';?>
</body>
</html>
|