Phalcon Framework 5.9.3

ParseError: Unclosed '{' on line 1

/tmp/cache/volt/%%srv%%chathispanoengine%%releases%%99%%apps%%web%%views%%index%%carousel.volt.compiled (81)
#0Phalcon\Mvc\View\Engine\Volt->render
#1Phalcon\Mvc\View->engineRender
#2Phalcon\Mvc\View->partial
#3Phalcon\Mvc\View\Engine\AbstractEngine->partial
/tmp/cache/volt/%%srv%%chathispanoengine%%releases%%99%%apps%%web%%views%%index%%index.volt.compiled (663)
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <?php if ($env == 'prod') { ?>
  5. <script async src="https://www.googletagmanager.com/gtag/js?id=G-55ZZ1BSSED"></script>
  6. <script>
  7. window.dataLayer = window.dataLayer || [];
  8. function gtag(){dataLayer.push(arguments);}
  9. gtag('js', new Date());
  10. gtag('config', 'G-55ZZ1BSSED');
  11. </script>
  12. <script>
  13. var _paq = window._paq = window._paq || [];
  14. /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  15. _paq.push(['trackPageView']);
  16. _paq.push(['enableLinkTracking']);
  17. (function() {
  18. var u="//analytics.chathispano.com/";
  19. _paq.push(['setTrackerUrl', u+'matomo.php']);
  20. _paq.push(['setSiteId', '2']);
  21. var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
  22. g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  23. })();
  24. </script>
  25. <?php } ?>
  26.  
  27. <meta charset="UTF-8" />
  28. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  29. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  30. <meta name="keywords" content="chat, chats, chatear, chat gratis, red de chat, irc, ligar en chat, chat de ciudades, chat de pueblos, chatear gratis" />
  31.  
  32. <?php if ($controller == 'index' && $action == 'index') { ?>
  33. <meta name="publisuites-verify-code" content="aHR0cHM6Ly9jaGF0aGlzcGFuby5jb20=" />
  34. <meta name="google-site-verification" content="qcxe2DWGaxmp1Db8zhwmwe5-A7BlJicc7R7hfTywm-4" />
  35. <meta name="msvalidate.01" content="8599F70ACD2A8328EADD494BDE2BD875" />
  36. <?php } ?>
  37.  
  38. <?php if (isset($amphtml)) { ?>
  39. <link rel="amphtml" href="<?= $amphtml ?>">
  40. <?php } ?>
  41.  
  42. <title><?= $head_title ?> <?= $head_suffix ?></title>
  43.  
  44. <?php if ($rel_canonical) { ?>
  45. <link rel="canonical" href="<?= $rel_canonical ?>" />
  46. <?php } ?>
  47.  
  48. <meta name="description" content="<?= $meta_description ?>" />
  49.  
  50. <meta name="twitter:card" content="summary">
  51. <meta name="twitter:description" content="<?= $meta_description ?>">
  52. <meta name="twitter:title" content="<?= $head_title ?>">
  53. <meta name="twitter:site" content="<?= $meta_twitter_profile ?>">
  54.  
  55. <meta property="og:title" content="<?= $head_title ?>" />
  56. <meta property="og:type" content="website" />
  57. <meta property="og:url" content="<?= $fullUri ?>" />
  58. <?php if ($meta_show_image) { ?>
  59. <meta property="og:image" content="<?= $meta_image ?>" />
  60. <?php } ?>
  61. <meta property="og:description" content="<?= $meta_description ?>" />
  62. <meta property="og:site_name" content="<?= $meta_site_name ?>" />
  63. <meta property="fb:admins" content="<?= $meta_facebook_id ?>" />
  64.  
  65. <?php if ($meta_article) { ?>
  66. <?php foreach ($meta_article_tags as $tag) { ?>
  67. <?php if ($tag && $tag != '') { ?>
  68. <meta property="article:tag" content="<?= $tag ?>" />
  69. <?php } ?>
  70. <?php } ?>
  71. <meta property="article:section" content="<?= $meta_article_section ?>" />
  72. <meta property="article:published_time" content="<?= $meta_article_created ?>" />
  73. <meta property="article:modified_time" content="<?= $meta_article_updated ?>" />
  74. <?php } ?>
  75.  
  76. <?php if ($meta_noindex && $meta_nofollow) { ?>
  77. <meta name="robots" content="noindex,nofollow">
  78. <meta name="googlebot" content="noindex,nofollow">
  79. <?php } elseif ($meta_noindex) { ?>
  80. <meta name="robots" content="noindex">
  81. <meta name="googlebot" content="noindex">
  82. <?php } elseif ($meta_nofollow) { ?>
  83. <meta name="robots" content="nofollow">
  84. <meta name="googlebot" content="nofollow">
  85. <?php } ?>
  86.  
  87. <script>
  88. var googletag = googletag || {};
  89. googletag.cmd = googletag.cmd || [];
  90. var msTag = {
  91. site: 'chathispano',
  92. <?php if ($controller == 'index' && $action == 'index') { ?>
  93. page: 'home',
  94. <?php } elseif ($controller == 'blogs' || ($controller == 'news' && ($action == 'index' || ($action == 'list' && $type == 'noticias')))) { ?>
  95. page: 'blog',
  96. <?php } elseif ($controller == 'webchat' && ($action == 'index' || $action == 'element')) { ?>
  97. page: 'chat',
  98. <?php } else { ?>
  99. page: 'ros',
  100. <?php } ?>
  101. data: {
  102. <?php if ($controller == 'index' && $action == 'index') { ?>
  103. ZonasMassarius: 'home',
  104. <?php } elseif ($controller == 'blogs' || ($controller == 'news' && ($action == 'index' || ($action == 'list' && $type == 'noticias')))) { ?>
  105. //ZonasMassarius: 'article',
  106. ZonasMassarius: 'blog',
  107. <?php } elseif ($controller == 'webchat' && $action == 'index') { ?>
  108. ZonasMassarius: 'chat',
  109. <?php } elseif ($controller == 'webchat' && $action == 'element') { ?>
  110. ZonasMassarius: 'chat',
  111. <?php } else { ?>
  112. ZonasMassarius: 'ros',
  113. <?php } ?>
  114. <?php if ($hasPremium || $ads_revive_enabled || $refinery89_enabled || $section_gay == 1 || $section_sex == 1 || $section_lesbianas == 1) { ?>
  115. noAds: true
  116. <?php } elseif ($controller == 'error' || $controller == 'paywall' || $controller == 'auth' || $controller == 'sexshop') { ?>
  117. noAds: true
  118. <?php } else { ?>
  119. noAds: false
  120. <?php } ?>
  121. },
  122. cb: function () {},
  123. };
  124. if (window.self !== window.top) {
  125. msTag.data.noAds = true;
  126. }
  127. </script>
  128.  
  129.  
  130. <script type="text/javascript">
  131. (function(c,l,a,r,i,t,y){
  132. c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
  133. t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
  134. y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
  135. })(window, document, "clarity", "script", "mh9qwq8zpy");
  136. </script>
  137.  
  138.  
  139. <!-- favicon -->
  140. <link rel="shortcut icon" href="/assets/web/images/favicon.ico" type="image/x-icon">
  141. <link rel="icon" href="/assets/web/images/favicon.ico" type="image/x-icon">
  142.  
  143. <link rel="preload" as="font" href="<?= $baseUri ?>webfonts/fa-solid-900.woff2" type="font/woff2" crossorigin="anonymous">
  144. <link rel="preload" as="font" href="<?= $baseUri ?>webfonts/fa-brands-400.woff2" type="font/woff2" crossorigin="anonymous">
  145. <link rel="preload" as="font" href="<?= $baseUri ?>webfonts/fa-regular-400.woff2" type="font/woff2" crossorigin="anonymous">
  146. <link rel="preload" as="font" href="<?= $baseUri ?>assets/web/fonts/Asap-BoldItalic.ttf" type="font/ttf" crossorigin="anonymous">
  147. <link rel="preload" as="font" href="<?= $baseUri ?>assets/web/fonts/Asap-Bold.ttf" type="font/ttf" crossorigin="anonymous">
  148. <link rel="preload" as="font" href="<?= $baseUri ?>assets/web/fonts/Asap-Italic.ttf" type="font/ttf" crossorigin="anonymous">
  149. <link rel="preload" as="font" href="<?= $baseUri ?>assets/web/fonts/Asap-MediumItalic.ttf" type="font/ttf" crossorigin="anonymous">
  150. <link rel="preload" as="font" href="<?= $baseUri ?>assets/web/fonts/Asap-Medium.ttf" type="font/ttf" crossorigin="anonymous">
  151. <link rel="preload" as="font" href="<?= $baseUri ?>assets/web/fonts/Asap-Regular.ttf" type="font/ttf" crossorigin="anonymous">
  152. <link rel="preload" as="font" href="<?= $baseUri ?>assets/web/fonts/Asap-SemiBoldItalic.ttf" type="font/ttf" crossorigin="anonymous">
  153. <link rel="preload" as="font" href="<?= $baseUri ?>assets/web/fonts/Asap-SemiBold.ttf" type="font/ttf" crossorigin="anonymous">
  154.  
  155.  
  156. <link rel="stylesheet" href="https://massariuscdn.com/pubs/chathispano/index.css">
  157. <script async type="text/javascript" src="https://massariuscdn.com/pubs/chathispano/chathispano_hb_setup.js"></script>
  158.  
  159. <?php if ($refinery89_enabled) { ?>
  160. <script src="https://tags.refinery89.com/chathispanocom.js" async></script>
  161. <?php } ?>
  162.  
  163. <style>
  164. :root {
  165. --banner-container-top: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted.png);
  166. --banner-container-top-home: url(<?= $baseUri ?>assets/web/images/banner-container-top-home.png);
  167. --banner-container-bottom: url(<?= $baseUri ?>assets/web/images/banner-container-bottom.png);
  168. --banner-container-top-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted.webp);
  169. --banner-container-top-home-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-home.webp);
  170. --banner-container-bottom-webp: url(<?= $baseUri ?>assets/web/images/banner-container-bottom.webp);
  171. }
  172. @media (max-width : 576px) {
  173. :root {
  174. --banner-container-top: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted-xs.png);
  175. --banner-container-top-home: url(<?= $baseUri ?>assets/web/images/banner-container-top-home-xs.png);
  176. --banner-container-bottom: url(<?= $baseUri ?>assets/web/images/banner-container-bottom-xs.png);
  177. --banner-container-top-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted-xs.webp);
  178. --banner-container-top-home-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-home-xs.webp);
  179. --banner-container-bottom-webp: url(<?= $baseUri ?>assets/web/images/banner-container-bottom-xs.webp);
  180. }
  181. }
  182. @media (min-width : 577px) and (max-width : 768px) {
  183. :root {
  184. --banner-container-top: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted-sm.png);
  185. --banner-container-top-home: url(<?= $baseUri ?>assets/web/images/banner-container-top-home-sm.png);
  186. --banner-container-bottom: url(<?= $baseUri ?>assets/web/images/banner-container-bottom-sm.png);
  187. --banner-container-top-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted-sm.webp);
  188. --banner-container-top-home-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-home-sm.webp);
  189. --banner-container-bottom-webp: url(<?= $baseUri ?>assets/web/images/banner-container-bottom-sm.webp);
  190. }
  191. }
  192. @media (min-width : 769px) and (max-width : 992px) {
  193. :root {
  194. --banner-container-top: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted-md.png);
  195. --banner-container-top-home: url(<?= $baseUri ?>assets/web/images/banner-container-top-home-md.png);
  196. --banner-container-bottom: url(<?= $baseUri ?>assets/web/images/banner-container-bottom-md.png);
  197. --banner-container-top-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted-md.webp);
  198. --banner-container-top-home-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-home-md.webp);
  199. --banner-container-bottom-webp: url(<?= $baseUri ?>assets/web/images/banner-container-bottom-md.webp);
  200. }
  201. }
  202. @media (min-width : 993px) and (max-width : 1200px) {
  203. :root {
  204. --banner-container-top: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted-lg.png);
  205. --banner-container-top-home: url(<?= $baseUri ?>assets/web/images/banner-container-top-home-lg.png);
  206. --banner-container-bottom: url(<?= $baseUri ?>assets/web/images/banner-container-bottom-lg.png);
  207. --banner-container-top-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-cutted-lg.webp);
  208. --banner-container-top-home-webp: url(<?= $baseUri ?>assets/web/images/banner-container-top-home-lg.webp);
  209. --banner-container-bottom-webp: url(<?= $baseUri ?>assets/web/images/banner-container-bottom-lg.webp);
  210. }
  211. }
  212. </style>
  213.  
  214. <style>
  215. @font-face {
  216. font-family: FontAwesome5Solid;
  217. src: url(<?= $baseUri ?>webfonts/fa-solid-900.woff2);
  218. font-display: swap;
  219. }
  220.  
  221. @font-face {
  222. font-family: FontAwesome5Brands;
  223. src: url(<?= $baseUri ?>webfonts/fa-brands-400.woff2);
  224. font-display: swap;
  225. }
  226.  
  227. @font-face {
  228. font-family: FontAwesome5Regular;
  229. src: url(<?= $baseUri ?>webfonts/fa-regular-400.woff2);
  230. font-display: swap;
  231. }
  232.  
  233. .fa, .fas {
  234. font-family: FontAwesome5Solid !important;
  235. }
  236. .fab {
  237. font-family: FontAwesome5Brands !important;
  238. }
  239. .far {
  240. font-family: FontAwesome5Regular !important;
  241. }
  242.  
  243. @font-face {
  244. font-family: AsapBold;
  245. src: url(<?= $baseUri ?>assets/web/fonts/Asap-Bold.ttf);
  246. font-display: swap;
  247. }
  248.  
  249. @font-face {
  250. font-family: AsapBoldItalic;
  251. src: url(<?= $baseUri ?>assets/web/fonts/Asap-BoldItalic.ttf);
  252. font-display: swap;
  253. }
  254.  
  255. @font-face {
  256. font-family: AsapItalic;
  257. src: url(<?= $baseUri ?>assets/web/fonts/Asap-Italic.ttf);
  258. font-display: swap;
  259. }
  260.  
  261. @font-face {
  262. font-family: AsapMedium;
  263. src: url(<?= $baseUri ?>assets/web/fonts/Asap-Medium.ttf);
  264. font-display: swap;
  265. }
  266.  
  267. @font-face {
  268. font-family: AsapMediumItalic;
  269. src: url(<?= $baseUri ?>assets/web/fonts/Asap-MediumItalic.ttf);
  270. font-display: swap;
  271. }
  272.  
  273. @font-face {
  274. font-family: AsapRegular;
  275. src: url(<?= $baseUri ?>assets/web/fonts/Asap-Regular.ttf);
  276. font-display: swap;
  277. }
  278.  
  279. @font-face {
  280. font-family: AsapSemiBold;
  281. src: url(<?= $baseUri ?>assets/web/fonts/Asap-SemiBold.ttf);
  282. font-display: swap;
  283. }
  284.  
  285. @font-face {
  286. font-family: AsapSemiBoldItalic;
  287. src: url(<?= $baseUri ?>assets/web/fonts/Asap-SemiBoldItalic.ttf);
  288. font-display: swap;
  289. }
  290. </style>
  291.  
  292. <?= $this->assets->outputInlineCss('headerCss') ?>
  293. </head>
  294.  
  295. <body class="container-fluid pl-0 pr-0 pb-0">
  296. <div id="veil"
  297. style="position:absolute;top:0px;bottom:0px;left:0px;right:0px;width:100%;height:100%;margin:0px;padding:0px;background-color:#ffffff;z-index:100000000;">
  298. </div>
  299.  
  300.  
  301. <?php if ($env == 'prod') { ?>
  302. <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N9MM3TX"
  303. height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  304. <?php } ?>
  305.  
  306. <?php if (!$hasPremium && ($section_gay == 1 || $section_lesbianas == 1 || $section_sex == 1)) { ?>
  307. <script async type="application/javascript" src="https://a.exdynsrv.com/ad-provider.js"></script>
  308.  
  309. <?php } ?>
  310.  
  311. <nav class="navbar fixed-top navbar-expand-lg">
  312. <div class="container-xl">
  313. <button class="navbar-toggler text-neutral1" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
  314. aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="<?= $this->translate->translate('Toggle navigation') ?>">
  315. <span class="fas fa-ellipsis-v"></span>
  316. <font style="position:fixed;top:14px;left:0px;width:100%;text-align:center;font-weight:bold;">CHAT HISPANO</font>
  317. </button>
  318. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  319. <ul class="navbar-nav mr-auto d-lg-none d-xl-none">
  320. <li class="nav-item">
  321. <a href="<?php if ($enable_element) { ?>/chat/<?php } else { ?>/webchat/<?php } ?>" class="nav-link pt-2 pb-2" target="_blank">
  322. <font><?= $this->translate->translate('Chat') ?></font>
  323. </a>
  324. </li>
  325. <li class="nav-item">
  326. <a href="https://foro.chathispano.com/" class="nav-link pt-2 pb-2" target="_blank">
  327. <font><?= $this->translate->translate('Forum') ?></font>
  328. </a>
  329. </li>
  330. <li class="nav-item">
  331. <a href="<?= $this->url->get('blogs/') ?>" class="nav-link pt-2 pb-2">
  332. <font><?= $this->translate->translate('Blogs') ?></font>
  333. </a>
  334. </li>
  335. <li class="nav-item">
  336. <a href="<?= $this->url->get('noticias/') ?>" class="nav-link pt-2 pb-2">
  337. <font><?= $this->translate->translate('News') ?></font>
  338. </a>
  339. </li>
  340. <li class="nav-item">
  341. <a href="<?= $this->url->get('normas/') ?>" class="nav-link pt-2 pb-2">
  342. <font><?= $this->translate->translate('Rules') ?></font>
  343. </a>
  344. </li>
  345. <li class="nav-item">
  346. <a href="<?= $this->url->get('gestiones/') ?>" class="nav-link pt-2 pb-2">
  347. <font><?= $this->translate->translate('Procedures') ?></font>
  348. </a>
  349. </li>
  350. <li class="nav-item">
  351. <a href="<?= $this->url->get('contactar/') ?>" class="nav-link pt-2 pb-2">
  352. <font><?= $this->translate->translate('Contact') ?></font>
  353. </a>
  354. </li>
  355. <li class="nav-item">
  356. <a href="<?= $this->url->get('ayuda/') ?>" class="nav-link pt-2 pb-2">
  357. <font><?= $this->translate->translate('Help') ?></font>
  358. </a>
  359. </li>
  360. <li class="dropdown-divider"></li>
  361. <li class="nav-item">
  362. <a class="nav-link pt-2 pb-2" href="/faqs-premium">
  363. <span class="fa fa-question" style="color:#ffffff;"></span>
  364. <font><?= $this->translate->translate('Premium FAQS') ?></font>
  365. </a>
  366. </li>
  367. <li class="dropdown-divider"></li>
  368. <?php if ($loggedIn) { ?>
  369. <li class="nav-item">
  370. <a href="<?= $this->url->get('perfil/') ?>" class="nav-link pt-2 pb-2">
  371. <font><?= $this->translate->translate('Profile') ?></font>
  372. </a>
  373. </li>
  374. <?php } ?>
  375. <li class="nav-item">
  376. <a href="/faqs-premium" class="nav-link pt-2 pb-2">
  377. <font><?= $this->translate->translate('Premium FAQS') ?></font>
  378. </a>
  379. </li>
  380. <li class="nav-item">
  381. <a href="/suscripciones" class="nav-link pt-2 pb-2">
  382. <font><?= $this->translate->translate('Subscriptions') ?></font>
  383. </a>
  384. </li>
  385. <?php if ($loggedIn) { ?>
  386. <li class="nav-item">
  387. <a href="<?= $this->url->get('auth/logout') ?>" class="nav-link pt-2 pb-2">
  388. <font><?= $this->translate->translate('Log out') ?></font>
  389. </a>
  390. </li>
  391. <?php } else { ?>
  392. <li class="nav-item">
  393. <a href="<?= $this->url->get('auth/login') ?>" class="nav-link pt-2 pb-2">
  394. <font><?= $this->translate->translate('Log in') ?></font>
  395. </a>
  396. </li>
  397. <?php } ?>
  398. </ul>
  399. </div>
  400. <div class="d-none d-lg-flex d-xl-flex justify-content-end">
  401. <ul class="navbar-nav mr-auto d-none d-lg-flex d-xl-flex">
  402. <li class="nav-item mr-4">
  403. <a href="<?php if ($enable_element) { ?>/chat/<?php } else { ?>/webchat/<?php } ?>" class="nav-link" target="_blank">
  404. <font><?= $this->translate->translate('Chat') ?></font>
  405. </a>
  406. </li>
  407. <li class="nav-item mr-4">
  408. <a href="https://foro.chathispano.com" class="nav-link" target="_blank">
  409. <font><?= $this->translate->translate('Forum') ?></font>
  410. </a>
  411. </li>
  412. <li class="nav-item mr-4">
  413. <a href="<?= $this->url->get('blogs/') ?>" class="nav-link">
  414. <font><?= $this->translate->translate('Blogs') ?></font>
  415. </a>
  416. </li>
  417. <li class="nav-item mr-4">
  418. <a href="<?= $this->url->get('noticias/') ?>" class="nav-link">
  419. <font><?= $this->translate->translate('News') ?></font>
  420. </a>
  421. </li>
  422. <li class="nav-item mr-4">
  423. <a href="<?= $this->url->get('normas/') ?>" class="nav-link">
  424. <font><?= $this->translate->translate('Rules') ?></font>
  425. </a>
  426. </li>
  427. <li class="nav-item mr-4">
  428. <a href="<?= $this->url->get('gestiones/') ?>" class="nav-link">
  429. <font><?= $this->translate->translate('Procedures') ?></font>
  430. </a>
  431. </li>
  432. <li class="nav-item mr-4">
  433. <a href="<?= $this->url->get('contactar/') ?>" class="nav-link">
  434. <font><?= $this->translate->translate('Contact') ?></font>
  435. </a>
  436. </li>
  437. <li class="nav-item mr-4">
  438. <a href="<?= $this->url->get('ayuda/') ?>" class="nav-link">
  439. <font><?= $this->translate->translate('Help') ?></font>
  440. </a>
  441. </li>
  442. </ul>
  443. <?php if ($controller != 'error') { ?>
  444. <form class="form-inline mr-4 pt-2 pb-1">
  445. <div class="dropdown">
  446. <button class="btn btn-outline-light dropdown-toggle" type="button"
  447. id="dropdownSearch" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  448. <span class="fa fa-search"></span>
  449. <?= $this->translate->translate('Search') ?>
  450. </button>
  451. <div class="dropdown-menu" aria-labelledby="dropdownSearch">
  452. <div class="input-group">
  453. <input type="search" class="border-0 pl-2 pr-2 pb-2 pt-2 rounded-right typeahead" name="search" placeHolder="<?= $this->translate->translate('Search') ?>"
  454. data-url='["<?= $baseUri ?>noticias/buscar/%QUERY","<?= $baseUri ?>blogs/buscar/%QUERY","<?= $baseUri ?>canal/buscar/%QUERY"]'
  455. data-wildcard="%QUERY"
  456. data-name='["News","Blogs","Channels"]'
  457. data-type="single"
  458. data-empty='["<?= str_replace(["'","à","á","è","é","í","ò","ó","ú"], ["&#39;","&agrave;","&aacute;","&egrave;","&eacute;","&iacute;","&ograve;","&oacute;","&uacute;"], $this->translate->translate('No articles found')) ?>","<?= str_replace(["'","à","á","è","é","í","ò","ó","ú"], ["&#39;","&agrave;","&aacute;","&egrave;","&eacute;","&iacute;","&ograve;","&oacute;","&uacute;"], $this->translate->translate('No blog posts found')) ?>","<?= str_replace(["'","à","á","è","é","í","ò","ó","ú"], ["&#39;","&agrave;","&aacute;","&egrave;","&eacute;","&iacute;","&ograve;","&oacute;","&uacute;"], $this->translate->translate('No channels found.')) ?>"]'
  459. data-template='["articles_search_mini","blogs_search_mini","channel_search_mini"]'
  460. data-limit="5"
  461. data-pending='<?= $this->translate->translate('Searching...') ?>'
  462. data-position="absolute"
  463. data-header="1">
  464. </div>
  465. </div>
  466. </div>
  467. </form>
  468. <?php } ?>
  469. <ul class="navbar-nav mr-auto d-none d-lg-flex d-xl-flex">
  470. <?php if ($hasPremium) { ?>
  471. <li class="nav-item pt-3 mr-2 nav-item-be-premium">
  472. <a href="<?= $baseUri ?>suscripciones/premium" class="nav-link btn btn-sm btn-gold">
  473. <span class="fa fa-star"></span>
  474. Webchat Premium
  475. </a>
  476. </li>
  477. <?php } else { ?>
  478. <li class="nav-item pt-3 mr-2 nav-item-be-premium">
  479. <a href="<?= $baseUri ?>suscripciones/premium" class="nav-link btn btn-sm btn-green">
  480. <span class="fa fa-star"></span>
  481. <?= $this->translate->translate('Chat without ads!') ?>
  482. </a>
  483. </li>
  484. <?php } ?>
  485. <li class="nav-item">
  486. <div class="dropdown">
  487. <a href="#" class="nav-link"
  488. data-toggle="dropdown" id="MenuProfile" aria-haspopup="true" aria-expanded="false">
  489. <img class="icon-log-in" src="/assets/web/images/log-in.png">
  490. </a>
  491. <div class="dropdown-menu dropdown-menu-right pt-0 pb-0 border-0">
  492. <?php if ($loggedIn) { ?>
  493. <a class="dropdown-item" href="/perfil"><?= $this->translate->translate('Profile') ?></a>
  494. <?php } ?>
  495. <a class="dropdown-item" href="/faqs-premium">
  496. <span class="fa fa-question"></span>
  497. <?= $this->translate->translate('Premium FAQS') ?>
  498. </a>
  499. <a class="dropdown-item" href="/suscripciones">
  500. <span class="fa fa-list"></span>
  501. <?= $this->translate->translate('Subscriptions') ?>
  502. </a>
  503. <?php if ($loggedIn) { ?>
  504. <a class="dropdown-item rounded-bottom" href="/auth/logout"><?= $this->translate->translate('Log out') ?></a>
  505. <?php } else { ?>
  506. <a class="dropdown-item rounded-bottom" href="/auth/login"><?= $this->translate->translate('Log in') ?></a>
  507. <?php } ?>
  508. </div>
  509. </div>
  510. </li>
  511. </ul>
  512. </div>
  513. </div>
  514. </nav>
  515.  
  516. <div class="container-fluid d-sm-none nav-item-be-premium pt-2 pb-2">
  517. <a href="<?= $baseUri ?>suscripciones" class="btn btn-block btn-green">
  518. <span class="fa fa-star"></span>
  519. <?= $this->translate->translate('Chat without ads!') ?>
  520. </a>
  521. </div>
  522.  
  523.  
  524. <?php if (!$hasPremium && $controller != 'error' && $controller != 'paywall' && $controller != 'auth' && $controller != 'sexshop') { ?>
  525. <div class="container-fluid banner-top pt-2 pb-2">
  526. <div id="pubtop" class="pt-2 pb-4 text-center">
  527. <p class="text-muted pt-0 pb-2"><small>PUBLICIDAD</small></p>
  528. <?php if ($ads_revive_enabled) { ?>
  529. <!-- We do not need to include anything here -->
  530. <?php } elseif ($section_gay == 1 || $section_lesbianas == 1 || $section_sex == 1) { ?>
  531. <?php if (isset($vivelavita) && $vivelavita) { ?>
  532. <?php if ($section_lesbianas == 1) { ?>
  533. <?php $vivelavita_slug = 'lesbianas'; ?>
  534. <?php } elseif ($section_gay == 1) { ?>
  535. <?php $vivelavita_slug = 'gays'; ?>
  536. <?php } else { ?>
  537. <?php $vivelavita_slug = 'heteros'; ?>
  538. <?php } ?>
  539. <a href="/sexshop/<?= $vivelavita_slug ?>" target="_blank" style="display:block;height:90px;">
  540. <img src="/assets/web/images/vivelavita.jpg" style="height:90px;">
  541. </a>
  542. <br>
  543. <a href="/sexshop/<?= $vivelavita_slug ?>" target="_blank" class="text-primary" style="text-transform:uppercase;font-weight:bold;">Ir al sexshop</a>
  544. <?php } ?>
  545.  
  546. <?php } else { ?>
  547. <div id="div-gpt-ad-1489776310120-0" style="display:block;"></div>
  548. <?php } ?>
  549. </div>
  550.  
  551. </div>
  552. <?php } ?>
  553.  
  554. <?php if ($controller == 'index' && $action == 'index') { ?>
  555. <div class="container-fluid main-content main-content-home">
  556. <?php } else { ?>
  557. <div class="container-fluid main-content">
  558. <?php } ?>
  559. <div class="row">
  560. <?php if ($controller == 'index' && $action == 'index') { ?>
  561. <div class="container-fluid home-header">
  562. <div class="container-xl main-content-header">
  563. <div class="row">
  564. <div class="col-5 pt-sm-4 pb-sm-4">
  565. <h1 class="mb-1 mb-sm-4 text-left">Chat Hispano</h1>
  566. <h2 class="mb-1 mb-sm-4 text-left"><?= $this->translate->translate('Greatest free chat network in spanish') ?></h2>
  567. <a href="<?php if ($enable_element) { ?>/chat/<?php } else { ?>/webchat/<?php } ?>" class="btn btn-lg btn-primary mt-4 ml-sm-4" target="_blank"><?= $this->translate->translate('Chat') ?></a>
  568. </div>
  569. </div>
  570. </div>
  571. <style>
  572. .main-content.main-content-home .main-content-header {
  573. color: var(--color-neutral1);
  574. }
  575. .main-content.main-content-home .main-content-header h1,
  576. .main-content.main-content-home .main-content-header h2 {
  577. font-size: 48px;
  578. }
  579. .main-content.main-content-home .main-content-header div a.btn {
  580. background-color: var(--color-primary);
  581. color: var(--color-neutral1);
  582. width: 250px;
  583. font-family: AsapSemiBold;
  584. }
  585.  
  586. /* xs mobile */
  587. @media (max-width: 575px) {
  588. .main-content.main-content-home .main-content-header h1,
  589. .main-content.main-content-home .main-content-header h2 {
  590. font-size: 19px;
  591. }
  592. }
  593. </style>
  594.  
  595. </div>
  596. <?php } ?>
  597. <div class="container-xl">
  598. <?php if (isset($navigation) && $this->length($navigation) > 0) { ?>
  599. <nav aria-label="breadcrumb">
  600. <ol class="breadcrumb bg-transparent">
  601. <?php foreach ($navigation as $idx => $item) { ?>
  602. <?php if ($idx == $this->length($navigation) - 1) { ?>
  603. <li class="breadcrumb-item active text-neutral1" aria-current="page"><?= $item['name'] ?></li>
  604. <?php } else { ?>
  605. <li class="breadcrumb-item text-neutral1"><a href="<?= $item['url'] ?>" class="text-neutral1"><?= $item['name'] ?></a></li>
  606. <?php } ?>
  607. <?php } ?>
  608. </ol>
  609. </nav>
  610. <style>
  611. .breadcrumb-item:not(.active) {
  612. font-weight: normal;
  613. }
  614. .breadcrumb-item.active {
  615. font-family: AsapSemiBold;
  616. font-weight: normal;
  617. text-decoration: underline;
  618. }
  619. </style>
  620. <?php } ?>
  621.  
  622. </div>
  623. <div class="container-xl">
  624. <div class="row">
  625. <div class="col-sm main-content-left bg-neutral1 rounded">
  626. <?= $this->flashSession->output() ?>
  627. <div class="container-fluid pb-0">
  628. <div class="row pb-4">
  629. <h2 class="mb-4"><?= $this->translate->translate('Welcome!') ?></h2>
  630. <p class="text-left"><?= $this->translate->translate('WELCOME_INTRO1') ?></p>
  631. <p class="text-left"><?= $this->translate->translate('WELCOME_INTRO2') ?></p>
  632. </div>
  633. </div>
  634. <?php if (!$hasPremium) { ?>
  635. <div class="mt-0 mb-4 text-center">
  636. <a href="/suscripciones/premium">
  637. <?php if ($paywall_promo_enabled) { ?>
  638. <img src="/assets/web/images/<?= $paywall_promo_image ?>" />
  639. <?php } else { ?>
  640. <img src="/assets/web/images/hispano-large-premium.png" />
  641. <?php } ?>
  642. </a>
  643. <h5 class="modal-title text-center mt-3">
  644. <b>
  645. <?php if ($paywall_promo_enabled) { ?>
  646. <a href="/suscripciones/premium" class="text-primary"><?= $paywall_promo_keyword_header ?></a>
  647. <?php } else { ?>
  648. <a href="/suscripciones/premium" class="text-primary">¡Chatea como nunca lo has soñado!</a>
  649. <?php } ?>
  650. </b>
  651. </h5>
  652. <?php if ($paywall_promo_enabled) { ?>
  653. <p class="text-muted pt-2"><small><i><?= $paywall_promo_keyword_description ?></i></small></p>
  654. <?php } ?>
  655. <a href="/suscripciones/premium" class="btn btn-lg btn-goldenrot mt-4 mb-4" target="_blank">
  656. <?= $this->translate->translate('Try it free') ?>
  657. </a>
  658. </div>
  659.  
  660. <?php } ?>
  661. <?php $this->partial('index/categorylist', ['seemore' => 1]); ?>
  662. <?php $this->partial('index/carousel', ['list' => $carousel_data, 'carousel_id' => 'HomeCarousel', 'title' => $this->translate->translate('Outstanding news')]); ?>
  663. <h1 class="mb-4 mt-4"><?= $this->translate->translate('Information for webmasters') ?></h1>
  664. <div class="row">
  665. <div class="col-12 col-sm-6 mb-4">
  666. <div class="card bg-secondary1 border-0 h-100">
  667. <div class="card-body border-0">
  668. <p>
  669. <?= $this->translate->translate('If you have a web in Wordpress, you can use our %plugin%.', ['plugin' => '<a href="https://wordpress.org/plugins/chathispano/" target="_blank">' . $this->translate->translate('official plugin') . '</a>']) ?>
  670. </p>
  671. <p>
  672. <?= $this->translate->translate('It will help you configure our webchat in your page. Easy and simple.') ?>
  673. </p>
  674. </div>
  675. <div class="card-footer border-0">
  676. <a href="https://wordpress.org/plugins/chathispano/" target="_blank"
  677. class="btn btn-block btn-primary btn-outline">
  678. <?= $this->translate->translate('Download Wordpress plugin') ?>
  679. </a>
  680. </div>
  681. </div>
  682. </div>
  683. <div class="col-12 col-sm-6 mb-4">
  684. <div class="card bg-secondary1 border-0 h-100">
  685. <div class="card-body border-0">
  686. <p>
  687. <?= $this->translate->translate('We also offer you the possibility to use %configurator% to generate a javascript code that you will only have to paste in your web page code.', ['configurator' => '<a href="' . $this->url->get('webmaster/embed') . '">' . $this->translate->translate('our configurator') . '</a>']) ?>
  688. </p>
  689. <p>
  690. <?= $this->translate->translate('Is simple as put Google Analytics code.') ?>
  691. </p>
  692. </div>
  693. <div class="card-footer border-0">
  694. <a href="<?= $this->url->get('webmaster/embed') ?>"
  695. class="btn btn-block btn-primary btn-outline">
  696. <?= $this->translate->translate('Go to configurator') ?>
  697. </a>
  698. </div>
  699. </div>
  700. </div>
  701. </div>
  702.  
  703.  
  704. <?php if (!$hasPremium && $controller != 'paywall' && $controller != 'auth' && $controller != 'error' && $controller != 'sexshop' && $section_gay != 1 && $section_lesbianas != 1 && $section_sex != 1) { ?>
  705. <?php if ($ads_onnetwork_enabled) { ?><div class="container-fluid text-center mb-4 pl-0 pr-0 ml-0 mr-0">
  706. <div id="onnetworkvideo">
  707. </div>
  708. </div>
  709. <script type="text/javascript">
  710. if (window.top === window.self) {
  711. console.log('Launching OnNetwork video');
  712. s = document.createElement('script');
  713. s.type = "text/javascript";
  714. <?php if ($controller == 'index' && $action == 'index') { ?>
  715. s.src = "https://video.onnetwork.tv/embed.php?sid=MnVjLDAsbDQ=";
  716. <?php } else { ?>
  717. s.src = "https://video.onnetwork.tv/embed.php?sid=MnVjLDAsbEs=";
  718. <?php } ?>
  719. document.getElementById('onnetworkvideo').append(s);
  720. }
  721. </script>
  722. <style>
  723. div#onnetworkvideo {
  724. max-width: 500px;
  725. width:100%;
  726. display:inline-block;
  727. }
  728. @media (max-width: 500px) {
  729. div#onnetworkvideo {
  730. max-width: 100%;
  731. }
  732. }
  733. </style>
  734. <?php } ?>
  735. <?php } ?>
  736. </div>
  737. <?php if (!$hasPremium && $controller != 'paywall' && $controller != 'auth' && $controller != 'error' && $controller != 'sexshop') { ?>
  738. <div class="col col-sm-auto main-content-right ml-sm-4 mt-4 mt-sm-0 bg-neutral3 rounded">
  739. <div id="pubright" class="banner-right">
  740. <p class="text-muted pt-0 pb-2"><small>PUBLICIDAD</small></p>
  741. <?php if ($ads_revive_enabled) { ?>
  742. <!-- We do not need to include anything here -->
  743. <?php } elseif ($section_gay == 1 || $section_lesbianas == 1 || $section_sex == 1) { ?>
  744. <ins id="exoright" class="adsbyexoclick" data-zoneid="4557896"></ins>
  745. <script type="text/javascript">
  746. if (window.screen.width <= 575) {
  747. document.getElementById('exoright').remove();
  748. }
  749. </script>
  750.  
  751. <?php } else { ?>
  752. <div id="div-gpt-ad-1489677647865-0" style="display:block;"></div>
  753. <?php if ($ads_optimanetwork_enabled) { ?>
  754. <div id="div-gpt-ad-chathispano-optima-network"></div>
  755.  
  756. <?php } ?>
  757. <?php } ?>
  758. </div>
  759.  
  760. </div>
  761. <?php } ?>
  762. </div>
  763. <?php if ($controller != 'paywall' && $controller != 'auth' && $controller != 'error' && $controller != 'profile' && $controller != 'sexshop') { ?>
  764. <div class="row">
  765. <?php if (!$hasPremium && $controller == 'index' && $action == 'index') { ?>
  766. <div class="col-12 pt-4 pb-4">
  767. <div class="container-fluid bg-neutral1 rounded mb-0">
  768. <?php if ($section_lesbianas != 1 && $section_gay != 1 && $section_sex != 1) { ?>
  769. <div id="div-gpt-ad-1511474953866-0"></div>
  770. <?php } ?>
  771.  
  772. </div>
  773. </div>
  774. <?php } ?>
  775. </div>
  776. <?php } ?>
  777. </div>
  778. </div>
  779. </div>
  780.  
  781. <div id="footer" class="container-fluid bg-neutral6">
  782. <div class="container-xl">
  783. <div class="row justify-content-center mb-4">
  784. <div class="col">
  785. <img class="lazyload"
  786. data-src="<?= $cdnUri ?>/public/assets/web/images/logo-menu-large.png?system=1">
  787. </div>
  788. <div class="col-auto">
  789. <ul class="sitemap list-group border-0 pl-4">
  790. <li class="list-group-item border-0 bg-transparent">
  791. <a href="<?= $this->url->get('webchat/') ?>" target="_blank"><?= $this->translate->translate('Chat') ?></a>
  792. </li>
  793. <li class="list-group-item border-0 bg-transparent">
  794. <a href="https://foro.chathispano.com/" target="_blank"><?= $this->translate->translate('Forum') ?></a>
  795. </li>
  796. <li class="list-group-item border-0 bg-transparent">
  797. <a href="<?= $this->url->get('blogs/') ?>"><?= $this->translate->translate('Blogs') ?></a>
  798. </li>
  799. <li class="list-group-item border-0 bg-transparent">
  800. <a href="<?= $this->url->get('noticias/') ?>"><?= $this->translate->translate('News') ?></a>
  801. </li>
  802. <li class="list-group-item border-0 bg-transparent">
  803. <a href="<?= $this->url->get('normas/') ?>"><?= $this->translate->translate('Rules') ?></a>
  804. </li>
  805. <li class="list-group-item border-0 bg-transparent">
  806. <a href="<?= $this->url->get('stats/') ?>"><?= $this->translate->translate('Stats') ?></a>
  807. </li>
  808. <li class="list-group-item border-0 bg-transparent">
  809. <a href="<?= $this->url->get('historias/') ?>"><?= $this->translate->translate('Stories') ?></a>
  810. </li>
  811. <li class="list-group-item border-0 bg-transparent">
  812. <a href="https://tuforo.chathispano.com"><?= $this->translate->translate('Your free forum') ?></a>
  813. </li>
  814. </ul>
  815. </div>
  816. <div class="col-auto">
  817. <ul class="sitemap list-group border-0">
  818. <li class="list-group-item border-0 bg-transparent">
  819. <a href="<?= $this->url->get('contactar/') ?>"><?= $this->translate->translate('Contact') ?></a>
  820. </li>
  821. <li class="list-group-item border-0 bg-transparent">
  822. <a href="<?= $this->url->get('ayuda/') ?>"><?= $this->translate->translate('Help') ?></a>
  823. </li>
  824. </ul>
  825. </div>
  826. <div class="col-auto">
  827. <ul class="sitemap list-group border-0 pr-4">
  828. <li class="list-group-item border-0 bg-transparent">
  829. <a href="<?= $this->url->get('condiciones/') ?>"><?= $this->translate->translate('Use conditions') ?></a>
  830. </li>
  831. <li class="list-group-item border-0 bg-transparent">
  832. <a href="<?= $this->url->get('lopd/') ?>"><?= $this->translate->translate('Privacy') ?></a>
  833. </li>
  834. <li class="list-group-item border-0 bg-transparent">
  835. <a href="<?= $this->url->get('soporte/') ?>"><?= $this->translate->translate('Support') ?></a>
  836. </li>
  837. <li class="list-group-item border-0 bg-transparent">
  838. <a href="<?= $this->url->get('contactar/comercial') ?>"><?= $this->translate->translate('Advertising') ?></a>
  839. </li>
  840. </ul>
  841. </div>
  842. <div class="col social text-right">
  843. <a href="https://www.facebook.com/IRCHispanoChat/" target="_blank">
  844. <i class="fab fa-facebook-f fa-2x"></i>
  845. </a>
  846. <a href="https://twitter.com/irchispanochat" target="_blank" class="ml-2">
  847. <i class="fab fa-twitter fa-2x"></i>
  848. </a>
  849. <a href="https://www.youtube.com/channel/UCDTR3d_JQWNqcfXIak35XKg" target="_blank" class="ml-2">
  850. <i class="fab fa-youtube fa-2x"></i>
  851. </a>
  852. </div>
  853. </div>
  854. <div class="row mt-4 pt-4">
  855. <div class="col-12 text-center copyright">
  856. Copyright © 1996-<?= $current_year ?> Chat Hispano, S.L. Todos los derechos reservados.
  857. </div>
  858. </div>
  859. </div>
  860. </div>
  861.  
  862.  
  863. <script type="text/javascript">
  864. document.getElementById('veil').remove();
  865. </script>
  866.  
  867.  
  868. <!-- main JavaScript -->
  869. <?= $this->assets->outputInlineJs('mainJs') ?>
  870. <?php if ($enable_moment) { ?>
  871. <?= $this->assets->outputInlineJs('momentJs') ?>
  872. <?php } ?>
  873. <?php if ($enable_charts) { ?>
  874. <?= $this->assets->outputInlineJs('chartJs') ?>
  875. <?php } ?>
  876. <?php if ($enable_editor) { ?>
  877. <?= $this->assets->outputJs('ckeditorJs') ?>
  878. <?php } ?>
  879. <?= $this->assets->outputInlineJs('pluginJs') ?>
  880.  
  881. <script type="text/javascript">
  882. $(document).ready(function() {
  883. /**********
  884. * PLUGIN *
  885. **********/
  886. var chathispano = new $.chathispano({
  887. 'baseUri': "<?= $baseUri ?>",
  888. 'locale': "<?= $locale ?>",
  889. 'rev': "<?= $revision ?>",
  890. 'tmpl_dir': '/assets/web/js/templates/',
  891. 'storage_prefix': 'ChatHispanoWeb-',
  892. 'language_file': 'web',
  893. });
  894. window.chathispano = chathispano;
  895. document.chathispano = chathispano;
  896. chathispano.init();
  897. chathispano.ready();
  898.  
  899. <?php if ($env == 'prod') { ?>
  900. $(window).on('unload', function() {
  901. window.dataLayer.push({'event': 'unloadPage'});
  902. });
  903. <?php if ($ads_revive_enabled) { ?>
  904. window.dataLayer.push({'event': 'revive'});
  905. <?php } else { ?>
  906. window.dataLayer.push({'event': 'massarius'});
  907. <?php } ?>
  908. <?php } ?>
  909. });
  910. </script>
  911.  
  912. <script type="text/javascript">
  913. function check_menu_css() {
  914. if ($('nav').css('opacity') != 1) {
  915. $('nav').css('opacity', '');
  916. $('nav').css('pointer-events', '');
  917. console.log('Fixed nav CSS');
  918. } else {
  919. setTimeout(check_menu_css, 1000);
  920. }
  921. }
  922. setTimeout(check_menu_css, 1000);
  923. </script>
  924.  
  925.  
  926.  
  927. <?php if (!$hasPremium && $controller != 'error' && $controller != 'paywall' && $controller != 'auth' && $controller != 'sexshop' && $section_gay != 1 && $section_lesbianas != 1 && $section_sex != 1) { ?>
  928. <?php } elseif (!$hasPremium && $controller != 'error' && $controller != 'paywall' && $controller != 'auth' && $controller != 'sexshop') { ?>
  929. <script>(AdProvider = window.AdProvider || []).push({"serve": {}});</script>
  930.  
  931. <?php } ?>
  932.  
  933. <?php if ($controller == 'index' && $controller == 'index' && !$hasPremium && $ads_revive_enabled) { ?>
  934. <div class="modal fade" id="pubmodal" tabindex="-1" aria-hidden="true">
  935. <div class="modal-dialog modal-dialog-centered">
  936. <div class="modal-content">
  937. <div class="modal-header">
  938. PUBLICIDAD
  939. <button type="button" class="close" data-dismiss="modal" aria-label="<?= $this->translate->translate('Close') ?>">
  940. <span aria-hidden="true">&times;</span>
  941. </button>
  942. </div>
  943. <div class="modal-body">
  944. </div>
  945. </div>
  946. </div>
  947. </div>
  948. <style>
  949. #pubmodal .modal-dialog .modal-content {
  950. width: auto;
  951. }
  952. #pubmodal .modal-dialog .modal-content .modal-header {
  953. border-bottom: 0px;
  954. padding-left: 5px;
  955. padding-right: 5px;
  956. padding-top: 5px;
  957. padding-bottom: 0px;
  958. }
  959. #pubmodal .modal-dialog .modal-content .modal-body {
  960. padding-left: 5px;
  961. padding-right: 5px;
  962. padding-top: 5px;
  963. padding-bottom: 0px;
  964. }
  965. @media (max-width: 767px) {
  966. #pubmodal .modal-dialog .modal-content {
  967. width: 100%;
  968. }
  969. #pubmodal .modal-dialog .modal-content .modal-body {
  970. text-align: center;
  971. }
  972. }
  973. </style>
  974.  
  975. <script type="text/javascript">
  976. // Vars
  977. var reviveId = 'ce33c1420c1c0f400ccdb1a320f6d2f5';
  978. var reviveRefreshInterval = 120000;
  979. // Sets up a banner given its node, zone and id
  980. function revive_setup_banner(node, zoneId) {
  981. $(node+' ins, '+node+' script').remove();
  982. el = $(node+' ins');
  983. el = document.createElement('ins');
  984. el.setAttribute('data-revive-zoneid', zoneId);
  985. el.setAttribute('data-revive-id', reviveId);
  986. $(node).append(el);
  987. }
  988. // Setup modal
  989. function revive_modal(zoneId) {
  990. el = document.createElement('ins');
  991. el.setAttribute('data-revive-zoneid', zoneId);
  992. el.setAttribute('data-revive-id', reviveId);
  993. $('#pubmodal .modal-body').append(el);
  994. $('#pubmodal').modal();
  995. }
  996. // Setup function
  997. function revive_setup() {
  998. <?php if ($section_gay == 1) { ?>
  999. <!-- g section -->
  1000. if (window.screen.width >= 992) { // desktop
  1001. revive_setup_banner('#pubtop', '66');
  1002. revive_setup_banner('#pubright', '90');
  1003. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1004. revive_setup_banner('#publeft', '96');
  1005. revive_setup_banner('#pubbottom', '78');
  1006. <?php } ?>
  1007. } else if (window.screen.width >= 768) { // tablet
  1008. revive_setup_banner('#pubtop', '72');
  1009. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1010. revive_setup_banner('#pubbottom', '84');
  1011. <?php } else { ?>
  1012. revive_setup_banner('#pubright', '102');
  1013. <?php } ?>
  1014. } else { // mobile
  1015. revive_setup_banner('#pubtop', '150');
  1016. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1017. revive_setup_banner('#pubbottom', '144');
  1018. <?php } else { ?>
  1019. revive_setup_banner('#pubright', '102');
  1020. <?php } ?>
  1021. }
  1022. <?php } elseif ($section_sex == 1) { ?>
  1023. <!-- a section -->
  1024. if (window.screen.width >= 992) { // desktop
  1025. revive_setup_banner('#pubtop', '192');
  1026. revive_setup_banner('#pubright', '180');
  1027. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1028. revive_setup_banner('#publeft', '174');
  1029. revive_setup_banner('#pubbottom', '156');
  1030. <?php } ?>
  1031. } else if (window.screen.width >= 768) { // tablet
  1032. revive_setup_banner('#pubtop', '204');
  1033. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1034. revive_setup_banner('#pubbottom', '168');
  1035. <?php } else { ?>
  1036. revive_setup_banner('#pubright', '186');
  1037. <?php } ?>
  1038. } else { // mobile
  1039. revive_setup_banner('#pubtop', '198');
  1040. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1041. revive_setup_banner('#pubbottom', '162');
  1042. <?php } else { ?>
  1043. revive_setup_banner('#pubright', '186');
  1044. <?php } ?>
  1045. }
  1046. <?php } else { ?>
  1047. <!-- default -->
  1048. if (window.screen.width >= 992) { // desktop
  1049. revive_setup_banner('#pubtop', '6');
  1050. revive_setup_banner('#pubright', '54');
  1051. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1052. revive_setup_banner('#publeft', '48');
  1053. revive_setup_banner('#pubbottom', '30');
  1054. <?php } ?>
  1055. } else if (window.screen.width >= 768) { // tablet
  1056. revive_setup_banner('#pubtop', '24');
  1057. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1058. revive_setup_banner('#pubbottom', '36');
  1059. <?php } else { ?>
  1060. revive_setup_banner('#pubright', '60');
  1061. <?php } ?>
  1062. } else { // mobile
  1063. revive_setup_banner('#pubtop', '18');
  1064. <?php if ($controller == 'webchat' && $action == 'index') { ?>
  1065. revive_setup_banner('#pubbottom', '42');
  1066. <?php } else { ?>
  1067. revive_setup_banner('#pubright', '60');
  1068. <?php } ?>
  1069. }
  1070. <?php } ?>
  1071. var s = document.createElement("script");
  1072. s.async = true;
  1073. s.type = "text/javascript";
  1074. s.src = "https://ad.chathispano.com/www/delivery/asyncjs.php";
  1075. $('body').append(s);
  1076. }
  1077. function revive_start() {
  1078. setInterval(function() {
  1079. window.reviveAsync={};
  1080. revive_setup();
  1081. }, reviveRefreshInterval);
  1082. revive_setup();
  1083. }
  1084. revive_start();
  1085. if (window.screen.width >= 768) { // tablet + desktop
  1086. revive_modal('282');
  1087. } else { // mobile
  1088. revive_modal('294');
  1089. }
  1090. </script>
  1091.  
  1092. <?php } ?>
  1093.  
  1094. <div id="hispanito">
  1095. <img src="/assets/web/images/logo-menu.png">
  1096. <div>
  1097. <?php if ($loggedIn) { ?>
  1098. <hr>
  1099. <a href="/perfil/info" class="text-purple" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1100. <span class="fa fa-2x fa-user-circle"></span><br>
  1101. <?= $this->translate->translate('Profile') ?>
  1102. </a>
  1103. <?php } else { ?>
  1104. <hr>
  1105. <a href="/auth/login" class="text-purple" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1106. <span class="fas fa-2x fa-sign-in-alt"></span><br>
  1107. <?= $this->translate->translate('Log in') ?>
  1108. </a>
  1109. <?php } ?>
  1110. <hr>
  1111. <a href="/suscripciones"
  1112. class="<?php if (!$hasPremium) { ?>text-darkgreen<?php } else { ?>text-goldenrot<?php } ?>"
  1113. <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1114. <?php if (!$hasPremium) { ?>
  1115. <span class="fa fa-2x fa-star"></span><br>
  1116. <?= $this->translate->translate('Chat without ads!') ?>
  1117. <?php } else { ?>
  1118. <span class="fa fa-2x fa-star"></span><br>
  1119. <font class="text-goldenrot">Webchat Premium</font>
  1120. <?php } ?>
  1121. </a>
  1122. <?php if (!$loggedIn) { ?>
  1123. <hr>
  1124. <a href="/auth/register" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1125. <span class="fa fa-2x fa-user-circle"></span><br>
  1126. <?= $this->translate->translate('Create an account') ?>
  1127. </a>
  1128. <?php } ?>
  1129. <?php if (!$loggedIn || isset($identity) && $this->length($identity['nicks']) < 3) { ?>
  1130. <hr>
  1131. <a href="/regnick" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1132. <span class="fa fa-2x fa-user-plus"></span><br>
  1133. <?= $this->translate->translate('Nick reservation') ?>
  1134. </a>
  1135. <?php } ?>
  1136. <?php if (!$loggedIn || isset($identity) && $this->length($identity['nicks']) > 0) { ?>
  1137. <hr>
  1138. <a href="/setpass" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1139. <span class="fa fa-2x fa-key"></span><br>
  1140. <?= $this->translate->translate('Update password') ?>
  1141. </a>
  1142. <hr>
  1143. <a href="/ipvirtual" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1144. <span class="fa fa-2x fa-paint-brush"></span><br>
  1145. <?= $this->translate->translate('Update Virtual IP') ?>
  1146. </a>
  1147. <hr>
  1148. <a href="/perfil/misblogs" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1149. <span class="fa fa-2x fa-blog"></span><br>
  1150. <?= $this->translate->translate('My blogs') ?>
  1151. </a>
  1152. <hr>
  1153. <a href="/perfil/misforos" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1154. <span class="fab fa-2x fa-discourse"></span><br>
  1155. <?= $this->translate->translate('My forums') ?>
  1156. </a>
  1157. <hr>
  1158. <a href="/chanreg" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1159. <span class="fa fa-2x fa-users"></span><br>
  1160. <?= $this->translate->translate('Channel registration') ?>
  1161. </a>
  1162. <?php } ?>
  1163. <hr>
  1164. <a href="/gestiones" <?php if ($controller == 'webchat' && $action == 'index') { ?>target="_blank"<?php } ?>>
  1165. <span class="fa fa-2x fa-list"></span><br>
  1166. <?= $this->translate->translate('More procedures') ?>
  1167. </a>
  1168. </div>
  1169. </div>
  1170.  
  1171. </body>
  1172. </html>
