* * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html. */ @define('HORDE_BASE', dirname(__FILE__) . '/..'); require_once HORDE_BASE . '/lib/base.php'; require_once 'Horde/Menu.php'; require_once 'Horde/Help.php'; if (!Auth::isAdmin()) { Horde::fatal('Forbidden.', __FILE__, __LINE__); } $title = _("Command Shell"); require HORDE_TEMPLATES . '/common-header.inc'; require HORDE_TEMPLATES . '/admin/common-header.inc'; echo '
' . nl2br(htmlspecialchars($command)) . '
';
$cmds = explode("\n", $command);
foreach ($cmds as $cmd) {
$cmd = trim($cmd);
if (strlen($cmd)) {
unset($results);
flush();
echo htmlspecialchars(shell_exec($cmd));
}
}
echo '