<?php 
include('includes/config.php');

?>


<?php
include('includes/user_data.php');

?>
<?php
if(isset($_POST['bankd']))
  {
$bank=$_POST['bank'];

   $sql = "INSERT INTO bank (id, email, details)
              VALUES ('', '$user_email', '$bank')";
              if (mysqli_query($conn, $sql)) 
              {
                  $msg="Profile Updated Successfully";
              }else{
                  $msg="Error occur"; 
              }


}

?>

<!doctype html>
<html lang="en">


<!-- Mirrored from codervent.com/rocker/demo/vertical/user-profile.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 26 Aug 2022 06:47:36 GMT -->
<head>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!--favicon-->
	<link rel="icon" href="assets/images/favicon-32x32.png" type="image/png" />
	<!--plugins-->
	<link href="assets/plugins/simplebar/css/simplebar.css" rel="stylesheet" />
	<link href="assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css" rel="stylesheet" />
	<link href="assets/plugins/metismenu/css/metisMenu.min.css" rel="stylesheet" />
	<!-- loader-->
	<link href="assets/css/pace.min.css" rel="stylesheet" />
	<script src="assets/js/pace.min.js"></script>
	<!-- Bootstrap CSS -->
	<link href="assets/css/bootstrap.min.css" rel="stylesheet">
	<link href="assets/css/bootstrap-extended.css" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&amp;display=swap" rel="stylesheet">
	<link href="assets/css/app.css" rel="stylesheet">
	<link href="assets/css/icons.css" rel="stylesheet">
	<!-- Theme Style CSS -->
	<link rel="stylesheet" href="assets/css/dark-theme.css" />
	<link rel="stylesheet" href="assets/css/semi-dark.css" />
	<link rel="stylesheet" href="assets/css/header-colors.css" />
	<title> PENUEL COLLEGE </title>
	 <style>
        body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: 
#f4f4f9;
    color: 
#333;
}

h1, h3 {
    text-align: center;
    margin-bottom: 20px;
}

form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: 
#fff;
    border-radius: 8px;
    box-shadow: 0 0 10px 
rgba(0, 0, 0, 0.1);
}

.student-list, .holiday-form {
    margin-top: 20px;
}

.student {
    padding: 10px 0;
}

label {
    margin-left: 8px;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 20px;
    border: none;
    border-radius: 5px;
    background-color: 
#007bff;
    color: 
white;
    font-size: 16px;
}

button:hover {
    background-color: 
#0056b3;
}
    </style>
</head>

<body>
	<!--wrapper-->
	<div class="wrapper">
		<!--sidebar wrapper -->
		<?php include 'includes/side.php'; ?>
		<!--end sidebar wrapper -->
		<!--start header -->
		<?php include 'includes/head.php'; ?>
		<!--end header -->
		<!--start page wrapper -->
		<div class="page-wrapper">
			<div class="page-content">
			
			       <div class="section-title wow fadeInUp" data-wow-delay="0.1s" style="padding-top: 10px; text-align: center;">
                                  
                                   <span style="color:red;font-size: 20px;" >
                                      <?php if($_SESSION['errmsg']){
                                    echo htmlentities($_SESSION['errmsg']);
                                    ?>
                                    <?php
                                    echo htmlentities($_SESSION['errmsg']="");
									  }?>
                                    </span>

                                    <span style="color:green;font-size: 20px;" >
                                      <?php if($_SESSION['mess']){
                                    echo htmlentities($_SESSION['mess']);
                                    ?>
                                    <?php
                                    echo htmlentities($_SESSION['mess']="");
									  }?>
                                    </span>
                              </div>
			
            			 <h1>Student Attendance System</h1>
                <form action="mark_attendance.php" method="POST">
                    <label for="date">Date:</label>
                    <input type="date" name="date" required>
                    
                    <h3>Mark Attendance:</h3>
                    <div class="student-list">
                        <ol>
                        <!-- Assuming we have students with IDs and names -->
                        <?php
                        // Fetch students from the database
                      
                        $result = $conn->query("SELECT * FROM students where class_id='$class'");
                        while ($row = $result->fetch_assoc()) {
                            echo '<div class="student"> <li>';
                            echo '<input type="checkbox" name="attendance[' . $row['id'] . ']" value="Present">';
                            echo '<label>' . $row['name'] . '</label>';
                            echo '</li> </div>';
                        }
                        $conn->close();
                        ?>
                        </ol>
                    </div>
                    
                    <button type="submit">Submit Attendance</button>
                </form>
            
                <div class="holiday-form">
                    <h3>Mark Holiday:</h3>
                    <form action="mark_holiday.php" method="POST">
                        <label for="holiday_date">Holiday Date:</label>
                        <input type="date" name="holiday_date" required>
                        <label for="description">Description:</label>
                        <input type="text" name="description" required>
                        <button type="submit">Submit Holiday</button>
                    </form>
                </div>
			
			
			
			</div>
		</div>
		<!--end page wrapper -->
		<!--start overlay-->
		<div class="overlay toggle-icon"></div>
		<!--end overlay-->
		<!--Start Back To Top Button--> <a href="javaScript:;" class="back-to-top"><i class='bx bxs-up-arrow-alt'></i></a>
		<!--End Back To Top Button-->
		<footer class="page-footer">
			<p class="mb-0">Copyright © 2025. All right reserved.</p>
		</footer>
	</div>
	<!--end wrapper-->
	<!--start switcher-->
	<?php include 'includes/customiser.php'; ?>

	<!--end switcher-->
	<!-- Bootstrap JS -->
	<script src="assets/js/bootstrap.bundle.min.js"></script>
	<!--plugins-->
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/plugins/simplebar/js/simplebar.min.js"></script>
	<script src="assets/plugins/metismenu/js/metisMenu.min.js"></script>
	<script src="assets/plugins/perfect-scrollbar/js/perfect-scrollbar.js"></script>
	<!--app JS-->
	<script src="assets/js/app.js"></script>
</body>


<!-- Mirrored from codervent.com/rocker/demo/vertical/user-profile.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 26 Aug 2022 06:47:36 GMT -->
</html>
