Minor syntax fix
This commit is contained in:
parent
b61e652749
commit
6f7e3907f6
@ -5,7 +5,7 @@ require_once("includes/header.php");
|
|||||||
require_once("includes/nav.php");
|
require_once("includes/nav.php");
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === POST && isset($_FILES['update']) && $_FILES['update']['size'] > 10000000 && $_FILES['upfile']['size'] < 10000000) {
|
if ($_SERVER['REQUEST_METHOD'] === POST && isset($_FILES['update']) && $_FILES['update']['size'] > 10000000 && $_FILES['upfile']['size'] < 10000000) {
|
||||||
move_uploaded_file($_FILES['file']['tmp_name'], '/tmp/update.cc')
|
move_uploaded_file($_FILES['file']['tmp_name'], '/tmp/update.cc');
|
||||||
exec("/usr/bin/sudo /update.sh", $result);
|
exec("/usr/bin/sudo /update.sh", $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ require_once("includes/nav.php");
|
|||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] === 'ping' || $_POST['action'] === 'traceroute') && isset($_POST['host']) && !empty($_POST['host'])) {
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['action'] === 'ping' || $_POST['action'] === 'traceroute') && isset($_POST['host']) && !empty($_POST['host'])) {
|
||||||
switch ($_POST['action']) {
|
switch ($_POST['action']) {
|
||||||
case 'ping':
|
case 'ping':
|
||||||
$cmd = '/usr/bin/'.$_POST['action']. ' -c 4';
|
$cmd = '/bin/'.$_POST['action']. ' -c 4';
|
||||||
break;
|
break;
|
||||||
case 'traceroute':
|
case 'traceroute':
|
||||||
$cmd = '/usr/bin/'.$_POST['action'];
|
$cmd = '/usr/bin/'.$_POST['action'];
|
||||||
|
Loading…
Reference in New Issue
Block a user