<div class="ads">
    <?= $settings['wheel_top_ad'] ?>
</div>
<div class="row justify-content-center">
<div class="col-12 col-md-8 col-lg-6 order-md-2 mb-4 text-center">
    <div class="row text-left">
      <div class="col-lg-6 col-12">
        <div class="card mini-stats-wid">
          <div class="card-body">
            <div class="media">
              <div class="media-body">
                        <p class="lh-1 mb-1 font-weight-bold"><?= $settings['wheel_energy'] ?></p>
                        <p class="mb-0">Energy left</p>
                    </div>
              <div class="align-self-center">
                <img src="/img/energy1.png" draggable="false" width="40px">
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="col-lg-6 col-12">
        <div class="card mini-stats-wid">
          <div class="card-body">
            <div class="media">
              <div class="media-body">
                        <p class="lh-1 mb-1 font-weight-bold"><?= $settings['wheel_limit'] - $user['wheel_cnt'] ?>/<?= $settings['wheel_limit'] ?></p>
                        <p class="mb-0">Claims left</p>
                    </div>

              <div class="align-self-center">
                <img src="/img/claims.png" draggable="false" width="40px">
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
<div class="row">
    <div class="col-12 col-md-8 col-lg-6 order-md-2 mb-4 text-center">
        <?php
        if (isset($_SESSION['message'])) {
            echo $_SESSION['message'];
        }
        ?>
        <div class="ads">
            <?= $settings['wheel_header_ad'] ?>
        </div>
        <?php if ($limit) { ?>
            <div class="alert alert-warning text-center">Daily limit reached, please come back by tomorrow</div>
            <div class="ads">
                <?= $settings['wheel_bottom_ad'] ?>
            </div>
        <?php } else if ($wait) { ?>
            <div class="ads">
                <?= $settings['wheel_bottom_ad'] ?>
            </div>
            <script type="text/javascript">
                var wait = <?= $wait ?> - 1;
            </script>
        <?php } ?>
        <?php if (!$limit && !$wait) { ?>
            <form>
                <?php if ($settings['antibotlinks'] == 'on') {
                    echo $antibot_show_info;
                }
                ?>
                <input type="hidden" name="<?= $csrf_name ?>" id="token" value="<?= $csrf_hash ?>">
                <input type="hidden" name="token" value="<?= $user['token'] ?>">
                <div style="width: 100%; padding: 5px; text-align: center">
                    <span style="display: block"><i class="fas fa-caret-down fa-3x"></i></span>
                    <canvas id='canvas' width='305' height='305'>
                        Canvas not supported, use another browser.
                    </canvas>
                </div>
               <center>
<center>
<center>
<ins class="64ddde7ff13f0a68c443938f" style="display:inline-block;width:1px;height:1px;"></ins><script>!function(e,n,c,t,o,r,d){!function e(n,c,t,o,r,m,d,s,a){s=c.getElementsByTagName(t)[0],(a=c.createElement(t)).async=!0,a.src="https://"+r[m]+"/js/"+o+".js?v="+d,a.onerror=function(){a.remove(),(m+=1)>=r.length||e(n,c,t,o,r,m)},s.parentNode.insertBefore(a,s)}(window,document,"script","64ddde7ff13f0a68c443938f",["cdn.bmcdn6.com"], 0, new Date().getTime())}();</script>

<center>

<center>
                <center>
                    <?= $captcha_display ?>
                </center>
                <div class="row">
                    <div class="col-md-6">
                        <div class="atb">
                            <div class="antibotlinks"></div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="atb">
                            <div class="antibotlinks"></div>
                        </div>
                    </div>
                </div>
                <div class="ads">
                    <?= $settings['wheel_bottom_ad'] ?>
                </div>
                <div class="atb">
                    <div class="antibotlinks"></div>
                </div>
                <?php if ($user['energy'] >= $settings['wheel_energy']) { ?>
                    <button type="button" class="btn btn-primary btn-lg" id="spin-button">Spin<?php if ($settings['wheel_energy'] > 0) echo '(-' . $settings['wheel_energy'] . ' energy)'; ?></button>
                <?php } else { ?>
                    <button type="button" class="btn btn-primary btn-lg" id="spin-button">You don't have enough energy</button>
                <?php } ?>
                <div class="atb">
                    <?php
                    if ($anti_pos[0] == 5) {
                        echo '<div class="antibotlinks"></div>';
                    }
                    if ($anti_pos[1] == 5) {
                        echo '<div class="antibotlinks"></div>';
                    }
                    if ($anti_pos[2] == 5) {
                        echo '<div class="antibotlinks"></div>';
                    }
                    ?>
                </div>
            </form>
        <?php } ?>
        <script>
            var prizes = [
                <?php
                for ($i = 0; $i < count($prizes); ++$i) {
                    echo "{'fillStyle' : '" . $prizes[$i]['color'] . "', 'text' : '" . $prizes[$i]['text'] . "'}";
                    if ($i < count($prizes) - 1) {
                        echo ",";
                    }
                }
                ?>
            ]
        </script>
    </div>
<div class="col-6 col-md-2 col-lg-3 order-md-1 p-0 left-ads text-center"><?= $settings['wheel_left_ad'] ?></div>
<div class="col-6 col-md-2 col-lg-3 order-md-3 p-0 right-ads text-center"><?= $settings['wheel_right_ad'] ?></div>
</div></div></div>
<div class="ads">
    <?= $settings['wheel_footer_ad'] ?>
</div>