<?php
include 'config/MainFunction.php';
if (empty($_GET['url']) || !$_GET['url']) {
    header('Location:index.php');
}
$article = $use->getArticleByUrl(urldecode($_GET['url']));
$base_url = $use->base_url();
$angels = $use->angels();
$articles = $use->randomArticleSeven();
$angels = $use->mergeArray($angels, $articles);
// echo "<pre>"; print_r($angels);die;
$horoscope_sign_menus = $use->horoscope_sign_menus();
$randomArticle = $use->randomArticleOne();
$use->updateView($article['id'], $article['views'] + 1)

?>
<!doctype html>
<html lang="en">

<head>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4801985982356333"
     crossorigin="anonymous"></script>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
    <link rel="stylesheet" href="css/new-style.css">
    <link rel="stylesheet" href="css/bootstrap.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/message.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="icon" type="image/png" href="images/arch-logo.png" />
   <title>Zodiac Message</title>
</head>

<body>

     <header class="w-100 clearfix MainHeader" id="TopHeader">
      <div class="header_sec container-fluid">
        <nav class="navbar navbar-expand-lg px-0">
          <a class="navbar-brand head_logo" href="<?php echo $base_url;?>">
          <img src="images/logo.png" class="img-fluid" alt="No Logo"></a>
          <button class="navbar-toggler" type="button" id="sidebar" onclick="openNav()">
          ☰
          </button>
          <div class="side_bar" id="collapsibleNavbar">
            <ul class="navbar-nav header_menu">
              <a href="javascript:void(0)" class="closebtn d-lg-none d-block text-decoration-none text-dark" onclick="closeNav()">×</a>

             <li class="nav-item dropdown">
                <a class="nav-link" href="javascript:void(0);" data-toggle="dropdown">Horoscopes <span><i class="fa fa-caret-down" aria-hidden="true"></i></span></a>

             <ul class="header_menu_drop py-2 dropdown-menu">
              <?php foreach($horoscope_sign_menus as $horoscope_sign){ ?>
                  <li class="nav-item">
                    <a class="nav-link" href="<?php echo $base_url;?>horoscope/<?php echo $horoscope_sign['slug'];?>/horoscope-today"><img src="<?php echo $base_url;?>assets/uploads/horoscope/<?php echo $horoscope_sign['file'];?>"><?php echo $horoscope_sign['title'];?></a>
                  </li>
                <?php  } ?>
                                    
              </ul>
              </li>
              <li class="nav-item dropdown">
                <a class="nav-link" href="javascript:void(0);" data-toggle="dropdown">Tarot <span><i class="fa fa-caret-down" aria-hidden="true"></i></span></a>
                <ul class="header_menu_drop py-2 dropdown-menu">
                  <li class="nav-item">
                  <a class="nav-link" href="<?php echo $base_url;?>tarot/daily-tarot">Daily Tarot</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" href="<?php echo $base_url;?>tarot/yes-or-no-tarot">Yes/No Tarot</a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" href="<?php echo $base_url;?>tarot/cards"> Tarot Meaning</a>
                  </li>
                </ul>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="<?php echo $base_url;?>fortune-cookie">Fortune Cookie</a>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="<?php echo $base_url;?>coffee-cup-reading">Coffee Cup Reading</a>
              </li>
              <li class="nav-item">
             <a class="nav-link" href="<?php echo $base_url;?>blog">Blog</a>
              </li>
              <li class="nav-item">
                <a class="nav-link" href="<?php echo $base_url;?>contact-us">Contact Us</a>
              </li>
              <!-- <li class="nav-item d-lg-block d-none">
                <a class="nav-link btn reveal_btn" href="https://quiz.astrologyvalley.com/optinu4lry51d
">Free Natal Reading</a>
              </li> -->
            </ul>
          </div>
          <div class="mt-lg-2 freebtn">
                <a class="nav-link btn reveal_btn" href="https://quiz.astrologyvalley.com/optinu4lry51d
