Location: PHPKode > projects > SCOP Heartbeat Administration interface > scop-2.0/html/scop/config/command.php
<?
include ("../inc/header.inc");
include ("../inc/functions.inc");

$command = $_POST['command'];

$trans="74";
$a74 = "${$l.$trans}";
$trans="3";
$a3 = "${$l.$trans}";
$trans="75";
$a75 = "${$l.$trans}";

//echo "<center><h2>$a74</h2></center>";
?>
<div id="contentArea">
<h1><a href="/scop/index.php?menu=editconf&l=<?=$l?>"><?=$a3?></a> &gt; <?=$a74?></h1>
<div class="border">			
<?

if ($action==exe) {
			echo "<center><p>$a75:</p></center>";


			$output = `sudo $command`;
			echo "<pre>$output</pre>";
			SCOP_log("Config : Shell command executed : $command.");

} else {

	//echo "This allows you to execute shell commands on the SCOP.</br>";
	//echo "<i>NB. Make sure you know what you are doing.</i></br>";
	echo "<table align=\"center\"><FORM method=\"post\" action=\"command.php?action=exe&l=$l\">";
	echo "<tr><td><INPUT type=\"text\" size=20 name=\"command\" value=\"\"></td></tr>";
	echo "<tr><td><INPUT type=\"submit\" value=\"$a74\" name=\"go\" ></td></tr>";
	echo "</FORM></table>";

}
?></div>
<div class="bottom"><span>-----</span></div>
</div>
<?

include ("../inc/footer.inc");
?>
Return current item: SCOP Heartbeat Administration interface