Viewing file: birthday.php (4.19 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE html> <html lang="en">
<head> <meta charset="utf-8"> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <title>ITCE (INFYSYS TECHNOLOGIES COMPUTER EDUCATION )</title> <meta name="description" content=""> <meta name="keywords" content="">
<!-- Favicons --> <link href="assets/img/favicon.png" rel="icon"> <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
<!-- Fonts --> <link href="https://fonts.googleapis.com" rel="preconnect"> <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Raleway:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<!-- Vendor CSS Files --> <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet"> <link href="assets/vendor/aos/aos.css" rel="stylesheet"> <link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet"> <link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<!-- Main CSS File --> <link href="assets/css/main.css" rel="stylesheet">
<!-- ======================================================= * Template Name: eBusiness * Template URL: https://bootstrapmade.com/ebusiness-bootstrap-corporate-template/ * Updated: Jun 23 2025 with Bootstrap v5.3.6 * Author: BootstrapMade.com * License: https://bootstrapmade.com/license/ ======================================================== --> </head>
<body class="index-page">
<?php include 'header.php'; ?>
<main class="main">
<div class="container py-4"> <h3 class="mb-4">🎉 ITCE Students Birthday Reminder</h3> <?php include 'admin/connect.php';
$month = $_GET['month'] ?? date("m"); $year = $_GET['year'] ?? date("Y"); $firstDay = date("w", mktime(0, 0, 0, $month, 1, $year)); $daysInMonth = date("t", mktime(0, 0, 0, $month, 1, $year));
echo "<table class='table table-bordered'>"; echo "<thead><tr><th colspan='7'>" . date("F Y", mktime(0,0,0,$month,1,$year)) . "</th></tr>"; echo "<tr><th>Sun</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th></tr></thead><tbody><tr>";
for ($i = 0; $i < $firstDay; $i++) echo "<td></td>";
for ($day = 1; $day <= $daysInMonth; $day++) { $birthdays = ""; $res = $conn->query("SELECT name, dob FROM admission WHERE DAY(dob) = $day AND MONTH(dob) = $month"); while ($row = $res->fetch_assoc()) { $birthYear = date('Y', strtotime($row['dob'])); $birthdays .= "<li>{$row['name']} ($birthYear)</li>"; }
echo "<td><strong>$day</strong>" . ($birthdays ? "<ul class='birthday-list'>$birthdays</ul>" : "") . "</td>"; if ((($day + $firstDay) % 7 == 0) && $day != $daysInMonth) echo "</tr><tr>"; }
while ((($day + $firstDay - 1) % 7) != 0) { echo "<td></td>"; $day++; }
echo "</tr></tbody></table>"; $conn->close(); ?> </div> </main>
<?php include 'footer.php'; ?>
<!-- Scroll Top --> <a href="#" id="scroll-top" class="scroll-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
<!-- Preloader --> <div id="preloader"></div>
<!-- Vendor JS Files --> <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="assets/vendor/php-email-form/validate.js"></script> <script src="assets/vendor/aos/aos.js"></script> <script src="assets/vendor/purecounter/purecounter_vanilla.js"></script> <script src="assets/vendor/swiper/swiper-bundle.min.js"></script> <script src="assets/vendor/glightbox/js/glightbox.min.js"></script> <script src="assets/vendor/imagesloaded/imagesloaded.pkgd.min.js"></script> <script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<!-- Main JS File --> <script src="assets/js/main.js"></script>
</body>
</html>
|