OwlCyberSecurity - MANAGER
Edit File: random-game.php
<?php include("includes/config.php"); include("includes/conexao.php"); $query = $db->prepare("SELECT * FROM game WHERE publicado=true AND data_publicar <= NOW() ORDER BY RAND() LIMIT 1"); $query->execute(); $result = $query->fetch(PDO::FETCH_ASSOC); $idg = $result['idg']; $ponto_do_game = $result['votos'] > 0 ? $result['ponto'] / $result['votos'] : 0; $ponto_do_game = number_format($ponto_do_game, 2); # contar visualização para contar apenas uma vez que acessa if (!isset($_SESSION["game-{$idg}"])) { $queryContar = $db->prepare("UPDATE game SET visitas=visitas+1 WHERE idg=:idg"); $queryContar->execute(array('idg' => $idg)); $_SESSION["game-{$idg}"] = true; } $pageTitle = _t("Random Game") ." ". _tDb($result, 'game') ." - ". _t("Kawaii Games"); $linksBradCrup = [ "/random-game" => _t("Random Game"), "/game//{$idg}" => _tDb($result, "game"), ]; ?> <!doctype html> <html> <head itemscope itemtype="https://schema.org/WebSite"> <meta charset="utf-8"> <title><?php echo $pageTitle ?></title> <meta name="description" content="<?= substr(_tDb($result, 'descricao'), 0, 152) ?>"> <meta name="author" content="Heglaé Malheiros Maia"> <!--Ajudar a compartilhar no facebook--> <!--Tags para facebook--> <meta property="og:locale" content="en_us"> <meta property="og:url" content="<?= URL_BASE ?>random-game"> <meta property="og:title" content="<?php echo $pageTitle ?>"> <meta itemprop='name' property="og:site_name" content="<?php echo _t("Kawaii Games") ?>"> <meta property="og:description" content= "<?= substr(_tDb($result, 'descricao'), 0, 152) ?>"> <meta property="og:image" content="//www.kawaiigames.net/kawaii_games_logo.fw.png"> <?php if($idg == 634){ // game: japao-nosso-de-cada-dia-pritt-and-lohgann-dress-up?> <script>wgAutoInit = false;</script> <?php }?> <!-- WGLoader implementation / add the following two lines of code --> <script type="text/javascript" src="//st.wgplayer.com/kawaiigames.net/wgAds.desktop.conf.js"></script> <script type="text/javascript" src="//st.wgplayer.com/kawaiigames.net/js/CNekQpJN5i0KOw3gBbIVMQ/2360998025/wgAds.js"></script> <!-- WGLoader implementation --> <?php include ("includes/head.php"); ?> </head> <body class="<?php #=$isMobile ? "mobile" : "" ?>"> <!--LOGO E PROPAGANDA CABEÇALHO................................................................................................................................--> <?php include ("includes/topo.php"); ?> <!--REDES SOCIAIS................................................................................................................................--> <div class="container"> <div class="row"> <?php include ("includes/menu-esquerdo.php"); ?> <!--BOX CENTRAL................................................................................................................................--> <div class="col-md-10" itemscope itemtype="https://schema.org/Game"> <?php echo breadcrumb_links($linksBradCrup); ?> <div class="box-central"> <div class="boxVotacao pull-right"> <input type="range" value="<?= $ponto_do_game ?>" step="0.5" id="backing5"> <div class="rateit" id="game-rateit" data-productid="<?= $idg ?>" data-rateit-backingfld="#backing5" data-rateit-resetable="false" data-rateit-ispreset="true" data-rateit-min="0" data-rateit-max="5" data-rateit-starwidth="20" data-rateit-starheight="20" <?php if (isset($_SESSION["game-votado-{$idg}"])) { ?> data-rateit-readonly="true" <?php } ?> > </div> <div class="pull-right" id="game_resultado_pontuacao"></div> <script>GameResultadoVotacao(<?= $idg ?>);</script> </div> <h1 class="barra-rosa titulo"> <?= _t("Random Game") ." ". _tDb($result, 'game') ?> <?php if (!empty($result['tipo_descricao'])) { echo '<span class="tipo_descricao">' . $result['tipo_descricao'] . '</span>'; } ?> </h1> <div class="text-center area-jogo"> <?php if ($result['tipo'] == "html5" || $result['tipo'] == "embed") { $url = $result['tipo'] == "html5" ? URL_BASE_GAMES . "jogos/" . $result['swf'] ."/" : $result['swf']; ?> <div class="game-canvas"> <embed width="100%" height="100%" frameborder='0' marginwidth='0' marginheight='0' scrolling='no' src="<?= $url ?>" style="border: 0px; display: inline-block; margin: 0; padding: 0" /> </div> <?php } else { ?> <div class="game-canvas"> <?php if($isMobile){ ?> <div class="text-center"> <br /> <br /> <br /> <br /> <br /> <h3 class="fonte-rosa">This game does not work on mobile devices.</h3> <h4 class="fonte-rosa">Play on the computer <br /> or go to the <a href="/mobile-games">mobile games</a> session</h4> </div> <?php } else{ ?> <embed width="800" height="600" src="<?= URL_BASE_GAMES ?>jogos/<?= $result['swf'] ?>"> <?php } ?> </div> <?php } ?> </div> </div> <br /> <!-- advgame.ru STAR STABLE <div class="text-center .d-none .d-sm-block"> <iframe class="embed-responsive-item" width="728" height="90" src="https://cdn.advg.agency/static/offer/43/banners/23216/index.html?data=eyJ1cmwiOiJodHRwczovL3IuYWR2Zy5hZ2VuY3kvdC9qYjlzeS8iLCJzdWJpZHMiOnt9fQ%3D%3D&bid=23216" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" sandbox="allow-same-origin allow-popups allow-scripts allow-forms"></iframe> </div> --> <br /> <!--GOOGLE ADSENSE - In-Between Game --> <amp-ad width="100vw" height="320" type="adsense" data-ad-client="ca-pub-6135483131884855" data-ad-slot="2142958168" data-auto-format="rspv" data-full-width=""> <div overflow=""></div> </amp-ad> <div class="box-central"> <h2 class="barra-rosa titulo"> <strong class=" pull-right"> <?= _tDb($result, 'visitas') ?> <?php echo _t("Views")?> </strong> <?php echo _t("Description") ?> </h2> <div class="row"> <div class="col-md-12 textao text-justify"> <p><?php echo str_replace("<a", '<a rel="nofollow"', _tDb($result, 'descricao')) ?></p> <?php include 'includes/game-tags.php'; ?> </div> <!--TEXTAO--> </div> <div class="row"> <div class="col-md-3 textao"> <p><strong><?php echo _t("Share this game") ?>:</strong></p> <!-- AddToAny BEGIN --> <div class="a2a_kit a2a_kit_size_32 a2a_default_style"> <a class="a2a_dd" href="https://www.addtoany.com/share"></a> <a class="a2a_button_facebook"></a> <a class="a2a_button_twitter"></a> <a class="a2a_button_google_plus"></a> </div> <script> var a2a_config = a2a_config || {}; a2a_config.linkname = "Kawaii Games"; </script> <script async src="https://static.addtoany.com/menu/page.js"></script> <!-- AddToAny END --> </div><!--SHARE THIS GAME--> <?php if ($result['tipo'] == 'embed') { ?> <div class="col-md-7 textao"> <p><strong><?php echo _t("URL Share") ?>:</strong></p> <input type="text" class="form-control" value="<?= $result['swf'] ?>"> </div> <!--EMBED CODE--> <?php } else if ($result['tipo'] == 'html5') { ?> <div class="col-md-7 textao"> <p><strong><?php echo _t("URL Share") ?>:</strong></p> <input type="text" class="form-control" value="<?= URL_BASE_GAMES ?>jogos/<?= $result['swf'] ?>"> </div> <!--EMBED CODE--> <?php } else { ?> <div class="col-md-7 textao"> <p><strong><?php echo _t("Embed code") ?>:</strong></p> <input type="text" class="form-control" value="<embed width='800' height='600' src='<?= URL_BASE_GAMES ?>jogos/<?= $result['swf'] ?>'>"> </div> <!--EMBED CODE--> <div class="col-md-2 textao text-right"> <p><strong><?php echo _t("Download") ?></strong></p> <a href="<?= URL_BASE_GAMES ?>jogos/<?= $result['swf'] ?>" target="_blank"> <i class="fa fa-download fa-5x" aria-hidden="true"></i> </a> </div><!--DOWNLOAD--> <?php } ?> </div><!--SHARE THIS GAME, EMBED CODE, DOWNLOAD--> </div><!--DESCRIPTION,SHARE THIS GAME, EMBED CODE, DOWNLOAD--> <br> <div class="box-central"> <h2 class="barra-rosa titulo"><?php echo _t("Recommended Games") ?></h2> <br> <div class="row"> <div class="jogos-recomendados col-md-7 text-center"> <?php $queryRec = $db->prepare("SELECT * FROM game WHERE publicado=true AND data_publicar <= NOW() AND categoria=:categoria ORDER BY RAND() LIMIT 6"); $queryRec->execute(array('categoria' => $result['categoria'])); $resultRec = $queryRec->fetchAll(PDO::FETCH_ASSOC); foreach ($resultRec as $itemRec) { $item = $itemRec; include("includes/game-item.php"); } ?> </div> <aside class="col-md-5 text-center"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- jogos-recomendados-banner --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6135483131884855" data-ad-slot="5339194864" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </aside> </div> <br> </div> <!--Jogos Recomendados--> <br> <div class="box-central"> <h2 class="barra-rosa titulo"><?php echo _t("Comments") ?></h2> <div class="textao"> <!-- FACEBOOK COMMENTS <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.6"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-comments" data-numposts="5"></div> --> <div id="disqus_thread"></div> <script> (function () { var d = document, s = d.createElement('script'); s.src = '//kawaiigames.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); </script> <noscript>Please enable JavaScript to view the <a rel="nofollow" href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> </div> <script id="dsq-count-scr" src="//kawaiigames.disqus.com/count.js" async></script> </div><!--FACEBOOK COMMENTS--> </div> <!--BOX CENTRAL--> </div><!---ROW - REDES SOCIAIS--> </div><!---CONTAINER - REDES SOCIAIS--> <!--RODAPÉ................................................................................................................................--> <?php include ("includes/rodape.php"); ?> <!-- SNIGEL STICKY LEADERBOARD <h3>sticky_leaderboard<br><small>desktop: [728,90]</small></h3>--> <?php include ("includes/snigel-stickerboard.php"); ?> <script> $(function(){ $('.mobile .area-jogo').css("min-height",'auto'); $('.mobile #logo, .mobile aside, .mobile #box-comments, .mobile #box-description, .mobile #box-recommend, .mobile .barra-rosa').remove(); }) </script> <!-- INFOLINK ADS--> <?php include ("includes/infolinks-ads.php"); ?> </body> </html>