#4Phalcon\Mvc\View\Engine\Volt->render
#5Phalcon\Mvc\View->engineRender
#6Phalcon\Mvc\View->processRender
#7Phalcon\Mvc\View->render
#8Phalcon\Mvc\Application->handle
/srv/ChatHispanoEngine/releases/99/apps/Application.php (150)
  1. <?php
  2.  
  3. // namespace ChatHispanoEngine;
  4.  
  5. /**
  6. * Application driver class to initialize Phalcon and
  7. * other resources.
  8. */
  9. class Application extends \Phalcon\Mvc\Application
  10. {
  11. private static $mode = 'dev';
  12.  
  13. private static $DEFAULT_MODULE = 'api';
  14.  
  15. public const MODE_PRODUCTION = 'prod';
  16. public const MODE_STAGING = 'staging';
  17. public const MODE_TEST = 'test';
  18. public const MODE_DEVELOPMENT = 'dev';
  19.  
  20. /**
  21. * Set application mode and error reporting level.
  22. */
  23. public function __construct($defaultModule, $env = 'dev')
  24. {
  25. $this->modules = array(
  26. 'core' => array(
  27. 'className' => 'ChatHispanoEngine\Core\Module',
  28. 'path' => __DIR__.'/Core/Module.php',
  29. ),
  30. 'api' => array(
  31. 'className' => 'ChatHispanoEngine\Api\Module',
  32. 'path' => __DIR__.'/Api/Module.php',
  33. ),
  34. 'login' => array(
  35. 'className' => 'ChatHispanoEngine\Login\Module',
  36. 'path' => __DIR__.'/Login/Module.php',
  37. ),
  38. 'oidc' => array(
  39. 'className' => 'ChatHispanoEngine\Oidc\Module',
  40. 'path' => __DIR__.'/Oidc/Module.php',
  41. ),
  42. 'web' => array(
  43. 'className' => 'ChatHispanoEngine\Web\Module',
  44. 'path' => __DIR__.'/Web/Module.php',
  45. ),
  46. 'backoffice' => array(
  47. 'className' => 'ChatHispanoEngine\Backoffice\Module',
  48. 'path' => __DIR__.'/Backoffice/Module.php',
  49. ),
  50. 'movil' => array(
  51. 'className' => 'ChatHispanoEngine\Movil\Module',
  52. 'path' => __DIR__.'/Movil/Module.php',
  53. ),
  54. 'regwebexternal' => array(
  55. 'className' => 'ChatHispanoEngine\RegWebExternal\Module',
  56. 'path' => __DIR__.'/Regwebexternal/Module.php',
  57. ),
  58. 'cdn' => array(
  59. 'className' => 'ChatHispanoEngine\Cdn\Module',
  60. 'path' => __DIR__.'/Cdn/Module.php',
  61. ),
  62. 'shorten' => array(
  63. 'className' => 'ChatHispanoEngine\Shorten\Module',
  64. 'path' => __DIR__.'/Shorten/Module.php',
  65. ),
  66. );
  67.  
  68. static::$DEFAULT_MODULE = $defaultModule;
  69. self::$mode = $env;
  70.  
  71. self::$mode = trim(file_get_contents(__DIR__.'/../config/environment.txt'));
  72. define('ENVIRONMENT', self::$mode);
  73.  
  74. if (!defined('PHALCON_MODE')) {
  75. $mode = getenv('PHALCON_MODE');
  76. $mode = $mode ? $mode : self::$mode;
  77. define('PHALCON_MODE', $mode);
  78. }
  79.  
  80. switch (self::getMode()) {
  81. case self::MODE_PRODUCTION:
  82. case self::MODE_STAGING:
  83. error_reporting(0);
  84. break;
  85. case self::MODE_TEST:
  86. case self::MODE_DEVELOPMENT:
  87. ini_set('display_errors', 'On');
  88. error_reporting(E_ALL);
  89. break;
  90. }
  91. }
  92.  
  93. /**
  94. * Register the services here to make them general or register in
  95. * the ModuleDefinition to make them module-specific.
  96. */
  97. protected function _registerServices()
  98. {
  99. $defaultModule = self::$DEFAULT_MODULE;
  100. $modules = $this->modules;
  101. $config = include __DIR__.'/../config/config.php';
  102. $env_config = include __DIR__.'/../config/config_'.ENVIRONMENT.'.php';
  103. $config->merge($env_config);
  104.  
  105. $di = new \Phalcon\DI\FactoryDefault();
  106.  
  107. include __DIR__.'/../config/loader.php';
  108. include __DIR__.'/../config/services.php';
  109. include __DIR__.'/../config/routing.php';
  110.  
  111. $this->setDI($di);
  112. }
  113.  
  114. /**
  115. * Run the application.
  116. */
  117. public function main()
  118. {
  119. if (static::MODE_PRODUCTION === static::getMode()) {
  120. $this->mainProd();
  121. } else {
  122. $this->mainDev();
  123. }
  124. }
  125.  
  126. private function getRequestUri()
  127. {
  128. if (!isset($_SERVER)) {
  129. return "/";
  130. }
  131. if (!is_array($_SERVER)) {
  132. return "/";
  133. }
  134. if (!isset($_SERVER['REQUEST_URI'])) {
  135. return "/";
  136. }
  137. return $_SERVER['REQUEST_URI'];
  138. }
  139.  
  140. /**
  141. * Run the development environment.
  142. */
  143. private function mainDev()
  144. {
  145. (new \Phalcon\Support\Debug())->listen();
  146.  
  147. $this->_registerServices();
  148. $this->registerModules($this->modules);
  149.  
  150. $response = $this->handle($this->getRequestUri());
  151. $response->send();
  152. }
  153.  
  154. /**
  155. * Run the production environment.
  156. */
  157. private function mainProd()
  158. {
  159. try {
  160. $this->registerModules($this->modules);
  161. $this->_registerServices();
  162.  
  163. $response = $this->handle($this->getRequestUri());
  164. $response->send();
  165. } catch (\Exception $e) {
  166. $logger = new \Phalcon\Logger\Adapter\Stream(__DIR__.'/../logs/'.date('Y-m-d').'.log');
  167. $msg = "[".$_SERVER['SERVER_NAME']."] [".$_SERVER['REQUEST_URI']."] [".$e->getCode()."] ".$e->getMessage()." at ".$e->getFile()." (".$e->getLine().")";
  168. $msg .= "\n".$e->getTraceAsString();
  169. $logger->process(new \Phalcon\Logger\Item($msg, "error", 100));
  170. $logger->close();
  171.  
  172. // remove view contents from buffer
  173. ob_clean();
  174.  
  175. $errorCode = 500;
  176. $errorView = __DIR__.'/../public/errors/error.html';
  177.  
  178. if (401 === $e->getCode()) {
  179. // 401 UNAUTHORIZED
  180. $errorCode = 401;
  181. } elseif (403 === $e->getCode()) {
  182. // 403 FORBIDDEN
  183. $errorCode = 403;
  184. } elseif (404 === $e->getCode()
  185. || $e instanceof Phalcon\Mvc\View\Exception
  186. || $e instanceof Phalcon\Mvc\Dispatcher\Exception) {
  187. // 404 NOT FOUND
  188. $errorCode = 404;
  189. }
  190.  
  191. // Get error view contents. Since we are including the view
  192. // file here you can use PHP and local vars inside the error view.
  193. ob_start();
  194. include_once $errorView;
  195. $contents = ob_get_contents();
  196. ob_end_clean();
  197.  
  198. // send view to header
  199. $response = $this->getDI()->getShared('response');
  200. $response->resetHeaders()
  201. ->setStatusCode($errorCode, null)
  202. ->setContent($contents)
  203. ->send()
  204. ;
  205.  
  206. /**
  207. * We try to register in MongoDB the error to be able to
  208. * track it in backoffice and/or receive emails
  209. */
  210. try {
  211. $system_log_manager = $this->getDI()->get('system_log_manager');
  212. if ($errorCode == 500) {
  213. $system_log_manager->createError([
  214. 'ip' => $_SERVER['SERVER_ADDR'],
  215. 'host' => $_SERVER['SERVER_NAME'],
  216. 'process' => 'php-fpm',
  217. 'message' => $e->getMessage(),
  218. 'file' => $e->getFile(),
  219. 'line' => $e->getLine(),
  220. ]);
  221. } else {
  222. $system_log_manager->createWarning([
  223. 'ip' => $_SERVER['SERVER_ADDR'],
  224. 'host' => $_SERVER['SERVER_NAME'],
  225. 'process' => 'php-fpm',
  226. 'message' => $e->getMessage(),
  227. 'file' => $e->getFile(),
  228. 'line' => $e->getLine(),
  229. ]);
  230. }
  231. } catch (\Exception $e) {
  232. }
  233. }
  234. }
  235.  
  236. public function slowLog($t)
  237. {
  238. $config = $this->getDI()->get('config');
  239. $irc_manager = $this->getDI()->get('inspircd_irc_manager');
  240. $server = gethostname() ? gethostname() : 'unknown';
  241. $uri = "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
  242. if (substr($_SERVER['REQUEST_URI'], 0, 10) == '/historias') {
  243. return;
  244. }
  245. $msg = "\x02[SLOWLOG] [".str_pad($server, 6, " ", STR_PAD_LEFT)."] [".str_pad(round($t, 1), 5, " ", STR_PAD_LEFT)."s] PATH=\x02 ".$_SERVER['REQUEST_URI']
  246. ."\x02 TYPE=\x02 ".$_SERVER['REQUEST_METHOD']."\x02 URI=\x02 ".$uri;
  247. $irc_manager->privmsgOrderEnqueue('AAAAAI', $config->irc->debug_channel, $msg);
  248. }
  249.  
  250. /**
  251. * Get the current mode.
  252. *
  253. * @return string
  254. */
  255. public static function getMode()
  256. {
  257. return self::$mode;
  258. }
  259. }
