home.php 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074
  1. <?php
  2. /**
  3. * Copyright 2021, 2024 5 Mode
  4. *
  5. * This file is part of Puzzleu.
  6. *
  7. * Puzzleu 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. * Puzzleu 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 Puzzleu. If not, see <https://www.gnu.org/licenses/>.
  19. *
  20. * home.php
  21. *
  22. * Home of Puzzleu.
  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. function uploadNewRes() {
  73. global $AVATAR_PATH;
  74. global $CV_PATH;
  75. global $FRIENDS_PATH;
  76. global $BLOG_PATH;
  77. global $GALLERY_PATH;
  78. global $MAGICJAR1_PATH;
  79. global $MAGICJAR2_PATH;
  80. global $MAGICJAR3_PATH;
  81. global $magicJar1;
  82. global $magicJar2;
  83. global $magicJar3;
  84. //echo_ifdebug(true, "AVATAR_PATH#1=");
  85. //echo_ifdebug(true, $AVATAR_PATH);
  86. if (!empty($_FILES['files']['tmp_name'][0]) || !empty($_FILES['filesdd']['tmp_name'][0])) {
  87. $uploads = (array)fixMultipleFileUpload($_FILES['files']);
  88. if ($uploads[0]['error'] === PHP_UPLOAD_ERR_NO_FILE) {
  89. $uploads = (array)fixMultipleFileUpload($_FILES['filesdd']);
  90. }
  91. //if ($uploads[0]['error'] === PHP_UPLOAD_ERR_NO_FILE) {
  92. // echo("WARNING: No file uploaded.");
  93. // return;
  94. //}
  95. $google = "abcdefghijklmnopqrstuvwxyz";
  96. if (count($uploads)>strlen($google)) {
  97. echo("WARNING: Too many uploaded files.");
  98. return;
  99. }
  100. $i=1;
  101. foreach($uploads as &$upload) {
  102. switch ($upload['error']) {
  103. case PHP_UPLOAD_ERR_OK:
  104. break;
  105. case PHP_UPLOAD_ERR_NO_FILE:
  106. echo("WARNING: One or more uploaded files are missing.");
  107. return;
  108. case PHP_UPLOAD_ERR_INI_SIZE:
  109. echo("WARNING: File exceeded INI size limit.");
  110. return;
  111. case PHP_UPLOAD_ERR_FORM_SIZE:
  112. echo("WARNING: File exceeded form size limit.");
  113. return;
  114. case PHP_UPLOAD_ERR_PARTIAL:
  115. echo("WARNING: File only partially uploaded.");
  116. return;
  117. case PHP_UPLOAD_ERR_NO_TMP_DIR:
  118. echo("WARNING: TMP dir doesn't exist.");
  119. return;
  120. case PHP_UPLOAD_ERR_CANT_WRITE:
  121. echo("WARNING: Failed to write to the disk.");
  122. return;
  123. case PHP_UPLOAD_ERR_EXTENSION:
  124. echo("WARNING: A PHP extension stopped the file upload.");
  125. return;
  126. default:
  127. echo("WARNING: Unexpected error happened.");
  128. return;
  129. }
  130. if (!is_uploaded_file($upload['tmp_name'])) {
  131. echo("WARNING: One or more file have not been uploaded.");
  132. return;
  133. }
  134. // name
  135. $name = (string)substr((string)filter_var($upload['name']), 0, 255);
  136. if ($name == PHP_STR) {
  137. echo("WARNING: Invalid file name: " . $name);
  138. return;
  139. }
  140. $upload['name'] = $name;
  141. // fileType
  142. $fileType = substr((string)filter_var($upload['type']), 0, 30);
  143. $upload['type'] = $fileType;
  144. // tmp_name
  145. $tmp_name = substr((string)filter_var($upload['tmp_name']), 0, 300);
  146. if ($tmp_name == PHP_STR || !file_exists($tmp_name)) {
  147. echo("WARNING: Invalid file temp path: " . $tmp_name);
  148. return;
  149. }
  150. $upload['tmp_name'] = $tmp_name;
  151. //size
  152. $size = substr((string)filter_var($upload['size'], FILTER_SANITIZE_NUMBER_INT), 0, 12);
  153. if ($size == "") {
  154. echo("WARNING: Invalid file size.");
  155. return;
  156. }
  157. $upload["size"] = $size;
  158. $tmpFullPath = $upload["tmp_name"];
  159. $originalFilename = pathinfo($name, PATHINFO_FILENAME);
  160. $originalFileExt = pathinfo($name, PATHINFO_EXTENSION);
  161. $fileExt = strtolower(pathinfo($name, PATHINFO_EXTENSION));
  162. $date = date("Ymd-His");
  163. $rnd = mt_rand(1000000000, 9999999999);
  164. if ($originalFileExt!==PHP_STR) {
  165. $destFileName = $date . "-" . $rnd . substr($google, $i-1, 1) . "|" . str_replace(" ", "_", $originalFilename) . ".$fileExt";
  166. } else {
  167. return;
  168. }
  169. //$CV_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "cv";
  170. //$FRIENDS_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "friends";
  171. //$BLOG_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "blog";
  172. //$GALLERY_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "gallery";
  173. $destPaths = [];
  174. $destFullPaths = [];
  175. if ($magicJar1 != 0) {
  176. $destPaths[] = $MAGICJAR1_PATH;
  177. $destFullPaths[] = $destPaths[count($destPaths)-1] . DIRECTORY_SEPARATOR . $destFileName;
  178. }
  179. if ($magicJar2 != 0) {
  180. $destPaths[] = $MAGICJAR2_PATH;
  181. $destFullPaths[] = $destPaths[count($destPaths)-1] . DIRECTORY_SEPARATOR . $destFileName;
  182. }
  183. if ($magicJar3 != 0) {
  184. $destPaths[] = $MAGICJAR3_PATH;
  185. $destFullPaths[] = $destPaths[count($destPaths)-1] . DIRECTORY_SEPARATOR . $destFileName;
  186. }
  187. if (empty($destPaths)) {
  188. switch ($fileExt) {
  189. case "doc":
  190. case "docx":
  191. case "pdf":
  192. $destPaths[] = $CV_PATH;
  193. break;
  194. //case "txt":
  195. // $destPaths[] = $BLOG_PATH;
  196. // break;
  197. case "png":
  198. case "jpg":
  199. case "jpeg":
  200. case "gif":
  201. case "webp":
  202. $destPaths[] = $BLOG_PATH;
  203. break;
  204. default:
  205. $destPaths[] = $MAGICJAR1_PATH;
  206. break;
  207. }
  208. $destFullPaths[] = $destPaths[0] . DIRECTORY_SEPARATOR . $destFileName;
  209. }
  210. $iPath = 0;
  211. foreach($destFullPaths as $destFullPath) {
  212. if (file_exists($destFullPath)) {
  213. echo("WARNING: destination already exists");
  214. exit(1);
  215. }
  216. if (filesize($tmpFullPath) > APP_FILE_MAX_SIZE) {
  217. echo("ERROR: file size(" . filesize($tmpFullPath) . ") exceeds app limit:" . APP_FILE_MAX_SIZE);
  218. exit(1);
  219. }
  220. if (!is_readable($AVATAR_PATH)) {
  221. mkdir($AVATAR_PATH, 0777);
  222. }
  223. if (!is_readable($destPaths[$iPath])) {
  224. mkdir($destPaths[$iPath], 0777);
  225. }
  226. $pattern = $destPaths[$iPath] . DIRECTORY_SEPARATOR . "*" . "|" . str_replace(" ", "_", $originalFilename) . ".$fileExt";
  227. $aExistingPaths = glob($pattern);
  228. if (!empty($aExistingPaths)) {
  229. continue;
  230. }
  231. copy($tmpFullPath, $destFullPath);
  232. $iPath++;
  233. }
  234. // Cleaning up..
  235. // Delete the tmp file..
  236. unlink($tmpFullPath);
  237. $i++;
  238. }
  239. } else {
  240. //echo("WARNING: No file uploaded (err-pip-po).");
  241. }
  242. }
  243. function writeFriends() {
  244. global $FRIENDS_PATH;
  245. $destPath = $FRIENDS_PATH;
  246. $s = filter_input(INPUT_POST, "f")??"";
  247. $s = strip_tags($s);
  248. if ($s != PHP_STR) {
  249. //echo($s);
  250. //exit(0);
  251. $friends=explode("|", $s);
  252. if (!is_readable($destPath)) {
  253. mkdir($destPath, 0777);
  254. }
  255. foreach($friends as $friend) {
  256. $a = explode("://",$friend);
  257. $s = $a[1];
  258. $a = explode("/", $s);
  259. $friendName = $a[0] . ".txt";
  260. file_put_contents($destPath . DIRECTORY_SEPARATOR . $friendName, $friend);
  261. }
  262. }
  263. }
  264. function grabProfileImage() {
  265. global $BLOG_PATH;
  266. $pattern = $BLOG_PATH . DIRECTORY_SEPARATOR . "*";
  267. $aImagePaths = glob($pattern);
  268. if (isset($aImagePaths[0])) {
  269. $retval = basename($aImagePaths[0]);
  270. } else {
  271. $retval = null;
  272. }
  273. return $retval;
  274. }
  275. function startApp() {
  276. global $CURRENT_VIEW;
  277. global $profilePic;
  278. if ($CURRENT_VIEW == ADMIN_VIEW) {
  279. uploadNewRes();
  280. writeFriends();
  281. }
  282. $profilePic = grabProfileImage() ?? APP_DEF_PROFILE_PIC;
  283. //echo("profile pic=" . $profilePic);
  284. }
  285. startApp();
  286. ?>
  287. <!DOCTYPE html>
  288. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  289. <head>
  290. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  291. <!--<?PHP echo(APP_LICENSE);?>-->
  292. <title><?PHP echo(APP_TITLE);?></title>
  293. <link rel="shortcut icon" href="/favicon.ico" />
  294. <meta name="description" content="Welcome to Puzzleu! Let everyone have its puzzle."/>
  295. <meta name="keywords" content="puzzleu,photo,puzzle,on,premise,solution"/>
  296. <meta name="robots" content="index,follow"/>
  297. <meta name="author" content="5 Mode"/>
  298. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  299. <script src="/js/sha.js" type="text/javascript"></script>
  300. <script src="/js/common.js" type="text/javascript"></script>
  301. <script src="/js/bootstrap.min.js" type="text/javascript"></script>
  302. <link href="/css/style.css?r=<?PHP echo(time());?>" type="text/css" rel="stylesheet">
  303. <link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet">
  304. </head>
  305. <?PHP if ($CURRENT_VIEW == ADMIN_VIEW): ?>
  306. <body style="background:url('/res/bg1.jpg') no-repeat; background-size: cover; background-attachment: fixed; background-position: center;">
  307. <div id="AFHint" style="z-index:0;">
  308. <button type="button" class="close" aria-label="Close" onclick="closeMe(this);" style="position:relative; top:5px; left:-7px;">
  309. <span aria-hidden="true" style="color:black; font-weight:900;">&times;</span>
  310. </button>
  311. <br>
  312. <span onclick="showHowTo();"><?PHP echo(getResource0("How-to: Manage your avatars in Puzzleu", $lang));?></span>
  313. <br><br>
  314. </div>
  315. <form id="frmUpload" role="form" method="post" action="/<?PHP echo(AVATAR_NAME);?>?hl=<?PHP echo($lang);?>" target="_self" enctype="multipart/form-data">
  316. <div class="dragover" dropzone="copy">
  317. <div id="fireupload" onclick="$('#files').click()">
  318. <img id="picavatar" src="/img?av=<?PHP echo(AVATAR_NAME);?>&pic=<?PHP echo($profilePic);?>" align="middle">
  319. </div>
  320. <input id="files" name="files[]" type="file" accept=".*" style="visibility: hidden;" multiple>
  321. <input type="hidden" id="a" name="a">
  322. <input type="hidden" id="f" name="f">
  323. </div>
  324. <div class="tools">
  325. <div class="settingson" onclick="settingsOn();"></div>
  326. <?PHP if ($magicJar1 == 0): ?>
  327. <div class="magicjar1" style="background:url(/res/magicjar1dis.png);" onclick="setJar1On()"></div>
  328. <?PHP else: ?>
  329. <div class="magicjar1" style="background:url(/res/magicjar1.png);" onclick="setJar1Off()"></div>
  330. <?PHP endif; ?>
  331. <?PHP if ($magicJar2 == 0): ?>
  332. <div class="magicjar2" style="background:url(/res/magicjar2dis.png);" onclick="setJar2On()"></div>
  333. <?PHP else: ?>
  334. <div class="magicjar2" style="background:url(/res/magicjar2.png);" onclick="setJar2Off()"></div>
  335. <?PHP endif; ?>
  336. <?PHP if ($magicJar3 == 0): ?>
  337. <div class="magicjar3" style="background:url(/res/magicjar3dis.png);" onclick="setJar3On()"></div>
  338. <?PHP else: ?>
  339. <div class="magicjar3" style="background:url(/res/magicjar3.png);" onclick="setJar3Off()"></div>
  340. <?PHP endif; ?>
  341. <div class="settingsoff" onclick="settingsOff();"></div>
  342. </div>
  343. <input type="hidden" id="txtMagicJar1" name="txtMagicJar1" value="<?PHP echo($magicJar1);?>">
  344. <input type="hidden" id="txtMagicJar2" name="txtMagicJar2" value="<?PHP echo($magicJar2);?>">
  345. <input type="hidden" id="txtMagicJar3" name="txtMagicJar3" value="<?PHP echo($magicJar3);?>">
  346. <input type="hidden" id="Password" name="Password" value="<?PHP echo($password);?>">
  347. </form>
  348. <div id="footerCont">&nbsp;</div>
  349. <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>
  350. <?PHP else: ?>
  351. <body style="background:#dadada no-repeat; background-size: cover; background-attachment: fixed; background-position: center;">
  352. <!--<div id="AFHint">
  353. <button type="button" class="close" aria-label="Close" onclick="closeMe(this);" style="position:relative; top:5px; left:-7px;">
  354. <span aria-hidden="true" style="color:black; font-weight:900;">&times;</span>
  355. </button>
  356. <br>
  357. <span onclick="showHowTo();"><?PHP echo(getResource0("How-to: Manage your avatars in Puzzleu", $lang));?></span>
  358. <br><br>
  359. </div> -->
  360. <div class="header" style="margin-top:18px;margin-bottom:18px;">
  361. <div style="float:left">
  362. <a href="http://puzzleu.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;Puzzleu</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://github.com/par7133/Puzzleu" 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>
  363. </div>
  364. <div style="float:right; position:relative; top:-10px;margin-right:300px;">
  365. <a href="#" onclick="slideShow();"><img src="/res/playicon.png" style="width:45px;"></a>
  366. </div>
  367. </div>
  368. <form id="frmUpload" role="form" method="post" action="/<?PHP echo(AVATAR_NAME);?>?hl=<?PHP echo($lang);?>" target="_self" enctype="multipart/form-data">
  369. <div id="blog">
  370. <?PHP
  371. $iEntry = 2;
  372. $totLinks = 0;
  373. $aLinks=[];
  374. $pattern = $BLOG_PATH . DIRECTORY_SEPARATOR . "*";
  375. $aFilePaths = glob($pattern);
  376. if (empty($aFilePaths)): ?>
  377. <div class="blog-content">
  378. <div class="blog-entry" style="background:url('/res/img.png');background-size:100% 100%;">
  379. &nbsp;
  380. </div>
  381. </div>
  382. <?PHP else: ?>
  383. <?PHP
  384. $CUDOZ++;
  385. $iEntry = 1;
  386. $iCurEntry = 1;
  387. arsort($aFilePaths, SORT_STRING);
  388. $totPost = count($aFilePaths);
  389. // PAGINATION
  390. $totPages = (int)(count($aFilePaths)/APP_BLOG_MAX_POSTS);
  391. if ($totPages < (count($aFilePaths)/APP_BLOG_MAX_POSTS)) {
  392. $totPages++;
  393. }
  394. $firstPost = 0;
  395. $prevPost = $blogSP - APP_BLOG_MAX_POSTS;
  396. if ($prevPost < 0) {
  397. $prevPost = 0;
  398. }
  399. $nextPost = $blogSP + APP_BLOG_MAX_POSTS;
  400. if ($nextPost > (($totPages - 1) * APP_BLOG_MAX_POSTS)) {
  401. $nextPost = (($totPages - 1) * APP_BLOG_MAX_POSTS);
  402. }
  403. if ($nextPost < 0) {
  404. $nextPost = 0;
  405. }
  406. $lastPost = (($totPages - 1) * APP_BLOG_MAX_POSTS);
  407. if ($lastPost < 0) {
  408. $lastPost = 0;
  409. }
  410. // ---
  411. //echo("blogSP=".$blogSP);
  412. foreach ($aFilePaths as $filePath) {
  413. //echo("iCurEntry=".$iCurEntry);
  414. if ($iCurEntry<($blogSP+1)) {
  415. $iCurEntry++;
  416. continue;
  417. }
  418. if ($iEntry>APP_BLOG_MAX_POSTS) {
  419. break;
  420. }
  421. $orifilename = basename($filePath);
  422. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  423. $date = explode("-",$orifilename)[0];
  424. $time = explode("-",$orifilename)[1];
  425. $time = left($time,2) . ":" . substr($time,2,2);
  426. if ($iEntry === count($aFilePaths) || $iEntry==APP_BLOG_MAX_POSTS) {
  427. $marginbottom = "0px";
  428. } else {
  429. $marginbottom = "5px";
  430. }
  431. ?>
  432. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  433. <div class="blog-content">
  434. <div class="blog-entry" onclick="selectVideo(<?php echo($iEntry-1);?>);" style="background:url('/img?av=<?PHP echo(AVATAR_NAME);?>&pic=<?PHP echo($orifilename);?>');background-size:100% 100%;">
  435. <?PHP if (APP_PAGINATION): ?>
  436. <?php if ($iCurEntry===1 && $iEntry===1): ?>
  437. <!--<img class="blog-img" src="/res/arrow-leftd.png" style="float:left;">-->
  438. <?php elseif ($iEntry===1 && $iCurEntry>1): ?>
  439. <a href="/<?PHP echo(AVATAR_NAME); ?>/?blogSP=<?PHP echo($prevPost);?>" onclick="event.stopPropagation();"><img class="blog-img" src="/res/arrow-left.png" style="float:left;"></a>
  440. <?php endif; ?>
  441. <?php if ($iEntry===APP_BLOG_MAX_POSTS && $iCurEntry===$totPost): ?>
  442. <!--<img class="blog-img" src="/res/arrow-rightd.png" style="float:right;">-->
  443. <?php elseif ($iEntry===APP_BLOG_MAX_POSTS): ?>
  444. <a href="/<?PHP echo(AVATAR_NAME); ?>/?blogSP=<?PHP echo($nextPost);?>" onclick="event.stopPropagation();"><img class="blog-img" src="/res/arrow-right.png" style="float:right;"></a>
  445. <?php endif; ?>
  446. <?PHP else: ?>
  447. &nbsp;
  448. <?PHP endif; ?>
  449. </div>
  450. </div>
  451. <?PHP $aLinks[] = "/img?av=" . AVATAR_NAME . "&pic=" . $orifilename; ?>
  452. <?PHP EndIf; ?>
  453. <?PHP
  454. $totLinks = $iEntry;
  455. $iEntry++;
  456. $iCurEntry++;
  457. }?>
  458. <?PHP endif; ?>
  459. <?PHP for($i=$iEntry;$i<=APP_BLOG_MAX_POSTS;$i++):?>
  460. <div class="blog-content">
  461. <div class="blog-entry" style="border:0px;background:darkgray;">
  462. &nbsp;
  463. </div>
  464. </div>
  465. <?PHP endfor; ?>
  466. <?PHP if ((APP_BLOG_MAX_POSTS / 3) > (int)(APP_BLOG_MAX_POSTS / 3)): ?>
  467. <div class="blog-content">
  468. <div class="blog-entry" style="border:0px;background:darkgray;">
  469. &nbsp;
  470. </div>
  471. </div>
  472. <?PHP if (((APP_BLOG_MAX_POSTS+1) / 3) > (int)((APP_BLOG_MAX_POSTS+1) / 3)): ?>
  473. <div class="blog-content">
  474. <div class="blog-entry" style="border:0px;background:darkgray;">
  475. &nbsp;
  476. </div>
  477. </div>
  478. <?PHP endif; ?>
  479. <?PHP endif; ?>
  480. <br><br>
  481. </div>
  482. <?php
  483. $iLink = 0;
  484. foreach($aLinks as $aLink) { ?>
  485. <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>
  486. <div class="modal" tabindex="-1" role="dialog" id="modal<?php echo($iLink);?>" style="z-index:99997">
  487. <div class="modal-dialog modal-lg" role="document" style="width:95%;margin-top:0;background-color:#FFFFFF;z-index:99998">
  488. <div class="modal-content" style="float:left;width: content-box;max-width:60%;z-index:99999;">
  489. <img id="imageh<?PHP echo($iLink);?>" class="imageh" src="<?php echo($aLink); ?>" style="display:none">
  490. <img id="image<?PHP echo($iLink);?>" class="image" src="" marti-src="<?php echo($aLink); ?>" style="width:100%;vertical-align:middle;">
  491. </div>
  492. <!--
  493. <div class="modal-toolbox" style="float:right;">
  494. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  495. </div> -->
  496. </div>
  497. </div>
  498. <?php $iLink++; ?>
  499. <?php } ?>
  500. <?PHP
  501. // GALLERY GHOST
  502. $CUDOZ++;
  503. ?>
  504. <div id="halSys" class="col-xs-12 col-sm-10 col-md-10 col-lg-7 col-xl-5 col-haligned input-group" style="display: none; position:relative; top:-85px; left:-95px;">
  505. <div class="input-group-btn" style="border: 0px solid red;">
  506. <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>
  507. <div id="halBoard" style="float: left; position:relative; left:+5%; top: +2px; display: none;">
  508. <?PHP
  509. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*";
  510. $aFilePaths = glob($pattern);
  511. if (!empty($aFilePaths)): ?>
  512. <?PHP $CUDOZ++; ?>
  513. <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;">
  514. <nobr>
  515. <div class="input-group">
  516. <div class="input-group-btn btn-white dropup">
  517. <a id="halCVOptions" class="btn dropdown-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;"><?php echo("CV");?></a>
  518. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  519. <tr>
  520. <td class="cv-options-td">
  521. <br>
  522. <?PHP
  523. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*.doc";
  524. $aFilePaths = glob($pattern);
  525. if (!empty($aFilePaths)): ?>
  526. <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>
  527. <?PHP endif; ?>
  528. <?PHP
  529. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*.pdf";
  530. $aFilePaths = glob($pattern);
  531. if (!empty($aFilePaths)): ?>
  532. <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>
  533. <?PHP endif; ?>
  534. </td>
  535. </tr>
  536. </table>
  537. </div>
  538. </div>
  539. </nobr>
  540. &nbsp;&nbsp; &nbsp;</h3>
  541. <?PHP endif; ?>
  542. <?PHP
  543. $pattern = $MAGICJAR1_PATH . DIRECTORY_SEPARATOR . "*";
  544. $aFilePaths = glob($pattern);
  545. if (!empty($aFilePaths)): ?>
  546. <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;">
  547. <nobr>
  548. <div class="input-group">
  549. <div class="input-group-btn btn-white dropup">
  550. <a id="halMP1Options" class="btn dropdown-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>
  551. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  552. <tr>
  553. <td class="cv-options-td">
  554. <br>
  555. <?PHP
  556. $iEntry = 1;
  557. foreach ($aFilePaths as $filePath) {
  558. $orifilename = basename($filePath);
  559. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  560. $filename = explode("|",basename($filePath))[1];
  561. if ($iEntry === count($aFilePaths)) {
  562. $marginbottom = "0px";
  563. } else {
  564. $marginbottom = "5px";
  565. }
  566. ?>
  567. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  568. <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;">
  569. <?PHP else: ?>
  570. <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;">
  571. <?PHP endif; ?>
  572. <?PHP echo($filename);?>
  573. </a>
  574. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  575. <br><br>
  576. <?PHP else: ?>
  577. <br>
  578. <?PHP endif; ?>
  579. <?PHP
  580. $iEntry++;
  581. }?>
  582. <br>
  583. </td>
  584. </tr>
  585. </table>
  586. </div>
  587. </div>
  588. </nobr>
  589. &nbsp;&nbsp;&nbsp;</h3>
  590. <?PHP endif; ?>
  591. <?PHP
  592. $pattern = $MAGICJAR2_PATH . DIRECTORY_SEPARATOR . "*";
  593. $aFilePaths = glob($pattern);
  594. if (!empty($aFilePaths)): ?>
  595. <!--<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;">
  596. &nbsp;&nbsp;<a id="halMagicpot1" onclick="#" style="cursor:pointer; color: #000000;">Magicpot1</a>&nbsp;&nbsp;
  597. </h3>-->
  598. <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;">
  599. <nobr>
  600. <div class="input-group">
  601. <div class="input-group-btn btn-white dropup">
  602. <a id="halMP1Options" class="btn dropdown-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>
  603. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  604. <tr>
  605. <td class="cv-options-td">
  606. <br>
  607. <?PHP
  608. $iEntry = 1;
  609. foreach ($aFilePaths as $filePath) {
  610. $orifilename = basename($filePath);
  611. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  612. $filename = explode("|",basename($filePath))[1];
  613. if ($iEntry === count($aFilePaths)) {
  614. $marginbottom = "0px";
  615. } else {
  616. $marginbottom = "5px";
  617. }
  618. ?>
  619. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  620. <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;">
  621. <?PHP else: ?>
  622. <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;">
  623. <?PHP endif; ?>
  624. <?PHP echo($filename);?>
  625. </a>
  626. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  627. <br><br>
  628. <?PHP else: ?>
  629. <br>
  630. <?PHP endif; ?>
  631. <?PHP
  632. $iEntry++;
  633. }?>
  634. <br>
  635. </td>
  636. </tr>
  637. </table>
  638. </div>
  639. </div>
  640. </nobr>
  641. &nbsp;&nbsp;&nbsp;</h3>
  642. <?PHP endif; ?>
  643. <?PHP
  644. $pattern = $MAGICJAR3_PATH . DIRECTORY_SEPARATOR . "*";
  645. $aFilePaths = glob($pattern);
  646. if (!empty($aFilePaths)): ?>
  647. <!--<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;">
  648. &nbsp;&nbsp;<a id="halMagicpot1" onclick="#" style="cursor:pointer; color: #000000;">Magicpot1</a>&nbsp;&nbsp;
  649. </h3>-->
  650. <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;">
  651. <nobr>
  652. <div class="input-group">
  653. <div class="input-group-btn btn-white dropup">
  654. <a id="halMP1Options" class="btn dropdown-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>
  655. <table class="dropdown-menu cv-options-table bubble" style="background-color: white; left:-6px; margin-bottom: 10px; z-index:99999;">
  656. <tr>
  657. <td class="cv-options-td">
  658. <br>
  659. <?PHP
  660. $iEntry = 1;
  661. foreach ($aFilePaths as $filePath) {
  662. $orifilename = basename($filePath);
  663. $orifileExt = strtolower(pathinfo($orifilename, PATHINFO_EXTENSION));
  664. $filename = explode("|",basename($filePath))[1];
  665. if ($iEntry === count($aFilePaths)) {
  666. $marginbottom = "0px";
  667. } else {
  668. $marginbottom = "5px";
  669. }
  670. ?>
  671. <?PHP if (in_array($orifileExt, ["png", "jpg", "jpeg", "gif", "webp"])):?>
  672. <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;">
  673. <?PHP else: ?>
  674. <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;">
  675. <?PHP endif; ?>
  676. <?PHP echo($filename);?>
  677. </a>
  678. <?PHP if ($iEntry !== count($aFilePaths)): ?>
  679. <br><br>
  680. <?PHP else: ?>
  681. <br>
  682. <?PHP endif; ?>
  683. <?PHP
  684. $iEntry++;
  685. }?>
  686. <br>
  687. </td>
  688. </tr>
  689. </table>
  690. </div>
  691. </div>
  692. </nobr>
  693. &nbsp;&nbsp;&nbsp;</h3>
  694. <?PHP endif; ?>
  695. <?PHP
  696. $pattern = $FRIENDS_PATH . DIRECTORY_SEPARATOR . "*.txt";
  697. $aFilePaths = glob($pattern);
  698. if (!empty($aFilePaths)): ?>
  699. <?PHP
  700. $CUDOZ++;
  701. $iEntry = 1;
  702. foreach ($aFilePaths as $filePath) {
  703. $orifilename = basename($filePath);
  704. $link=file_get_contents($filePath);
  705. $filename = pathinfo($filePath, PATHINFO_FILENAME);
  706. if ($iEntry === count($aFilePaths)) {
  707. $marginbottom = "0px";
  708. } else {
  709. $marginbottom = "5px";
  710. }
  711. ?>
  712. <h3 class="board-entry" style="border-radius:3px;font-size: 1.45vw; font-weight:700; float:left; background-color:lightgray; margin-right:4px; padding:4px;">
  713. &nbsp;&nbsp;<a id="halFriend1" href="<?PHP echo($link);?>" style="cursor:pointer; color: #000000;"><?PHP echo($filename);?></a>&nbsp;&nbsp;
  714. </h3>
  715. <?PHP
  716. $iEntry++;
  717. }?>
  718. <?PHP endif; ?>
  719. <?PHP if (defined("APP_EMAIL_CONTACT") && APP_EMAIL_CONTACT!==PHP_STR): ?>
  720. <h3 class="board-entry" style="border-radius:3px;font-size: 1.45vw; font-weight:700; float:left; background-color:lightgray; margin-right:4px; padding:4px;">
  721. &nbsp;&nbsp;<a id="halContact" href="mailto:<?PHP echo(APP_EMAIL_CONTACT);?>" style="cursor:pointer; color: #000000;"><?PHP echo(APP_EMAIL_CONTACT);?></a>&nbsp;&nbsp;
  722. </h3>
  723. <?PHP Endif; ?>
  724. </div>
  725. </div>
  726. </div>
  727. <div id="passworddisplay">
  728. <br>
  729. &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>
  730. &nbsp;&nbsp;<input type="text" id="Salt" placeholder="salt" autocomplete="off"><br>
  731. <div style="text-align:center;">
  732. <a id="hashMe" href="#" onclick="showEncodedPassword();"><?PHP echo(getResource0("Hash Me", $lang));?>!</a>
  733. </div>
  734. </div>
  735. </form>
  736. <div id="footerCont">&nbsp;</div>
  737. <div id="footer1" style="float:left; width:80px;">
  738. <select id="cbLang" onchange="changeLang(this);">
  739. <option value="en-US" <?PHP echo($lang==PHP_EN?"selected":"");?>>en</option>
  740. <option value="it-IT" <?PHP echo($lang==PHP_IT?"selected":"");?>>it</option>
  741. <option value="zh-CN" <?PHP echo($lang==PHP_CN?"selected":"");?>>cn</option>
  742. </select>
  743. </div>
  744. <div id="footer2" style="float:right; width:450px;">
  745. <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>
  746. </div>
  747. <?PHP endif; ?>
  748. <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>
  749. <?PHP if ($CURRENT_VIEW == PUBLIC_VIEW): ?>
  750. <script>
  751. function selectVideo(i) {
  752. //alert(3);
  753. y=0;
  754. $(".image").each(function(){
  755. if (y==i) {
  756. if ($("#imageh" + y).height() >= $("#imageh" + y).width()) {
  757. $(this).css("height", parseInt(window.innerHeight));
  758. } else {
  759. $(this).css("height", "");
  760. }
  761. $(this).attr("src", $(this).attr("marti-src"));
  762. } else {
  763. $(this).attr("src", "");
  764. }
  765. y++;
  766. });
  767. //alert(i);
  768. //alert($('#iframe' + i).attr("id"));
  769. //$("#iframe"+i).attr("src", $("#iframe"+i).attr("marti-src") );
  770. $("#modalButton" + i).click();
  771. }
  772. </script>
  773. <script>
  774. var bHal = false;
  775. $("span#halTerm").on("click",function(e) {
  776. bHal=!bHal;
  777. if (bHal) {
  778. document.getElementById("hal").src = '/res/hal2_open.png';
  779. $("div#halBoard").show("fast");
  780. } else {
  781. document.getElementById("hal").src = '/res/hal2_closed.png';
  782. $("div#halBoard").hide("slow");
  783. }
  784. });
  785. function setHalPos() {
  786. bodyRect = document.body.getBoundingClientRect();
  787. //document.getElementById('q').write = bodyRect.width;
  788. bHal=false;
  789. document.getElementById("hal").src = '/res/hal2_closed.png';
  790. $("div#halBoard").hide();
  791. if (parseInt(bodyRect.width) < 690) {
  792. $("div#predSys").hide();
  793. $("div#halSys").hide();
  794. } else {
  795. $("div#predSys").show();
  796. $("div#halSys").show();
  797. }
  798. if (parseInt(bodyRect.width) > 1200) {
  799. $("h3.board-entry").css("font-size", "1.0vw");
  800. $("a#halCVOptions").css("font-size", "1.0vw");
  801. $("span#halTerm").css("left", "+11%");
  802. $("div#halBoard").css("left", "+12%");
  803. } else if (parseInt(bodyRect.width) < 800) {
  804. $("h3.board-entry").css("font-size", "14px");
  805. $("a#halCVOptions").css("font-size", "14px");
  806. $("span#halTerm").css("left", "+0%");
  807. $("div#halBoard").css("left", "+0%");
  808. } else {
  809. $("span#halTerm").css("left", "+8%");
  810. $("div#halBoard").css("left", "+9%");
  811. $("h3.board-entry").css("font-size", "1.45vw");
  812. $("a#halCVOptions").css("font-size", "1.45vw");
  813. }
  814. }
  815. window.addEventListener("load", function() {
  816. setTimeout("setHalPos()", 100);
  817. }, true);
  818. window.addEventListener("resize", function() {
  819. setTimeout("setHalPos()", 100);
  820. }, true);
  821. </script>
  822. <script>
  823. function setContentPos() {
  824. h = window.innerHeight;
  825. w = window.innerWidth;
  826. pich = parseInt((h - $(".header").height() - 80) / 3);
  827. // picw = parseInt(w / 5); ori
  828. iimg = parseInt(<?PHP echo(APP_BLOG_MAX_POSTS / 3); ?>);
  829. if ((<?PHP echo(APP_BLOG_MAX_POSTS / 3); ?>) > parseInt(<?PHP echo(APP_BLOG_MAX_POSTS / 3); ?>)) {
  830. iimg++;
  831. }
  832. picw = parseInt(w / iimg);
  833. $(".blog-content").css("height", pich + "px");
  834. $(".blog-content").css("width", picw + "px");
  835. $(".blog-entry").css("height", (pich-2) + "px");
  836. $(".blog-entry").css("width", (picw-2) + "px");
  837. $(".blog-img").css("height", (pich-4) + "px");
  838. $(".blog-img").css("width", ((picw-4)/3) + "px");
  839. // ---
  840. $("#passworddisplay").css("top", parseInt(h-$("#passworddisplay").height()-100)+"px");
  841. }
  842. window.addEventListener("load", function() {
  843. setTimeout("setContentPos()", 1000);
  844. });
  845. window.addEventListener("resize", function() {
  846. setTimeout("setContentPos()", 1000);
  847. });
  848. </script>
  849. <script>
  850. var iSlide;
  851. var ii;
  852. function showSlide() {
  853. $(".modal").click();
  854. selectVideo(iSlide);
  855. if (iSlide<<?PHP echo($totLinks);?>) {
  856. iSlide++;
  857. } else {
  858. clearInterval(ii);
  859. $(".modal").click();
  860. }
  861. }
  862. function slideShow() {
  863. iSlide = 0;
  864. ii = setInterval(showSlide,3700);
  865. }
  866. </script>
  867. <!-- SKINNER CODE -->
  868. <?php if (is_readable($AVATAR_PATH . DIRECTORY_SEPARATOR . "skinner.html")): ?>
  869. <?php include($AVATAR_PATH . DIRECTORY_SEPARATOR . "skinner.html"); ?>
  870. <?php else: ?>
  871. <?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "skinner.html")): ?>
  872. <?php include(APP_PATH . DIRECTORY_SEPARATOR . "skinner.html"); ?>
  873. <?php endif; ?>
  874. <?php endif; ?>
  875. <!-- METRICS CODE -->
  876. <?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html")): ?>
  877. <?php include(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html"); ?>
  878. <?php endif; ?>
  879. <?php endif; ?>
  880. </body>
  881. </html>