home.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. <?php
  2. /**
  3. * Copyright 2021, 2024 5 Mode
  4. *
  5. * This file is part of Avatar Free.
  6. *
  7. * Avatar Free 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. * Avatar Free 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 Avatar Free. If not, see <https://www.gnu.org/licenses/>.
  19. *
  20. * home.php
  21. *
  22. * Home of Avatar Free.
  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. $TRES1_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "tres1";
  36. $TRES2_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "tres2";
  37. $TRES3_PATH = $AVATAR_PATH . DIRECTORY_SEPARATOR . "tres3";
  38. $profilePic = APP_DEF_PROFILE_PIC;
  39. // PAGE PARAMETERS
  40. $lang = APP_DEF_LANG;
  41. $lang1 = substr(filter_input(INPUT_GET, "hl", FILTER_SANITIZE_STRING), 0, 5);
  42. if ($lang1 !== PHP_STR) {
  43. $lang = $lang1;
  44. }
  45. $shortLang = getShortLang($lang);
  46. $password = filter_input(INPUT_POST, "Password");
  47. if ($password !== PHP_STR) {
  48. $hash = hash("sha256", $password . APP_SALT, false);
  49. if ($hash !== APP_HASH) {
  50. $password=PHP_STR;
  51. }
  52. }
  53. if ($password !== PHP_STR) {
  54. $CURRENT_VIEW = ADMIN_VIEW;
  55. } else {
  56. $CURRENT_VIEW = PUBLIC_VIEW;
  57. }
  58. function uploadNewRes() {
  59. global $AVATAR_PATH;
  60. global $CV_PATH;
  61. global $FRIENDS_PATH;
  62. global $BLOG_PATH;
  63. global $GALLERY_PATH;
  64. global $TRES1_PATH;
  65. global $TRES2_PATH;
  66. global $TRES3_PATH;
  67. //echo_ifdebug(true, "AVATAR_PATH#1=");
  68. //echo_ifdebug(true, $AVATAR_PATH);
  69. //if (!empty($_FILES['files'])) {
  70. if (!empty($_FILES['filesdd']['tmp_name'][0])) {
  71. //no file uploaded
  72. //$uploads = (array)fixMultipleFileUpload($_FILES['files']);
  73. //if ($uploads[0]['error'] === UPLOAD_ERR_NO_FILE) {
  74. $uploads = (array)fixMultipleFileUpload($_FILES['filesdd']);
  75. //}
  76. //if ($uploads[0]['error'] === PHP_UPLOAD_ERR_NO_FILE) {
  77. // echo("WARNING: No file uploaded.");
  78. // return;
  79. //}
  80. $google = "abcdefghijklmnopqrstuvwxyz";
  81. if (count($uploads)>strlen($google)) {
  82. echo("WARNING: Too many uploaded files.");
  83. return;
  84. }
  85. $i=1;
  86. foreach($uploads as &$upload) {
  87. switch ($upload['error']) {
  88. case PHP_UPLOAD_ERR_OK:
  89. break;
  90. case PHP_UPLOAD_ERR_NO_FILE:
  91. echo("WARNING: One or more uploaded files are missing.");
  92. return;
  93. case PHP_UPLOAD_ERR_INI_SIZE:
  94. echo("WARNING: File exceeded INI size limit.");
  95. return;
  96. case PHP_UPLOAD_ERR_FORM_SIZE:
  97. echo("WARNING: File exceeded form size limit.");
  98. return;
  99. case PHP_UPLOAD_ERR_PARTIAL:
  100. echo("WARNING: File only partially uploaded.");
  101. return;
  102. case PHP_UPLOAD_ERR_NO_TMP_DIR:
  103. echo("WARNING: TMP dir doesn't exist.");
  104. return;
  105. case PHP_UPLOAD_ERR_CANT_WRITE:
  106. echo("WARNING: Failed to write to the disk.");
  107. return;
  108. case PHP_UPLOAD_ERR_EXTENSION:
  109. echo("WARNING: A PHP extension stopped the file upload.");
  110. return;
  111. default:
  112. echo("WARNING: Unexpected error happened.");
  113. return;
  114. }
  115. if (!is_uploaded_file($upload['tmp_name'])) {
  116. echo("WARNING: One or more file have not been uploaded.");
  117. return;
  118. }
  119. // name
  120. $name = (string)substr((string)filter_var($upload['name']), 0, 255);
  121. if ($name == PHP_STR) {
  122. echo("WARNING: Invalid file name: " . $name);
  123. return;
  124. }
  125. $upload['name'] = $name;
  126. // fileType
  127. $fileType = substr((string)filter_var($upload['type']), 0, 30);
  128. $upload['type'] = $fileType;
  129. // tmp_name
  130. $tmp_name = substr((string)filter_var($upload['tmp_name']), 0, 300);
  131. if ($tmp_name == PHP_STR || !file_exists($tmp_name)) {
  132. echo("WARNING: Invalid file temp path: " . $tmp_name);
  133. return;
  134. }
  135. $upload['tmp_name'] = $tmp_name;
  136. //size
  137. $size = substr((string)filter_var($upload['size'], FILTER_SANITIZE_NUMBER_INT), 0, 12);
  138. if ($size == "") {
  139. echo("WARNING: Invalid file size.");
  140. return;
  141. }
  142. $upload["size"] = $size;
  143. $tmpFullPath = $upload["tmp_name"];
  144. $originalFilename = pathinfo($name, PATHINFO_FILENAME);
  145. $originalFileExt = pathinfo($name, PATHINFO_EXTENSION);
  146. $fileExt = strtolower(pathinfo($name, PATHINFO_EXTENSION));
  147. $date = date("Ymd-His");
  148. $rnd = mt_rand(1000000000, 9999999999);
  149. if ($originalFileExt!==PHP_STR) {
  150. $destFileName = $date . "-" . $rnd . substr($google, $i-1, 1) . "|" . str_replace(" ", "_", $originalFilename) . ".$fileExt";
  151. } else {
  152. return;
  153. }
  154. //$CV_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "cv";
  155. //$FRIENDS_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "friends";
  156. //$BLOG_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "blog";
  157. //$GALLERY_PATH = APP_DATA_PATH . DIRECTORY_SEPARATOR . "gallery";
  158. switch ($fileExt) {
  159. case "doc":
  160. case "docx":
  161. case "pdf":
  162. $destPath = $CV_PATH;
  163. break;
  164. case "txt":
  165. $destPath = $BLOG_PATH;
  166. break;
  167. case "png":
  168. case "jpg":
  169. case "jpeg":
  170. case "gif":
  171. case "webp":
  172. $destPath = $GALLERY_PATH;
  173. break;
  174. default:
  175. $destPath = $TRES1_PATH;
  176. break;
  177. }
  178. $destFullPath = $destPath . DIRECTORY_SEPARATOR . $destFileName;
  179. if (file_exists($destFullPath)) {
  180. echo("WARNING: destination already exists");
  181. return;
  182. }
  183. //echo_ifdebug(true, "AVATAR_PATH#2=");
  184. //echo_ifdebug(true, $AVATAR_PATH);
  185. //echo_ifdebug(true, "is_readable(AVATAR_PATH)=");
  186. //echo_ifdebug(true, is_readable($AVATAR_PATH));
  187. if (!is_readable($AVATAR_PATH)) {
  188. mkdir($AVATAR_PATH, 0777);
  189. }
  190. if (!is_readable($destPath)) {
  191. mkdir($destPath, 0777);
  192. }
  193. $pattern = $destPath . DIRECTORY_SEPARATOR . "*" . "|" . str_replace(" ", "_", $originalFilename) . ".$fileExt";
  194. $aExistingPaths = glob($pattern);
  195. if (!empty($aExistingPaths)) {
  196. continue;
  197. }
  198. copy($tmpFullPath, $destFullPath);
  199. // Cleaning up..
  200. // Delete the tmp file..
  201. unlink($tmpFullPath);
  202. $i++;
  203. }
  204. }
  205. }
  206. function writeFriends() {
  207. global $FRIENDS_PATH;
  208. $destPath = $FRIENDS_PATH;
  209. $s = filter_input(INPUT_POST, "f", FILTER_SANITIZE_STRING);
  210. if ($s != PHP_STR) {
  211. //echo($s);
  212. //exit(0);
  213. $friends=explode("|", $s);
  214. if (!is_readable($destPath)) {
  215. mkdir($destPath, 0777);
  216. }
  217. foreach($friends as $friend) {
  218. $a = explode("://",$friend);
  219. $s = $a[1];
  220. $a = explode("/", $s);
  221. $friendName = $a[0] . ".txt";
  222. file_put_contents($destPath . DIRECTORY_SEPARATOR . $friendName, $friend);
  223. }
  224. }
  225. }
  226. function grabProfileImage() {
  227. global $GALLERY_PATH;
  228. $pattern = $GALLERY_PATH . DIRECTORY_SEPARATOR . "*";
  229. $aImagePaths = glob($pattern);
  230. if (isset($aImagePaths[0])) {
  231. $retval = basename($aImagePaths[0]);
  232. } else {
  233. $retval = null;
  234. }
  235. return $retval;
  236. }
  237. function startApp() {
  238. global $CURRENT_VIEW;
  239. global $profilePic;
  240. if ($CURRENT_VIEW == ADMIN_VIEW) {
  241. uploadNewRes();
  242. writeFriends();
  243. }
  244. $profilePic = grabProfileImage() ?? APP_DEF_PROFILE_PIC;
  245. //echo("profile pic=" . $profilePic);
  246. }
  247. startApp();
  248. ?>
  249. <!DOCTYPE html>
  250. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  251. <head>
  252. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  253. <!--<?PHP echo(APP_LICENSE);?>-->
  254. <title>Avatar Free: everyone its social presence.</title>
  255. <link rel="shortcut icon" href="/favicon.ico" />
  256. <meta name="description" content="Welcome to Avatar Free! Let everyone have its social presence."/>
  257. <meta name="keywords" content="Avatar Free,social,presence,avatarfree.org,on,premise,solution"/>
  258. <meta name="robots" content="index,follow"/>
  259. <meta name="author" content="5 Mode"/>
  260. <script src="/js/jquery-3.6.0.min.js" type="text/javascript"></script>
  261. <script src="/js/sha.js" type="text/javascript"></script>
  262. <script src="/js/common.js" type="text/javascript"></script>
  263. <link href="/css/style.css?r=<?PHP echo(time());?>" type="text/css" rel="stylesheet">
  264. <link href="/css/bootstrap.min.css" type="text/css" rel="stylesheet">
  265. </head>
  266. <?PHP if ($CURRENT_VIEW == ADMIN_VIEW): ?>
  267. <body style="background:url('/res/bg1.jpg') no-repeat; background-size: cover; background-attachment: fixed; background-position: center;">
  268. <div style="width:100%;height:fit-content;position:fixed;background:yellow;color:darkorange;text-align:center;cursor:pointer;" onclick="showHowTo();"><br><?PHP echo(getResource0("How-to: Manage your avatars in Avatar Free", $lang));?><br><br></div>
  269. <form id="frmUpload" role="form" method="post" action="/<?PHP echo(AVATAR_NAME);?>?hl=<?PHP echo($lang);?>" target="_self" enctype="multipart/form-data">
  270. <div class="dragover" style="width:100%;height:100%;border:0px solid red;" dropzone="copy">
  271. <img id="picavatar" src="/img?av=<?PHP echo(AVATAR_NAME);?>&pic=<?PHP echo($profilePic);?>" align="middle" style="position:absolute;width:255px;height:255px;border-radius: 90%; display:none;">
  272. <input type="hidden" id="a" name="a">
  273. <input type="hidden" id="f" name="f">
  274. </div>
  275. <input type="hidden" id="Password" name="Password" value="<?PHP echo($password);?>">
  276. </form>
  277. <div id="footerCont">&nbsp;</div>
  278. <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>
  279. <?PHP else: ?>
  280. <body style="background:#dadada no-repeat; background-size: cover; background-attachment: fixed; background-position: center;">
  281. <div style="width:100%;height:fit-content;position:fixed;background:yellow;color:darkorange;text-align:center;cursor:pointer;z-index:99999;" onclick="showHowTo();"><br><?PHP echo(getResource0("How-to: Manage your avatars in Avatar Free", $lang));?><br><br></div>
  282. <form id="frmUpload" role="form" method="post" action="/<?PHP echo(AVATAR_NAME);?>?hl=<?PHP echo($lang);?>" target="_self" enctype="multipart/form-data">
  283. <div id="title" style="position:relative;top:80px;left:50px;width:100%;float:left;font-size:25px;font-family:'Press Start 2P';border:0px solid blue;">
  284. <div id="cudoz" style="width:255px;height:255px;float:left;border:0px solid yellow;">
  285. <img id="picavatar" src="/img?av=<?PHP echo(AVATAR_NAME);?>&pic=<?PHP echo($profilePic);?>" align="middle" style="width:255px;height:255px;border-radius: 90%;">
  286. </div>
  287. <div id="cudoz" style="width:250px;height:255px;padding-top:122px;float:left;border:0px solid yellow;vertical-align:middle;">
  288. &nbsp;<?PHP echo(strtoupper(AVATAR_NAME));?>&nbsp;&nbsp;&nbsp;
  289. </div>
  290. <div id="cudoz" style="width:250px;height:255px;padding-top:116px;float:left;border:0px solid green;vertical-align:middle;">
  291. <?PHP for ($i=1;$i<=$CUDOZ;$i++): ?>
  292. <img id="cudozentry<?PHP echo($i);?>" src="/res/chicca_<?PHP echo($shortLang);?>.png" style="float:left;width:46px">
  293. <?PHP endfor; ?>
  294. <?PHP for ($i=$CUDOZ+1;$i<=5;$i++): ?>
  295. <img id="cudozentry<?PHP echo($i);?>" src="/res/chiccadis.png" style="float:left;width:46px">
  296. <?PHP endfor; ?>
  297. </div>
  298. <div id="cvs" style="float:right;border:3px solid darkgray;border-radius:4px;padding:4px;background:#dadada;font-size:20px;font-family:'Press Start 2P';font-weight:900;">
  299. <div style="float:left;width:47px;margin-top:20px;margin-left:7px;"><?PHP echo(getResource0("CV", $lang));?></div>
  300. <?PHP
  301. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*";
  302. $aFilePaths = glob($pattern);
  303. if (empty($aFilePaths)): ?>
  304. <img src="/res/wordicondis.png" style="float:left;width:64px">&nbsp;&nbsp;<img src="/res/pdficondis.png" style="float:left;width:64px">
  305. <?PHP else: ?>
  306. <?PHP
  307. $CUDOZ++;
  308. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*.doc";
  309. $aFilePaths = glob($pattern);
  310. if (empty($aFilePaths)): ?>
  311. <img src="/res/wordicondis.png" style="float:left;width:64px">&nbsp;&nbsp;
  312. <?PHP else: ?>
  313. <a href="/doc?av=<?PHP echo(AVATAR_NAME);?>&re=cv&doc=<?PHP echo(basename($aFilePaths[0]));?>"><img src="/res/wordicon.png" style="float:left;width:64px"></a>&nbsp;&nbsp;
  314. <?PHP endif; ?>
  315. <?PHP
  316. $pattern = $CV_PATH . DIRECTORY_SEPARATOR . "*.pdf";
  317. $aFilePaths = glob($pattern);
  318. if (empty($aFilePaths)): ?>
  319. <img src="/res/pdficondis.png" style="float:left;width:64px">
  320. <?PHP else: ?>
  321. <a href="/doc?av=<?PHP echo(AVATAR_NAME);?>&re=cv&doc=<?PHP echo(basename($aFilePaths[0]));?>"><img src="/res/pdficon.png" style="float:left;width:64px"></a>
  322. <?PHP endif; ?>
  323. <?PHP endif; ?>
  324. </div>
  325. </div>
  326. <br>
  327. <div id="blog" style="height:fit-content;float:left;margin:6%;margin-top:130px;margin-bottom:5px;width:90%;font-size:15px;font-family:'Press Start 2P';color:#000000;">
  328. <?PHP
  329. $pattern = $BLOG_PATH . DIRECTORY_SEPARATOR . "*.txt";
  330. $aFilePaths = glob($pattern);
  331. if (empty($aFilePaths)): ?>
  332. <div class="blog-content" style="width:100%;float:left;border:3px solid darkgray;border-radius:4px;color:#000000;">
  333. <div class="blog-entry" style="width:100%;margin-bottom:0px;min-height:120px;background:#FFFFFF;border:1px solid black;padding:30px;">
  334. <?PHP echo(getResource0("Hello from 5 Mode", $lang));?>,<br>
  335. <?PHP echo(getResource0("This is just an example of blog entry", $lang));?>.
  336. </div>
  337. </div>
  338. <?PHP else: ?>
  339. <?PHP
  340. $CUDOZ++;
  341. $iEntry = 1;
  342. foreach ($aFilePaths as $filePath) {
  343. $s=file_get_contents($filePath);
  344. if ($iEntry === count($aFilePaths)) {
  345. $marginbottom = "0px";
  346. } else {
  347. $marginbottom = "5px";
  348. }
  349. ?>
  350. <div class="blog-content" style="margin-bottom:<?PHP echo($marginbottom);?>;width:100%;float:left;border:3px solid darkgray;border-radius:4px;color:#000000;">
  351. <div class="blog-entry" style="min-height:120px;background:#FFFFFF;border:1px solid black;padding:30px;">
  352. <?PHP echo(HTMLencode($s, true));?>
  353. </div>
  354. </div>
  355. <?PHP
  356. $iEntry++;
  357. }?>
  358. <?PHP endif; ?>
  359. </div>
  360. <div id="gallery" style="float:left;margin:6%;margin-top:0px;margin-bottom:5px;width:90%;font-size:15px;font-family:Arial,Sans,Verdana;color:#000000;background:#C2DBF2;">
  361. <div class="gallery-content" style="width:100%;float:left;border:3px solid darkgray;border-radius:4px;color:#000000;">
  362. <?PHP
  363. $pattern = $GALLERY_PATH . DIRECTORY_SEPARATOR . "*";
  364. $aFilePaths = glob($pattern);
  365. if (empty($aFilePaths)): ?>
  366. <div class="image-entry" style="height:fit-content;min-height:120px;float:left;width:fit-content;border:0px solid green;padding:10px;text-align:center;">
  367. <div style="width:100%;border:0px solid black;"><img src="/res/imgicon.png" align="center" style="width:64px;border:1px solid gray;"></div>
  368. <div style="margin-top:10px;"><?PHP echo(getResource0("Sample", $lang));?></div>
  369. </div>
  370. <?PHP else: ?>
  371. <?PHP
  372. $CUDOZ++;
  373. $iEntry = 1;
  374. foreach ($aFilePaths as $filePath) {
  375. $orifilename = basename($filePath);
  376. $filename = explode("|",basename($filePath))[1];
  377. if ($iEntry === count($aFilePaths)) {
  378. $marginbottom = "0px";
  379. } else {
  380. $marginbottom = "5px";
  381. }
  382. ?>
  383. <div class="image-entry" style="height:fit-content;min-height:120px;float:left;width:fit-content;border:0px solid green;padding:10px;text-align:center;">
  384. <a href="/img?av=<?PHP echo(AVATAR_NAME);?>&pic=<?PHP echo($orifilename);?>">
  385. <div style="width:100%;border:0px solid black;"><img src="/res/imgicon.png" align="center" style="width:64px;border:1px solid gray;"></div>
  386. <div style="margin-top:10px;"><?PHP echo($filename);?> </div>
  387. </a>
  388. </div>
  389. <?PHP
  390. $iEntry++;
  391. }?>
  392. <?PHP endif; ?>
  393. </div>
  394. </div>
  395. <div id="friends" style="float:left;margin:6%;margin-top:50px;width:90%;font-size:15px;font-family:Arial,Sans,Verdana;color:#000000;background:#dadada">
  396. <div class="friends-content" style="width:100%;float:left;border:3px solid transparent;border-radius:4px;color:#000000;padding-top:10px;text-align:center;">
  397. <div style="font-family:'Press Start 2P';width:fit-content;margin:auto;color:#245269;"><?PHP echo(getResource0("My Network", $lang));?>:<br><br>
  398. <?PHP
  399. $pattern = $FRIENDS_PATH . DIRECTORY_SEPARATOR . "*.txt";
  400. $aFilePaths = glob($pattern);
  401. if (empty($aFilePaths)): ?>
  402. <div class="friend-entry" style="height:fit-content;min-height:120px;float:left;width:fit-content;border:0px solid green;padding:10px;text-align:center;">
  403. <a href="http://5mode.com">
  404. <div style="width:100%;border:0px solid black;"><img src="/res/pic1.png" align="center" style="width:64px;border:0px solid gray;"></div>
  405. <div style="margin-top:10px;"><?PHP echo(getResource0("Sample", $lang));?></div>
  406. </a>
  407. </div>
  408. <?PHP else: ?>
  409. <?PHP
  410. $CUDOZ++;
  411. $iEntry = 1;
  412. foreach ($aFilePaths as $filePath) {
  413. $orifilename = basename($filePath);
  414. $link=file_get_contents($filePath);
  415. $filename = pathinfo($filePath, PATHINFO_FILENAME);
  416. if ($iEntry === count($aFilePaths)) {
  417. $marginbottom = "0px";
  418. } else {
  419. $marginbottom = "5px";
  420. }
  421. ?>
  422. <div class="friend-entry" style="height:fit-content;min-height:120px;float:left;width:fit-content;border:0px solid green;padding:10px;text-align:center;">
  423. <a href="<?PHP echo($link);?>">
  424. <div style="width:100%;border:0px solid black;"><img src="/res/pic1.png" align="center" style="width:64px;border:0px solid gray;"></div>
  425. <div style="margin-top:10px;"><?PHP echo($filename);?> </div>
  426. </a>
  427. </div>
  428. <?PHP
  429. $iEntry++;
  430. }?>
  431. <?PHP endif; ?>
  432. </div>
  433. </div>
  434. </div>
  435. <div id="passworddisplay" style="float:left;position:fixed;top:680px;left:50px;width:255px;height:120px;background:darkgray;text-align:left;white-space:nowrap; font-family:'Bungee Hairline'; color:#000000; font-weight:900;z-index:99999;">
  436. <br>
  437. &nbsp;&nbsp;<input type="password" id="Password" name="Password" placeholder="password" style="font-size:18px; background:transparent; width: 60%; border-radius:3px; font-weight:900;" 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>
  438. &nbsp;&nbsp;<input type="text" id="Salt" placeholder="salt" style="position:relative; top:+5px; font-size:18px; background:transparent; width: 90%; border-radius:3px; font-weight:900;" autocomplete="off"><br>
  439. <div style="text-align:center;">
  440. <a href="#" onclick="showEncodedPassword();" style="position:relative; left:-2px; top:+5px; font-size:18px; font-weight:900; color:#000000;"><?PHP echo(getResource0("Hash Me", $lang));?>!</a>
  441. </div>
  442. </div>
  443. </form>
  444. <div id="footerCont">&nbsp;</div>
  445. <div id="footer">
  446. <div style="float:left">
  447. <select id="cbLang" style="margin-left:22px;font-size:10px;" onchange="changeLang(this);">
  448. <option value="en-US" <?PHP echo($lang==PHP_EN?"selected":"");?>>en</option>
  449. <option value="it-IT" <?PHP echo($lang==PHP_IT?"selected":"");?>>it</option>
  450. <option value="zh-CN" <?PHP echo($lang==PHP_CN?"selected":"");?>>cn</option>
  451. </select>
  452. </div>
  453. <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>
  454. <?PHP endif; ?>
  455. <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>
  456. <?php if (file_exists(APP_PATH . DIRECTORY_SEPARATOR . "metrics.html")): ?>
  457. <?php include("../../Public/metrics.html"); ?>
  458. <?php endif; ?>
  459. </body>
  460. </html>