44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Email accounts administration</title>
|
|
<link rel='stylesheet' href='/style.css' type='text/css' media='all' />
|
|
</head>
|
|
<body>
|
|
|
|
<p><a href="/">< GO BACK</a> to main administration page</p>
|
|
|
|
<table class="boxed"><tr><td>
|
|
|
|
<?php
|
|
// Reads variables of HTML form in index.php
|
|
$ACTION = $_POST['action'];
|
|
$USER = $_POST['user'];
|
|
$PASS = $_POST['pass'];
|
|
$SURE = $_POST['sure'];
|
|
|
|
// Checks if checkbox is activated (default at most forms)
|
|
if($SURE == "yes")
|
|
{
|
|
// Creates full command but sanitizes the arguments first
|
|
$command = '/bin/bash action.sh ' . escapeshellarg($ACTION) . ' ' . escapeshellarg($USER) . ' ' . escapeshellarg($PASS);
|
|
|
|
// Execute sanitized command and give output
|
|
$output = shell_exec($command);
|
|
echo "<pre>$output</pre>";
|
|
}
|
|
else
|
|
{
|
|
echo "You did not hit the necessary checkbox. Aborting.";
|
|
}
|
|
|
|
?>
|
|
|
|
</tr></td></table>
|
|
|
|
<p>In case of errors, please check all input data again.<br />
|
|
If problem still exists, please contact us and add the error message.</p>
|
|
|
|
</body>
|
|
</html>
|