#9Application->mainDev
/srv/ChatHispanoEngine/releases/99/apps/Application.php (122)
  1. <?php
  2.  
  3. // namespace ChatHispanoEngine;
  4.  
  5. /**
  6. * Application driver class to initialize Phalcon and
  7. * other resources.
  8. */
  9. class Application extends \Phalcon\Mvc\Application
  10. {
  11. private static $mode = 'dev';
  12.  
  13. private static $DEFAULT_MODULE = 'api';
  14.  
  15. public const MODE_PRODUCTION = 'prod';
  16. public const MODE_STAGING = 'staging';
  17. public const MODE_TEST = 'test';
  18. public const MODE_DEVELOPMENT = 'dev';
  19.  
  20. /**
  21. * Set application mode and error reporting level.
  22. */
  23. public function __construct($defaultModule, $env = 'dev')
  24. {
  25. $this->modules = array(
  26. 'core' => array(
  27. 'className' => 'ChatHispanoEngine\Core\Module',
  28. 'path' => __DIR__.'/Core/Module.php',
  29. ),
  30. 'api' => array(
  31. 'className' => 'ChatHispanoEngine\Api\Module',
  32. 'path' => __DIR__.'/Api/Module.php',
  33. ),
  34. 'login' => array(
  35. 'className' => 'ChatHispanoEngine\Login\Module',
  36. 'path' => __DIR__.'/Login/Module.php',
  37. ),
  38. 'oidc' => array(
  39. 'className' => 'ChatHispanoEngine\Oidc\Module',
  40. 'path' => __DIR__.'/Oidc/Module.php',
  41. ),
  42. 'web' => array(
  43. 'className' => 'ChatHispanoEngine\Web\Module',
  44. 'path' => __DIR__.'/Web/Module.php',
  45. ),
  46. 'backoffice' => array(
  47. 'className' => 'ChatHispanoEngine\Backoffice\Module',
  48. 'path' => __DIR__.'/Backoffice/Module.php',
  49. ),
  50. 'movil' => array(
  51. 'className' => 'ChatHispanoEngine\Movil\Module',
  52. 'path' => __DIR__.'/Movil/Module.php',
  53. ),
  54. 'regwebexternal' => array(
  55. 'className' => 'ChatHispanoEngine\RegWebExternal\Module',
  56. 'path' => __DIR__.'/Regwebexternal/Module.php',
  57. ),
  58. 'cdn' => array(
  59. 'className' => 'ChatHispanoEngine\Cdn\Module',
  60. 'path' => __DIR__.'/Cdn/Module.php',
  61. ),
  62. 'shorten' => array(
  63. 'className' => 'ChatHispanoEngine\Shorten\Module',
  64. 'path' => __DIR__.'/Shorten/Module.php',
  65. ),
  66. );
  67.  
  68. static::$DEFAULT_MODULE = $defaultModule;
  69. self::$mode = $env;
  70.  
  71. self::$mode = trim(file_get_contents(__DIR__.'/../config/environment.txt'));
  72. define('ENVIRONMENT', self::$mode);
  73.  
  74. if (!defined('PHALCON_MODE')) {
  75. $mode = getenv('PHALCON_MODE');
  76. $mode = $mode ? $mode : self::$mode;
  77. define('PHALCON_MODE', $mode);
  78. }
  79.  
  80. switch (self::getMode()) {
  81. case self::MODE_PRODUCTION:
  82. case self::MODE_STAGING:
  83. error_reporting(0);
  84. break;
  85. case self::MODE_TEST:
  86. case self::MODE_DEVELOPMENT:
  87. ini_set('display_errors', 'On');
  88. error_reporting(E_ALL);
  89. break;
  90. }
  91. }
  92.  
  93. /**
  94. * Register the services here to make them general or register in
  95. * the ModuleDefinition to make them module-specific.
  96. */
  97. protected function _registerServices()
  98. {
  99. $defaultModule = self::$DEFAULT_MODULE;
  100. $modules = $this->modules;
  101. $config = include __DIR__.'/../config/config.php';
  102. $env_config = include __DIR__.'/../config/config_'.ENVIRONMENT.'.php';
  103. $config->merge($env_config);
  104.  
  105. $di = new \Phalcon\DI\FactoryDefault();
  106.  
  107. include __DIR__.'/../config/loader.php';
  108. include __DIR__.'/../config/services.php';
  109. include __DIR__.'/../config/routing.php';
  110.  
  111. $this->setDI($di);
  112. }
  113.  
  114. /**
  115. * Run the application.
  116. */
  117. public function main()
  118. {
  119. if (static::MODE_PRODUCTION === static::getMode()) {
  120. $this->mainProd();
  121. } else {
  122. $this->mainDev();
  123. }
  124. }
  125.  
  126. private function getRequestUri()
  127. {
  128. if (!isset($_SERVER)) {
  129. return "/";
  130. }
  131. if (!is_array($_SERVER)) {
  132. return "/";
  133. }
  134. if (!isset($_SERVER['REQUEST_URI'])) {
  135. return "/";
  136. }
  137. return $_SERVER['REQUEST_URI'];
  138. }
  139.  
  140. /**
  141. * Run the development environment.
  142. */
  143. private function mainDev()
  144. {
  145. (new \Phalcon\Support\Debug())->listen();
  146.  
  147. $this->_registerServices();
  148. $this->registerModules($this->modules);
  149.  
  150. $response = $this->handle($this->getRequestUri());
  151. $response->send();
  152. }
  153.  
  154. /**
  155. * Run the production environment.
  156. */
  157. private function mainProd()
  158. {
  159. try {
  160. $this->registerModules($this->modules);
  161. $this->_registerServices();
  162.  
  163. $response = $this->handle($this->getRequestUri());
  164. $response->send();
  165. } catch (\Exception $e) {
  166. $logger = new \Phalcon\Logger\Adapter\Stream(__DIR__.'/../logs/'.date('Y-m-d').'.log');
  167. $msg = "[".$_SERVER['SERVER_NAME']."] [".$_SERVER['REQUEST_URI']."] [".$e->getCode()."] ".$e->getMessage()." at ".$e->getFile()." (".$e->getLine().")";
  168. $msg .= "\n".$e->getTraceAsString();
  169. $logger->process(new \Phalcon\Logger\Item($msg, "error", 100));
  170. $logger->close();
  171.  
  172. // remove view contents from buffer
  173. ob_clean();
  174.  
  175. $errorCode = 500;
  176. $errorView = __DIR__.'/../public/errors/error.html';
  177.  
  178. if (401 === $e->getCode()) {
  179. // 401 UNAUTHORIZED
  180. $errorCode = 401;
  181. } elseif (403 === $e->getCode()) {
  182. // 403 FORBIDDEN
  183. $errorCode = 403;
  184. } elseif (404 === $e->getCode()
  185. || $e instanceof Phalcon\Mvc\View\Exception
  186. || $e instanceof Phalcon\Mvc\Dispatcher\Exception) {
  187. // 404 NOT FOUND
  188. $errorCode = 404;
  189. }
  190.  
  191. // Get error view contents. Since we are including the view
  192. // file here you can use PHP and local vars inside the error view.
  193. ob_start();
  194. include_once $errorView;
  195. $contents = ob_get_contents();
  196. ob_end_clean();
  197.  
  198. // send view to header
  199. $response = $this->getDI()->getShared('response');
  200. $response->resetHeaders()
  201. ->setStatusCode($errorCode, null)
  202. ->setContent($contents)
  203. ->send()
  204. ;
  205.  
  206. /**
  207. * We try to register in MongoDB the error to be able to
  208. * track it in backoffice and/or receive emails
  209. */
  210. try {
  211. $system_log_manager = $this->getDI()->get('system_log_manager');
  212. if ($errorCode == 500) {
  213. $system_log_manager->createError([
  214. 'ip' => $_SERVER['SERVER_ADDR'],
  215. 'host' => $_SERVER['SERVER_NAME'],
  216. 'process' => 'php-fpm',
  217. 'message' => $e->getMessage(),
  218. 'file' => $e->getFile(),
  219. 'line' => $e->getLine(),
  220. ]);
  221. } else {
  222. $system_log_manager->createWarning([
  223. 'ip' => $_SERVER['SERVER_ADDR'],
  224. 'host' => $_SERVER['SERVER_NAME'],
  225. 'process' => 'php-fpm',
  226. 'message' => $e->getMessage(),
  227. 'file' => $e->getFile(),
  228. 'line' => $e->getLine(),
  229. ]);
  230. }
  231. } catch (\Exception $e) {
  232. }
  233. }
  234. }
  235.  
  236. public function slowLog($t)
  237. {
  238. $config = $this->getDI()->get('config');
  239. $irc_manager = $this->getDI()->get('inspircd_irc_manager');
  240. $server = gethostname() ? gethostname() : 'unknown';
  241. $uri = "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
  242. if (substr($_SERVER['REQUEST_URI'], 0, 10) == '/historias') {
  243. return;
  244. }
  245. $msg = "\x02[SLOWLOG] [".str_pad($server, 6, " ", STR_PAD_LEFT)."] [".str_pad(round($t, 1), 5, " ", STR_PAD_LEFT)."s] PATH=\x02 ".$_SERVER['REQUEST_URI']
  246. ."\x02 TYPE=\x02 ".$_SERVER['REQUEST_METHOD']."\x02 URI=\x02 ".$uri;
  247. $irc_manager->privmsgOrderEnqueue('AAAAAI', $config->irc->debug_channel, $msg);
  248. }
  249.  
  250. /**
  251. * Get the current mode.
  252. *
  253. * @return string
  254. */
  255. public static function getMode()
  256. {
  257. return self::$mode;
  258. }
  259. }
#10Application->main
/srv/ChatHispanoEngine/releases/99/public/index.php (13)
  1. <?php
  2.  
  3. date_default_timezone_set('Europe/Madrid');
  4.  
  5. require_once __DIR__.'/../vendor/autoload.php';
  6. require_once __DIR__.'/../apps/Application.php';
  7.  
  8. if (isset($_SERVER['PHALCON_APP'])) {
  9. $app = new Application($_SERVER['PHALCON_APP']);
  10. } else {
  11. $app = new Application('web');
  12. }
  13. $app->main();
  14.  
  15. try {
  16. $t = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
  17. if ($t > 6) {
  18. $app->slowLog($t);
  19. }
  20. } catch (\Exception $e) {
  21. }