2011-01-10 22:31:56 +01:00
|
|
|
{
|
|
|
|
"name" : "users",
|
|
|
|
|
|
|
|
"info" : {
|
|
|
|
"syntax" : "users",
|
|
|
|
"brief" : "Show the users on the system"
|
|
|
|
},
|
|
|
|
|
|
|
|
"action" : function ( arg )
|
|
|
|
{
|
|
|
|
var users_php = window.location.href;
|
|
|
|
users_php = users_php.replace ( /\/([a-zA-Z\.]+)$/, '/modules/users/users.php' );
|
|
|
|
params = 'action=list';
|
|
|
|
shell.auto_prompt_refresh = false;
|
|
|
|
|
|
|
|
var http = new XMLHttpRequest();
|
|
|
|
http.open ( "POST", users_php, true );
|
|
|
|
http.setRequestHeader( "Content-type", "application/x-www-form-urlencoded" );
|
|
|
|
http.setRequestHeader( "Content-length", params.length );
|
|
|
|
http.setRequestHeader( "Connection", "close" );
|
|
|
|
|
|
|
|
http.onreadystatechange = function ()
|
|
|
|
{
|
|
|
|
if ( http.readyState == 4 && http.status == 200 )
|
|
|
|
{
|
2011-01-11 12:18:45 +01:00
|
|
|
shell.cmdOut.innerHTML = http.responseText;
|
2011-01-10 22:31:56 +01:00
|
|
|
shell.auto_prompt_refresh = true;
|
|
|
|
shell.refreshPrompt ( false, false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
http.send ( params );
|
|
|
|
shell.cmdOut.innerHTML = '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|