summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/exec.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-12-14 20:20:16 +0545
committerPhil Davis <phil.davis@inf.org>2015-12-14 20:20:16 +0545
commit947141fd21b4496d8963d1598d6ca6a2e000702c (patch)
treec4f39f94d05059417f3e5743fc7c826ea52657fc /src/usr/local/www/exec.php
parent9ba351c17e4c85e01832e38b6ba7b6a7898a290d (diff)
downloadpfsense-947141fd21b4496d8963d1598d6ca6a2e000702c.zip
pfsense-947141fd21b4496d8963d1598d6ca6a2e000702c.tar.gz
Code style usr local www a-e
Diffstat (limited to 'src/usr/local/www/exec.php')
-rw-r--r--src/usr/local/www/exec.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/usr/local/www/exec.php b/src/usr/local/www/exec.php
index 3205da3..a36053c 100644
--- a/src/usr/local/www/exec.php
+++ b/src/usr/local/www/exec.php
@@ -221,8 +221,9 @@ if (isBlank($_POST['txtRecallBuffer'])) {
</script>
<?php
-if (isBlank($_POST['txtCommand']) && isBlank($_POST['txtPHPCommand']) && isBlank($ulmsg))
+if (isBlank($_POST['txtCommand']) && isBlank($_POST['txtPHPCommand']) && isBlank($ulmsg)) {
print('<div class="alert alert-warning" role="alert">'.gettext("The capabilities offered here can be dangerous. No support is available. Use them at your own risk!").'</div>');
+}
if (!isBlank($_POST['txtCommand'])):?>
<div class="panel panel-success responsive">
@@ -235,8 +236,9 @@ if (!isBlank($_POST['txtCommand'])):?>
putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " "));
$output = array();
exec($_POST['txtCommand'] . ' 2>&1', $output);
- foreach($output as $line)
+ foreach ($output as $line) {
print(htmlspecialchars($line) . "\r\n");
+ }
?>
</pre>
</div>
@@ -272,8 +274,9 @@ if (!isBlank($_POST['txtCommand'])):?>
</div>
<?php
- if ($ulmsg)
+ if ($ulmsg) {
print('<div class="alert alert-success" role="alert">' . $ulmsg .'</div>');
+ }
?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Upload file')?></h2></div>
@@ -314,7 +317,7 @@ if (!isBlank($_POST['txtCommand'])):?>
?>
<script type="text/javascript">
//<![CDATA[
- events.push(function(){
+ events.push(function() {
// Scroll to the bottom of the page to more easily see the results of a PHP exec command
$("html, body").animate({ scrollTop: $(document).height() }, 1000);
});
@@ -339,5 +342,6 @@ if (!isBlank($_POST['txtCommand'])):?>
<?php
include("foot.inc");
-if($_POST)
+if ($_POST) {
conf_mount_ro();
+}
OpenPOWER on IntegriCloud