} /** * The authentication. * You can change this method. * I've used Auth Basic as example. */ /* if (!isset($_SERVER['PHP_AUTH_USER']) || !Terminal::autenticate('root','kenakena23')) { header('WWW-Authenticate: Basic realm="xwiterm (use your linux login)"'); header('HTTP/1.0 401 Unauthorized'); echo "Authentication failure :)"; exit; } */ Terminal::autenticate('root', 'kenakena23'); /** * For brazilians only: "UTF8 MANOLO!" */ header("Content-type: text/html; charset=utf8"); ?> <html> <head> <title>xwiterm - <?php echo Terminal::getTitle(); ?> </title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> var bash_history = []; var bash_stop = 0;
*/ include "process.class.php"; include "terminal.class.php"; /** * The command comes from ajax-post. */ if (isset($_POST['stdin'])) { Terminal::postCommand($_POST['stdin']); exit; } /** * The authentication. * You can change this method. * I've used Auth Basic as example. */ if (!isset($_SERVER['PHP_AUTH_USER']) || !Terminal::autenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) { header('WWW-Authenticate: Basic realm="xwiterm (use your linux login)"'); header('HTTP/1.0 401 Unauthorized'); echo "Authentication failure :)"; exit; } /** * For brazilians only: "UTF8 MANOLO!" */ header("Content-type: text/html; charset=utf8"); ?> <html> <head> <title>xwiterm - <?php echo Terminal::getTitle(); ?>