<?php
include 'config/MainFunction.php';
if (empty($_GET['url']) || !$_GET['url']) {
    header('Location:index.php');
}
$article = $use->getArticleByUrl(urldecode($_GET['url']));
$angels = $use->angels();
$articles = $use->randomArticleSeven();
$angels = $use->mergeArray($angels, $articles);
$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">
    <!--  Font Awesome  -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="css/new-style.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="icon" type="image/png" href="images/arch-logo.png" />
    <title>Lords Message | <?= $article['title'] ?></title>
</head>

<body>

    <header class="w-100 clearfix MainHeader py-2 bg-white" id="TopHeader">
          <div class="header_sec container">
                    <nav class="navbar navbar-expand-lg p-0">
                        <a class="navbar-brand head_logo" href="avascript:void(0)">
                            <img src="images/arch-logo.png" class="img-fluid" alt="No Logo"></a>
                        <button class="navbar-toggler" type="button" id="sidebar" onclick="openNav()">
                    ☰
                    </button>
                        <div class="side_bar pl-xl-5" 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">
                                    <a class="nav-link" href="javascript:void(0);">Home</a>
                                </li>
                                 <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);">Daily Message</a>
                                </li>
                                 <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);">Guardian Angel</a>
                                </li>
                                 <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);">Protection</a>
                                </li>
                                 <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);"> Blessing & Prayers</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);"> Healing</a>
                                </li>
                                <li class="nav-item d-lg-block d-none">
                                    <a class="nav-link" href="javascript:void(0);"> <i class="penci-faicon fa fa-search"></i></a>
                                </li>
                                
                            </ul>
                        </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 Lords 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 Lords 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.png" 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>

   <section class="footer text-center py-5">
            <div class="footer_logo">
                <a href="javascript:void(0);">
                    <img src="images/footer_logo.png" class="img-fluid">
                 </a>
            </div>
            <p class="footer-text mb-0">© Copyright AngelicPrayer 2020 - All Right Reserved.</p>
            <div class="footer-links">
               <ul class="nav header_menu_1 text-md-right text-center">
                               
                                <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);">Home |</a>
                                </li>
                                 <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);"> About us |</a>
                                </li>
                                 <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);"> Contact us |</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);">  Privacy Policy |</a>
                                </li>
                                 <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);"> Disclaimer |</a>
                                </li>
                                 <li class="nav-item">
                                    <a class="nav-link" href="javascript:void(0);">  Terms & Conditions |</a>
                                </li>
                                
                            </ul>
            </div>
            <div class="container">
        <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4801985982356333"
     crossorigin="anonymous"></script>
<ins class="adsbygoogle"
     style="display:block"
     data-ad-format="autorelaxed"
     data-ad-client="ca-pub-4801985982356333"
     data-ad-slot="1746366052"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>


</div>
        </section>

    <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>