V1rus Private
User / IP
:
216.73.217.108
Host / Server
:
190.92.174.125 / aerosofthealthcare.com
System
:
Linux s3739.bom1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
Cmd
|
Upload
|
Mass Deface
|
Create
|
Sym
:
/
home
/
aerosoft
/
www
/
exam
/
Viewing: exam_landing.php
<?php include 'config.php'; if (!isset($_SESSION['student_id'])) { header("Location: login.php"); exit(); } $category_id = $_GET['category_id'] ?? null; if (!$category_id) { header("Location: student_dashboard.php"); exit(); } // Get category details $stmt = $pdo->prepare("SELECT * FROM categories WHERE id = ?"); $stmt->execute([$category_id]); $category = $stmt->fetch(); // Check if student can take exam $stmt = $pdo->prepare("SELECT COUNT(*) as attempts FROM exams WHERE student_id = ? AND category_id = ?"); $stmt->execute([$_SESSION['student_id'], $category_id]); $attempts = $stmt->fetch()['attempts']; $max_attempts = 3; // Can be fetched from exam_settings table ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Exam Instructions - <?php echo $category['name']; ?></title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> <style> .instruction-card { border-left: 4px solid #007bff; box-shadow: 0 5px 15px rgba(0,0,0,0.1); } .rule-item { padding: 10px 0; border-bottom: 1px solid #eee; } .rule-item:last-child { border-bottom: none; } .timer-warning { background: linear-gradient(45deg, #ff6b6b, #ee5a52); color: white; } </style> </head> <body> <nav class="navbar navbar-light bg-light"> <div class="container"> <a class="navbar-brand" href="student_dashboard.php"> <i class="fas fa-arrow-left"></i> Back to Dashboard </a> <span class="navbar-text"> Welcome, <?php echo $_SESSION['student_name']; ?> </span> </div> </nav> <div class="container mt-4"> <div class="row justify-content-center"> <div class="col-md-10"> <div class="card instruction-card"> <div class="card-header bg-primary text-white"> <h4 class="mb-0"><i class="fas fa-file-alt"></i> Exam Instructions</h4> </div> <div class="card-body"> <div class="row"> <div class="col-md-8"> <h5><?php echo $category['name']; ?></h5> <p class="text-muted"><?php echo $category['description']; ?></p> <div class="alert alert-warning"> <h6><i class="fas fa-exclamation-triangle"></i> Important Instructions</h6> <div class="rule-item"> <i class="fas fa-clock text-primary"></i> <strong>Exam Duration:</strong> <?php echo $category['exam_duration']; ?> minutes </div> <div class="rule-item"> <i class="fas fa-question-circle text-primary"></i> <strong>Total Questions:</strong> <?php echo $category['total_questions']; ?> multiple choice questions </div> <div class="rule-item"> <i class="fas fa-trophy text-primary"></i> <strong>Passing Marks:</strong> <?php echo $category['passing_marks']; ?>% </div> <div class="rule-item"> <i class="fas fa-ban text-danger"></i> <strong>Don't refresh or close the browser</strong> during the exam </div> <div class="rule-item"> <i class="fas fa-redo text-info"></i> <strong>Attempts Used:</strong> <?php echo $attempts; ?>/<?php echo $max_attempts; ?> </div> </div> <div class="requirements"> <h6>Before You Start:</h6> <ul> <li>Ensure you have a stable internet connection</li> <li>Close all other applications and browser tabs</li> <li>Have your identification ready if required</li> <li>Make sure you won't be interrupted during the exam</li> </ul> </div> </div> <div class="col-md-4"> <div class="card timer-warning text-center"> <div class="card-body"> <i class="fas fa-clock fa-3x mb-3"></i> <h5>Time Limit</h5> <h2><?php echo $category['exam_duration']; ?> min</h2> <p class="small">The exam will auto-submit when time expires</p> </div> </div> <div class="text-center mt-4"> <?php if ($attempts >= $max_attempts): ?> <div class="alert alert-danger"> <i class="fas fa-times-circle"></i><br> Maximum attempts reached </div> <?php else: ?> <button class="btn btn-success btn-lg px-5" onclick="startExam()"> <i class="fas fa-play-circle"></i> Start Exam </button> <?php endif; ?> </div> </div> </div> </div> </div> </div> </div> </div> <script> function startExam() { if (confirm('Are you ready to start the exam? The timer will begin immediately.')) { window.location.href = 'take_exam.php?category_id=<?php echo $category_id; ?>'; } } </script> </body> </html>
Coded With 💗 by
HanzOFC