gallery.funny 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <?php
  2. /**
  3. * Copyright (c) 2021, 2024, 5 Mode
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions are met:
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * * Neither Open Gallery nor the names of its contributors
  14. * may be used to endorse or promote products derived from this software
  15. * without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  18. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  19. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY
  21. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  22. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  23. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  24. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  26. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. *
  28. * gallery.funny
  29. *
  30. * Gallery Index page.
  31. *
  32. * @author Daniele Bonini <my25mb@2aol.com>
  33. * @copyrights (c) 2021, 2024, 5 Mode
  34. * @license https://opensource.org/licenses/BSD-3-Clause
  35. */
  36. require "../../../Private/core/init.inc";
  37. //use OpenGallery\OpenGallery\Err;
  38. //use OpenGallery\OpenGallery\GalleryUtil;
  39. //Err::setRedirectHandlers("/");
  40. if (filter_input(INPUT_SERVER, "HTTP_HOST") === "takeyou.to") {?>
  41. <script>
  42. window.open("http://5mode.com/err-404.html","_self");
  43. </script>
  44. <?PHP
  45. exit(1);
  46. }
  47. // VARIABLES AND FUNCTION DECLARATION
  48. define('GALLERY_NAME', "Indexbooks");
  49. define('GALLERY_TITLE', "List");
  50. define('GALLERY_DESC', "GNUBOOK List");
  51. define('GALLERY_KEYWORDS', "Link,Index");
  52. define('LANDINGPAGE', "gnubook.org");
  53. define('LANDINGPAGE_BGCOLOR', "#F1ECEC");
  54. define('LANDINGPAGE_COLOR', "#000000");
  55. define('LANDINGPAGE_BOLD', "yes");
  56. settype($aGalleryIndx, "array");
  57. // PARAMETERS VALIDATION AND NORMALIZATION
  58. //requestMethod
  59. $requestMethod = (string)filter_input(INPUT_SERVER, "REQUEST_METHOD");
  60. //if ($requestMethod != "GET") {
  61. // Err::trigger_error1(ERR::ERR_REQMETHOD, "The page has been initiated by an invalid REQUEST_METHOD: " . $requestMethod, __FILE__, __LINE__);
  62. //}
  63. //print
  64. //$print = substr((bool)filter_input1(INPUT_GET, "print", FILTER_SANITIZE_BOOLEAN), 0 , 1);
  65. $cgFlag = (int)filter_input(INPUT_POST, "cgf");
  66. if ($cgFlag === (98989898989 - (int)(date("YmdH") . left(date("i"), 1)))) {
  67. $cgFlagCheck = true;
  68. } else {
  69. $cgFlagCheck = false;
  70. }
  71. $cg1 = (int)filter_input(INPUT_POST, "cg1");
  72. $cg2 = (int)filter_input(INPUT_POST, "cg2");
  73. $cgr = (int)filter_input(INPUT_POST, "cgr");
  74. if ($cg1 === 0 || $cg2 === 0 || $cgr === 0) {
  75. $cgCheck = false;
  76. } else {
  77. if (($cg1 + $cg2) === $cgr) {
  78. $cgCheck = true;
  79. } else {
  80. $cgCheck = false;
  81. }
  82. }
  83. // DEBUG
  84. // echo "cg1=" . $cg1. "<br>";
  85. // echo "cg2=" . $cg2. "<br>";
  86. // echo "cgr=" . $cgr. "<br>";
  87. // echo "cgFlag=" . $cgFlag. "<br>";
  88. // if ($cgFlagCheck) {
  89. // echo "cgFlagCheck=" . "true" . "<br>";
  90. // } else {
  91. // echo "cgFlagCheck=" . "false" . "<br>";
  92. // }
  93. // if ($cgCheck) {
  94. // echo "cgCheck=" . "true" . "<br>";
  95. // } else {
  96. // echo "cgCheck=" . "false" . "<br>";
  97. // }
  98. ?>
  99. <!DOCTYPE html>
  100. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  101. <head>
  102. <meta charset="UTF-8"/>
  103. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  104. <!--
  105. <?php echo APP_LICENSE; ?>
  106. -->
  107. <title>GNUBOOK: <?php echo GALLERY_TITLE; ?></title>
  108. <link rel="shortcut icon" href="favicon.ico?v=<?php echo time() ?>" />
  109. <meta name="description" content="<?php echo GALLERY_DESC; ?>"/>
  110. <meta name="keywords" content="<?php echo GALLERY_KEYWORDS; ?>"/>
  111. <meta name="robots" content="index,follow"/>
  112. <meta name="author" content="the <?php echo APP_NAME;?> contributors"/>
  113. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  114. <link href="/css/style.css" type="text/css" rel="stylesheet">
  115. <style>
  116. body {
  117. background: url('/res/bg3.jpg');
  118. background-size: cover;
  119. background-color: #000000;
  120. background-position: 0 0;
  121. background-repeat: no-repeat;
  122. }
  123. a {
  124. color: green;
  125. }
  126. a:focus {
  127. color: green;
  128. }
  129. a:hover {
  130. color: green;
  131. }
  132. a:visited {
  133. color: green;
  134. }
  135. .bbb {
  136. color:#7bca2e;
  137. font-weight: 900;
  138. }
  139. .originLabel {
  140. font-weight:900;
  141. }
  142. #footerCont {
  143. position: relative;
  144. top: +34.5px;
  145. left:-15px;
  146. width: 111%;
  147. height:50px;
  148. border: 1px solid #C2DBF2;
  149. padding: 7px;
  150. opacity: 0.6;
  151. background: #b2dba1;
  152. color:#000000;
  153. font-family: Sans;
  154. font-size: 12px;
  155. text-align: center;
  156. z-index: 99998;
  157. display:none;
  158. }
  159. #footer {
  160. position: relative;
  161. top: 15px;
  162. left: -20px;
  163. float: right;
  164. width: fit-content;
  165. height: 21px;
  166. border: 0px solid #C2DBF2;
  167. padding: 2px;
  168. opacity: 0.7;
  169. background: #000f1f;
  170. color: #FFFFFF;
  171. font-family: Sans;
  172. font-size: 12px;
  173. font-weight: 400;
  174. text-align: right;
  175. z-index: 99999;
  176. vertical-align:middle;
  177. }
  178. #originsDisplay {
  179. float: right;
  180. position:relative;
  181. top:-30px;
  182. width:200px;
  183. height:80px;
  184. text-align:left;
  185. margin-right:42px;
  186. display:inline;
  187. }
  188. @media screen and (max-width: 650px) {
  189. #video {
  190. display:none;
  191. }
  192. }
  193. </style>
  194. </head>
  195. <body style="background-color: #000000; color: #FFFFFF">
  196. <div class="body-area">
  197. <div class="content-area">
  198. <div class="box" align="center">
  199. <br><br>
  200. <?php if (!$cgFlagCheck || !$cgCheck) { ?>
  201. <form id="frmcg" name="frmcg" action="." method="post" target="_self">
  202. <div stype="font-family: arial,verdana, sans serif;">
  203. &nbsp;&nbsp;&nbsp;<span style="font-size:13px">5 Mode Recaptcha:</span><br>
  204. &nbsp;&nbsp;&nbsp;<input id="cg1" name="cg1" type="number" maxlength="1" style="width:36px">&nbsp;&plus;&nbsp;<input id="cg2" name="cg2" type="number" maxlength="1" style="width:36px">&nbsp;&equals;&nbsp;<input id="cg2" name="cgr" type="number" maxlength="1" style="width:36px"></br></br>
  205. &nbsp;&nbsp;&nbsp;<input type="submit" value="Go" stype="font-size: 12px;">
  206. </div>
  207. <input id="cgf" name="cgf" type="hidden" value="<?php echo(98989898989 - (int)(date("YmdH") . left(date("i"),1)));?>">
  208. </form>
  209. <?php } else { ?>
  210. <div id="originsDisplay">
  211. <br>
  212. &nbsp;<span class="originLabel">Coding:</span>&nbsp;Italy&nbsp;<br>
  213. &nbsp;<span class="originLabel">Server:</span>&nbsp;Finland&nbsp;<br>
  214. &nbsp;<span class="originLabel"><a href="http://metrica.yandex.com" class="bbb" style="color:#7bca2e;" target="_top">Metrics</a>:</span>&nbsp;Russia&nbsp;<br>
  215. <br>
  216. </div>
  217. <?php
  218. // BEGIN Links
  219. //$iGalleries = GalleryUtil::readGalleryIndex($aGalleryIndx, GalleryUtil::LINK_GALLERY);
  220. $aGalleryIndx = [
  221. 0 => [
  222. 'virtualPath' => 'gnubook',
  223. 'link' => 'https://gnubook.org/gnubook'
  224. ]
  225. ];
  226. $iGalleries = count($aGalleryIndx);
  227. if ($iGalleries === 0) {
  228. echo "Empty";
  229. ?>
  230. <?php
  231. } else {
  232. echo "<p>";
  233. echo "<img src='/res/logoos.png' style='width:280px;height:280px;margin-left:22px;float:left;'>";
  234. echo '<iframe id="video" style="width:350px; height:350px; clear:both; margin-left:5%;" src="https://www.youtube.com/embed/5qF_qbaWt3Q?autoplay=1&loop=1&controls=0"; title="Linkin Park - Waiting For The end" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
  235. echo "</p>";
  236. echo "<div style='clear:both;'><br><br></div>";
  237. echo "<H3 style='clear:both;float:left;background:#000000;'>&nbsp;&nbsp;&nbsp;gnubook list:&nbsp;&nbsp;&nbsp;</H3>";
  238. //echo "<ul style='float:left; width:100%'>";
  239. echo "<br><br><br><br><br>";
  240. echo "<table border='0' style='width:95%;margin:auto; margin-left:20px; border:3px solid #FFFFFF;'>";
  241. $aBgs = ["#f2f2f2","#001832"];
  242. $aColors = ["#000000","#ffffff"];
  243. //$aBgs = ["#f2f2f2","#9ff99f"];
  244. $odd = false;
  245. foreach ($aGalleryIndx as $gallery) {
  246. if ($gallery['virtualPath'] !== "Index" && $gallery['virtualPath'] !== "Indexfoss") { ?>
  247. <tr><td style='height:35px;text-align:left;padding-left:5px;border-bottom:1px dashed lightgray;background:<?PHP echo($aBgs[$odd]);?>;color:#000000;white-space:nowrap;'><a href="<?PHP echo $gallery['link']; ?>"><?php echo $gallery['virtualPath']; ?></a></td><td style="width:150px;border-bottom:1px dashed lightgray;background:<?PHP echo($aBgs[$odd]);?>;color:<?PHP echo($aColors[$odd]);?>;text-align:center;">=&gt;</td><td style="border-bottom:1px dashed lightgray;padding-left:5px;background:<?PHP echo($aBgs[$odd]);?>;color:<?PHP echo($aColors[$odd]);?>;white-space:nowrap;"><?PHP echo $gallery['link']; ?></td></tr>
  248. <?PHP
  249. $odd=!$odd;
  250. }
  251. }
  252. echo "</table>";
  253. echo "<div style='clear:all; width:100%;'>&nbsp;</div>";
  254. }
  255. // END Link
  256. ?>
  257. <br><br>
  258. <div id="footerCont">&nbsp;</div>
  259. <div id="footer">&nbsp;&nbsp;<a href="https://5mode.com/dd.html" class="aaa" target="_top">Disclaimer</a>.&nbsp;&nbsp;A <a href="http://5mode.com/EN" class="aaa" target="_top">5 Mode</a> project and <a href="http://demo.5mode.com" target="_top" class="aaa">WYSIWYG</a> system. - CC&nbsp;&nbsp;</div>
  260. <br><br><br>
  261. <?php } ?>
  262. </div>
  263. </div>
  264. </div>
  265. <!-- Yandex.Metrika counter -->
  266. <script type="text/javascript" >
  267. (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
  268. m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
  269. (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
  270. ym(97321090, "init", {
  271. clickmap:true,
  272. trackLinks:true,
  273. accurateTrackBounce:true
  274. });
  275. </script>
  276. <noscript><div><img src="https://mc.yandex.ru/watch/97321090" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
  277. <!-- /Yandex.Metrika counter -->
  278. </body>
  279. </html>