📁 File Manager
🏠 /
/
home
/
u857492117
/
domains
/
mangaldaicollege.org
/
public_html
/
admission
Dosya Düzenle: raise_query.php
<?php session_start(); if (!isset($_SESSION['collegeroll'])) { header("Location: index.html"); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Mangaldai College Dashboard</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap 4 CSS --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <!-- Font Awesome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> body { font-family: 'Segoe UI', sans-serif; background-color: #f4f6f9; } .sidebar { height: 100vh; background-color: #343a40; color: white; position: fixed; width: 220px; top: 0; left: 0; padding-top: 60px; } .sidebar a { color: #cfd8dc; text-decoration: none; display: block; padding: 12px 20px; transition: 0.3s; } .sidebar a:hover { background-color: #495057; color: white; } .content { margin-left: 220px; padding: 40px 20px; } .card { box-shadow: 0 0 20px rgba(0,0,0,0.05); transition: 0.3s; } .card:hover { transform: translateY(-5px); } .navbar-brand { font-weight: bold; } </style> </head> <body> <!-- Sidebar --> <div class="sidebar"> <h5 class="text-center mb-4">🎓 Mangaldai College</h5> <a href="#"><i class="fas fa-tachometer-alt mr-2"></i> Dashboard</a> <a href="admission_apply_2025.php"><i class="fas fa-user-graduate mr-2"></i>Admission 2025-26</a> <a href="profile.php"><i class="fas fa-user-graduate mr-2"></i>Personal Profile</a> <a href="#"><i class="fas fa-user-graduate mr-2"></i>Academic Details</a> <a href="#"><i class="fas fa-book mr-2"></i> Courses</a> <a href="#"><i class="fas fa-calendar-alt mr-2"></i> Schedule</a> <a href="changepassword.php"><i class="fas fa-key mr-2"></i> Change Password</a> <a href="raise_query.php"><i class="fas fa-question-circle mr-2"></i> Raise Query</a> <a href="logout.php"><i class="fas fa-sign-out-alt mr-2"></i> Logout</a> </div> <!-- Main Content --> <div class="content"> <nav class="navbar navbar-light bg-white shadow-sm mb-4"> <span class="navbar-brand mb-0 h4">Welcome, <?php echo $_SESSION['name']; ?>!</span> <span class="text-muted">Your Roll: <?php echo $_SESSION['collegeroll']; ?></span> </nav> <!-- Raise a Query Section --> <div class="card"> <div class="card-header bg-primary text-white"> <h5 class="mb-0"><i class="fas fa-question-circle mr-2"></i>Raise a Query</h5> </div> <div class="card-body"> <form action="submit_query.php" method="POST"> <div class="form-group"> <label for="subject">Topic</label> <input type="text" class="form-control" id="subject" name="subject" required> </div> <div class="form-group"> <label for="message">Query Message <font color="red">(Include phone number & email at end.)</font></label> <textarea class="form-control" id="message" name="message" rows="5" required></textarea> </div> <input type="hidden" name="roll" value="<?php echo $_SESSION['collegeroll']; ?>"> <button type="submit" class="btn btn-primary"><i class="fas fa-paper-plane"></i> Submit</button> </form> </div> <!-- Previous Queries Section --> <hr> <h5 class="mt-4 px-3">Previous Queries</h5> <div class="table-responsive px-3 pb-3"> <table class="table table-bordered table-sm"> <thead class="thead-light"> <tr> <th>Token No</th> <th>Subject</th> <th>Message</th> <th>Reply</th> <th>Submitted On</th> <th>Replied On</th> </tr> </thead> <tbody> <?php include("connect.php"); $roll = $_SESSION['collegeroll']; $query = "SELECT token_no, subject, message, reply, submitted_at, replied_at FROM queries WHERE roll = '$roll' ORDER BY submitted_at DESC"; $res = mysqli_query($con, $query); if (mysqli_num_rows($res) > 0) { while ($row = mysqli_fetch_assoc($res)) { echo "<tr>"; echo "<td><strong>" . htmlspecialchars($row['token_no']) . "</strong></td>"; echo "<td>" . htmlspecialchars($row['subject']) . "</td>"; echo "<td>" . nl2br(htmlspecialchars($row['message'])) . "</td>"; echo "<td>" . ($row['reply'] ? nl2br(htmlspecialchars($row['reply'])) : "<span class='text-muted'>Pending</span>") . "</td>"; echo "<td>" . date('d-M-Y h:i A', strtotime($row['submitted_at'])) . "</td>"; echo "<td>" . ($row['replied_at'] ? date('d-M-Y h:i A', strtotime($row['replied_at'])) : "-") . "</td>"; echo "</tr>"; } } else { echo "<tr><td colspan='6' class='text-center text-muted'>No queries found.</td></tr>"; } ?> </tbody> </table> </div> </div> </div> <!-- Scripts --> <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.2/dist/js/bootstrap.bundle.min.js"></script> </body> </html>
💾 Kaydet
İptal