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

<head>
    <?php include("include/meta.php");?>
    <?php include("include/css.php");?>


</head>

<body>
    <?php include("include/preloader.php");?>


    <!-- header area -->
    <?php include("include/header.php");?>
    <!-- header area end -->


    <!-- popup search -->
    <div class="search-popup">
        <button class="close-search"><span class="far fa-times"></span></button>
        <form action="#">
            <div class="form-group">
                <input type="search" name="search-field" placeholder="Search Here..." required>
                <button type="submit"><i class="far fa-search"></i></button>
            </div>
        </form>
    </div>
    <!-- popup search end -->


    <main class="main">

        <!-- hero slider -->
        <div class="hero-section">
            <div class="hero-slider owl-carousel owl-theme">
                <?php
                $banner_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'slider' && recycle = '1' ORDER BY id DESC";
                $banner_run = mysqli_query($con, $banner_sql);
                while ($banner_row = mysqli_fetch_assoc($banner_run)) {
                ?>
                <div class="hero-single" style="background: url(./login/upload/<?php echo $banner_row['image_one']?>)">
                    <div class="container">
                        <div class="row align-items-center">
                            <div class="col-md-12 col-lg-7">
                                <div class="hero-content">
                                    <h6 class="hero-sub-title" data-animation="fadeInDown" data-delay=".25s">
                                        <i class="far fa-book-open-reader"></i>Welcome To Macaw!
                                    </h6>
                                    <h1 class="hero-title" data-animation="fadeInRight" data-delay=".50s">
                                        <?php echo $banner_row['title']; ?>
                                    </h1>
                                    <p data-animation="fadeInLeft" data-delay=".75s">
                                        <?php echo $banner_row['short_des']; ?>
                                    </p>
                                    <div class="hero-btn" data-animation="fadeInUp" data-delay="1s">
                                        <a href="about.php" class="theme-btn">About More<i
                                                class="fas fa-arrow-right-long"></i></a>
                                        <a href="contact.php" class="theme-btn theme-btn2">Learn More<i
                                                class="fas fa-arrow-right-long"></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <?php }?>
            </div>
        </div>
        <!-- hero slider end -->


        <!-- feature area -->
        <div class="feature-area fa-negative">
            <div class="col-xl-9 ms-auto">
                <div class="feature-wrapper">
                    <div class="row g-4">
                        <?php
                        $features_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'features' && recycle = '1' order by id ASC LIMIT 4 ";
                        $features_run = mysqli_query($con, $features_sql);
                        $c = '1';
                        while ($features_row = mysqli_fetch_assoc($features_run)) {
                        ?>
                        <div class="col-md-6 col-lg-3">
                            <div class="feature-item">
                                <span class="count">0<?= $c;?></span>
                                <div class="feature-icon">
                                    <img src="./login/upload/<?php echo $features_row['image_one']?>" alt="">
                                </div>
                                <div class="feature-content">
                                    <h4 class="feature-title"><?php echo $features_row['title']; ?></h4>
                                    <p><?php echo $features_row['short_des']; ?></p>
                                </div>
                            </div>
                        </div>
                        <?php $c++; }?>
                    </div>
                </div>
            </div>
        </div>
        <!-- feature area end -->


        <!-- about area -->
        <?php 
            $about_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'about' && recycle = '1' ";
            $about_run = mysqli_query($con, $about_sql);
            $c = 1;
            if ($about_row = mysqli_fetch_assoc($about_run)) {
        ?>
        <div class="about-area py-120">
            <div class="container">
                <div class="row g-4 align-items-center">
                    <div class="col-lg-6">
                        <div class="about-left wow fadeInLeft" data-wow-delay=".25s">
                            <div class="about-img">
                                <div class="row g-4">
                                    <div class="col-md-6 col-6">
                                        <img class="img-1" src="./login/upload/<?php echo $about_row['image_one']?>"
                                            alt="">
                                        <div class="about-experience mt-4">
                                            <div class="about-experience-icon d-none d-lg-block">
                                                <img src="assets/img/icon/exchange-idea.svg" alt="">
                                            </div>
                                            <b class="text-start"> <br> Quality
                                                Education</b>
                                        </div>
                                    </div>
                                    <div class="col-md-6 col-6">
                                        <img class="img-2" src="assets/img/logo/macaw.png" alt="">
                                        <img class="img-3 mt-4"
                                            src="./login/upload/<?php echo $about_row['image_two']?>" alt="">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="about-right wow fadeInRight" data-wow-delay=".25s">
                            <div class="site-heading mb-3">
                                <span class="site-title-tagline"><i class="far fa-book-open-reader"></i> About
                                    Us</span>
                                <h2 class="site-title">
                                    <?= $about_row["title"];?>
                                </h2>
                                <span class="site-title-tagline"
                                    style="text-decoration: none;font-size: 14px;text-transform: none;border-bottom: none;">Where
                                    Dreams Take Flight, Knowledge Takes Root.</span>
                            </div>
                            <p class="about-text">
                                <?= $about_row["short_des"];?>
                            </p>
                            <div class="about-content">
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="about-quote">
                                            <p><?= $about_row["title_two"];?></p>
                                            <i class="far fa-quote-right"></i>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="about-bottom">
                                <a href="about.php" class="theme-btn">Discover More<i
                                        class="fas fa-arrow-right-long"></i></a>
                                <div class="about-phone">
                                    <div class="icon"><i class="fal fa-headset"></i></div>
                                    <div class="number">
                                        <span>Call Now</span>
                                        <h6><a
                                                href="tel:<?php echo $user_rows['uothcontact']; ?>"><?php echo $user_rows['uothcontact']; ?></a>
                                        </h6>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php }?>
        <!-- about area end -->


        <!-- counter area --
        <?php
            $banner_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'slider' && recycle = '1' ORDER BY id DESC";
            $banner_run = mysqli_query($con, $banner_sql);
            if ($banner_row = mysqli_fetch_assoc($banner_run)) {
            ?>
        <div class="counter-area pt-60 pb-60"
            style="background-image: url(./login/upload/<?php echo $banner_row['image_one']?>);">
            <div class="container">
                <div class="row">
                    <div class="col-lg-3 col-sm-6">
                        <div class="counter-box">
                            <div class="icon">
                                <img src="assets/img/icon/course.svg" alt="">
                            </div>
                            <div>
                                <span class="counter" data-count="+" data-to="500" data-speed="3000">500</span>
                                <h6 class="title">+ Total Cources </h6>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3 col-sm-6">
                        <div class="counter-box">
                            <div class="icon">
                                <img src="assets/img/icon/graduation.svg" alt="">
                            </div>
                            <div>
                                <span class="counter" data-count="+" data-to="1900" data-speed="3000">1900</span>
                                <h6 class="title">+ Our Students</h6>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3 col-sm-6">
                        <div class="counter-box">
                            <div class="icon">
                                <img src="assets/img/icon/teacher-2.svg" alt="">
                            </div>
                            <div>
                                <span class="counter" data-count="+" data-to="750" data-speed="3000">750</span>
                                <h6 class="title">+ Skilled Lecturers</h6>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3 col-sm-6">
                        <div class="counter-box">
                            <div class="icon">
                                <img src="assets/img/icon/award.svg" alt="">
                            </div>
                            <div>
                                <span class="counter" data-count="+" data-to="30" data-speed="3000">30</span>
                                <h6 class="title">+ Win Awards</h6>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php }?>
        <!-- counter area end -->

        <!-- course-area --
        <?php
            $cources_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'cource' && recycle = '1' ORDER BY id DESC limit 6";
            $cources_run = mysqli_query($con, $cources_sql);
            if ($cources_run) {
        ?>
        <div class="course-area py-120">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6 mx-auto">
                        <div class="site-heading text-center">
                            <span class="site-title-tagline"><i class="far fa-book-open-reader"></i>
                                Our Classes</span>
                            <h2 class="site-title">Let's Check Our <span>Classes</span></h2>
                        </div>
                    </div>
                </div>
                <div class="row justify-content-center">
                    <?php while ($cources_row = mysqli_fetch_assoc($cources_run)) {?>
                    <div class="col-md-6 col-lg-4">
                        <div class="course-item wow fadeInUp" data-wow-delay=".25s">
                            <div class="course-img">
                                <img src="./login/upload/<?php echo $cources_row['image_one']?>"
                                    style="background-size: cover;width: 100%;height: 170px;" alt="">
                                <a href="class-details.php?class=<?= $cources_row["title"];?>" class="btn"><i
                                        class="far fa-link"></i></a>
                            </div>
                            <div class="course-content mt-3">
                                <h4 class="course-title">
                                    <a
                                        href="class-details.php?class=<?= $cources_row["title"];?>"><?= $cources_row["title"];?></a>
                                </h4>
                                <p class="course-text">
                                    <?= $cources_row["short_des"];?>
                                </p>
                                <div class="course-meta">
                                    <span class="course-meta-left"><a class="theme-btn"
                                            href="class-details.php?class=<?= $cources_row["title"];?>">Know
                                            More <i class="fas fa-arrow-right-long"></i></a></span>
                                    <div class="course-rating d-none">
                                        <i class="fas fa-star"></i>
                                        <i class="fas fa-star"></i>
                                        <i class="fas fa-star"></i>
                                        <i class="fas fa-star"></i>
                                        <i class="far fa-star"></i>
                                        <span>(4.0)</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                </div>
            </div>
        </div>
        <?php } ?>
        <!-- course-area -->


        <!-- notice area --
        <?php
            $banner_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'slider' && recycle = '1' ORDER BY id DESC";
            $banner_run = mysqli_query($con, $banner_sql);
            if ($banner_row = mysqli_fetch_assoc($banner_run)) {
        ?>
        <div class="cta-area" style="background-image: url(./login/upload/<?php echo $banner_row['image_one']?>);">
            <div class="container">
                <div class="cta-wrapper">
                    <div class="row align-items-center">
                        <div class="col-lg-5 ms-lg-auto">
                            <div class="cta-content">
                                <h3 class="text-white">Notice Board</h3>
                                <div class="notice-wrapper">
                                    <div class="notice-content">
                                        <?php
                                        $notice_sql = "SELECT * FROM data_table WHERE page_type = 'notice' AND recycle = '1' ORDER BY id DESC";
                                        $notice_run = mysqli_query($con, $notice_sql);
                                        $total = mysqli_num_rows($notice_run);
                                        $count = 1;
                                        while ($notice_row = mysqli_fetch_assoc($notice_run)) {
                                        ?>
                                        <h4 class="m-0">
                                            <a href="notice-details.php?id=<?php echo $notice_row['id']; ?>">
                                                <?php echo htmlspecialchars($notice_row['title']); ?>
                                            </a>
                                        </h4>
                                        <?php if ($count < $total) { ?>
                                        <hr class="m-0">
                                        <?php } ?>
                                        <?php $count++; } ?>
                                    </div>
                                </div>

                                <div class="cta-btn">
                                    <a href="notice.php" class="theme-btn">All Notice<i
                                            class="fas fa-arrow-right-long"></i></a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php } ?>
        <!-- Notice-area end -->



        <!-- video-area -->
        <?php
            $video_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'video' && recycle = '1' ORDER BY id DESC";
            $video_run = mysqli_query($con, $video_sql);
            if ($video_row = mysqli_fetch_assoc($video_run)) {
        ?>
        <div class="video-area pt-80">
            <div class="container">
                <div class="row g-4">
                    <div class="col-lg-4 wow fadeInLeft" data-wow-delay=".25s">
                        <div class="site-heading mb-3">
                            <span class="site-title-tagline"><i class="far fa-book-open-reader"></i>
                                Latest Video</span>
                            <h2 class="site-title">
                                Let's Check Our <span>Latest</span> Video
                            </h2>
                        </div>
                        <p class="about-text">
                            There are many variations of passages available but the majority have
                            suffered
                            alteration in some form by injected humour look even slightly
                            believable.
                        </p>
                        <a href="about.php" class="theme-btn mt-30">Learn More<i
                                class="fas fa-arrow-right-long"></i></a>
                    </div>
                    <div class="col-lg-8 wow fadeInRight" data-wow-delay=".25s">
                        <div class="video-content"
                            style="background-image: url(assets/img/logo/macaw.png);background-size: contain;">
                            <div class="row align-items-center">
                                <div class="col-lg-12">
                                    <div class="video-wrapper">
                                        <a class="play-btn popup-youtube"
                                            href="https://www.youtube.com/watch?v=<?= $video_row["short_des"];?>">
                                            <i class="fas fa-play"></i>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php }?>
        <!-- video-area end -->


        <!-- team-area --
        <?php
            $team_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'team' && recycle = '1' ORDER BY id DESC";
            $team_run = mysqli_query($con, $team_sql);
            if($team_run){
        ?>
        <div class="team-area py-120">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6 mx-auto">
                        <div class="site-heading text-center">
                            <span class="site-title-tagline"><i class="far fa-book-open-reader"></i>
                                Our Teachers</span>
                            <h2 class="site-title">Meet With Our <span>Teachers</span></h2>
                        </div>
                    </div>
                </div>
                <div class="row justify-content-center">
                    <?php
                        while ($team_row = mysqli_fetch_assoc($team_run)) {
                    ?>
                    <div class="col-md-6 col-lg-3">
                        <div class="team-item wow fadeInUp" data-wow-delay=".25s">
                            <div class="team-img text-center">
                                <img src="./login/upload/<?php echo $team_row['image_one']?>" alt="thumb">
                            </div>
                            <div class="team-social d-none">
                                <a href="#"><i class="fab fa-facebook-f"></i></a>
                                <a href="#"><i class="fab fa-whatsapp"></i></a>
                                <a href="#"><i class="fab fa-linkedin-in"></i></a>
                                <a href="#"><i class="fab fa-youtube"></i></a>
                            </div>
                            <div class="team-content">
                                <div class="team-bio">
                                    <h5><a href="team.php"><?= $team_row["title"];?></a></h5>
                                    <span><?= $team_row["short_des"];?></span>
                                </div>
                            </div>
                            <span class="team-social-btn"><i class="far fa-user"></i></span>
                        </div>
                    </div>
                    <?php }?>
                </div>
            </div>
        </div>
        <?php } ?>
        <!-- team-area end -->


        <!-- choose-area -->
        <div class="choose-area pt-80 pb-80">
            <div class="container">
                <div class="row align-items-center">
                    <div class="col-lg-6">
                        <div class="choose-content wow fadeInUp" data-wow-delay=".25s">
                            <div class="choose-content-info">
                                <div class="site-heading mb-0">
                                    <span class="site-title-tagline"><i class="far fa-book-open-reader"></i> Our Wings
                                        of Difference</span>
                                    <h2 class="site-title text-white mb-10">Why Families Trust <span>MACAW </span>
                                        Public School?</h2>
                                    <p class="text-white">
                                        Give your child a place to dream, learn, and rise. We develop strength, wisdom,
                                        and courage — the wings every child needs to fly toward success.
                                    </p>
                                </div>
                                <div class="choose-content-wrap">
                                    <div class="row g-4">
                                        <div class="col-md-12">
                                            <div class="choose-ite m">
                                                <div class="choose-item-info">
                                                    <ul>
                                                        <li class="mb-3">
                                                            <h4 class="mb-0 text-white"><i
                                                                    class="fa-regular fa-record-vinyl h6"></i> Mother
                                                                Tongue,
                                                                Modern Minds
                                                                –
                                                            </h4>
                                                            <p>Our Bengali medium approach ensures deeper understanding.
                                                            </p>
                                                        </li>
                                                        <li class="mb-3">
                                                            <h4 class="mb-0 text-white"><i
                                                                    class="fa-regular fa-record-vinyl h6"></i> Digital
                                                                Classrooms, Smarter
                                                                Thinking –</h4>
                                                            <p>Every room blends technology, creativity, and real
                                                                understanding.
                                                            </p>
                                                        </li>
                                                        <li class="mb-3">
                                                            <h4 class="mb-0 text-white"><i
                                                                    class="fa-regular fa-record-vinyl h6"></i> Hostel
                                                                That Feels Like Home –
                                                            </h4>
                                                            <p>We have separate, peaceful, and supportive spaces for
                                                                both boys and girls.
                                                            </p>
                                                        </li>
                                                        <li class="mb-3">
                                                            <h4 class="mb-0 text-white"><i
                                                                    class="fa-regular fa-record-vinyl h6"></i> Guidance
                                                                that Never Ends –</h4>
                                                            <p>Our teachers act as mentors, and we will shape both skill
                                                                and soul.
                                                            </p>
                                                        </li>
                                                        <li class="mb-3">
                                                            <h4 class="mb-0 text-white"><i
                                                                    class="fa-regular fa-record-vinyl h6"></i> Safety in
                                                                Every Step –</h4>
                                                            <p>A secure campus with care in every corner.
                                                            </p>
                                                        </li>
                                                        <li class="mb-0">
                                                            <h4 class="mb-0 text-white"><i
                                                                    class="fa-regular fa-record-vinyl h6"></i> Rooted in
                                                                Values, Ready for the
                                                                Future – </h4>
                                                            <p>We prepare students to fly high without losing their
                                                                ground.
                                                            </p>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6 mt-5 mt-lg-0">
                        <div class="cta-content mt-5 mt-lg-0">
                            <h3 class="text-white mb-3">Notice Board</h3>
                            <div class="notice-wrapper">
                                <div class="notice-content">
                                    <?php
                                        $notice_sql = "SELECT * FROM data_table WHERE page_type = 'notice' AND recycle = '1' ORDER BY id DESC";
                                        $notice_run = mysqli_query($con, $notice_sql);
                                        $total = mysqli_num_rows($notice_run);
                                        $count = 1;
                                        while ($notice_row = mysqli_fetch_assoc($notice_run)) {
                                        ?>
                                    <h4 class="m-0">
                                        <a href="notice-details.php?title=<?php echo $notice_row['title']; ?>">
                                            <?php echo htmlspecialchars($notice_row['title']); ?>
                                        </a>
                                    </h4>
                                    <?php if ($count < $total) { ?>
                                    <hr class="m-0">
                                    <?php } ?>
                                    <?php $count++; } ?>
                                </div>
                            </div>

                            <div class="cta-btn">
                                <a href="notice.php" class="theme-btn">All Notice<i
                                        class="fas fa-arrow-right-long"></i></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- choose-area end -->


        <!-- gallery-area -->
        <div class="gallery-area py-120">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6 mx-auto">
                        <div class="site-heading text-center">
                            <span class="site-title-tagline"><i class="far fa-book-open-reader"></i>
                                Gallery</span>
                            <h2 class="site-title">MACAW <span>Memories</span></h2>
                            <p>We capture vibrant moments of learning, celebration, and growth—where every picture tells
                                our school's inspiring story of excellence and joy.</p>
                        </div>
                    </div>
                </div>
                <div class="row popup-gallery justify-content-center">
                    <?php
                    $images_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'gallery' && recycle = '1' ORDER BY id DESC";
                    $images_run = mysqli_query($con, $images_sql);
                    $c = 1;
                    while ($images_row = mysqli_fetch_assoc($images_run)) {
                    ?>
                    <div class="col-md-4 wow fadeInUp" data-wow-delay=".<?php echo $c; ?>5s">
                        <div class="gallery-item">
                            <div class="gallery-img">
                                <img src="./login/upload/<?php echo $images_row['image_one']; ?>" alt="">
                            </div>
                            <div class="gallery-content">
                                <a class="popup-img gallery-link"
                                    href="./login/upload/<?php echo $images_row['image_one']; ?>"><i
                                        class="fal fa-plus"></i></a>
                            </div>
                        </div>
                    </div>
                    <?php $c++; }?>
                </div>
            </div>
        </div>

        <!-- gallery-area end -->

        <!-- enroll area-->
        <div class="enroll-area pt-80 pb-80"
            style="background-image: url(./login/upload/<?php echo $banner_row['image_one']?>);">
            <div class="container">
                <div class="col-lg-12">
                    <div class="row g-5 align-items-center">
                        <div class="col-lg-5">
                            <div class="enroll-left wow fadeInLeft" data-wow-delay=".25s">
                                <div class="enroll-form">
                                    <div class="enroll-form-header text-center">
                                        <h3>Start Your Enrollment</h3>
                                        <p>We are variations of passages the have suffered.</p>
                                    </div>
                                    <form action="" method="POST">
                                        <div class="form-group">
                                            <input type="text" name="name" class="form-control" placeholder="Your Name">
                                        </div>
                                        <div class="form-group">
                                            <input type="number" name="contact" class="form-control"
                                                placeholder="Mobile Number">
                                        </div>
                                        <div class="form-group">
                                            <input type="email" name="email" class="form-control"
                                                placeholder="Email Address">
                                        </div>
                                        <div class="form-group">
                                            <select class="form-select" name="service" required>
                                                <option value="">Choose Course</option>
                                                <?php
                                                $course_sql = "SELECT * FROM data_table 
                                                            WHERE up_by = $x 
                                                            && page_type = 'course' 
                                                            && recycle = '1' 
                                                            ORDER BY id DESC";
                                                $course_run = mysqli_query($con, $course_sql);

                                                while ($course_row = mysqli_fetch_assoc($course_run)) {
                                                    ?>
                                                <option value="<?php echo $course_row['title']; ?>">
                                                    <?php echo htmlspecialchars($course_row['title']); ?>
                                                </option>
                                                <?php } ?>
                                            </select>

                                        </div>
                                        <div class="form-group">
                                            <textarea name="message" class="form-control" placeholder="Type Message"
                                                rows="2"></textarea>
                                        </div>
                                        <button class="theme-btn" type="submit" name="submit">Enroll Now<i
                                                class="fas fa-arrow-right-long"></i></button>
                                    </form>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-7">
                            <div class="enroll-right wow fadeInUp" data-wow-delay=".25s">
                                <div class="skill-content">
                                    <div class="conSide-div">
                                        <h3 class="mb-3 text-white">Our Exceptional Education Method </h3>
                                        <ul>
                                            <li class="mb-2">
                                                <p><i class="fa-solid fa-diamond"></i> Individual attention and
                                                    mentorship for every child.</p>
                                            </li>
                                            <li class="mb-2">
                                                <p><i class="fa-solid fa-diamond"></i> Smart classroom tools and live
                                                    demonstrations.</p>
                                            </li>
                                            <li class="mb-2">
                                                <p><i class="fa-solid fa-diamond"></i> Concept clarity through
                                                    visuals and examples.</p>
                                            </li>
                                            <li class="mb-2">
                                                <p><i class="fa-solid fa-diamond"></i> Academic guidance with moral
                                                    learning.</p>
                                            </li>
                                            <li class="mb-2">
                                                <p><i class="fa-solid fa-diamond"></i> Parent–teacher communication
                                                    for progress tracking.</p>
                                            </li>
                                            <li class="mb-2">
                                                <p><i class="fa-solid fa-diamond"></i> Strong balance of discipline,
                                                    values, and creativity.</p>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </div>
        <!-- enroll area end -->


        <!-- Founder area -->
        <?php
            $founder_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'founder' && recycle = '1' ORDER BY id DESC";
            $founder_run = mysqli_query($con, $founder_sql);
            if($founder_row = mysqli_fetch_assoc($founder_run)){
        ?>
        <div class="team-single pt-120 pb-80">
            <div class="container">
                <div class="row align-items-center">
                    <div class="col-lg-9 mx-auto">
                        <div class="site-heading text-center">
                            <span class="site-title-tagline"><i class="far fa-book-open-reader"></i>
                                Message</span>
                            <h2 class="site-title">Our <span>Founder’s</span> Message</h2>
                        </div>
                    </div>
                    <?php if(!empty($founder_row['image_one'])){?>
                    <div class="col-md-4 text-center">
                        <div class="team-single-img">
                            <img src="./login/upload/<?= $founder_row['image_one']?>" alt="">
                        </div>
                    </div>
                    <?php }?>
                    <div class="col-md-<?php if(!empty($founder_row['image_one'])){ echo '8'; } else { echo '12'; }?>">
                        <div class="team-details">
                            <h3><?= $founder_row['title']?></h3>
                            <strong>Founder Of MACAW Public School</strong>
                            <p class="mt-3">
                                <?= $founder_row['short_des']?>
                            </p>
                            <div class="team-details-info">
                                <?= $founder_row["long_des"]; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php } ?>
        <!-- Founder area end -->


        <!-- testimonial area -->
        <div class="testimonial-area ts-bg pt-80 pb-80"
            style="background-image: url(./login/upload/<?php echo $banner_row['image_one']?>);">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6 mx-auto">
                        <div class="site-heading text-center">
                            <span class="site-title-tagline"><i class="far fa-book-open-reader"></i> Testimonials</span>
                            <h2 class="site-title text-white">Let's Explore What Our Students <span>Say's</span> About
                                Us</h2>
                        </div>
                    </div>
                </div>
                <div class="testimonial-slider owl-carousel owl-theme">
                    <?php 
                    $testimonial_sql = "SELECT * FROM data_table WHERE up_by = $x && page_type = 'testimonial' && recycle = '1' ORDER BY id DESC";
                    $testimonial_run = mysqli_query($con, $testimonial_sql);
                    while($testimonial_row = mysqli_fetch_assoc($testimonial_run)){
                    ?>
                    <div class="testimonial-item">
                        <div class="testimonial-rate">
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                            <i class="fas fa-star"></i>
                        </div>
                        <div class="testimonial-quote">
                            <p><?= $testimonial_row["short_des"];?></p>
                        </div>
                        <div class="testimonial-content">
                            <?php if(!empty($testimonial_row['image_one'])){?>
                            <div class="testimonial-author-img">
                                <img src="./login/upload/<?= $testimonial_row['image_one'];?>" alt="">
                            </div>
                            <?php }?>
                            <div class="testimonial-author-info">
                                <h4><?= $testimonial_row["title"];?></h4>
                                <p><?= $testimonial_row["title_two"];?></p>
                            </div>
                        </div>
                        <span class="testimonial-quote-icon"><i class="far fa-quote-right"></i></span>
                    </div>
                    <?php }?>
                </div>
            </div>
        </div>
        <!-- testimonial area end -->

        <!-- facility area -->
        <div class="facility-area py-120">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6 mx-auto">
                        <div class="site-heading text-center">
                            <span class="site-title-tagline"><i class="far fa-book-open-reader"></i> Our
                                Facilities</span>
                            <h2 class="site-title">Let's Check Our <span>Facilities</span></h2>
                            <p>We have modern amenities and safe, nurturing spaces where students thrive academically,
                                physically, and emotionally.Lets explore our school facilities which your children will
                                enjoy-</p>
                        </div>
                    </div>
                </div>
                <div class="row justify-content-center align-items-center">
                    <?php
                    $features_sql = "SELECT * FROM data_table WHERE up_by = $x AND page_type = 'facility' AND recycle = '1' ORDER BY id ASC limit 4";
                    $features_run = mysqli_query($con, $features_sql);
                    $c = 1;

                    while ($features_row = mysqli_fetch_assoc($features_run)) {
                        // Split long description into sentences using regex
                        $sentence = $features_row['long_des'];
                    ?>
                    <div class="col-md-6 col-lg-6">
                        <div class="facility-item wow fadeInUp" data-wow-delay=".25s">
                            <div class="facility-img">
                                <img src="./login/upload/<?php echo htmlspecialchars($features_row['image_one']); ?>"
                                    alt="">
                            </div>
                            <div class="facility-content">
                                <h3 class="facility-title mb-3">
                                    <?php echo htmlspecialchars($features_row['title']); ?>
                                    <span style="color:#eb9602;font-size: 26px;">
                                        <?php echo htmlspecialchars($features_row['short_des']); ?>
                                    </span>
                                </h3>
                                <div class="facility-text">
                                    <?php 
                                        echo "<p>" . $sentence. "</p>";
                                    ?>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                    <div class="col-md-12">
                        <div class="text-center mt-5">
                            <a href="facility.php" class="theme-btn mt-2">View All <i class="fa fa-arrow-right"></i></a>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <!-- facility area end -->

    </main>


    <!-- footer area -->
    <?php include("include/footer.php");?>
    <!-- footer area end -->


    <!-- js -->
    <?php include("include/js.php");?>

</body>

</html>

<?php
if (isset($_POST['submit'])) {
    $conname    = mysqli_real_escape_string($con, strip_tags($_POST['name']));
    $conno      = mysqli_real_escape_string($con, strip_tags($_POST['contact']));
    $conemail   = mysqli_real_escape_string($con, strip_tags($_POST['email']));
    $conmessage = mysqli_real_escape_string($con, strip_tags($_POST['message']));
    $consubject = mysqli_real_escape_string($con, strip_tags($_POST['service'])); 

    $conref = $x;
    $concreatedon = date("j F, Y, g:i a");

    $contact_sql = "INSERT INTO contact 
        (conname, conno, conmessage, conref, concreatedon, consubject, conemail) 
        VALUES 
        ('$conname', '$conno', '$conmessage', '$conref', '$concreatedon', '$consubject', '$conemail')";

    // Mail setup
    $to = $email_id;
    $subject = "Contact Details Of Customer";
    $message = "Name: $conname\n";
    $message .= "Phone Number: $conno\n";
    $message .= "Email Id: $conemail\n";
    $message .= "Course Selected: $consubject\n";
    $message .= "Message: $conmessage\n";

    $headers = "From: noreply@yourdomain.com\r\n";

    if (mysqli_query($con, $contact_sql)) {
        mail($to, $subject, $message, $headers);
        ?>
<script>
alert("Details Sent Successfully");
window.location = "index.php";
</script>
<?php
    } else {
        ?>
<script>
alert("Something's Wrong");
window.location = "index.php";
</script>
<?php
    }
}
?>