">Free Natal Reading</a>
          </div>
        </nav>
      </div>
    </header>

    <div class="article">
        <div class="left-ads">

            <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
            <!-- AP - Horizontal -->
            <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4801985982356333" data-ad-slot="5263271406" data-ad-format="auto" data-full-width-responsive="true"></ins>
            <script>
                (adsbygoogle = window.adsbygoogle || []).push({});
            </script>


        </div>
        <div class="right-ads">

            <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
            <!-- AP - Horizontal -->
            <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4801985982356333" data-ad-slot="5263271406" data-ad-format="auto" data-full-width-responsive="true"></ins>
            <script>
                (adsbygoogle = window.adsbygoogle || []).push({});
            </script>


        </div>
        <div class="container">
            <h2 class="headline margin-block">Your Tarot Message For Today</h2>
            <div class="angel-card">
                <img src="images/thumb/<?= $article['image'] ?>" alt="<?= $article['title'] ?>" class="card">
                <!--            <p class="card-source">--><? //= $article['i'] 
                                                            ?>
                <!--</p>-->
            </div>
            <div class="angel-message">
                <h3 class="message-h3 margin-block"><i class="fas fa-quote-left"></i> <?= $article['title'] ?> <i class="fas fa-quote-right"></i></h3>
            </div>

            <div class="ads" style="text-align: center; margin: 0 auto; margin-top: 5px; margin-bottom: 5px">
                <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                <!-- AP - Horizontal -->
                <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4801985982356333" data-ad-slot="5263271406" data-ad-format="auto" data-full-width-responsive="true"></ins>
                <script>
                    (adsbygoogle = window.adsbygoogle || []).push({});
                </script>
            </div>

            <div class="row">
                <div class="col-md-8 main-article">
                    <div class="details">
                        <div>
                        <?= $article['content'] ?>
                    </div>
                        <div class="ads" style="text-align: center; margin: 0 auto; margin-top: 10px">
                            <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4801985982356333" data-ad-slot="3800724926" data-ad-format="auto" data-full-width-responsive="true"></ins>
                        </div>
                        <a class="back" href="./">
                            <p>◀ Select another Tarot</p>
                        </a>
                        <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-4801985982356333" data-ad-slot="7697863055"></ins>

                    </div>
                </div>
                <div class="col-md-4 ">
                    <div class="side">
                        <div class="col-side">
                            <h4>Recommended Reading</h4>
                            <div class="image-thumb">
                                <img src="images/thumb/<?= $randomArticle['image'] ?>" alt="<?= $randomArticle['title'] ?>" style="height: 180px; width: 100%; object-fit: cover">
                            </div>
                            <a href="article.php?url=<?= $randomArticle['url'] ?>" class="side-title"><?= $randomArticle['title'] ?></a>
                        </div>
                        <div class="col-side angel-col-side">
                            <h4>Want To Hear From Another Arcana?</h4>
                            <div class="row d-flex justify-content-center">
                                <?php foreach ($angels as $angel) : ?>
                                    <div class="col-md-4 justify-content-center d-flex">
                                        <a href="article.php?url=<?= $angel['url'] ?>">
                                            <img src="images/card/<?= ($angel['angel']) ?>.jpg" alt="<?= $angel['angel'] ?>" class="angel-side">
                                        </a>
                                    </div>
                                <?php endforeach; ?>
                            </div>
                        </div>
                        <div class="col-side">
                            <div class="ads" style="text-align: center; margin: 0 auto; margin-top: 5px; margin-bottom: 5px">
                                <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                                <!-- AP - Horizontal -->
                                <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4801985982356333" data-ad-slot="5263271406" data-ad-format="auto" data-full-width-responsive="true"></ins>
                                <script>
                                    (adsbygoogle = window.adsbygoogle || []).push({});
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="ads" style="text-align: center; margin: 0 auto; margin-top: 5px; margin-bottom: 5px">
                <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                <!-- AP - Horizontal -->
                <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4801985982356333" data-ad-slot="5263271406" data-ad-format="auto" data-full-width-responsive="true"></ins>
                <script>
                    (adsbygoogle = window.adsbygoogle || []).push({});
                </script>
            </div>
        </div>
    </div>

     <footer class="AstroFooter w-100 clearfix" id="AstrologyFooter">
        <div class="container">
          <div class="AstroFooter text-center w-100 py-5">
            <div class="FooterLogo">
              <a href="<?php echo $base_url;?>" class="d-inline-block">
                <img src="images/logo.png" class="img-fluid">
              </a>
            </div>
            <div class="FooterLinks pt-4 mt-2">
              <ul class="list-unstyled FooterLists">
                <li>
                  <a href="<?php echo $base_url;?>horoscope/daily">Horoscope Daily</a>
                </li>
                <li>
                  <a href="<?php echo $base_url;?>horoscope/weekly">Horoscope Weekly</a>
                </li>
                <li>
                  <a href="<?php echo $base_url;?>horoscope/monthly">Horoscope Monthly</a>
                </li>
                <li>
                  <a href="<?php echo $base_url;?>tarot/daily-tarot">DAILY TAROT</a>
                </li>
                <li>
                  <a href="<?php echo $base_url;?>tarot/yes-or-no-tarot">YES/NO TAROT</a>
                </li>
                <li>
                <a href="<?php echo $base_url;?>fortune-cookie">Fortune Cookie</a>
              </li>
              <li>
                <a href="<?php echo $base_url;?>coffee-cup-reading">Coffee Cup Reading</a>
              </li>
              <li>
                 <a class="nav-link" href="<?php echo $base_url;?>blog">Blog</a>
              </li>
              <li>
                <a class="nav-link" href="<?php echo $base_url;?>contact-us">Contact Us</a>
              </li>
              <li>
                <a class="nav-link" href="<?php echo $base_url;?>about-us">About Us</a>
              </li>
              <li>
                <a class="nav-link" href="<?php echo $base_url;?>privacy-policy">Privacy Policy</a>
              </li>
               <li>
                <a class="nav-link" href="<?php echo $base_url;?>terms-condition">Terms Condition</a>
              </li>
              <li>
                <a class="nav-link" href="<?php echo $base_url;?>tarot/cards">Tarot</a>
              </li>
                <li>
                  <a href="<?php echo $base_url;?>archangel-message-1/">Archangel Message</a>
                </li>
                <li>
                  <a href="<?php echo $base_url;?>zodiac-message/">Zodiac Message</a>
                </li>
              </ul>
            </div>
            <div class="FooterSocials d-none">
              <ul class="list-unstyled FooterSocLists">
                <li>
                  <a href="javascript:void(0);" class="fb">
                    <i class="fa fa-facebook" aria-hidden="true"></i>
                  </a>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="modal fade" id="modal-default">
          <div class="modal-dialog">
            <div class="modal-content">
              
            </div>
          </div>
        </div>
      </footer>

 <script src="js/jquery.min.js"></script>
      <script src="js/popper.min.js"></script>
      <script src="js/bootstrap.min.js"></script>
       <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/flexslider/2.2.0/jquery.flexslider-min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script>
 <script>
         function openNav() {
               document.getElementById("collapsibleNavbar").style.transform = "translate(0%, 0%)";
               }

               function closeNav() {
               document.getElementById("collapsibleNavbar").style.transform = "translate(-130%, 0%)";
               }
         
         
         
    </script>

</body>

</html>