π File Manager
π /
/
home
/
u857492117
/
domains
/
mangaldaicollege.org
/
public_html
/
admission
/
data
Dosya DΓΌzenle: index.php
<?php include("connect.php"); // Fetch unique filter options function getOptions($con, $column) { $options = []; $query = "SELECT DISTINCT `$column` FROM student_admission_25 WHERE `$column` != ''"; $res = mysqli_query($con, $query); while ($row = mysqli_fetch_assoc($res)) { $options[] = $row[$column]; } return $options; } // Filters $programme = $_GET['programme_name'] ?? ''; $scheme = $_GET['admission_scheme'] ?? ''; $sub1 = $_GET['subject1'] ?? ''; $sub2 = $_GET['subject2'] ?? ''; $aecc = $_GET['aec_subject'] ?? ''; // Query $sql = "SELECT * FROM student_admission_25 WHERE 1"; if ($programme) $sql .= " AND programme_name = '".mysqli_real_escape_string($con, $programme)."'"; if ($scheme) $sql .= " AND admission_scheme = '".mysqli_real_escape_string($con, $scheme)."'"; if ($sub1) $sql .= " AND subject1 = '".mysqli_real_escape_string($con, $sub1)."'"; if ($sub2) $sql .= " AND subject2 = '".mysqli_real_escape_string($con, $sub2)."'"; if ($aecc) $sql .= " AND aec_subject = '".mysqli_real_escape_string($con, $aecc)."'"; $result = mysqli_query($con, $sql); ?> <!DOCTYPE html> <html> <head> <title>Student Records</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body class="container mt-4"> <h3>π Student Admission (2025-26) Records (Filtered) | <a href="35.php">BA/BSc2nd and 3rd Year</a> </h3> <style> /* Modal style */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); } .modal-content { background-color: #fff; margin: 10% auto; padding: 20px; border-radius: 10px; width: 90%; max-width: 500px; } .close { color: #aaa; float: right; font-size: 24px; font-weight: bold; cursor: pointer; } </style> <h3>π Instructions</h3> <button onclick="openModal()">π Show Instructions</button> <!-- Modal structure --> <div id="instructionModal" class="modal"> <div class="modal-content"> <span class="close" onclick="closeModal()">×</span> <h3>π Instructions</h3> <ul> <li><strong>MAJOR student:</strong> Admission Scheme: <em>1 Major 1 Minor</em><br> β€ Select <strong>Subject 1 (Major)</strong> from dropdown<br> β€ Click <strong>SEARCH AND DOWNLOAD</strong> </li> <br> <li><strong>MINOR student:</strong> <ol> <li>Scheme: <em>1 Major 1 Minor</em> β Select <strong>Subject 2 (Minor)</strong><br>β€ Click SEARCH AND DOWNLOAD</li> <li>Scheme: <em>2 Minor</em> β Select <strong>Subject 1 (Minor 1)</strong><br>β€ Click SEARCH AND DOWNLOAD</li> <li>Scheme: <em>2 Minor</em> β Select <strong>Subject 2 (Minor 2)</strong><br>β€ Click SEARCH AND DOWNLOAD</li> </ol> </li> </ul> </div> </div> <script> function openModal() { document.getElementById('instructionModal').style.display = 'block'; } function closeModal() { document.getElementById('instructionModal').style.display = 'none'; } // Optional: close modal when clicking outside window.onclick = function(event) { const modal = document.getElementById('instructionModal'); if (event.target == modal) { modal.style.display = "none"; } } </script> <form method="get" class="row g-3 mb-4"> <?php function dropdown($name, $label, $options, $selected) { echo '<div class="col-md-2">'; echo "<label>$label</label><select name=\"$name\" class=\"form-select\">"; echo "<option value=\"\">All</option>"; foreach ($options as $opt) { $sel = ($opt == $selected) ? 'selected' : ''; echo "<option value=\"$opt\" $sel>$opt</option>"; } echo '</select></div>'; } dropdown("programme_name", "Programme Name", getOptions($con, "programme_name"), $programme); dropdown("admission_scheme", "Admission Scheme", getOptions($con, "admission_scheme"), $scheme); dropdown("subject1", "Subject 1", getOptions($con, "subject1"), $sub1); dropdown("subject2", "Subject 2", getOptions($con, "subject2"), $sub2); dropdown("aec_subject", "AECC Subject", getOptions($con, "aec_subject"), $aecc); ?> <div class="col-md-2 d-flex align-items-end"> <button class="btn btn-primary w-100">Search</button> </div> <div class="col-md-2 d-flex align-items-end"> <a href="export_csv.php?<?php echo http_build_query($_GET); ?>" class="btn btn-success w-100">Download CSV</a> </div> <div class="col-md-2 d-flex align-items-end"> <a href="in.php" class="btn btn-success w-100">View Minor List </a> </div> </form> <div class="table-responsive"> <table class="table table-bordered table-striped"> <thead class="table-dark"> <tr> <th>Sl. No.</th> <th>College Roll No</th> <th>Form No</th> <th>Programme</th> <th>Name</th> <th>Mobile</th> <th>Scheme</th> <th>Subject 1/(Major/Minor1)</th> <th>Subject 2 (Minor 1/Minor2)</th> <th>AECC</th> <th>Gender</th> <th>Category</th> <th>Email</th> </tr> </thead> <tbody> <?php $sl = 1; while ($row = mysqli_fetch_assoc($result)) { ?> <tr> <td><?= $sl++ ?></td> <td><?= $row['clgroll'] ?></td> <td><?= $row['formNo'] ?></td> <td><?= $row['programme_name'] ?></td> <td><?= $row['applicant_name'] ?></td> <td><?= $row['mobile'] ?></td> <td><?= $row['admission_scheme'] ?></td> <td><?= $row['subject1'] ?></td> <td><?= $row['subject2'] ?></td> <td><?= $row['aec_subject'] ?></td> <td><?= $row['gender'] ?></td> <td><?= $row['category'] ?></td> <td><?= $row['email'] ?></td> </tr> <?php } ?> </tbody> </table> </div> </body> </html>
πΎ Kaydet
Δ°ptal