0917d32013-03-04Anders Johansson // $Id$
845bb22000-08-28Martin Stjernholm 
3c31542000-02-24Per Hedbor #include <config_interface.h>
e33c562000-07-17Andreas Lange #include <roxen.h>
23414a2000-07-21Andreas Lange //<locale-token project="roxen_config"> LOCALE </locale-token> #define LOCALE(X,Y) _STR_LOCALE("roxen_config",X,Y)
e33c562000-07-17Andreas Lange 
1363b92000-02-27Per Hedbor mapping parse( RequestID id )
3c31542000-02-24Per Hedbor { string res="";
1363b92000-02-27Per Hedbor  RequestID nid = id;
3c31542000-02-24Per Hedbor 
1363b92000-02-27Per Hedbor  while( nid->misc->orig && !nid->my_fd ) nid = nid->misc->orig;
3c31542000-02-24Per Hedbor 
1363b92000-02-27Per Hedbor  if( !nid->misc->config_user->auth( "Edit Users" ) )
23414a2000-07-21Andreas Lange  return Roxen.http_string_answer(LOCALE(226, "Permission denied"),
e33c562000-07-17Andreas Lange  "text/html");
1363b92000-02-27Per Hedbor 
c170ce2001-01-28Per Hedbor  foreach( sort( roxen.list_admin_users() ), string uid )
3c31542000-02-24Per Hedbor  {
c170ce2001-01-28Per Hedbor  object u = roxen.find_admin_user( uid );
3c31542000-02-24Per Hedbor  res += "<table width='100%'><tr><td bgcolor='"+config_setting2("bgcolor")+ "'><font size='+2'>&nbsp;&nbsp;<b>"+uid+"</b></font></td></tr></table>";
1363b92000-02-27Per Hedbor  res += u->form( nid );
3c31542000-02-24Per Hedbor  }
1363b92000-02-27Per Hedbor  do { id->variables = nid->variables; id = id->misc->orig; } while( id );
e33c562000-07-17Andreas Lange  return Roxen.http_string_answer(res, "text/html");
3c31542000-02-24Per Hedbor }