From de5cb6329b4e6a4c409d1418f16a3488a53ca953 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Nov 2011 11:29:44 -0500 Subject: This is what was deployed on the lnns server --- shell/shell.php | 98 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 50 insertions(+), 48 deletions(-) (limited to 'shell/shell.php') diff --git a/shell/shell.php b/shell/shell.php index 499441d..9fd10e6 100644 --- a/shell/shell.php +++ b/shell/shell.php @@ -1,48 +1,50 @@ - -
'; - echo $term; - echo ''; - echo ''; - echo ''; -?>
- - + +
'; + + // Figure out what needs to be displayed on the terminal + if (!isset($_POST['c'])) { $_POST['c'] = ''; } + ob_start(); + if ($_POST['c'] == 'clear') { + lts_chdir('.'); + } else { + if (isset($_POST['stdout'])) { echo htmlentities($_POST['stdout']); } + echo $_POST['c']."\n"; + + lts_shell_exec($_POST['c'],$env); + + echo '$ '; + } + $term = ob_get_contents(); + ob_end_flush(); + + // prompt + echo ''; + echo ''; + echo ''; +?>
+ -- cgit v1.2.3-54-g00ecf