home.php 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230
  1. <?php
  2. /**
  3. * Copyright 2021, 2024 5 Mode
  4. *
  5. * This file is part of Faceborg.
  6. *
  7. * Faceborg is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * Faceborg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with Faceborg. If not, see <https://www.gnu.org/licenses/>.
  19. *
  20. * home.php
  21. *
  22. * Home of Faceborg.
  23. *
  24. * @author Daniele Bonini <my25mb@aol.com>
  25. * @copyrights (c) 2016, 2024, 5 Mode
  26. */
  27. // CONSTANTS AND VARIABLE DECLARATION
  28. $CURRENT_VIEW = PUBLIC_VIEW;
  29. $CUDOZ = 1;
  30. $AVATAR_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . AVATAR_NAME;
  31. $CV_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "cv";
  32. $FRIENDS_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "friends";
  33. $BLOG_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "blog";
  34. $GALLERY_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "gallery";
  35. $MAGICJAR1_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "magicjar1";
  36. $MAGICJAR2_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "magicjar2";
  37. $MAGICJAR3_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "magicjar3";
  38. $profilePic = APP_DEF_PROFILE_PIC;
  39. // PAGE PARAMETERS
  40. $lang = APP_DEF_LANG;
  41. $lang1 = substr(strip_tags(filter_input(INPUT_GET, "hl")??""), 0, 5);
  42. if ($lang1 !== PHP_STR) {
  43. $lang = $lang1;
  44. }
  45. $shortLang = getShortLang($lang);
  46. $blogSP = (int)substr(strip_tags(filter_input(INPUT_GET, "blogSP")??""), 0, 5);
  47. $password = filter_input(INPUT_POST, "Password")??"";
  48. $password = strip_tags($password);
  49. if ($password !== PHP_STR) {
  50. $hash = hash("sha256", $password . APP_SALT, false);
  51. if (defined("APP_" . strtoupper(AVATAR_NAME) . "_HASH")) {
  52. if ($hash !== constant("APP_" . strtoupper(AVATAR_NAME) . "_HASH")) {
  53. $password=PHP_STR;
  54. }
  55. } else {
  56. if ($hash !== APP_HASH) {
  57. $password=PHP_STR;
  58. }
  59. }
  60. // if ($hash !== APP_HASH) {
  61. // $password=PHP_STR;
  62. // }
  63. }
  64. if ($password !== PHP_STR) {
  65. $CURRENT_VIEW = ADMIN_VIEW;
  66. } else {
  67. $CURRENT_VIEW = PUBLIC_VIEW;
  68. }
  69. $magicJar1 = (int)substr(strip_tags(filter_input(INPUT_POST, "txtMagicJar1")??""), 0, 1);
  70. $magicJar2 = (int)substr(strip_tags(filter_input(INPUT_POST, "txtMagicJar2")??""), 0, 1);
  71. $magicJar3 = (int)substr(strip_tags(filter_input(INPUT_POST, "txtMagicJar3")??""), 0, 1);
  72. if ($CURRENT_VIEW === PUBLIC_VIEW ) {
  73. $MAXP = (int)substr(strip_tags(filter_input(INPUT_GET, "maxp")??""), 0, 2);
  74. if ($MAXP === 0) {
  75. $MAXP = APP_BLOG_MAX_POSTS;
  76. }
  77. }
  78. function uploadNewRes() {
  79. global $AVATAR_PATH;
  80. global $CV_PATH;
  81. global $FRIENDS_PATH;
  82. global $BLOG_PATH;
  83. global $GALLERY_PATH;
  84. global $MAGICJAR1_PATH;
  85. global $MAGICJAR2_PATH;
  86. global $MAGICJAR3_PATH;
  87. global $magicJar1;
  88. global $magicJar2;
  89. global $magicJar3;
  90. //echo_ifdebug(true, "AVATAR_PATH#1=");
  91. //echo_ifdebug(true, $AVATAR_PATH);
  92. //echo($_FILES['filesdd']['tmp_name'][0]);
  93. //exit(1);
  94. //error_log("tmp_name0 = ");
  95. if (!empty($_FILES['files']['tmp_name'][0]) || !empty($_FILES['filesdd']['tmp_name'][0])) {
  96. $uploads = (array)fixMultipleFileUpload($_FILES['files']);
  97. if ($uploads[0]['error'] === PHP_UPLOAD_ERR_NO_FILE) {
  98. $uploads = (array)fixMultipleFileUpload($_FILES['filesdd']);
  99. }
  100. //if ($uploads[0]['error'] === PHP_UPLOAD_ERR_NO_FILE) {
  101. // echo("WARNING: No file uploaded.");
  102. // return;
  103. //}
  104. $google = "abcdefghijklmnopqrstuvwxyz";
  105. if (count($uploads)>strlen($google)) {
  106. echo("WARNING: Too many uploaded files.");
  107. return;
  108. }
  109. $i=1;
  110. foreach($uploads as &$upload) {
  111. switch ($upload['error']) {
  112. case PHP_UPLOAD_ERR_OK:
  113. break;
  114. case PHP_UPLOAD_ERR_NO_FILE:
  115. echo("WARNING: One or more uploaded files are missing.");
  116. return;
  117. case PHP_UPLOAD_ERR_INI_SIZE:
  118. echo("WARNING: File exceeded INI size limit.");
  119. return;
  120. case PHP_UPLOAD_ERR_FORM_SIZE:
  121. echo("WARNING: File exceeded form size limit.");
  122. return;
  123. case PHP_UPLOAD_ERR_PARTIAL:
  124. echo("WARNING: File only partially uploaded.");
  125. return;
  126. case PHP_UPLOAD_ERR_NO_TMP_DIR:
  127. echo("WARNING: TMP dir doesn't exist.");
  128. return;
  129. case PHP_UPLOAD_ERR_CANT_WRITE:
  130. echo("WARNING: Failed to write to the disk.");
  131. return;
  132. case PHP_UPLOAD_ERR_EXTENSION:
  133. echo("WARNING: A PHP extension stopped the file upload.");
  134. return;
  135. default:
  136. echo("WARNING: Unexpected error happened.");
  137. return;
  138. }
  139. if (!is_uploaded_file($upload['tmp_name'])) {
  140. echo("WARNING: One or more file have not been uploaded.");
  141. return;
  142. }
  143. // name
  144. $name = (string)substr((string)filter_var($upload['name']), 0, 255);
  145. if ($name == PHP_STR) {
  146. echo("WARNING: Invalid file name: " . $name);
  147. return;
  148. }
  149. $upload['name'] = $name;
  150. // fileType
  151. $fileType = substr((string)filter_var($upload['type']), 0, 30);
  152. $upload['type'] = $fileType;
  153. // tmp_name
  154. $tmp_name = substr((string)filter_var($upload['tmp_name']), 0, 300);
  155. if ($tmp_name == PHP_STR || !file_exists($tmp_name)) {
  156. echo("WARNING: Invalid file temp path: " . $tmp_name);
  157. return;
  158. }
  159. $upload['tmp_name'] = $tmp_name;
  160. //size
  161. $size = substr((string)filter_var($upload['size'], FILTER_SANITIZE_NUMBER_INT), 0, 12);
  162. if ($size == "") {
  163. echo("WARNING: Invalid file size.");
  164. return;
  165. }
  166. $upload["size"] = $size;
  167. $tmpFullPath = $upload["tmp_name"];
  168. $originalFilename = pathinfo($name, PATHINFO_FILENAME);
  169. $originalFileExt = pathinfo($name, PATHINFO_EXTENSION);
  170. $fileExt = strtolower(pathinfo($name, PATHINFO_EXTENSION));
  171. $date = date("Ymd-His");
  172. $rnd = mt_rand(1000000000, 9999999999);
  173. if ($originalFileExt!==PHP_STR) {
  174. $destFileName = $date . "-" . $rnd . substr($google, $i-1, 1) . "|" . str_replace(" ", "_", $originalFilename) . ".$fileExt";
  175. } else {
  176. return;
  177. }
  178. //$CV_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "cv";
  179. //$FRIENDS_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "friends";
  180. //$BLOG_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "blog";
  181. //$GALLERY_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "gallery";
  182. $destPaths = [];
  183. $destFullPaths = [];
  184. if ($magicJar1 != 0) {
  185. $destPaths[] = $MAGICJAR1_PATH;
  186. $destFullPaths[] = $destPaths[count($destPaths)-1] . DIRECTORY_SEPARATOR . $destFileName;
  187. }
  188. if ($magicJar2 != 0) {
  189. $destPaths[] = $MAGICJAR2_PATH;
  190. $destFullPaths[] = $destPaths[count($destPaths)-1] . DIRECTORY_SEPARATOR . $destFileName;
  191. }
  192. if ($magicJar3 != 0) {
  193. $destPaths[] = $MAGICJAR3_PATH;
  194. $destFullPaths[] = $destPaths[count($destPaths)-1] . DIRECTORY_SEPARATOR . $destFileName;
  195. }
  196. if (empty($destPaths)) {
  197. switch ($fileExt) {
  198. case "doc":
  199. case "docx":
  200. case "pdf":
  201. $destPaths[] = $CV_PATH;
  202. break;
  203. case "txt":
  204. $destPaths[] = $BLOG_PATH;
  205. break;
  206. case "png":
  207. case "jpg":
  208. case "jpeg":
  209. case "gif":
  210. case "webp":
  211. $destPaths[] = $GALLERY_PATH;
  212. break;
  213. default:
  214. $destPaths[] = $MAGICJAR1_PATH;
  215. break;
  216. }
  217. $destFullPaths[] = $destPaths[0] . DIRECTORY_SEPARATOR . $destFileName;
  218. }
  219. $iPath = 0;
  220. foreach($destFullPaths as $destFullPath) {
  221. if (file_exists($destFullPath)) {
  222. echo("WARNING: destination already exists");
  223. exit(1);
  224. }
  225. if (filesize($tmpFullPath) > APP_FILE_MAX_SIZE) {
  226. echo("ERROR: file size(" . filesize($tmpFullPath) . ") exceeds app limit:" . APP_FILE_MAX_SIZE);
  227. exit(1);
  228. }
  229. if (!is_readable($AVATAR_PATH)) {
  230. mkdir($AVATAR_PATH, 0777);
  231. }
  232. if (!is_readable($destPaths[$iPath])) {
  233. mkdir($destPaths[$iPath], 0777);
  234. }
  235. $pattern = $destPaths[$iPath] . DIRECTORY_SEPARATOR . "*" . "|" . str_replace(" ", "_", $originalFilename) . ".$fileExt";
  236. $aExistingPaths = glob($pattern);
  237. if (!empty($aExistingPaths)) {
  238. continue;
  239. }
  240. $ret5 = copy($tmpFullPath, $destFullPath);
  241. echo($ret5);
  242. $iPath++;
  243. }
  244. // Cleaning up..
  245. // Delete the tmp file..
  246. unlink($tmpFullPath);
  247. $i++;
  248. }
  249. } else {
  250. //echo("WARNING: No file uploaded (err-pip-po).");
  251. }
  252. }
  253. function writeFriends() {
  254. global $FRIENDS_PATH;
  255. $destPath = $FRIENDS_PATH;
  256. $s = filter_input(INPUT_POST, "f")??"";
  257. $s = strip_tags($s);
  258. if ($s != PHP_STR) {
  259. //echo($s);
  260. //exit(0);
  261. $friends=explode("|", $s);
  262. if (!is_readable($destPath)) {
  263. mkdir($destPath, 0777);
  264. }
  265. foreach($friends as $friend) {
  266. $a = explode("://",$friend);
  267. $s = $a[1];
  268. $a = explode("/", $s);
  269. $friendName = $a[0] . ".txt";
  270. file_put_contents($destPath . DIRECTORY_SEPARATOR . $friendName, $friend);
  271. }
  272. }
  273. }
  274. function grabProfileImage() {
  275. global $GALLERY_PATH;
  276. $pattern = $GALLERY_PATH . DIRECTORY_SEPARATOR . "*";
  277. $aImagePaths = glob($pattern);
  278. if (isset($aImagePaths[0])) {
  279. $retval = basename($aImagePaths[0]);
  280. } else {
  281. $retval = null;
  282. }
  283. return $retval;
  284. }
  285. function startApp() {
  286. global $CURRENT_VIEW;
  287. global $profilePic;
  288. if ($CURRENT_VIEW == ADMIN_VIEW) {
  289. uploadNewRes();
  290. writeFriends();
  291. }
  292. $profilePic = grabProfileImage() ?? APP_DEF_PROFILE_PIC;
  293. //echo("profile pic=" . $profilePic);
  294. }
  295. startApp();
  296. ?>
  297. <!DOCTYPE html>
  298. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  299. <head>
  300. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  301. <!--<?PHP echo(APP_LICENSE);?>-->
  302. <title><?PHP echo(APP_TITLE);?></title>
  303. <link rel="shortcut icon" href="/favicon.ico" />
  304. <?PHP if ($CURRENT_VIEW == PUBLIC_VIEW): ?>
  305. <script>
  306. function renderCorrectPag () {
  307. if (window.innerWidth <= 500) {
  308. if (<?PHP echo($MAXP) ?>!=<?PHP echo(APP_BLOG_ULTRATHIN_MAX_POSTS) ?>) {
  309. window.open("http://<?php echo $_SERVER['HTTP_HOST'];?>/?maxp=<?PHP echo(APP_BLOG_ULTRATHIN_MAX_POSTS) ?>","_self");
  310. }
  311. } else if (window.innerWidth <= 1050) {
  312. if (<?PHP echo($MAXP) ?>!=<?PHP echo(APP_BLOG_THIN_MAX_POSTS) ?>) {
  313. window.open("http://<?php echo $_SERVER['HTTP_HOST'];?>/?maxp=<?PHP echo(APP_BLOG_THIN_MAX_POSTS) ?>","_self");
  314. }
  315. } else {
  316. if (<?PHP echo($MAXP) ?>!=<?PHP echo(APP_BLOG_MAX_POSTS) ?>) {
  317. window.open("http://<?php echo $_SERVER['HTTP_HOST'];?>/?maxp=<?PHP echo(APP_BLOG_MAX_POSTS) ?>","_self");
  318. }
  319. }
  320. }
  321. window.addEventListener("load", function() {
  322. renderCorrectPag();
  323. }, false);
  324. window.addEventListener("resize", function() {
  325. renderCorrectPag();
  326. }, false);
  327. </script>
  328. <?PHP endif; ?>
  329. <meta name="description" content="Welcome to Faceborg! Let everyone have its colorful 'borghetto'."/>
  330. <meta name="keywords" content="faceborg,on,premise,solution"/>
  331. <meta name="robots" content="index,follow"/>
  332. <meta name="author" content="5 Mode"/>
  333. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  334. <script src="/js/sha.js" type="text/javascript"></script>
  335. <script src="/js/common.js" type="text/javascript"></script>
  336. <script src="/js/bootstrap.min.js" type="text/javascript"></script>
  337. <link href="/css/style.css?r=<?PHP echo(time());?>" type="text/css" rel="stylesheet">
  338. <link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet">
  339. </head>
  340. <?PHP if ($CURRENT_VIEW == ADMIN_VIEW): ?>
  341. <body style="background:url('/res/bg1.jpg') no-repeat; background-size: cover; background-attachment: fixed; background-position: center;">
  342. <div id="AFHint" style="z-index:0;">
  343. <button type="button" class="close" aria-label="Close" onclick="closeMe(this);" style="position:relative; top:5px; left:-7px;">
  344. <span aria-hidden="true" style="color:black; font-weight:900;">&times;</span>
  345. </button>
  346. <br>
  347. <span onclick="showHowTo();"><?PHP echo(getResource0("How-to: Manage your avatars in Faceborg", $lang));?></span>
  348. <br><br>
  349. </div>
  350. <form id="frmUpload" role="form" method="post" action="/<?PHP echo(AVATAR_NAME);?>?hl=<?PHP echo($lang);?>" target="_self" enctype="multipart/form-data">
  351. <div class="dragover" dropzone="copy">
  352. <div id="fireupload" onclick="$('#files').click()">
  353. <img id="picavatar" src="/img?av=<?PHP echo(AVATAR_NAME);?>&pic=<?PHP echo($profilePic);?>" align="middle">
  354. </div>
  355. <input id="files" name="files[]" type="file" accept=".*" style="visibility: hidden;" multiple>
  356. <input type="hidden" id="a" name="a">
  357. <input type="hidden" id="f" name="f">
  358. </div>
  359. <div class="tools">
  360. <div class="settingson" onclick="settingsOn();"></div>
  361. <?PHP if ($magicJar1 == 0): ?>
  362. <div class="magicjar1" style="background:url(/res/magicjar1dis.png);" onclick="setJar1On()"></div>
  363. <?PHP else: ?>
  364. <div class="magicjar1" style="background:url(/res/magicjar1.png);" onclick="setJar1Off()"></div>
  365. <?PHP endif; ?>
  366. <?PHP if ($magicJar2 == 0): ?>
  367. <div class="magicjar2" style="background:url(/res/magicjar2dis.png);" onclick="setJar2On()"></div>
  368. <?PHP else: ?>
  369. <div class="magicjar2" style="background:url(/res/magicjar2.png);" onclick="setJar2Off()"></div>
  370. <?PHP endif; ?>
  371. <?PHP if ($magicJar3 == 0): ?>
  372. <div class="magicjar3" style="background:url(/res/magicjar3dis.png);" onclick="setJar3On()"></div>
  373. <?PHP else: ?>
  374. <div class="magicjar3" style="background:url(/res/magicjar3.png);" onclick="setJar3Off()"></div>
  375. <?PHP endif; ?>
  376. <div class="settingsoff" onclick="settingsOff();"></div>
  377. </div>
  378. <input type="hidden" id="txtMagicJar1" name="txtMagicJar1" value="<?PHP echo($magicJar1);?>">
  379. <input type="hidden" id="txtMagicJar2" name="txtMagicJar2" value="<?PHP echo($magicJar2);?>">
  380. <input type="hidden" id="txtMagicJar3" name="txtMagicJar3" value="<?PHP echo($magicJar3);?>">
  381. <input type="hidden" id="Password" name="Password" value="<?PHP echo($password);?>">
  382. </form>
  383. <div id="footerCont">&nbsp;</div>
  384. <div id="footer"><span style="background:#FFFFFF; opacity:0.7;">&nbsp;&nbsp;<a class="aaa" href="dd.html">Disclaimer</a>.&nbsp;&nbsp;A <a href="http://5mode.com" class="aaa">5 Mode</a> project and <a href="http://demo.5mode.com" class="aaa">WYSIWYG</a> system. <?PHP echo(getResource0("Some rights reserved", $lang));?></span></div>
  385. <?PHP else: ?>
  386. <body style="background:#dadada no-repeat; background-size: cover; background-attachment: fixed; background-position: center;">
  387. <?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "jscheck.html")): ?>
  388. <?php include(APP_PATH . DIRECTORY_SEPARATOR . "jscheck.html"); ?>
  389. <?php endif; ?>
  390. <!--<div id="AFHint">
  391. <button type="button" class="close" aria-label="Close" onclick="closeMe(this);" style="position:relative; top:5px; left:-7px;">
  392. <span aria-hidden="true" style="color:black; font-weight:900;">&times;</span>
  393. </button>
  394. <br>
  395. <span onclick="showHowTo();"><?PHP echo(getResource0("How-to: Manage your avatars in Faceborg", $lang));?></span>
  396. <br><br>
  397. </div> -->
  398. <!--
  399. <div id="header" class="header" style="margin-top:18px;margin-bottom:18px;">
  400. <div style="float:left">
  401. <a href="http://faceborg.5mode-foss.eu" target="_self" style="color:#000000; text-decoration: none;">&nbsp;<img src="/res/AFlogo.png" align="middle" style="position:relative;top:-5px;width:22px;">&nbsp;Faceborg</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://github.com/par7133/Faceborg" style="color:#000000;"><span style="color:#119fe2">on</span> github</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:posta@elettronica.lol" style="color:#000000;"><span style="color:#119fe2">for</span> feedback</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="tel:+39-331-4029415" style="font-size:13px;background-color:#15c60b;border:2px solid #15c60b;color:#000000;height:27px;text-decoration:none;">&nbsp;&nbsp;get support&nbsp;&nbsp;</a><br>
  402. </div>
  403. </div> -->
  404. <div id="headerMob" class="header" style="margin-top:18px;margin-bottom:18px;">
  405. <div style="float:left">
  406. <a href="http://faceborg.5mode-foss.eu" target="_self" style="color:#000000; text-decoration: none;">&nbsp;<img src="/res/AFlogo.png" align="middle" style="position:relative;top:-5px;width:22px;">&nbsp;Faceborg</a><br>
  407. </div>
  408. </div>
  409. <form id="frmUpload" role="form" method="post" action="/<?PHP echo(AVATAR_NAME);?>?hl=<?PHP echo($lang);?>" target="_self" enctype="multipart/form-data">
  410. <div id="blog">
  411. <?PHP
  412. $iEntry = 2;
  413. $totLinks = 0;
  414. $aLinks=[];
  415. $aBGColors = APP_CARD_BGCOLORS;
  416. $aColors = APP_CARD_COLORS;
  417. $pattern = $BLOG_PATH . DIRECTORY_SEPARATOR . "*.txt";
  418. $aFilePaths = glob($pattern);
  419. if (empty($aFilePaths)): ?>
  420. <div class="blog-content">
  421. <div class="blog-entry" style="background-color:#FFFFFF;">
  422. <br><br>
  423. <?PHP echo(date("Ymd") . " " . date("Hi"));?><br><br><br>
  424. <?PHP echo(getResource0("Hello from 5 Mode", $lang));?>,<br><br>
  425. <?PHP echo(getResource0("This is just an example of blog entry", $lang));?>.
  426. </div>
  427. </div>
  428. <?PHP $totLinks = 1; ?>
  429. <?PHP else: ?>
  430. <?PHP
  431. $CUDOZ++;
  432. $iEntry = 1;
  433. $iCurEntry = 1;
  434. arsort($aFilePaths, SORT_STRING);
  435. $totPost = count($aFilePaths);
  436. // PAGINATION
  437. $totPages = (int)(count($aFilePaths)/$MAXP);
  438. if ($totPages < (count($aFilePaths)/$MAXP)) {
  439. $totPages++;
  440. }
  441. $firstPost = 0;
  442. $prevPost = $blogSP - $MAXP;
  443. if ($prevPost < 0) {
  444. $prevPost = 0;
  445. }
  446. $nextPost = $blogSP + $MAXP;
  447. if ($nextPost > (($totPages - 1) * $MAXP)) {
  448. $nextPost = (($totPages - 1) * $MAXP);
  449. }
  450. if ($nextPost < 0) {
  451. $nextPost = 0;
  452. }
  453. $lastPost = (($totPages - 1) * $MAXP);
  454. if ($lastPost < 0) {
  455. $lastPost = 0;
  456. }
  457. // ---
  458. //echo("blogSP=".$blogSP);
  459. foreach ($aFilePaths as $filePath) {
  460. //echo("iCurEntry=".$iCurEntry);
  461. if ($iCurEntry<($blogSP+1)) {
  462. $iCurEntry++;
  463. continue;
  464. }
  465. if ($iEntry>$MAXP) {
  466. break;
  467. }
  468. $orifilename = basename($filePath);
  469. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  470. $date = explode("-",$orifilename)[0];
  471. $time = explode("-",$orifilename)[1];
  472. $time = left($time,2) . ":" . substr($time,2,2);
  473. if ($iEntry === count($aFilePaths) || $iEntry==$MAXP) {
  474. $marginbottom = "0px";
  475. } else {
  476. $marginbottom = "5px";
  477. }
  478. ?>
  479. <?PHP if ($orifileExt === "txt"):?>
  480. <div class="blog-content">
  481. <div class="blog-entry" onclick="selectVideo(<?php echo($iEntry-1);?>);" style="background-color:<?PHP echo($aBGColors[$iEntry-1]);?>;color:<?PHP echo($aColors[$iEntry-1]);?>;">
  482. <?PHP if (APP_PAGINATION): ?>
  483. <?php if ($iCurEntry===1 && $iEntry===1): ?>
  484. <!--<img class="blog-img" src="/res/arrow-leftd.png" style="float:left;">-->
  485. <?php elseif ($iEntry===1 && $iCurEntry>1): ?>
  486. <div style="float:right;position: absolute;left:+1%; opacity:0.85;"><a href="/<?PHP echo(AVATAR_NAME); ?>/?blogSP=<?PHP echo($prevPost);?>&maxp=<?PHP echo($MAXP)?>" onclick="event.stopPropagation();"><img class="blog-img" src="/res/arrow-left.png" style="float:left;"></a></div>
  487. <?php endif; ?>
  488. <?php if ($iEntry===$MAXP && $iCurEntry===$totPost): ?>
  489. <!--<img class="blog-img" src="/res/arrow-rightd.png" style="float:right;">-->
  490. <?php elseif ($iEntry===$MAXP): ?>
  491. <?PHP if ($MAXP===APP_BLOG_ULTRATHIN_MAX_POSTS): ?>
  492. <div style="float:right;position: absolute;left:+65%; opacity:0.85;"><a href="/<?PHP echo(AVATAR_NAME); ?>/?blogSP=<?PHP echo($nextPost);?>&maxp=<?PHP echo($MAXP)?>" onclick="event.stopPropagation();"><img class="blog-img" src="/res/arrow-right.png" style="float:right;"></a></div>
  493. <?PHP elseif ($MAXP===APP_BLOG_THIN_MAX_POSTS): ?>
  494. <div style="float:right;position: absolute;left:+82%; opacity:0.85;"><a href="/<?PHP echo(AVATAR_NAME); ?>/?blogSP=<?PHP echo($nextPost);?>&maxp=<?PHP echo($MAXP)?>" onclick="event.stopPropagation();"><img class="blog-img" src="/res/arrow-right.png" style="float:right;"></a></div>
  495. <?PHP else: ?>
  496. <div style="float:right;position: absolute;left:+92%; opacity:0.85;"><a href="/<?PHP echo(AVATAR_NAME); ?>/?blogSP=<?PHP echo($nextPost);?>&maxp=<?PHP echo($MAXP)?>" onclick="event.stopPropagation();"><img class="blog-img" src="/res/arrow-right.png" style="float:right;"></a></div>
  497. <?php endif; ?>
  498. <?php endif; ?>
  499. <?PHP else: ?>
  500. &nbsp;
  501. <?PHP endif; ?>
  502. <div id="mydivzero">&nbsp;</div>
  503. <?PHP
  504. $s=file_get_contents($filePath);
  505. echo($date."&nbsp;".$time."<br><br><br>".enableEmoticons(HTMLencode($s, true)));
  506. ?>
  507. </div>
  508. </div>
  509. <?PHP $aLinks[] = "/img?av=" . AVATAR_NAME . "&pic=" . $orifilename; ?>
  510. <?PHP EndIf; ?>
  511. <?PHP
  512. $totLinks = $iEntry;
  513. $iEntry++;
  514. $iCurEntry++;
  515. }?>
  516. <?PHP endif; ?>
  517. <?PHP for($i=$iEntry;$i<=$MAXP;$i++):?>
  518. <div class="blog-content">
  519. <div class="blog-entry" style="border:0px;">
  520. &nbsp;
  521. </div>
  522. </div>
  523. <?PHP endfor; ?>
  524. <?PHP if (($MAXP / 3) > (int)($MAXP / 3)): ?>
  525. <div class="blog-content">
  526. <div class="blog-entry" style="border:0px;">
  527. &nbsp;
  528. </div>
  529. </div>
  530. <?PHP if ((($MAXP+1) / 3) > (int)(($MAXP+1) / 3)): ?>
  531. <div class="blog-content">
  532. <div class="blog-entry" style="border:0px;">
  533. &nbsp;
  534. </div>
  535. </div>
  536. <?PHP endif; ?>
  537. <?PHP endif; ?>
  538. <br><br>
  539. </div>
  540. <?php
  541. $iLink = 0;
  542. foreach($aLinks as $aLink) { ?>
  543. <button id="modalButton<?php echo($iLink);?>" type="button" class="btn btn-primary" style="display:none;" data-toggle="modal" data-target="#modal<?php echo($iLink);?>">Button #<?php echo($iLink);?></button>
  544. <div class="modal" tabindex="-1" role="dialog" id="modal<?php echo($iLink);?>" style="z-index:99997">
  545. <div class="modal-dialog modal-lg" role="document" style="width:95%;margin-top:0;background-color:#FFFFFF;z-index:99998">
  546. <div class="modal-content" style="float:left;width:content-box;max-width:60%;z-index:99999;font-size:12px;">
  547. &nbsp;
  548. </div>
  549. </div>
  550. </div>
  551. <?php $iLink++; ?>
  552. <?php } ?>
  553. <?PHP
  554. // GALLERY GHOST
  555. $CUDOZ++;
  556. ?>
  557. <div id="halSys" class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 col-haligned input-group" style="display: none; position:relative; top:-85px; left:-95px; white-space: nowrap;">
  558. <div class="input-group-btn" style="border: 0px solid red;">
  559. <span id="halTerm" style="float: left; position:relative; left:+4%; top: +2px; cursor:pointer;"><img id="hal" src="/res/hal2_closed.png" style="width: 52px; position:relative; left:+5px;"></span>
  560. <div id="halBoard" style="float: left; position:relative; left:+5%; top: +2px; display: none;">
  561. <?PHP
  562. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*";
  563. $aFilePaths = glob($pattern);
  564. if (!empty($aFilePaths)): ?>
  565. <?PHP $CUDOZ++; ?>
  566. <h3 class="board-entry" style="font-size: 1.45vw; float:left; color:#000000; background-color:lightgray; opacity:0.7; margin-right:4px; padding:4px; margin-left:3px; margin-right:3px;height: 24px;">
  567. <nobr>
  568. <div class="input-group">
  569. <div class="input-group-btn btn-white dropup">
  570. <a id="halCVOptions" class="btn dropdown-toggle mydropdown-toggle btn-link btn-white" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="font-size: 9px; font-weight:700; top:-9px; cursor:pointer; color: #000000;"><?php echo("CV");?></a>
  571. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  572. <tr>
  573. <td class="cv-options-td">
  574. <br>
  575. <?PHP
  576. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*.doc";
  577. $aFilePaths = glob($pattern);
  578. if (!empty($aFilePaths)): ?>
  579. <a id="halCVDoc" href="/doc?av=<?PHP echo(AVATAR_NAME);?>&re=cv&doc=<?PHP echo(basename($aFilePaths[0]));?>" style="cursor:pointer; color: #000000; font-weight:700;"><?php echo("doc");?></a><br><br>
  580. <?PHP endif; ?>
  581. <?PHP
  582. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*.pdf";
  583. $aFilePaths = glob($pattern);
  584. if (!empty($aFilePaths)): ?>
  585. <a id="halCVPdf" href="/doc?av=<?PHP echo(AVATAR_NAME);?>&re=cv&doc=<?PHP echo(basename($aFilePaths[0]));?>" style="cursor:pointer; color: #000000; font-weight:700;"><?php echo("pdf");?></a><br> <br>
  586. <?PHP endif; ?>
  587. </td>
  588. </tr>
  589. </table>
  590. </div>
  591. </div>
  592. </nobr>
  593. &nbsp;&nbsp; &nbsp;</h3>
  594. <?PHP endif; ?>
  595. <?PHP
  596. $pattern = $GALLERY_PATH . DIRECTORY_SEPARATOR . "*";
  597. $aFilePaths = glob($pattern);
  598. if (!empty($aFilePaths)): ?>
  599. <h3 class="board-entry" style="font-size: 1.45vw; float:left; color:#000000; background-color:lightgray; opacity:0.7; margin-right:4px; padding:4px; margin-left:3px; margin-right:3px;height: 24px;">
  600. <nobr>
  601. <div class="input-group">
  602. <div class="input-group-btn btn-white dropup">
  603. <a id="halGALOptions" class="btn dropdown-toggle mydropdown-toggle btn-link btn-white" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="font-size: 9px; font-weight:700; top:-9px; cursor:pointer; color: #000000;">Gallery</a>
  604. <table class="dropdown-menu gal-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  605. <tr>
  606. <td class="gal-options-td">
  607. <br>
  608. <?PHP
  609. $iEntry = 1;
  610. foreach ($aFilePaths as $filePath) {
  611. $orifilename = basename($filePath);
  612. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  613. if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])) {
  614. $filename = explode("|",basename($filePath))[1];
  615. if ($iEntry === count($aFilePaths)) {
  616. $marginbottom = "0px";
  617. } else {
  618. $marginbottom = "5px";
  619. }
  620. ?>
  621. <a id="halMP1Doc<?PHP echo($iEntry);?>" href="/img?av=<?PHP echo(AVATAR_NAME);?>&pic=<?PHP echo($orifilename);?>" style="cursor:pointer; color: #000000; font-weight:700;margin-right:10px;">
  622. <?PHP echo($filename);?>
  623. </a>
  624. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  625. <br><br>
  626. <?PHP else: ?>
  627. <br>
  628. <?PHP endif; ?>
  629. <?PHP }?>
  630. <?PHP
  631. $iEntry++;
  632. }?>
  633. <br>
  634. </td>
  635. </tr>
  636. </table>
  637. </div>
  638. </div>
  639. </nobr>
  640. &nbsp;&nbsp;&nbsp;</h3>
  641. <?PHP endif; ?>
  642. <?PHP
  643. $pattern = $MAGICJAR1_PATH . DIRECTORY_SEPARATOR . "*";
  644. $aFilePaths = glob($pattern);
  645. if (!empty($aFilePaths)): ?>
  646. <h3 class="board-entry" style="font-size: 1.45vw; float:left; color:#000000; background-color:lightgray; opacity:0.7; margin-right:4px; padding:4px; margin-left:3px; margin-right:3px;height: 24px;">
  647. <nobr>
  648. <div class="input-group">
  649. <div class="input-group-btn btn-white dropup">
  650. <a id="halMP1Options" class="btn dropdown-toggle mydropdown-toggle btn-link btn-white" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="font-size: 0.95vw; font-weight:700; top:-9px; cursor:pointer; color: #000000;">MagicPot1</a>
  651. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  652. <tr>
  653. <td class="cv-options-td">
  654. <br>
  655. <?PHP
  656. $iEntry = 1;
  657. foreach ($aFilePaths as $filePath) {
  658. $orifilename = basename($filePath);
  659. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  660. $filename = explode("|",basename($filePath))[1];
  661. if ($iEntry === count($aFilePaths)) {
  662. $marginbottom = "0px";
  663. } else {
  664. $marginbottom = "5px";
  665. }
  666. ?>
  667. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  668. <a id="halMP1Doc<?PHP echo($iEntry);?>" href="/imgj?av=<?PHP echo(AVATAR_NAME);?>&jar=1&fn=<?PHP echo($orifilename);?>" style="cursor:pointer; color: #000000; font-weight:700;margin-right:10px;">
  669. <?PHP else: ?>
  670. <a id="halMP1Doc<?PHP echo($iEntry);?>" href="/file?av=<?PHP echo(AVATAR_NAME);?>&jar=1&fn=<?PHP echo($orifilename);?>" style="cursor:pointer; color: #000000; font-weight:700;margin-right:10px;">
  671. <?PHP endif; ?>
  672. <?PHP echo($filename);?>
  673. </a>
  674. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  675. <br><br>
  676. <?PHP else: ?>
  677. <br>
  678. <?PHP endif; ?>
  679. <?PHP
  680. $iEntry++;
  681. }?>
  682. <br>
  683. </td>
  684. </tr>
  685. </table>
  686. </div>
  687. </div>
  688. </nobr>
  689. &nbsp;&nbsp;&nbsp;</h3>
  690. <?PHP endif; ?>
  691. <?PHP
  692. $pattern = $MAGICJAR2_PATH . DIRECTORY_SEPARATOR . "*";
  693. $aFilePaths = glob($pattern);
  694. if (!empty($aFilePaths)): ?>
  695. <!--<h3 class="board-entry" style="border-radius:3px;font-size: 1.45vw; font-weight:700; float:left; background-color:lightgray; opacity:0.7; margin-right:4px; padding:4px;">
  696. &nbsp;&nbsp;<a id="halMagicpot1" onclick="#" style="cursor:pointer; color: #000000;">Magicpot1</a>&nbsp;&nbsp;
  697. </h3>-->
  698. <h3 class="board-entry" style="font-size: 1.45vw; float:left; color:#000000; background-color:lightgray; opacity:0.7; margin-right:4px; padding:4px; margin-left:3px; margin-right:3px;height: 24px;">
  699. <nobr>
  700. <div class="input-group">
  701. <div class="input-group-btn btn-white dropup">
  702. <a id="halMP2Options" class="btn dropdown-toggle mydropdown-toggle btn-link btn-white" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="font-size: 0.95vw; font-weight:700; top:-9px; cursor:pointer; color: #000000;">MagicPot2</a>
  703. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  704. <tr>
  705. <td class="cv-options-td">
  706. <br>
  707. <?PHP
  708. $iEntry = 1;
  709. foreach ($aFilePaths as $filePath) {
  710. $orifilename = basename($filePath);
  711. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  712. $filename = explode("|",basename($filePath))[1];
  713. if ($iEntry === count($aFilePaths)) {
  714. $marginbottom = "0px";
  715. } else {
  716. $marginbottom = "5px";
  717. }
  718. ?>
  719. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  720. <a id="halMP1Doc<?PHP echo($iEntry);?>" href="/imgj?av=<?PHP echo(AVATAR_NAME);?>&jar=2&fn=<?PHP echo($orifilename);?>" style="cursor:pointer; color: #000000; font-weight:700;margin-right:10px;">
  721. <?PHP else: ?>
  722. <a id="halMP1Doc<?PHP echo($iEntry);?>" href="/file?av=<?PHP echo(AVATAR_NAME);?>&jar=2&fn=<?PHP echo($orifilename);?>" style="cursor:pointer; color: #000000; font-weight:700;margin-right:10px;">
  723. <?PHP endif; ?>
  724. <?PHP echo($filename);?>
  725. </a>
  726. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  727. <br><br>
  728. <?PHP else: ?>
  729. <br>
  730. <?PHP endif; ?>
  731. <?PHP
  732. $iEntry++;
  733. }?>
  734. <br>
  735. </td>
  736. </tr>
  737. </table>
  738. </div>
  739. </div>
  740. </nobr>
  741. &nbsp;&nbsp;&nbsp;</h3>
  742. <?PHP endif; ?>
  743. <?PHP
  744. $pattern = $MAGICJAR3_PATH . DIRECTORY_SEPARATOR . "*";
  745. $aFilePaths = glob($pattern);
  746. if (!empty($aFilePaths)): ?>
  747. <!--<h3 class="board-entry" style="border-radius:3px;font-size: 1.45vw; font-weight:700; float:left; background-color:lightgray; opacity:0.7; margin-right:4px; padding:4px;">
  748. &nbsp;&nbsp;<a id="halMagicpot1" onclick="#" style="cursor:pointer; color: #000000;">Magicpot1</a>&nbsp;&nbsp;
  749. </h3>-->
  750. <h3 class="board-entry" style="font-size: 1.45vw; float:left; color:#000000; background-color:lightgray; opacity:0.7; margin-right:4px; padding:4px; margin-left:3px; margin-right:3px;height: 24px;">
  751. <nobr>
  752. <div class="input-group">
  753. <div class="input-group-btn btn-white dropup">
  754. <a id="halMP1Options" class="btn dropdown-toggle mydropdown-toggle btn-link btn-white" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="font-size: 0.95vw; font-weight:700; top:-9px; cursor:pointer; color: #000000;">MagicPot3</a>
  755. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  756. <tr>
  757. <td class="cv-options-td">
  758. <br>
  759. <?PHP
  760. $iEntry = 1;
  761. foreach ($aFilePaths as $filePath) {
  762. $orifilename = basename($filePath);
  763. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  764. $filename = explode("|",basename($filePath))[1];
  765. if ($iEntry === count($aFilePaths)) {
  766. $marginbottom = "0px";
  767. } else {
  768. $marginbottom = "5px";
  769. }
  770. ?>
  771. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  772. <a id="halMP1Doc<?PHP echo($iEntry);?>" href="/imgj?av=<?PHP echo(AVATAR_NAME);?>&jar=3&fn=<?PHP echo($orifilename);?>" style="cursor:pointer; color: #000000; font-weight:700;margin-right:10px;">
  773. <?PHP else: ?>
  774. <a id="halMP1Doc<?PHP echo($iEntry);?>" href="/file?av=<?PHP echo(AVATAR_NAME);?>&jar=3&fn=<?PHP echo($orifilename);?>" style="cursor:pointer; color: #000000; font-weight:700;margin-right:10px;">
  775. <?PHP endif; ?>
  776. <?PHP echo($filename);?>
  777. </a>
  778. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  779. <br><br>
  780. <?PHP else: ?>
  781. <br>
  782. <?PHP endif; ?>
  783. <?PHP
  784. $iEntry++;
  785. }?>
  786. <br>
  787. </td>
  788. </tr>
  789. </table>
  790. </div>
  791. </div>
  792. </nobr>
  793. &nbsp;&nbsp;&nbsp;</h3>
  794. <?PHP endif; ?>
  795. <?PHP
  796. $pattern = $FRIENDS_PATH . DIRECTORY_SEPARATOR . "*.txt";
  797. $aFilePaths = glob($pattern);
  798. if (!empty($aFilePaths)): ?>
  799. <?PHP
  800. $CUDOZ++;
  801. $iEntry = 1;
  802. foreach ($aFilePaths as $filePath) {
  803. $orifilename = basename($filePath);
  804. $link=file_get_contents($filePath);
  805. $filename = pathinfo($filePath, PATHINFO_FILENAME);
  806. if ($iEntry === count($aFilePaths)) {
  807. $marginbottom = "0px";
  808. } else {
  809. $marginbottom = "5px";
  810. }
  811. ?>
  812. <h3 class="board-entry" style="height:24px; border-radius:0px;font-size: 1.45vw; font-weight:700; float:left; background-color:lightgray; margin-right:4px; padding:4px;">
  813. &nbsp;&nbsp;<a id="halFriend1" class="mydropdown-toggle" href="<?PHP echo($link);?>" style="cursor:pointer; color: #333333;"><?PHP echo($filename);?></a>&nbsp;&nbsp;
  814. </h3>
  815. <?PHP
  816. $iEntry++;
  817. }?>
  818. <?PHP endif; ?>
  819. <?PHP if (defined("APP_EMAIL_CONTACT") && APP_EMAIL_CONTACT!==PHP_STR): ?>
  820. <h3 class="board-entry" style="height:24px; border-radius:0px;font-size: 1.45vw; font-weight:700; float:left; background-color:lightgray; margin-right:4px; padding:4px;">
  821. &nbsp;&nbsp;<a id="halContact" class="mydropdown-toggle" href="mailto:<?PHP echo(APP_EMAIL_CONTACT);?>" style="cursor:pointer; color: #333333;"><?PHP echo(APP_EMAIL_CONTACT);?></a>&nbsp;&nbsp;
  822. </h3>
  823. <?PHP Endif; ?>
  824. </div>
  825. </div>
  826. </div>
  827. <div id="passworddisplay">
  828. <br>
  829. &nbsp;&nbsp;<input type="password" id="Password" name="Password" placeholder="password" value="<?php echo($password);?>" autocomplete="off">&nbsp;<input type="submit" value="<?PHP echo(getResource0("Go", $lang));?>" style="text-align:left;width:25%;color:#000000;"><br>
  830. &nbsp;&nbsp;<input type="text" id="Salt" placeholder="salt" autocomplete="off"><br>
  831. <div style="text-align:center;">
  832. <a id="hashMe" href="#" onclick="showEncodedPassword();"><?PHP echo(getResource0("Hash Me", $lang));?>!</a>
  833. </div>
  834. </div>
  835. </form>
  836. <div id="footerCont">&nbsp;</div>
  837. <div id="footer1" style="float:left; width:80px;">
  838. <select id="cbLang" onchange="changeLang(this);">
  839. <option value="en-US" <?PHP echo($lang==PHP_EN?"selected":"");?>>en</option>
  840. <option value="it-IT" <?PHP echo($lang==PHP_IT?"selected":"");?>>it</option>
  841. <option value="zh-CN" <?PHP echo($lang==PHP_CN?"selected":"");?>>cn</option>
  842. </select>
  843. </div>
  844. <div id="footer2" style="float:right; width:520px; white-space: nowrap;">
  845. <span style="background:#FFFFFF; opacity:0.7;">&nbsp;&nbsp;A <a href="http://5mode.com" class="aaa">5 Mode</a> project and <a href="http://demo.5mode.com" class="aaa">WYSIWYG</a> system. <?PHP echo(getResource0("Some rights reserved", $lang));?>.</span>
  846. </div>
  847. <?PHP endif; ?>
  848. <script src="/js/home-js.php?hl=<?PHP echo($lang);?>&av=<?PHP echo(AVATAR_NAME);?>&cv=<?PHP echo($CURRENT_VIEW);?>&cu=<?PHP echo($CUDOZ);?>" type="text/javascript"></script>
  849. <?PHP if ($CURRENT_VIEW == PUBLIC_VIEW): ?>
  850. <script>
  851. function selectVideo(i) {
  852. //alert(3);
  853. y=0;
  854. $(".modal-content").each(function(){
  855. if (y==i) {
  856. //alert(y);
  857. //if (window.innerHeight >= window.innerWidth) {
  858. // $(this).css("height", parseInt(window.innerHeight) + "px");
  859. //} else {
  860. // $(this).css("height", "");
  861. //}
  862. $(this).css("height", window.innerHeight);
  863. if (window.innerWidth < 1000) {
  864. $(this).css("width", "90%");
  865. $(this).css("max-width", "90%");
  866. $(this).css("font-size", "12px");
  867. } else {
  868. $(this).css("width", "60%");
  869. $(this).css("max-width", "60%");
  870. $(this).css("font-size", "15px");
  871. }
  872. $(this).css("padding", "20px");
  873. $(this).css("font-weight", "900");
  874. s=document.getElementsByClassName("blog-entry")[y].innerHTML;
  875. s=s.replaceAll("<br><br><br>","<br><br>");
  876. ii = s.indexOf('<div id="mydivzero">&nbsp;</div>');
  877. $(this).get(0).innerHTML=s.substr(ii+32);
  878. //alert(document.getElementsByClassName("blog-entry")[y].innerHTML);
  879. } else {
  880. $(this).get(0).innerHTML="";
  881. }
  882. y++;
  883. });
  884. //alert(i);
  885. //alert($('#iframe' + i).attr("id"));
  886. //$("#iframe"+i).attr("src", $("#iframe"+i).attr("marti-src") );
  887. $("#modalButton" + i).click();
  888. }
  889. </script>
  890. <script>
  891. var bHal = false;
  892. $("span#halTerm").on("click",function(e) {
  893. bHal=!bHal;
  894. if (bHal) {
  895. document.getElementById("hal").src = '/res/hal2_open.png';
  896. $("div#halBoard").show("fast");
  897. } else {
  898. document.getElementById("hal").src = '/res/hal2_closed.png';
  899. $("div#halBoard").hide("slow");
  900. }
  901. });
  902. function setHalPos() {
  903. bodyRect = document.body.getBoundingClientRect();
  904. //document.getElementById('q').write = bodyRect.width;
  905. bHal=false;
  906. document.getElementById("hal").src = '/res/hal2_closed.png';
  907. $("div#halBoard").hide();
  908. if (parseInt(bodyRect.width) < 690) {
  909. $("div#predSys").hide();
  910. $("div#halSys").hide();
  911. } else {
  912. $("div#predSys").show();
  913. $("div#halSys").show();
  914. }
  915. if (parseInt(bodyRect.width) > 1200) {
  916. $("h3.board-entry").css("font-size", "1.0vw");
  917. //$("a#halCVOptions").css("font-size", "1.0vw");
  918. $("a.mydropdown-toggle").css("font-size", "1.0vw");
  919. $("span#halTerm").css("left", "+11%");
  920. $("div#halBoard").css("left", "+12%");
  921. } else if (parseInt(bodyRect.width) < 800) {
  922. $("h3.board-entry").css("font-size", "14px");
  923. //$("a#halCVOptions").css("font-size", "14px");
  924. $("a.mydropdown-toggle").css("font-size", "14px");
  925. $("span#halTerm").css("left", "+0%");
  926. $("div#halBoard").css("left", "+0%");
  927. } else {
  928. $("span#halTerm").css("left", "+8%");
  929. $("div#halBoard").css("left", "+9%");
  930. $("h3.board-entry").css("font-size", "1.45vw");
  931. //$("a#halCVOptions").css("font-size", "1.45vw");
  932. $("a.mydropdown-toggle").css("font-size", "1.45vw");
  933. }
  934. }
  935. window.addEventListener("load", function() {
  936. setTimeout("setHalPos()", 100);
  937. }, true);
  938. window.addEventListener("resize", function() {
  939. setTimeout("setHalPos()", 100);
  940. }, true);
  941. </script>
  942. <script>
  943. function showEntries() {
  944. $(".blog-content").css("border", "1px solid darkgray");
  945. $(".blog-entry").css("visibility", "visible");
  946. }
  947. function setContentPos() {
  948. h = window.innerHeight;
  949. w = window.innerWidth;
  950. pich = parseInt((h - $(".header").height() - 80) / 3);
  951. // picw = parseInt(w / 5); ori
  952. iimg = parseInt(<?PHP echo($MAXP / 3); ?>);
  953. if ((<?PHP echo($MAXP / 3); ?>) > parseInt(<?PHP echo($MAXP / 3); ?>)) {
  954. iimg++;
  955. }
  956. picw = parseInt(w / iimg);
  957. $(".blog-content").css("height", pich + "px");
  958. $(".blog-content").css("width", picw + "px");
  959. $(".blog-entry").css("height", (pich-2) + "px");
  960. $(".blog-entry").css("width", (picw-2) + "px");
  961. $(".blog-img").css("height", (pich-4) + "px");
  962. $(".blog-img").css("width", ((picw-4)/3) + "px");
  963. if (w > 900) {
  964. ii = 1;
  965. $(".blog-entry").each(function() {
  966. ss = $(this).get(0).innerHTML.trim();
  967. if (ii <= <?PHP echo($totLinks); ?>) {
  968. $(this).css("background-image", "url('/res/dogborg.png')");
  969. $(this).css("background-repeat", "no-repeat");
  970. $(this).css("background-position", "top 10px right 10px");
  971. $(this).css("background-size", "50px");
  972. } else if (ii > <?PHP echo($totLinks); ?> && ii < 15) {
  973. //$(this).css("background-image", "url('/res/break.png')");
  974. //$(this).css("background-repeat", "repeat");
  975. //$(this).css("background-position", "");
  976. $(this).css("background-image", "none");
  977. $(this).css("background", "transparent");
  978. $(this).css("background-repeat", "");
  979. $(this).css("background-position", "");
  980. } else if (ii === 15 && ss === "&nbsp;") {
  981. $(this).css("background-image", "url('/res/dogborge.png')");
  982. $(this).css("background-repeat", "no-repeat");
  983. $(this).css("background-position", "");
  984. $(this).css("background-size", "80%");
  985. } else {
  986. $(this).css("background-image", "");
  987. }
  988. ii++;
  989. });
  990. } else {
  991. $(".blog-entry").css("background-image", "");
  992. }
  993. setTimeout("showEntries()", 1200);
  994. // ---
  995. $("#passworddisplay").css("top", parseInt(h-$("#passworddisplay").height()-100)+"px");
  996. }
  997. window.addEventListener("load", function() {
  998. setTimeout("setContentPos()", 1000);
  999. });
  1000. window.addEventListener("resize", function() {
  1001. setTimeout("setContentPos()", 1000);
  1002. });
  1003. </script>
  1004. <!-- SKINNER CODE -->
  1005. <?php if (is_readable($AVATAR_PATH . DIRECTORY_SEPARATOR . "skinner.html")): ?>
  1006. <?php include($AVATAR_PATH . DIRECTORY_SEPARATOR . "skinner.html"); ?>
  1007. <?php else: ?>
  1008. <?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "skinner.html")): ?>
  1009. <?php include(APP_PATH . DIRECTORY_SEPARATOR . "skinner.html"); ?>
  1010. <?php endif; ?>
  1011. <?php endif; ?>
  1012. <!-- METRICS CODE -->
  1013. <?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html")): ?>
  1014. <?php include(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html"); ?>
  1015. <?php endif; ?>
  1016. <?php endif; ?>
  1017. </body>
  1018. </html>