Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 20.08 KB | None | 0 0
  1. <?php
  2. require_once ('heliocms/core.php');
  3. $page = 'index';
  4. $page_group = '1';
  5. $page_name = 'Faça amigos, divirta-se e seja famoso!';
  6. if ($_GET['unlock'] == "$w") {
  7. $message = '<div id="toast_container_s" class="toast-top-center" aria-live="polite" role="alert"><div class="toast toast-success" style="display: table;"><div class="toast-message">Conta desbloqueada!</div></div></div>';
  8. }
  9. $emailorusername_class = 'form__input login-form__input ng-pristine ng-untouched ng-invalid ng-invalid-required ng-valid-email';
  10. $password_class = 'form__input login-form__input ng-pristine ng-untouched ng-invalid ng-invalid-required';
  11. if (isset($_POST['login'])) {
  12. $emailorusername = $_POST['emailorusername'];
  13. $password = $_POST['password'];
  14. $user_verify = mysql_query("SELECT * FROM users WHERE mail='$emailorusername' or username='$emailorusername' && password='".MD5($password)."' LIMIT 1");
  15. $user_fetch = mysql_fetch_assoc($user_verify);
  16. if (mysql_num_rows($user_verify) == 0) {
  17. $error = '1';
  18. $emailorusername_class = 'form__input login-form__input ng-valid ng-dirty ng-valid-parse ng-touched ng-invalid';
  19. $password_class = 'form__input login-form__input ng-valid ng-dirty ng-valid-parse ng-touched ng-invalid';
  20. }else{
  21. $ban_check = mysql_query("SELECT * FROM bans WHERE value='$user_fetch[username]'");
  22. if(mysql_num_rows($ban_check) == 1){
  23. $ban = mysql_fetch_assoc($ban_check);
  24. $message = '<div id="toast-container" class="toast-top-center toast-sticky" aria-live="polite" role="alert"><div class="toast toast-error" style="display: block;"><div class="toast-progress"></div><div class="toast-title">Você foi banido.</div><div class="toast-message">Você foi banido permanentemente por: <b>'.$ban['reason'].'</b>.<button id="toast-close" class="toast-button">OK</button></div></div></div>';
  25. }else{
  26. $user_safety_a = mysql_query("SELECT * FROM heliocms_safetyquestions WHERE email='$user_fetch[mail]'");
  27. $user_safety_q = mysql_fetch_assoc($user_safety_a);
  28. $_SESSION['id'] = $user_fetch['id'];
  29. if ($user_safety_q['trusted_ip'] <> $ip) {
  30. mysql_query("UPDATE heliocms_safetyquestions SET active='1' WHERE email='$user_fetch[mail]'");
  31. }
  32. mysql_query("UPDATE users SET ip_last='$ip', last_online='".time()."' WHERE mail='$user_fetch[mail]'");
  33. mysql_query("INSERT INTO heliocms_sessions (last,user_id) VALUES ('".time()."','$user_fetch[id]')");
  34. header ("Location: $site");
  35. }}}
  36. if (isset($_POST['forgotten_submit'])) {
  37. $email_forgotten = $_POST['emailAddress'];
  38. if (empty($email_forgotten)) {
  39. $message = '<div id="toast_container_s" class="toast-top-center" aria-live="polite" role="alert"><div class="toast toast-error" style="display: table;"><div class="toast-message">Você deixou o campo "email" vazio.</div></div></div>';
  40. }else{
  41. if (!preg_match("/^[A-Z0-9._-]{2,}+@[A-Z0-9._-]{2,}\.[A-Z0-9._-]{2,}$/i", $email_forgotten)) {
  42. $message = '<div id="toast_container_s" class="toast-top-center" aria-live="polite" role="alert"><div class="toast toast-error" style="display: table;"><div class="toast-message">Você inseriu um email inválido!</div></div></div>';
  43. }else{
  44. mysql_query("INSERT INTO heliocms_forgotten (email) VALUES ('$email_forgotten')");
  45. $message = '<div id="toast_container_s" class="toast-top-center" aria-live="polite" role="alert"><div class="toast toast-success" style="display: table;"><div class="toast-message">Em breve enviaremos um e-mail de recuperação de senha para o email <b>'.$email_forgotten.'</b>.</div></div></div>';
  46. }}}
  47. if (isset($_GET['badge_id'])) {
  48. $badge_a = mysql_query("SELECT * FROM heliocms_badgestore WHERE code='$_GET[badge_id]'");
  49. $badge_q = mysql_fetch_assoc($badge_a);
  50. if (isset($_SESSION['id'])) {
  51. if ($user_q['credits'] - $badge_q['credit_price'] <= '0') {
  52. $message = '<div id="toast_container_s" class="toast-top-center" aria-live="polite" role="alert"><div class="toast toast-error" style="display: table;"><div class="toast-message">Você não tem moedas suficientes para este emblema.</div></div></div>';
  53. }else{
  54. if ($user_q['gotw_points'] - $badge_q['gotw_price'] <= '0') {
  55. $message = '<div id="toast_container_s" class="toast-top-center" aria-live="polite" role="alert"><div class="toast toast-error" style="display: table;"><div class="toast-message">Você não tem diamantes suficientes para este emblema.</div></div></div>';
  56. }else{
  57. if ($_GET['badge_id'] <> $badge_q['code']) {
  58. }else{
  59. $badge_already_a = mysql_query("SELECT * FROM user_badges WHERE badge_id='$_GET[badge_id]' AND user_id='$user_q[id]'");
  60. if (mysql_num_rows($badge_already_a) == '0') {
  61. $message = '<div id="toast_container_s" class="toast-top-center" aria-live="polite" role="alert"><div class="toast toast-success" style="display: table;"><div class="toast-message">Emblema comprado com sucesso!</div></div></div>';
  62. mysql_query("INSERT INTO user_badges (user_id,badge_id) VALUES ('$user_q[id]','$_GET[badge_id]')");
  63. mysql_query("UPDATE users SET credits = credits - $badge_q[credit_price], gotw_points = gotw_points - $badge_q[gotw_price] WHERE id='$user_q[id]'");
  64. }}}}}}
  65. require_once ('includes/header.php');
  66. ?>
  67. <section class="wrapper wrapper--content" ui-view="">
  68.     <!-- requireSession:  -->
  69.     <section require-session="" class="">
  70.         <div>
  71.             <!-- ngIf: moderations.length > 0 -->
  72.         </div>
  73.     </section>
  74.     <!-- end ngIf: function (){return e.hasSession()} -->
  75.     <!-- requireSession:  -->
  76.     <section require-session="" class="">
  77.         <div>
  78.             <!-- ngIf: items.length > 0 -->
  79.         </div>
  80.     </section>
  81.     <!-- end ngIf: function (){return e.hasSession()} -->
  82.     <section>
  83.         <h1 translate="NEWS_TITLE">Últimas Notícias</h1>
  84.         <div class="row">
  85.             <div class="main main--fixed">
  86.                 <section>
  87.                 <?php $news_a = mysql_query("SELECT * FROM heliocms_news ORDER BY ID DESC"); ?>
  88.                 <?php $i = 0; while($news_q = mysql_fetch_assoc($news_a)){ $i++;
  89.                 $news_category_a = mysql_query("SELECT * FROM heliocms_news_categories WHERE id='$news_q[category]'");
  90.                 $news_category = mysql_fetch_assoc($news_category_a);
  91.                 ?>
  92.                                        <article class="news-header news-header--column">
  93.                         <a <?php if ($news_q['kind'] == '2') { ?><?php if (!isset($_SESSION['id'])) { ?> data-toggle="modal" data-target="#login"<?php }else{ ?>href="/hotel"<?php }}else{ ?> href="/community/article/<?php echo $news_q['id']; ?>"<?php } ?> class="news-header__link news-header__banner">
  94.                             <figure class="news-header__viewport">
  95.                                 <img src="<?php echo $news_q['image_url']; ?>" alt="<?php echo $news_q['title']; ?>" class="news-header__image news-header__image--featured">
  96.                                 <img src="<?php echo $news_q['image_url_thumb']; ?>" alt="<?php echo $news_q['title']; ?>" class="news-header__image news-header__image--thumbnail">
  97.                             </figure>
  98.                         </a>
  99.                         <a <?php if ($news_q['kind'] == '2') { ?><?php if (!isset($_SESSION['id'])) { ?> data-toggle="modal" data-target="#login"<?php }else{ ?>href="/hotel"<?php }}else{ ?> href="/community/article/<?php echo $news_q['id']; ?>"<?php } ?> class="news-header__link news-header__wrapper">
  100.                             <h2 class="news-header__title"><?php echo $news_q['title']; ?></h2>
  101.                         </a>
  102.                         <aside class="news-header__wrapper news-header__info">
  103.                             <time class="news-header__date"><?php echo date('d', $news_q['time']); ?> de <?php echo utf8_encode(strftime('%b', $news_q['time'])) ?> de <?php echo date('Y', $news_q['time']); ?></time>
  104.                             <ul class="news-header__categories">
  105.                                 <li class="news-header__category">
  106.                                     <a href="/community/category/<?php echo $news_category['code']; ?>" class="news-header__category__link" translate="NEWS_CATEGORY"><?php echo $news_category['name']; ?></a>
  107.                                 </li>
  108.                             </ul>
  109.                         </aside>
  110.                         <p class="news-header__wrapper news-header__summary"><?php echo $news_q['stext']; ?></p>
  111.                     </article>
  112.                 <?php } ?>
  113.                 </section>
  114.                 <div class="news__navigation"><a href="/community/category/all" class="news__more" translate="NEWS_MORE">Mais notícias</a></div>
  115.             </div>
  116.             <?php if ($hotel_q['ads'] == '1') { ?>
  117. <div ng-if="hasAd" unit="inlineRectangle" class="aside aside--fixed">
  118.     <div id="div-gpt-ad-2-wrapper" class="ad-double-click" unit="inlineRectangle">
  119.         <div id="div-gpt-ad-2" ng-dfp-ad="div-gpt-ad-2" ng-class="'ad-double-click__ad--' + class" translation="Third-party advertisement" class="ad-double-click__ad ad-double-click__ad--inline-rectangle">
  120.             <div id="google_ads_iframe_/108596585/Habbo_WEB_IAB_1__container__" style="border: 0pt none;">
  121.             <iframe id="google_ads_iframe_/108596585/Habbo_WEB_IAB_1" name="google_ads_iframe_/108596585/Habbo_WEB_IAB_1" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="<?php echo $hotel_q['threetwo']; ?>" style="border: 0px; vertical-align: bottom;"></iframe>
  122.             </div>
  123.     </div>
  124.     </div>
  125. </div>
  126.             <?php } ?>
  127.             <article class="aside aside--box aside--fixed static-content" ng-show="show" key="common/box_learn_how_to_stay_safe" style="">
  128.                 <h3>Dicas de Segurança</h3>
  129.                 <p>Proteja-se de maneira inteligente! Aprenda como <a href="/playing-habbo/safety">manter-se seguro na internet</a>.</p>
  130.             </article>
  131.             <article class="aside aside--box aside--fixed static-content" ng-show="show" key="common/box_parents_guide">
  132.                 <h3>Guia para os Pais</h3>
  133.                 <p>Quer saber mais sobre as ferramentas que temos para que nossos usuários possam se divertir num ambiente seguro? Veja o nosso <a target="_blank" ng-href="/api/public/help?returnTo=https://help.habbo.com.br/forums/311751-Informa%C3%A7%C3%B5es-para-os-Pais" href="/api/public/help?returnTo=https://help.habbo.com.br/forums/311751-Informa%C3%A7%C3%B5es-para-os-Pais">Guia para pais na Ferramenta de Ajuda do <?php echo $sitename; ?> Hotel</a>.</p>
  134.             </article>
  135.         </div>
  136.     </section>
  137. </section>
  138.         </ui-view>
  139.     </section>
  140. <?php
  141. require_once ('includes/footer.php');
  142. ?>
  143.     <!-- requireSession:  -->
  144.     <!-- requireNoSession:  -->
  145.     <div require-no-session="">
  146.         <div ng-show="show" class="eu-cookie-banner ng-hide">
  147.             <div class="wrapper"><span translate="EU_COOKIE_BANNER">O <?php echo $sitename; ?> Hotel utiliza cookies para oferecer um melhor serviço e publicidade de acordo com as suas preferências. Ao utilizar nossa web, consideramos que você aceita o seu uso.</span> <a ng-href="https://help.habbo.com.br/entries/93874096-Pol%C3%ADtica-de-Cookies" translate="EU_COOKIE_BANNER_READ_MORE" target="_blank" href="https://help.habbo.com.br/entries/93874096-Pol%C3%ADtica-de-Cookies">Saiba mais.</a></div><i ng-click="close()" class="eu-cookie-banner__close icon--close"></i></div>
  148.     </div>
  149.     <!-- end ngIf: function (){return!e.hasSession()} -->
  150.     <script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js" data-apikey="1492699e4b5e2ef6b25d19d4e1b9e64e" data-appversion="20e33e2" data-releasestage="hhbr"></script>
  151.     <script>
  152.         ! function() {
  153.             var h = Date.now();
  154.             window.Bugsnag && (window.Bugsnag.notifyReleaseStages = ["hhde", "hhus", "hhes", "hhfi", "hhfr", "hhit", "hhnl", "hhbr", "hhtr"], window.Bugsnag.beforeNotify = function(e) {
  155.                 return e.metaData.secondsSincePageLoad = (Date.now() - h) / 1e3, /habbo\./.test(e.url)
  156.             })
  157.         }();
  158.     </script>
  159.     <script src="<?php echo $aka; ?>/habbo-web/america/pt/scripts.js" defer="defer"></script>
  160.     <script>
  161.         ! function(e, n, a, o, t, r, i) {
  162.             e.GoogleAnalyticsObject = t, e[t] = e[t] || function() {
  163.                 (e[t].q = e[t].q || []).push(arguments)
  164.             }, e[t].l = 1 * new Date, r = n.createElement(a), i = n.getElementsByTagName(a)[0], r.async = 1, r.src = o, i.parentNode.insertBefore(r, i)
  165.         }(window, document, "script", "//www.google-analytics.com/analytics.js", "ga"), ga("create", "UA-448325-57", "auto"), ga("require", "ecommerce"), ga("require", "linkid", "linkid.js"), window.partnerCodeInfo && (ga("set", "campaignName", window.partnerCodeInfo.campaign), ga("set", "campaignSource", window.partnerCodeInfo.theme || window.partnerCodeInfo.partner), ga("set", "campaignMedium", window.partnerCodeInfo.media));
  166.     </script>
  167.     <div id="fb-root" class=" fb_reset">
  168.         <div style="position: absolute; top: -10000px; height: 0px; width: 0px;">
  169.             <div>
  170.                 <iframe name="fb_xdm_frame_https" frameborder="0" allowtransparency="true" allowfullscreen="true" scrolling="no" title="Facebook Cross Domain Communication Frame" aria-hidden="true" tabindex="-1" id="fb_xdm_frame_https" src="https://staticxx.facebook.com/connect/xd_arbiter.php?version=42#channel=f135291044&amp;origin=https%3A%2F%2Fwww.habbo.com.br" style="border: none;"></iframe>
  171.             </div>
  172.         </div>
  173.         <div style="position: absolute; top: -10000px; height: 0px; width: 0px;">
  174.             <div></div>
  175.         </div>
  176.     </div>
  177.     <script id="facebook-jssdk" async="" src="//connect.facebook.net/pt_BR/sdk.js"></script>
  178.     <script id="janrainAuthWidget" src="https://rpxnow.com/js/lib/login.habbo.com/engage.js"></script>
  179.     <iframe src="https://tpc.googlesyndication.com/safeframe/1-0-2/html/container.html" style="visibility: hidden; display: none;"></iframe>
  180.     <div id="janrainModalOverlay" style="left: 0px; top: 0px; bottom: 0px; right: 0px; position: fixed; opacity: 0.4; display: none; z-index: 1000; background-color: rgb(0, 0, 0);"></div>
  181.     <div id="janrainModal" style="width: 392px; height: 143px; position: absolute; padding: 4px; border-radius: 3px; z-index: 1000; display: none; background-color: rgba(0, 0, 0, 0.6);"><img src="https://docj27ko03fnu.cloudfront.net/rel/img/17c96fc4b9c8464d1c95cd785dd3120b.png" style="position: absolute; cursor: pointer; z-index: 1000; right: -6px; top: -7px; height: 31px; width: 28px;">
  182.         <div class="janrainContent" style="width: 380px; height: 141px; padding-left: 5px; padding-right: 5px; box-sizing: content-box; border: 1px solid rgb(226, 226, 226); border-radius: 0px; overflow: hidden; position: absolute; background-color: rgb(226, 226, 226);">
  183.             <div id="janrainView">
  184.                 <div class="janrainHeader" style="font-size: 18px; color: rgb(51, 51, 51); position: relative; height: 20px; left: -5px; padding: 5px 5px 0px; white-space: nowrap; width: 380px; z-index: 100; border-radius: 0px; text-align: left; background-color: rgb(226, 226, 226);">
  185.                     <div style="padding-left: 1px; font-family: 'lucida grande', Helvetica, Verdana, sans-serif;">Entre através da sua conta no</div>
  186.                 </div>
  187.                 <div id="janrainProviderPages" style="padding-top: 5px; left: 5px; position: absolute;">
  188.                     <div class="janrainPage" pageindex="0">
  189.                         <ul class="providers" id="janrainProviders_0" style="float: left; list-style-type: none; margin: 0px; padding: 0px;">
  190.                             <li id="janrain-googleplus" role="button" style="list-style: none; height: 30px; width: 185px; margin-top: 0px; margin-right: 5px; margin-bottom: 5px; position: relative; border: 1px solid rgb(199, 199, 199); border-radius: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; background-image: -webkit-linear-gradient(bottom, rgb(238, 238, 238), rgb(255, 255, 255));"><a tabindex="1" href="javascript:void(0);" style="font-family: Helvetica, 'lucida grande', Verdana, sans-serif; font-size: 12px; line-height: 14px; margin-left: auto; margin-right: auto; text-decoration: none; display: block; padding-left: 5px; padding-right: 5px; text-align: left; width: auto;"><span class="janrain-provider-icon-24 janrain-provider-icon-googleplus" style="margin-top: 3px; background-color: transparent;"></span><span class="janrain-provider-text-color-googleplus" style="font-family: 'lucida grande', Helvetica, Verdana, sans-serif; cursor: pointer; margin-left: 7px; text-align: left; margin-top: 9px; vertical-align: top; display: inline-block;">Google</span></a></li>
  191.                             <li id="janrain-twitter" role="button" style="list-style: none; height: 30px; width: 185px; margin-top: 0px; margin-right: 5px; margin-bottom: 5px; position: relative; border: 1px solid rgb(199, 199, 199); border-radius: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; background-image: -webkit-linear-gradient(bottom, rgb(238, 238, 238), rgb(255, 255, 255));"><a tabindex="3" href="javascript:void(0);" style="font-family: Helvetica, 'lucida grande', Verdana, sans-serif; font-size: 12px; line-height: 14px; margin-left: auto; margin-right: auto; text-decoration: none; display: block; padding-left: 5px; padding-right: 5px; text-align: left; width: auto;"><span class="janrain-provider-icon-24 janrain-provider-icon-twitter" style="margin-top: 3px; background-color: transparent;"></span><span class="janrain-provider-text-color-twitter" style="font-family: 'lucida grande', Helvetica, Verdana, sans-serif; cursor: pointer; margin-left: 7px; text-align: left; margin-top: 9px; vertical-align: top; display: inline-block;">Twitter</span></a></li>
  192.                         </ul>
  193.                         <ul class="providers" id="janrainProviders_1" style="float: left; list-style-type: none; margin: 0px; padding: 0px;">
  194.                             <li id="janrain-yahoo" role="button" style="list-style: none; height: 30px; width: 185px; margin-top: 0px; margin-right: 5px; margin-bottom: 5px; position: relative; border: 1px solid rgb(199, 199, 199); border-radius: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; background-image: -webkit-linear-gradient(bottom, rgb(238, 238, 238), rgb(255, 255, 255));"><a tabindex="2" href="javascript:void(0);" style="font-family: Helvetica, 'lucida grande', Verdana, sans-serif; font-size: 12px; line-height: 14px; margin-left: auto; margin-right: auto; text-decoration: none; display: block; padding-left: 5px; padding-right: 5px; text-align: left; width: auto;"><span class="janrain-provider-icon-24 janrain-provider-icon-yahoo" style="margin-top: 3px; background-color: transparent;"></span><span class="janrain-provider-text-color-yahoo" style="font-family: 'lucida grande', Helvetica, Verdana, sans-serif; cursor: pointer; margin-left: 7px; text-align: left; margin-top: 9px; vertical-align: top; display: inline-block;">Yahoo!</span></a></li>
  195.                             <li id="janrain-live_id" role="button" style="list-style: none; height: 30px; width: 185px; margin-top: 0px; margin-right: 5px; margin-bottom: 5px; position: relative; border: 1px solid rgb(199, 199, 199); border-radius: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; background-image: -webkit-linear-gradient(bottom, rgb(238, 238, 238), rgb(255, 255, 255));"><a tabindex="4" href="javascript:void(0);" style="font-family: Helvetica, 'lucida grande', Verdana, sans-serif; font-size: 12px; line-height: 14px; margin-left: auto; margin-right: auto; text-decoration: none; display: block; padding-left: 5px; padding-right: 5px; text-align: left; width: auto;"><span class="janrain-provider-icon-24 janrain-provider-icon-live_id" style="margin-top: 3px; background-color: transparent;"></span><span class="janrain-provider-text-color-live_id" style="font-family: 'lucida grande', Helvetica, Verdana, sans-serif; cursor: pointer; margin-left: 7px; text-align: left; margin-top: 9px; vertical-align: top; display: inline-block;">Microsoft Account</span></a></li>
  196.                         </ul>
  197.                     </div>
  198.                 </div>
  199.             </div>
  200.         </div>
  201.     </div>
  202.     <iframe id="google_osd_static_frame_9355908208526" name="google_osd_static_frame" style="display: none; width: 0px; height: 0px;"></iframe>
  203. </body>
  204.  
  205. </html>
  206. <?php
  207. if (!isset($_SESSION['id'])) {
  208. require_once ('includes/modal_forgotten.php');
  209. require_once ('includes/modal_login.php');
  210. }else{
  211. require_once ('includes/modal_badgestore.php');
  212. }
  213. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement