<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Doctor Appointment</title>
    <link rel="stylesheet" href="../CSS/hospital.css">
    <link
        href="https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Catamaran:wght@200&family=Courgette&family=Dancing+Script:wght@700&family=Edu+TAS+Beginner:wght@700&family=Lato:wght@300;900&family=Mukta:wght@700&family=Mulish:wght@300&family=Open+Sans&family=PT+Sans:ital,wght@1,700&family=Poppins:wght@300&family=Raleway:wght@100&family=Roboto&family=Roboto+Condensed:wght@700&family=Roboto+Slab&display=swap"
        rel="stylesheet">
    <script src="https://kit.fontawesome.com/f30fac2c61.js" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="../css/animations.css">
    <link rel="stylesheet" href="../css/main.css">

    <?php

    //learn from w3schools.com
    
    session_start();

    if (isset ($_SESSION["user"])) {
        if (($_SESSION["user"]) == "" or $_SESSION['usertype'] != 'p') {
            header("location: ../login.php");
        } else {
            $useremail = $_SESSION["user"];
        }

    } else {
        header("location: ../login.php");
    }


    //import database
    include ("../connection.php");
    $userrow = $database->query("select * from patient where pemail='$useremail'");
    $userfetch = $userrow->fetch_assoc();
    $userid = $userfetch["pid"];
    $username = $userfetch["pname"];

    ?>
    <style>
        .popup {
            animation: transitionIn-Y-bottom 0.5s;
        }

        .main {
            animation: transitionIn-Y-bottom 0.75s;
        }
        
    .button-styles {
        text-decoration: none;
        font-weight: normal;
        color:White; /* Change color as desired */
    }

    </style>


</head>

<body>

    <div class="container">
        <nav>
            <div class="logo">
                <h1>Doc Appointment</h1>
            </div>
            <i id="bar" class="fa-solid fa-bars"></i>
            <ul>
                <li><a href="../patient/index.php"><b><u>Home</u></b></a></li>
                <li><a href="../patient/appointment.php">Appointments</a></li>
                <li><a href="../patient/doctor.php">Doctors</a></li>
                <li><a href="../patient/session.php">Sessions</a></li>
                <li><a href="..\patient\profile.php">Profile</a></li>
                <li>
                    <p class="profile-title" style="text-align:center;text-transform:uppercase;"><b>
                            <?php echo substr($username, 0, 13) ?>
                    </p></b>
                    <!-- <b>  <p class="profile-subtitle"><b><?php echo substr($useremail, 0, 22) ?></p></b> -->
                </li>



                <li>


                    <a href="../logout.php">
                        <button class="btn">Log out</button>
                    </a>
                </li>
                <li>
                    <p style="font-size: 14px;color:black;padding: 0;margin: 0;text-align: right;">
                        Today's Date
                    </p>
                    <p class="heading-sub12" style="padding: 0;margin: 0; font-weight:bold">
                        <?php
                        date_default_timezone_set('Asia/Kolkata');

                        $date = date('Y-m-d');
                        echo $date;
                        ?>
                    </p>
                </li>



            </ul>
        </nav>

        <div class="main" class="display: flex; ">
            <div class="mainText">
                <h1>The Website that <br>
                    Care for you</h1>
                <h3>Best Doctor's</h3>


                <button><a href="../patient/session.php" class="button-styles">BOOK NOW</a></button>

            </div>
            <img src="../img/mains.png" alt="">
        </div>




    </div>





    <div class="footer">
        <div class="text">
            <h3>About Us</h3>
            <p>24 Hours</p>
            <p>Top Doctor</p>
            <p>Best Care</p>
            <p>Patient</p>
            <p></p>

        </div>
        <div class="text">
            <h3>Speciality</h3>
            <p>Knee surgery</p>
            <p>Spin surgery</p>
            <p>Leg surgery</p>
            <p>Tendon surgery</p>
            <p></p>

        </div>
        <div class="text">
            <h3>Best Teams</h3>
            <p>Doctors</p>
            <p>Nursing</p>
            <p>Staff</p>
            <p>Hospital</p>
            <p></p>

        </div>
        <div class="text">
            <h3>Address</h3>
            <p>Near MG Road</p>
            <p>Galaxy Care</p>
            <p>333-09093</p>
            <p>09-883-090</p>


        </div>
    </div>

    <div class="detail">
        <button id="closeBtn">
            <i class="fa-solid fa-xmark"></i>
        </button>
        <div class="content">

        </div>
    </div>
    </div>
    <script src="../script/index.js"></script>
</body>

</html>