<?php
/*
add_user_results.inc
$version$
$author$
*/


/*
Setup the environment for the add of the user :
*/
   $AddUser                   = new HordeUser;
   $AddUser->user_name        = $horde_user_name;
   $AddUser->user_password    = $horde_user_password;
   $AddUser->login_deny       = $horde_login_deny;
   list( $good, $ret_val, $reason ) = $db->User->Add( $AddUser );

/* Print the results to the users */
echo( '<center>' );
echo( '<table bgcolor="' . $default->nav_bg . '" border="0" cellspacing="0">' );
echo( "\n" );
$horde_config_frm = new HordeConfigForm;
$horde_config_frm->full_colspan = 2;
$horde_config_frm->gen_title_bar( 'Add User' );
$stat_code = '';
if ( $good == true ) {
$stat_code =
'<img src="' . $default->graphics_url . '/green.gif">' .
'Account Succesfully added.';
} else {
$stat_code =
'<img src="' . $default->graphics_url . '/red.gif"><b>' .
$reason . '</b>' .
'<img src="' . $default->graphics_url . '/red.gif"><b>';
}
$horde_config_frm->gen_sect_subtitle( 'Account Creation status : <br><center>' . $stat_code . '</center>' );
$horde_config_frm->gen_attr_value_title();
echo( '<tr bgcolor="' . $default->light_bg . '">' );
$horde_config_frm->gen_single_item( '<b>User Name:</b>' );
$horde_config_frm->gen_single_item( $AddUser->user_name );
echo( '</tr>' );
echo( '<tr bgcolor="' . $default->light_bg . '">' );
$horde_config_frm->gen_single_item( '<b>Password:</b>' );
$horde_config_frm->gen_single_item( $AddUser->user_password );
echo( '</tr>' );
echo( '<tr bgcolor="' . $default->light_bg . '">' );
$horde_config_frm->gen_single_item( '<b>Login Deny:</b>' );
if ( $AddUser->login_deny == true ) {
$horde_config_frm->gen_single_item( 'True' );
} else {
$horde_config_frm->gen_single_item( 'False' );
}
echo( '</tr>' );
/*
echo( $good );
*/

if ( $good != true ) {
/* Allow them to edit their input */
$title         = 'Error: ';
$subtitle      = $reason;
$action_url    = 'manager.php3';
$action_tag    = MGR_USER_ADD;
require ( "$default->include_dir/manager/user_attributes.inc" );
}
echo( '</table>' );
echo( '</center>' );
?>
