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

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Satoshi Club - Events</title>
    <!-- custom stylesheet -->
    <link rel="stylesheet" href="./css/style.css?v=1012211607">
</head>
<?php
ob_start();
include('./dashboard/db_connection.php');
$event_query       = mysqli_query($con, "SELECT * from ev_events");
$event_month_query = mysqli_query($con, "SELECT * from ev_time");

$event_month_fetch = mysqli_fetch_array($event_month_query);

?>

<body class="ath-body-tag" id="screen">
    <div class="sc-main ath-main">
        <div class="sc-wrapper">
            <!-- sc-header -->
            <div class="sc-header ss-header">
                <div class="sc-heading ev-heading">
                    <?php if (!empty($event_month_fetch['month'])) { ?>
                        <h1><span class="accent-color">10 Major events</span> in <?php echo $event_month_fetch['month']; ?></h1>
                    <?php } ?>
                </div>
                <div id="screenshot" onclick="takePageScreenshot()" class="sc-save">
                    <img src="./images/take-screenshot.png" class="sc-save__img">
                </div>
            </div>
            <!-- sc-body -->
            <div class="sc-body ath-body ev-body">
                <?php while ($fetch_events = mysqli_fetch_array($event_query)) { ?>
                    <a href="javascript:void(0)">
                        <div class="ev-card">
                            <div class="sc-card-serial">
                                <span class="sc-card-serial-span ath-card-serial-span">1</span>
                            </div>
                            <div class="ev-card-body">
                                <div class="sc-card-body-top ev-card-body-top">
                                    <?php if (!empty($fetch_events['name'])) { ?>
                                        <h3><?php echo $fetch_events['name']; ?></h3>
                                    <?php }
                                    if (!empty($fetch_events['description'])) { ?>
                                        <p class="opacity-6"><?php echo $fetch_events['description']; ?></p>
                                    <?php } ?>
                                </div>
                                <div class="ev-card-body-bottom">
                                    <div class="sc-coin-label">
                                        <div class="sc-coin-logo">
                                            <?php if (!empty($fetch_events['coin_logo'])) { ?>
                                                <img src="./dashboard/uploads/<?php echo $fetch_events['coin_logo'] ?>" alt="">
                                            <?php } ?>
                                        </div>
                                        <div class="sc-coin-name">
                                            <?php if (!empty($fetch_events['coin_shortname'])) { ?>
                                                <div class="sc-coin-shortname"><span class="accent-color"><?php echo $fetch_events['coin_shortname'] ?></span></div>
                                            <?php }
                                            if (!empty($fetch_events['coin_fullname'])) { ?>
                                                <div class="sc-coin-fullname opacity-6"><?php echo $fetch_events['coin_fullname'] ?></div>
                                            <?php } ?>
                                        </div>
                                    </div>
                                    <div class="sc-card-date">
                                        <?php if (!empty($fetch_events['date'])) { ?>
                                            <img src="./images/calendar-icon.svg" alt="">
                                            <span><?php echo $fetch_events['date'] ?></span>
                                        <?php } ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                <?php } ?>
            </div>
        </div>
        <!-- sc-footer -->
        <footer class="sc-footer ath-footer">
            <div class="sc-wrapper">
                <div class="in-sc-footer in-ath-footer">
                    <div class="sc-sc-logo">
                        <img src="./images/satoshi-club-logo-light.svg" alt="">
                    </div>
                    <div class="sc-social opacity-6">
                        <div class="sc-social-icon ath-social-icon">
                            <img src="./images/telegram-icon-light.svg" alt="">
                            <a href="#">@satoshi_club</a>
                        </div>
                        <div class="sc-social-icon ath-social-icon">
                            <img src="./images/twitter-icon-light.svg" alt="">
                            <a href="#">esatoshiclub</a>
                        </div>
                        <div class="sc-social-icon ath-social-icon">
                            <img src="./images/web-icon-light.svg" alt="">
                            <a href="#">esatoshi.club</a>
                        </div>
                    </div>
                </div>
            </div>
        </footer>
    </div>

    <script src="./js/app.js?v=1012211607"></script>
    <script src="./js/html2canvas.min.js?v=1012211607"></script>
</body>

</html>