* * 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_LIBS . 'Horde/Menu.php'; require_once HORDE_LIBS . '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'; if ($command = trim(Util::getFormData('cmd'))) { 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 ' |