home.php.old 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218
  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 <= 850) {
  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. <!--<div id="AFHint">
  388. <button type="button" class="close" aria-label="Close" onclick="closeMe(this);" style="position:relative; top:5px; left:-7px;">
  389. <span aria-hidden="true" style="color:black; font-weight:900;">&times;</span>
  390. </button>
  391. <br>
  392. <span onclick="showHowTo();"><?PHP echo(getResource0("How-to: Manage your avatars in Faceborg", $lang));?></span>
  393. <br><br>
  394. </div> -->
  395. <div class="header" style="margin-top:18px;margin-bottom:18px;">
  396. <div style="float:left">
  397. <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>
  398. </div>
  399. </div>
  400. <form id="frmUpload" role="form" method="post" action="/<?PHP echo(AVATAR_NAME);?>?hl=<?PHP echo($lang);?>" target="_self" enctype="multipart/form-data">
  401. <div id="blog">
  402. <?PHP
  403. $iEntry = 2;
  404. $totLinks = 0;
  405. $aLinks=[];
  406. $aBGColors = APP_CARD_BGCOLORS;
  407. $aColors = APP_CARD_COLORS;
  408. $pattern = $BLOG_PATH . DIRECTORY_SEPARATOR . "*.txt";
  409. $aFilePaths = glob($pattern);
  410. if (empty($aFilePaths)): ?>
  411. <div class="blog-content">
  412. <div class="blog-entry" style="background-color:#FFFFFF;">
  413. <br><br>
  414. <?PHP echo(date("Ymd") . " " . date("Hi"));?><br><br><br>
  415. <?PHP echo(getResource0("Hello from 5 Mode", $lang));?>,<br><br>
  416. <?PHP echo(getResource0("This is just an example of blog entry", $lang));?>.
  417. </div>
  418. </div>
  419. <?PHP $totLinks = 1; ?>
  420. <?PHP else: ?>
  421. <?PHP
  422. $CUDOZ++;
  423. $iEntry = 1;
  424. $iCurEntry = 1;
  425. arsort($aFilePaths, SORT_STRING);
  426. $totPost = count($aFilePaths);
  427. // PAGINATION
  428. $totPages = (int)(count($aFilePaths)/$MAXP);
  429. if ($totPages < (count($aFilePaths)/$MAXP)) {
  430. $totPages++;
  431. }
  432. $firstPost = 0;
  433. $prevPost = $blogSP - $MAXP;
  434. if ($prevPost < 0) {
  435. $prevPost = 0;
  436. }
  437. $nextPost = $blogSP + $MAXP;
  438. if ($nextPost > (($totPages - 1) * $MAXP)) {
  439. $nextPost = (($totPages - 1) * $MAXP);
  440. }
  441. if ($nextPost < 0) {
  442. $nextPost = 0;
  443. }
  444. $lastPost = (($totPages - 1) * $MAXP);
  445. if ($lastPost < 0) {
  446. $lastPost = 0;
  447. }
  448. // ---
  449. //echo("blogSP=".$blogSP);
  450. foreach ($aFilePaths as $filePath) {
  451. //echo("iCurEntry=".$iCurEntry);
  452. if ($iCurEntry<($blogSP+1)) {
  453. $iCurEntry++;
  454. continue;
  455. }
  456. if ($iEntry>$MAXP) {
  457. break;
  458. }
  459. $orifilename = basename($filePath);
  460. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  461. $date = explode("-",$orifilename)[0];
  462. $time = explode("-",$orifilename)[1];
  463. $time = left($time,2) . ":" . substr($time,2,2);
  464. if ($iEntry === count($aFilePaths) || $iEntry==$MAXP) {
  465. $marginbottom = "0px";
  466. } else {
  467. $marginbottom = "5px";
  468. }
  469. ?>
  470. <?PHP if ($orifileExt === "txt"):?>
  471. <div class="blog-content">
  472. <div class="blog-entry" onclick="selectVideo(<?php echo($iEntry-1);?>);" style="background-color:<?PHP echo($aBGColors[$iEntry-1]);?>;color:<?PHP echo($aColors[$iEntry-1]);?>;">
  473. <?PHP if (APP_PAGINATION): ?>
  474. <?php if ($iCurEntry===1 && $iEntry===1): ?>
  475. <!--<img class="blog-img" src="/res/arrow-leftd.png" style="float:left;">-->
  476. <?php elseif ($iEntry===1 && $iCurEntry>1): ?>
  477. <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>
  478. <?php endif; ?>
  479. <?php if ($iEntry===$MAXP && $iCurEntry===$totPost): ?>
  480. <!--<img class="blog-img" src="/res/arrow-rightd.png" style="float:right;">-->
  481. <?php elseif ($iEntry===$MAXP): ?>
  482. <?PHP if ($MAXP===APP_BLOG_ULTRATHIN_MAX_POSTS): ?>
  483. <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>
  484. <?PHP elseif ($MAXP===APP_BLOG_THIN_MAX_POSTS): ?>
  485. <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>
  486. <?PHP else: ?>
  487. <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>
  488. <?php endif; ?>
  489. <?php endif; ?>
  490. <?PHP else: ?>
  491. &nbsp;
  492. <?PHP endif; ?>
  493. <div id="mydivzero">&nbsp;</div>
  494. <?PHP
  495. $s=file_get_contents($filePath);
  496. echo($date."&nbsp;".$time."<br><br><br>".enableEmoticons(HTMLencode($s, true)));
  497. ?>
  498. </div>
  499. </div>
  500. <?PHP $aLinks[] = "/img?av=" . AVATAR_NAME . "&pic=" . $orifilename; ?>
  501. <?PHP EndIf; ?>
  502. <?PHP
  503. $totLinks = $iEntry;
  504. $iEntry++;
  505. $iCurEntry++;
  506. }?>
  507. <?PHP endif; ?>
  508. <?PHP for($i=$iEntry;$i<=$MAXP;$i++):?>
  509. <div class="blog-content">
  510. <div class="blog-entry" style="border:0px;">
  511. &nbsp;
  512. </div>
  513. </div>
  514. <?PHP endfor; ?>
  515. <?PHP if (($MAXP / 3) > (int)($MAXP / 3)): ?>
  516. <div class="blog-content">
  517. <div class="blog-entry" style="border:0px;">
  518. &nbsp;
  519. </div>
  520. </div>
  521. <?PHP if ((($MAXP+1) / 3) > (int)(($MAXP+1) / 3)): ?>
  522. <div class="blog-content">
  523. <div class="blog-entry" style="border:0px;">
  524. &nbsp;
  525. </div>
  526. </div>
  527. <?PHP endif; ?>
  528. <?PHP endif; ?>
  529. <br><br>
  530. </div>
  531. <?php
  532. $iLink = 0;
  533. foreach($aLinks as $aLink) { ?>
  534. <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>
  535. <div class="modal" tabindex="-1" role="dialog" id="modal<?php echo($iLink);?>" style="z-index:99997">
  536. <div class="modal-dialog modal-lg" role="document" style="width:95%;margin-top:0;background-color:#FFFFFF;z-index:99998">
  537. <div class="modal-content" style="float:left;width:content-box;max-width:60%;z-index:99999;font-size:12px;">
  538. &nbsp;
  539. </div>
  540. </div>
  541. </div>
  542. <?php $iLink++; ?>
  543. <?php } ?>
  544. <?PHP
  545. // GALLERY GHOST
  546. $CUDOZ++;
  547. ?>
  548. <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;">
  549. <div class="input-group-btn" style="border: 0px solid red;">
  550. <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>
  551. <div id="halBoard" style="float: left; position:relative; left:+5%; top: +2px; display: none;">
  552. <?PHP
  553. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*";
  554. $aFilePaths = glob($pattern);
  555. if (!empty($aFilePaths)): ?>
  556. <?PHP $CUDOZ++; ?>
  557. <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;">
  558. <nobr>
  559. <div class="input-group">
  560. <div class="input-group-btn btn-white dropup">
  561. <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>
  562. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  563. <tr>
  564. <td class="cv-options-td">
  565. <br>
  566. <?PHP
  567. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*.doc";
  568. $aFilePaths = glob($pattern);
  569. if (!empty($aFilePaths)): ?>
  570. <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>
  571. <?PHP endif; ?>
  572. <?PHP
  573. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*.pdf";
  574. $aFilePaths = glob($pattern);
  575. if (!empty($aFilePaths)): ?>
  576. <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>
  577. <?PHP endif; ?>
  578. </td>
  579. </tr>
  580. </table>
  581. </div>
  582. </div>
  583. </nobr>
  584. &nbsp;&nbsp; &nbsp;</h3>
  585. <?PHP endif; ?>
  586. <?PHP
  587. $pattern = $GALLERY_PATH . DIRECTORY_SEPARATOR . "*";
  588. $aFilePaths = glob($pattern);
  589. if (!empty($aFilePaths)): ?>
  590. <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;">
  591. <nobr>
  592. <div class="input-group">
  593. <div class="input-group-btn btn-white dropup">
  594. <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>
  595. <table class="dropdown-menu gal-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  596. <tr>
  597. <td class="gal-options-td">
  598. <br>
  599. <?PHP
  600. $iEntry = 1;
  601. foreach ($aFilePaths as $filePath) {
  602. $orifilename = basename($filePath);
  603. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  604. if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])) {
  605. $filename = explode("|",basename($filePath))[1];
  606. if ($iEntry === count($aFilePaths)) {
  607. $marginbottom = "0px";
  608. } else {
  609. $marginbottom = "5px";
  610. }
  611. ?>
  612. <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;">
  613. <?PHP echo($filename);?>
  614. </a>
  615. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  616. <br><br>
  617. <?PHP else: ?>
  618. <br>
  619. <?PHP endif; ?>
  620. <?PHP }?>
  621. <?PHP
  622. $iEntry++;
  623. }?>
  624. <br>
  625. </td>
  626. </tr>
  627. </table>
  628. </div>
  629. </div>
  630. </nobr>
  631. &nbsp;&nbsp;&nbsp;</h3>
  632. <?PHP endif; ?>
  633. <?PHP
  634. $pattern = $MAGICJAR1_PATH . DIRECTORY_SEPARATOR . "*";
  635. $aFilePaths = glob($pattern);
  636. if (!empty($aFilePaths)): ?>
  637. <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;">
  638. <nobr>
  639. <div class="input-group">
  640. <div class="input-group-btn btn-white dropup">
  641. <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>
  642. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  643. <tr>
  644. <td class="cv-options-td">
  645. <br>
  646. <?PHP
  647. $iEntry = 1;
  648. foreach ($aFilePaths as $filePath) {
  649. $orifilename = basename($filePath);
  650. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  651. $filename = explode("|",basename($filePath))[1];
  652. if ($iEntry === count($aFilePaths)) {
  653. $marginbottom = "0px";
  654. } else {
  655. $marginbottom = "5px";
  656. }
  657. ?>
  658. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  659. <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;">
  660. <?PHP else: ?>
  661. <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;">
  662. <?PHP endif; ?>
  663. <?PHP echo($filename);?>
  664. </a>
  665. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  666. <br><br>
  667. <?PHP else: ?>
  668. <br>
  669. <?PHP endif; ?>
  670. <?PHP
  671. $iEntry++;
  672. }?>
  673. <br>
  674. </td>
  675. </tr>
  676. </table>
  677. </div>
  678. </div>
  679. </nobr>
  680. &nbsp;&nbsp;&nbsp;</h3>
  681. <?PHP endif; ?>
  682. <?PHP
  683. $pattern = $MAGICJAR2_PATH . DIRECTORY_SEPARATOR . "*";
  684. $aFilePaths = glob($pattern);
  685. if (!empty($aFilePaths)): ?>
  686. <!--<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;">
  687. &nbsp;&nbsp;<a id="halMagicpot1" onclick="#" style="cursor:pointer; color: #000000;">Magicpot1</a>&nbsp;&nbsp;
  688. </h3>-->
  689. <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;">
  690. <nobr>
  691. <div class="input-group">
  692. <div class="input-group-btn btn-white dropup">
  693. <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>
  694. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  695. <tr>
  696. <td class="cv-options-td">
  697. <br>
  698. <?PHP
  699. $iEntry = 1;
  700. foreach ($aFilePaths as $filePath) {
  701. $orifilename = basename($filePath);
  702. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  703. $filename = explode("|",basename($filePath))[1];
  704. if ($iEntry === count($aFilePaths)) {
  705. $marginbottom = "0px";
  706. } else {
  707. $marginbottom = "5px";
  708. }
  709. ?>
  710. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  711. <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;">
  712. <?PHP else: ?>
  713. <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;">
  714. <?PHP endif; ?>
  715. <?PHP echo($filename);?>
  716. </a>
  717. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  718. <br><br>
  719. <?PHP else: ?>
  720. <br>
  721. <?PHP endif; ?>
  722. <?PHP
  723. $iEntry++;
  724. }?>
  725. <br>
  726. </td>
  727. </tr>
  728. </table>
  729. </div>
  730. </div>
  731. </nobr>
  732. &nbsp;&nbsp;&nbsp;</h3>
  733. <?PHP endif; ?>
  734. <?PHP
  735. $pattern = $MAGICJAR3_PATH . DIRECTORY_SEPARATOR . "*";
  736. $aFilePaths = glob($pattern);
  737. if (!empty($aFilePaths)): ?>
  738. <!--<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;">
  739. &nbsp;&nbsp;<a id="halMagicpot1" onclick="#" style="cursor:pointer; color: #000000;">Magicpot1</a>&nbsp;&nbsp;
  740. </h3>-->
  741. <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;">
  742. <nobr>
  743. <div class="input-group">
  744. <div class="input-group-btn btn-white dropup">
  745. <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>
  746. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  747. <tr>
  748. <td class="cv-options-td">
  749. <br>
  750. <?PHP
  751. $iEntry = 1;
  752. foreach ($aFilePaths as $filePath) {
  753. $orifilename = basename($filePath);
  754. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  755. $filename = explode("|",basename($filePath))[1];
  756. if ($iEntry === count($aFilePaths)) {
  757. $marginbottom = "0px";
  758. } else {
  759. $marginbottom = "5px";
  760. }
  761. ?>
  762. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  763. <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;">
  764. <?PHP else: ?>
  765. <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;">
  766. <?PHP endif; ?>
  767. <?PHP echo($filename);?>
  768. </a>
  769. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  770. <br><br>
  771. <?PHP else: ?>
  772. <br>
  773. <?PHP endif; ?>
  774. <?PHP
  775. $iEntry++;
  776. }?>
  777. <br>
  778. </td>
  779. </tr>
  780. </table>
  781. </div>
  782. </div>
  783. </nobr>
  784. &nbsp;&nbsp;&nbsp;</h3>
  785. <?PHP endif; ?>
  786. <?PHP
  787. $pattern = $FRIENDS_PATH . DIRECTORY_SEPARATOR . "*.txt";
  788. $aFilePaths = glob($pattern);
  789. if (!empty($aFilePaths)): ?>
  790. <?PHP
  791. $CUDOZ++;
  792. $iEntry = 1;
  793. foreach ($aFilePaths as $filePath) {
  794. $orifilename = basename($filePath);
  795. $link=file_get_contents($filePath);
  796. $filename = pathinfo($filePath, PATHINFO_FILENAME);
  797. if ($iEntry === count($aFilePaths)) {
  798. $marginbottom = "0px";
  799. } else {
  800. $marginbottom = "5px";
  801. }
  802. ?>
  803. <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;">
  804. &nbsp;&nbsp;<a id="halFriend1" class="mydropdown-toggle" href="<?PHP echo($link);?>" style="cursor:pointer; color: #333333;"><?PHP echo($filename);?></a>&nbsp;&nbsp;
  805. </h3>
  806. <?PHP
  807. $iEntry++;
  808. }?>
  809. <?PHP endif; ?>
  810. <?PHP if (defined("APP_EMAIL_CONTACT") && APP_EMAIL_CONTACT!==PHP_STR): ?>
  811. <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;">
  812. &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;
  813. </h3>
  814. <?PHP Endif; ?>
  815. </div>
  816. </div>
  817. </div>
  818. <div id="passworddisplay">
  819. <br>
  820. &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>
  821. &nbsp;&nbsp;<input type="text" id="Salt" placeholder="salt" autocomplete="off"><br>
  822. <div style="text-align:center;">
  823. <a id="hashMe" href="#" onclick="showEncodedPassword();"><?PHP echo(getResource0("Hash Me", $lang));?>!</a>
  824. </div>
  825. </div>
  826. </form>
  827. <div id="footerCont">&nbsp;</div>
  828. <div id="footer1" style="float:left; width:80px;">
  829. <select id="cbLang" onchange="changeLang(this);">
  830. <option value="en-US" <?PHP echo($lang==PHP_EN?"selected":"");?>>en</option>
  831. <option value="it-IT" <?PHP echo($lang==PHP_IT?"selected":"");?>>it</option>
  832. <option value="zh-CN" <?PHP echo($lang==PHP_CN?"selected":"");?>>cn</option>
  833. </select>
  834. </div>
  835. <div id="footer2" style="float:right; width:520px; white-space: nowrap;">
  836. <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>
  837. </div>
  838. <?PHP endif; ?>
  839. <script src="/static/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>
  840. <?PHP if ($CURRENT_VIEW == PUBLIC_VIEW): ?>
  841. <script>
  842. function selectVideo(i) {
  843. //alert(3);
  844. y=0;
  845. $(".modal-content").each(function(){
  846. if (y==i) {
  847. //alert(y);
  848. //if (window.innerHeight >= window.innerWidth) {
  849. // $(this).css("height", parseInt(window.innerHeight) + "px");
  850. //} else {
  851. // $(this).css("height", "");
  852. //}
  853. $(this).css("height", window.innerHeight);
  854. if (window.innerWidth < 1000) {
  855. $(this).css("width", "90%");
  856. $(this).css("max-width", "90%");
  857. $(this).css("font-size", "12px");
  858. } else {
  859. $(this).css("width", "60%");
  860. $(this).css("max-width", "60%");
  861. $(this).css("font-size", "15px");
  862. }
  863. $(this).css("padding", "20px");
  864. $(this).css("font-weight", "900");
  865. s=document.getElementsByClassName("blog-entry")[y].innerHTML;
  866. s=s.replaceAll("<br><br><br>","<br><br>");
  867. ii = s.indexOf('<div id="mydivzero">&nbsp;</div>');
  868. $(this).get(0).innerHTML=s.substr(ii+32);
  869. //alert(document.getElementsByClassName("blog-entry")[y].innerHTML);
  870. } else {
  871. $(this).get(0).innerHTML="";
  872. }
  873. y++;
  874. });
  875. //alert(i);
  876. //alert($('#iframe' + i).attr("id"));
  877. //$("#iframe"+i).attr("src", $("#iframe"+i).attr("marti-src") );
  878. $("#modalButton" + i).click();
  879. }
  880. </script>
  881. <script>
  882. var bHal = false;
  883. $("span#halTerm").on("click",function(e) {
  884. bHal=!bHal;
  885. if (bHal) {
  886. document.getElementById("hal").src = '/res/hal2_open.png';
  887. $("div#halBoard").show("fast");
  888. } else {
  889. document.getElementById("hal").src = '/res/hal2_closed.png';
  890. $("div#halBoard").hide("slow");
  891. }
  892. });
  893. function setHalPos() {
  894. bodyRect = document.body.getBoundingClientRect();
  895. //document.getElementById('q').write = bodyRect.width;
  896. bHal=false;
  897. document.getElementById("hal").src = '/res/hal2_closed.png';
  898. $("div#halBoard").hide();
  899. if (parseInt(bodyRect.width) < 690) {
  900. $("div#predSys").hide();
  901. $("div#halSys").hide();
  902. } else {
  903. $("div#predSys").show();
  904. $("div#halSys").show();
  905. }
  906. if (parseInt(bodyRect.width) > 1200) {
  907. $("h3.board-entry").css("font-size", "1.0vw");
  908. //$("a#halCVOptions").css("font-size", "1.0vw");
  909. $("a.mydropdown-toggle").css("font-size", "1.0vw");
  910. $("span#halTerm").css("left", "+11%");
  911. $("div#halBoard").css("left", "+12%");
  912. } else if (parseInt(bodyRect.width) < 800) {
  913. $("h3.board-entry").css("font-size", "14px");
  914. //$("a#halCVOptions").css("font-size", "14px");
  915. $("a.mydropdown-toggle").css("font-size", "14px");
  916. $("span#halTerm").css("left", "+0%");
  917. $("div#halBoard").css("left", "+0%");
  918. } else {
  919. $("span#halTerm").css("left", "+8%");
  920. $("div#halBoard").css("left", "+9%");
  921. $("h3.board-entry").css("font-size", "1.45vw");
  922. //$("a#halCVOptions").css("font-size", "1.45vw");
  923. $("a.mydropdown-toggle").css("font-size", "1.45vw");
  924. }
  925. }
  926. window.addEventListener("load", function() {
  927. setTimeout("setHalPos()", 100);
  928. }, true);
  929. window.addEventListener("resize", function() {
  930. setTimeout("setHalPos()", 100);
  931. }, true);
  932. </script>
  933. <script>
  934. function showEntries() {
  935. $(".blog-content").css("border", "1px solid darkgray");
  936. $(".blog-entry").css("visibility", "visible");
  937. }
  938. function setContentPos() {
  939. h = window.innerHeight;
  940. w = window.innerWidth;
  941. pich = parseInt((h - $(".header").height() - 80) / 3);
  942. // picw = parseInt(w / 5); ori
  943. iimg = parseInt(<?PHP echo($MAXP / 3); ?>);
  944. if ((<?PHP echo($MAXP / 3); ?>) > parseInt(<?PHP echo($MAXP / 3); ?>)) {
  945. iimg++;
  946. }
  947. picw = parseInt(w / iimg);
  948. $(".blog-content").css("height", pich + "px");
  949. $(".blog-content").css("width", picw + "px");
  950. $(".blog-entry").css("height", (pich-2) + "px");
  951. $(".blog-entry").css("width", (picw-2) + "px");
  952. $(".blog-img").css("height", (pich-4) + "px");
  953. $(".blog-img").css("width", ((picw-4)/3) + "px");
  954. if (w > 900) {
  955. ii = 1;
  956. $(".blog-entry").each(function() {
  957. ss = $(this).get(0).innerHTML.trim();
  958. if (ii <= <?PHP echo($totLinks); ?>) {
  959. $(this).css("background-image", "url('/res/dogborg.png')");
  960. $(this).css("background-repeat", "no-repeat");
  961. $(this).css("background-position", "top 10px right 10px");
  962. $(this).css("background-size", "50px");
  963. } else if (ii > <?PHP echo($totLinks); ?> && ii < 15) {
  964. //$(this).css("background-image", "url('/res/break.png')");
  965. //$(this).css("background-repeat", "repeat");
  966. //$(this).css("background-position", "");
  967. $(this).css("background-image", "none");
  968. $(this).css("background", "transparent");
  969. $(this).css("background-repeat", "");
  970. $(this).css("background-position", "");
  971. } else if (ii === 15 && ss === "&nbsp;") {
  972. $(this).css("background-image", "url('/res/dogborge.png')");
  973. $(this).css("background-repeat", "no-repeat");
  974. $(this).css("background-position", "");
  975. $(this).css("background-size", "80%");
  976. } else {
  977. $(this).css("background-image", "");
  978. }
  979. ii++;
  980. });
  981. } else {
  982. $(".blog-entry").css("background-image", "");
  983. }
  984. setTimeout("showEntries()", 1200);
  985. // ---
  986. $("#passworddisplay").css("top", parseInt(h-$("#passworddisplay").height()-100)+"px");
  987. }
  988. window.addEventListener("load", function() {
  989. setTimeout("setContentPos()", 1000);
  990. });
  991. window.addEventListener("resize", function() {
  992. setTimeout("setContentPos()", 1000);
  993. });
  994. </script>
  995. <!-- SKINNER CODE -->
  996. <?php if (is_readable($AVATAR_PATH . DIRECTORY_SEPARATOR . "skinner.html")): ?>
  997. <?php include($AVATAR_PATH . DIRECTORY_SEPARATOR . "skinner.html"); ?>
  998. <?php else: ?>
  999. <?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "skinner.html")): ?>
  1000. <?php include(APP_PATH . DIRECTORY_SEPARATOR . "skinner.html"); ?>
  1001. <?php endif; ?>
  1002. <?php endif; ?>
  1003. <!-- METRICS CODE -->
  1004. <?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html")): ?>
  1005. <?php include(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html"); ?>
  1006. <?php endif; ?>
  1007. <?php endif; ?>
  1008. </body>
  1009. </html>