diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-11-07 01:20:04 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-11-07 01:20:04 +0000 |
commit | fbcf00372e5ecdddfeae80b1fe2862182aabe125 (patch) | |
tree | 2645492ac5ffca8552562b308897e6fdda23dcff /usr/local/www/exec.php | |
parent | 512fa4d7ed9c5c48026efa4187ce17164d9abd4c (diff) | |
download | pfsense-fbcf00372e5ecdddfeae80b1fe2862182aabe125.zip pfsense-fbcf00372e5ecdddfeae80b1fe2862182aabe125.tar.gz |
* Clean up interface, make consistent
* Add php execute command
Diffstat (limited to 'usr/local/www/exec.php')
-rwxr-xr-x | usr/local/www/exec.php | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php index 9556a6e..145d07d 100755 --- a/usr/local/www/exec.php +++ b/usr/local/www/exec.php @@ -201,10 +201,23 @@ if (!isBlank($_POST['txtCommand'])) { puts("</pre>"); } + +if (!isBlank($_POST['txtPHPCommand'])) { + puts("<pre>"); + require_once("config.inc"); + require_once("functions.inc"); + echo eval($_POST['txtPHPCommand']); + puts("</pre>"); +} + + ?> <form action="exec.php" method="POST" enctype="multipart/form-data" name="frmExecPlus" onSubmit="return frmExecPlus_onSubmit( this );"> <table> + <tr> + <td colspan="2" valign="top" class="vnsepcell">Execute Shell command</td> + </tr> <tr> <td class="label" align="right">Command:</td> <td class="type"><input id="txtCommand" name="txtCommand" type="text" size="80" value="<?=htmlspecialchars($_POST['txtCommand']);?>"></td> @@ -223,19 +236,58 @@ if (!isBlank($_POST['txtCommand'])) { <td height="8"></td> <td></td> </tr> + <tr> + <td colspan="2" valign="top" height="16"></td> + </tr> + <tr> + <td colspan="2" valign="top" class="vnsepcell">Download</td> + </tr> <tr> - <td align="right">Download:</td> + <td align="right">File to download:</td> <td> <input name="dlPath" type="text" id="dlPath" size="50"> + </td></tr> + <tr> + <td valign="top"> </td> + <td valign="top" class="label"> <input name="submit" type="submit" class="button" id="download" value="Download"> </td> </tr> + <tr> + <td colspan="2" valign="top" height="16"></td> + </tr> + <tr> + <td colspan="2" valign="top" class="vnsepcell">Upload</td> + </tr> <tr> - <td align="right">Upload:</td> + <td align="right">File to upload:</td> <td valign="top" class="label"> -<input name="ulfile" type="file" class="button" id="ulfile"> + <input name="ulfile" type="file" class="button" id="ulfile"> + </td></tr> + <tr> + <td valign="top"> </td> + <td valign="top" class="label"> <input name="submit" type="submit" class="button" id="upload" value="Upload"></td> </tr> + <tr> + <td colspan="2" valign="top" height="16"></td> + </tr> + <tr> + <td colspan="2" valign="top" class="vnsepcell">PHP Execute</td> + </tr> + <tr> + <td class="label" align="right">Command:</td> + <td class="type"><textarea id="txtPHPCommand" name="txtPHPCommand" type="text" rows="3" cols="50" value="<?=htmlspecialchars($_POST['txtPHPCommand']);?>"></textarea></td> + </tr> + <tr> + <td valign="top"> </td> + <td valign="top" class="label"> + <input type="submit" class="button" value="Execute"> + <p> + <b>Example:</b> interfaces_carp_bring_up_final(); + </td> + </tr> + </table> <?php include("fend.inc"); ?> </form> |