HC.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. <?php
  2. /**
  3. * Copyright (c) 2016, 2024, 5 Mode's contributors
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions are met:
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * * Neither 5 Mode nor the names of its contributors
  14. * may be used to endorse or promote products derived from this software
  15. * without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  18. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  19. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY
  21. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  22. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  23. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  24. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  25. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  26. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. *
  28. * HC.php
  29. *
  30. * Http Console home page.
  31. *
  32. * @author Daniele Bonini <my25mb@aol.com>
  33. * @copyrights (c) 2016, 2024, 5 Mode
  34. * @license https://opensource.org/licenses/BSD-3-Clause
  35. */
  36. require "HC_init.inc";
  37. $cmdHistory = [];
  38. $cmd = HC_STR;
  39. $opt = HC_STR;
  40. $param1 = HC_STR;
  41. $param2 = HC_STR;
  42. $param3 = HC_STR;
  43. $cmdRecallHistory = [];
  44. function showHistory() {
  45. global $cmdHistory;
  46. $i = 1;
  47. foreach($cmdHistory as $val) {
  48. echo(HTMLencode($val));
  49. $i++;
  50. }
  51. }
  52. function updateHistory(&$update, $maxItems) {
  53. global $cmdHistory;
  54. // Making enough space in $cmdHistory for the update..
  55. $shift = (count($cmdHistory) + count($update)) - $maxItems;
  56. if ($shift > 0) {
  57. $cmdHistory = array_slice($cmdHistory, $shift, $maxItems);
  58. }
  59. // Adding $cmdHistory update..
  60. if (count($update) > $maxItems) {
  61. $beginUpd = count($update) - ($maxItems-1);
  62. } else {
  63. $beginUpd = 0;
  64. }
  65. $update = array_slice($update, $beginUpd, $maxItems);
  66. foreach($update as $val) {
  67. $cmdHistory[] = $val;
  68. }
  69. // Writing out $cmdHistory on disk..
  70. $filepath = HC_APP_PATH . HC_SLASH . ".HC_history";
  71. file_put_contents($filepath, implode('', $cmdHistory));
  72. }
  73. function loadRecallHistory() {
  74. global $cmdRecallHistory;
  75. $tmpcmdRecallHistory = file(HC_APP_PATH . HC_SLASH . ".HC_Recallhistory");
  76. foreach($tmpcmdRecallHistory as $val) {
  77. $cmdRecallHistory[left($val, strlen($val)-1)]=$val;
  78. }
  79. }
  80. function updateRecallHistory($update, $maxItems) {
  81. global $cmdRecallHistory;
  82. if (!array_key_exists($update, $cmdRecallHistory)) {
  83. // Making enough space in $cmdHistory for the update..
  84. $shift = (count($cmdRecallHistory) + 1) - $maxItems;
  85. if ($shift > 0) {
  86. $cmdRecallHistory = array_slice($cmdRecallHistory, $shift, $maxItems);
  87. }
  88. $cmdRecallHistory[$update] = $update . "\n";
  89. }
  90. // Writing out $cmdRecallHistory on disk..
  91. $filepath = HC_APP_PATH . HC_SLASH . ".HC_Recallhistory";
  92. file_put_contents($filepath, implode('', $cmdRecallHistory));
  93. }
  94. function updateHistoryWithErr(string $err) {
  95. global $prompt;
  96. global $command;
  97. $output = [];
  98. $output[] = $prompt . " " . $command . "\n";
  99. $output[] = "$err\n";
  100. updateHistory($output, HC_HISTORY_MAX_ITEMS);
  101. }
  102. function myExecCommand() {
  103. global $prompt;
  104. global $command;
  105. // Exec command..
  106. $output = [];
  107. $output[] = $prompt . " " . $command . "\n";
  108. exec($command, $output);
  109. // Update history..
  110. foreach ($output as &$val) {
  111. if (right($val,1)!="\n") {
  112. $val = $val . "\n";
  113. }
  114. }
  115. updateRecallHistory($command, HC_RECALL_HISTORY_MAX_ITEMS);
  116. updateHistory($output, HC_HISTORY_MAX_ITEMS);
  117. }
  118. function myExecCopy() {
  119. global $prompt;
  120. global $command;
  121. global $param1;
  122. global $param2;
  123. // Exec command..
  124. $output = [];
  125. $output[] = $prompt . " " . $command . "\n";
  126. copy($param1, $param2);
  127. // Update history..
  128. foreach ($output as &$val) {
  129. if (right($val,1)!="\n") {
  130. $val = $val . "\n";
  131. }
  132. }
  133. updateRecallHistory($command, HC_RECALL_HISTORY_MAX_ITEMS);
  134. updateHistory($output, HC_HISTORY_MAX_ITEMS);
  135. }
  136. function myExecCDFolderCommand() {
  137. global $prompt;
  138. global $command;
  139. global $param1;
  140. global $curPath;
  141. // Exec command..
  142. $output = [];
  143. $output[] = $prompt . " " . $command . "\n";
  144. //exec($command, $output);
  145. $newPath = $curPath . HC_SLASH . $param1;
  146. chdir($newPath);
  147. $curPath = $newPath;
  148. $curDir = $param1;
  149. $prompt = str_replace("$1", $curDir, HC_APP_PROMPT);
  150. // Update history..
  151. foreach ($output as &$val) {
  152. if (right($val,1)!="\n") {
  153. $val = $val . "\n";
  154. }
  155. }
  156. updateRecallHistory($command, HC_RECALL_HISTORY_MAX_ITEMS);
  157. updateHistory($output, HC_HISTORY_MAX_ITEMS);
  158. }
  159. function myExecCDBackwCommand() {
  160. global $prompt;
  161. global $command;
  162. global $curPath;
  163. // Exec command..
  164. $output = [];
  165. $output[] = $prompt . " " . $command . "\n";
  166. //exec($command, $output);
  167. $ipos = strripos($curPath, HC_SLASH);
  168. $newPath = substr($curPath, 0, $ipos);
  169. chdir($newPath);
  170. $curPath = getcwd();
  171. $ipos = strripos($curPath, HC_SLASH);
  172. $curDir = substr($curPath, $ipos);
  173. $prompt = str_replace("$1", $curDir, HC_APP_PROMPT);
  174. // Update history..
  175. foreach ($output as &$val) {
  176. if (right($val,1)!="\n") {
  177. $val = $val . "\n";
  178. }
  179. }
  180. updateRecallHistory($command, HC_RECALL_HISTORY_MAX_ITEMS);
  181. updateHistory($output, HC_HISTORY_MAX_ITEMS);
  182. }
  183. function parseCommand() {
  184. global $command;
  185. global $cmd;
  186. global $opt;
  187. global $param1;
  188. global $param2;
  189. global $param3;
  190. $str = trim($command);
  191. $ipos = stripos($str, HC_SPACE);
  192. if ($ipos > 0) {
  193. $cmd = left($str, $ipos);
  194. $str = substr($str, $ipos+1);
  195. } else {
  196. $cmd = $str;
  197. return;
  198. }
  199. if (left($str, 1) === "-") {
  200. $ipos = stripos($str, HC_SPACE);
  201. if ($ipos > 0) {
  202. $opt = left($str, $ipos);
  203. $str = substr($str, $ipos+1);
  204. } else {
  205. $opt = $str;
  206. return;
  207. }
  208. }
  209. $ipos = stripos($str, HC_SPACE);
  210. if ($ipos > 0) {
  211. $param1 = left($str, $ipos);
  212. $str = substr($str, $ipos+1);
  213. } else {
  214. $param1 = $str;
  215. return;
  216. }
  217. $ipos = stripos($str, HC_SPACE);
  218. if ($ipos > 0) {
  219. $param2 = left($str, $ipos);
  220. $str = substr($str, $ipos+1);
  221. } else {
  222. $param2 = $str;
  223. return;
  224. }
  225. $ipos = stripos($str, HC_SPACE);
  226. if ($ipos > 0) {
  227. $param3 = left($str, $ipos);
  228. $str = substr($str, $ipos+1);
  229. } else {
  230. $param3 = $str;
  231. return;
  232. }
  233. }
  234. function is_word(string $string) {
  235. return preg_match("/^[\w\-]+?$/", $string);
  236. }
  237. function cdparamValidation() {
  238. global $curPath;
  239. global $param1;
  240. global $param2;
  241. //param1!="" and isword
  242. if (($param1===HC_STR) && !is_word($param1)) {
  243. updateHistoryWithErr("invalid dir");
  244. return false;
  245. }
  246. //param2==""
  247. if ($param2!==HC_STR) {
  248. updateHistoryWithErr("invalid parameters");
  249. return false;
  250. }
  251. //param1 exist and is_dir
  252. $path = $curPath . HC_SLASH . $param1;
  253. if (!file_exists($path) || !is_dir($path)) {
  254. updateHistoryWithErr("dir doesn't exist");
  255. return false;
  256. }
  257. return true;
  258. }
  259. function cpparamValidation() {
  260. global $curPath;
  261. global $opt;
  262. global $param1;
  263. global $param2;
  264. global $param3;
  265. //opt!="" and opt!="-R" and opt!="-Rp"
  266. if (($opt!==HC_STR) && ($opt!=="-R") && ($opt!=="-Rp") && ($opt!=="-p")) {
  267. updateHistoryWithErr("invalid parameters");
  268. return false;
  269. }
  270. //param1!="" and isword
  271. if (($param1===HC_STR) && !is_word($param1)) {
  272. updateHistoryWithErr("invalid source path");
  273. return false;
  274. }
  275. //param2!="" and isword
  276. if (($param2===HC_STR) && !is_word($param2)) {
  277. updateHistoryWithErr("invalid destination path");
  278. return false;
  279. }
  280. if ($param3!=HC_STR) {
  281. updateHistoryWithErr("invalid parameters");
  282. return false;
  283. }
  284. //param1 exist
  285. $path = $curPath . HC_SLASH . $param1;
  286. if (!file_exists($path)) {
  287. updateHistoryWithErr("source must exists");
  288. return false;
  289. }
  290. //param2 doesn't exist
  291. $path = $curPath . HC_SLASH . $param2;
  292. if (file_exists($path)) {
  293. updateHistoryWithErr("destination already exists");
  294. return false;
  295. }
  296. return true;
  297. }
  298. function mvparamValidation() {
  299. global $curPath;
  300. global $opt;
  301. global $param1;
  302. global $param2;
  303. global $param3;
  304. //opt!="" and opt!="-R"
  305. if ($opt!==HC_STR) {
  306. updateHistoryWithErr("invalid parameters");
  307. return false;
  308. }
  309. //param1!="" and isword
  310. if (($param1===HC_STR) && !is_word($param1)) {
  311. updateHistoryWithErr("invalid source path");
  312. return false;
  313. }
  314. //param2!="" and isword
  315. if (($param2===HC_STR) && !is_word($param2)) {
  316. updateHistoryWithErr("invalid destination path");
  317. return false;
  318. }
  319. if ($param3!=HC_STR) {
  320. updateHistoryWithErr("invalid parameters");
  321. return false;
  322. }
  323. //param1 exist
  324. $path = $curPath . HC_SLASH . $param1;
  325. if (!file_exists($path)) {
  326. updateHistoryWithErr("source must exists");
  327. return false;
  328. }
  329. //param2 doesn't exist
  330. $path = $curPath . HC_SLASH . $param2;
  331. if (file_exists($path)) {
  332. updateHistoryWithErr("destination already exists");
  333. return false;
  334. }
  335. return true;
  336. }
  337. $password = filter_input(INPUT_POST, "Password");
  338. $command = filter_input(INPUT_POST, "CommandLine");
  339. $pwd = filter_input(INPUT_POST, "pwd");
  340. $hideFB = filter_input(INPUT_POST, "hideFB");
  341. if ($password !== HC_STR) {
  342. $hash = hash("sha256", $password . HC_APP_SALT, false);
  343. if ($hash !== HC_APP_HASH) {
  344. $password=HC_STR;
  345. }
  346. }
  347. $curPath = HC_CMDLINE_CD_DEPTH;
  348. if ($pwd!==HC_STR) {
  349. if (left($pwd, strlen(HC_CMDLINE_CD_DEPTH)) === HC_CMDLINE_CD_DEPTH) {
  350. $curPath = $pwd;
  351. chdir($curPath);
  352. }
  353. }
  354. $ipos = strripos($curPath, HC_SLASH);
  355. $curDir = substr($curPath, $ipos);
  356. $prompt = str_replace("$1", $curDir, HC_APP_PROMPT);
  357. if ($password !== HC_STR) {
  358. loadRecallHistory();
  359. $cmdHistory = file(HC_APP_PATH . HC_SLASH . ".HC_history");
  360. parseCommand($command);
  361. //echo("cmd=" . $cmd . "<br>");
  362. //echo("opt=" . $opt . "<br>");
  363. //echo("param1=" . $param1 . "<br>");
  364. //echo("param2=" . $param2 . "<br>");
  365. if (mb_stripos(HC_CMDLINE_VALIDCMDS, "|" . $command . "|")) {
  366. if ($command === "cd ..") {
  367. $ipos = strripos($curPath, HC_SLASH);
  368. $nextPath = substr($curPath, 0, $ipos);
  369. if (strlen(HC_CMDLINE_CD_DEPTH) > strlen($nextPath)) {
  370. updateHistoryWithErr("out of root boundary");
  371. } else {
  372. myExecCDBackwCommand();
  373. }
  374. } else {
  375. myExecCommand();
  376. }
  377. } else if (mb_stripos(HC_CMDLINE_VALIDCMDS, "|" . $cmd . "|")) {
  378. if ($cmd === "cd") {
  379. if (cdparamValidation()) {
  380. myExecCDFolderCommand();
  381. }
  382. } else if ($cmd === "cp") {
  383. if (cpparamValidation()) {
  384. myExecCommand();
  385. }
  386. } else if ($cmd === "mv") {
  387. if (mvparamValidation()) {
  388. myExecCommand();
  389. }
  390. }
  391. } else {
  392. updateHistoryWithErr("invalid command");
  393. }
  394. } else {
  395. $cmdHistory = [];
  396. }
  397. ?>
  398. <!DOCTYPE html>
  399. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  400. <head>
  401. <meta charset="UTF-8"/>
  402. <meta name="style" content="day1"/>
  403. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  404. <!--
  405. Copyright (c) 2016, 2024, 5 Mode
  406. All rights reserved.
  407. Redistribution and use in source and binary forms, with or without
  408. modification, are permitted provided that the following conditions are met:
  409. * Redistributions of source code must retain the above copyright
  410. notice, this list of conditions and the following disclaimer.
  411. * Redistributions in binary form must reproduce the above copyright
  412. notice, this list of conditions and the following disclaimer in the
  413. documentation and/or other materials provided with the distribution.
  414. * Neither 5 Mode nor the names of its contributors
  415. may be used to endorse or promote products derived from this software
  416. without specific prior written permission.
  417. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  418. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  419. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  420. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY
  421. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  422. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  423. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  424. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  425. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  426. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  427. https://opensource.org/licenses/BSD-3-Clause -->
  428. <title><?php echo(HC_APP_NAME); ?></title>
  429. <link rel="shortcut icon" href="HCres/favicon.ico?v=<?php echo(time()); ?>" />
  430. <meta name="description" content="Welcome to <?php echo(HC_APP_NAME); ?>"/>
  431. <meta name="author" content="5 Mode"/>
  432. <meta name="robots" content="noindex"/>
  433. <script src="./HCjs/jquery-3.1.0.min.js" type="text/javascript"></script>
  434. <script src="./HCjs/jquery-ui.1.12.1.min.js" type="text/javascript"></script>
  435. <script src="./HCjs/HC_common.js" type="text/javascript"></script>
  436. <script src="./HCjs/bootstrap.min.js" type="text/javascript"></script>
  437. <script src="./HCjs/sha.js" type="text/javascript"></script>
  438. <script src="./HCjs/HC.js" type="text/javascript" defer></script>
  439. <link href="./HCcss/bootstrap.min.css" type="text/css" rel="stylesheet">
  440. <link href="./HCcss/jquery-ui.1.12.1.css" type="text/css" rel="stylesheet">
  441. <link href="./HCcss/style.css?v=<?php echo(time()); ?>" type="text/css" rel="stylesheet">
  442. <script>
  443. $(document).ready(function() {
  444. $("#CommandLine").on("keydown",function(e){
  445. key = e.which;
  446. //alert(key);
  447. if (key===13) {
  448. e.preventDefault();
  449. frmHC.submit();
  450. } else {
  451. //e.preventDefault();
  452. }
  453. });
  454. });
  455. window.addEventListener("load", function() {
  456. maxY = document.getElementById("Console").scrollHeight;
  457. //alert(maxY);
  458. document.getElementById("Console").scrollTo(0, maxY);
  459. }, true);
  460. </script>
  461. </head>
  462. <body>
  463. <form id="frmHC" method="POST" action="/hc" target="_self">
  464. <div class="header">
  465. <a href="/" style="color:white; text-decoration: none;"><img src="HCres/hclogo.png" style="width:48px;">&nbsp;Http Console</a>
  466. </div>
  467. <div style="clear:both; float:left; padding:8px; width:15%; height:100%;">
  468. &nbsp;Upload
  469. <br><br><br><br><br><br><br>
  470. &nbsp;Password<br>
  471. &nbsp;<input type="text" id="Password" name="Password" style="font-size:10px; color:black; width: 90%" value="<?php echo($password);?>"><br>
  472. &nbsp;Salt<br>
  473. &nbsp;<input type="text" id="Salt" style="font-size:10px; color:black; width: 90%" autocomplete="off"><br>
  474. &nbsp;<input type="button" id="Encode" value="Hash Me!" onclick="showEncodedPassword();" style="width:90%; color:black;">
  475. </div>
  476. <div style="float:left; width:85%;height:100%; padding:8px; border-left: 1px solid #2c2f34;">
  477. <?php if ($hideFB !== HC_STR): ?>
  478. <div id="FirstBanner" style="border-radius:20px; position:relative; left:+3px; width:98%; background-color: #33aced; padding: 20px; margin-bottom:8px;">
  479. <button type="button" class="close" aria-label="Close" onclick="closeFirstBanner();" style="position:relative; left:-10px;">
  480. <span aria-hidden="true">&times;</span>
  481. </button>
  482. Hello and welcome to Http Console!<br><br>
  483. Http Console is supplied AS-IS and we do not take any responsibility for its misusage.<br><br>
  484. First step, use the left side panel password and salt fields to create the hash to insert in the config file. Remember to manually set there also the salt value.<br><br>
  485. As you are going to make work Http Console in the PHP process environment, using a limited web server or phpfpm user, we reccomend you to follow some simple directives for an optimal first setup:<br>
  486. <ol>
  487. <li>We encourage you to setup a "stage" folder in your web app path; give to the stage folder the write permissions; and set the stage path in the config file as *cd depth*.</li>
  488. <li>Inside the stage path create a "sample" folder and give to this folder the write permission. This folder will be the sample folder to copy from to create new folders with write permissions inside the stage path.</li>
  489. <li>Likewise create an "upload" folder inside the stage path giving the right permissions.</li>
  490. <li>Configure the max history items and max recall history items as required (default: 50).</li>
  491. </ol>
  492. <br>
  493. Http Console understands a limited set of commands with a far limited set of parameters:<br>
  494. cd, cd.., cp, cp -R, ls, ls -lsa, mkdir, mv, pwd<br><br>
  495. Hope you can enjoy it and let us know about any feedback: <a href="mailto:info@httpconsole.com" style="color:#e6d236;">info@httpconsole.com</a>
  496. </div>
  497. <?php endif; ?>
  498. &nbsp;Console<br>
  499. <div id="Console" style="height:500px; overflow-y:auto; margin-top:10px;">
  500. <pre style="margin-left:5px;padding-left:0px;border:0px;background-color: #000000; color: #ffffff;">
  501. <?php showHistory($cmdHistory); ?>
  502. <div style="position:relative;top:-15px;"><label id="Prompt" for="CommandLine"><?php echo($prompt); ?></label>&nbsp;<input id="CommandLine" name="CommandLine" list="CommandList" type="text" autocomplete="off" style="width:80%; height:22px; background-color: black; color:white; border:0px; border-bottom: 1px dashed #EEEEEE;"></div>
  503. </pre>
  504. </div>
  505. <datalist id="CommandList">
  506. <?php foreach($cmdRecallHistory as &$val): ?>
  507. <?php $val = left($val, strlen($val)-1); ?>
  508. <?php echo("<option value='$val'>\n"); ?>
  509. <?php endforeach; ?>
  510. </datalist>
  511. </div>
  512. <div class="footer">
  513. <div id="footerCont">&nbsp;</div>
  514. <div id="footer"><span style="background:#FFFFFF;opacity:1.0;">&nbsp;&nbsp;A <a id="linkOpenGallery" href="http://5mode.com" style="cursor: poin
  515. ter;">5 Mode</a> project. Some rights reserved.</span></div>
  516. </div>
  517. <input type="hidden" name="pwd" value="<?php echo($curPath); ?>" style="color:black">
  518. <input type="hidden" name="hideFB" value="<?php echo($hideFB); ?>">
  519. </form>
  520. </body>
  521. </html>