- <?php
- /*
- The Actual calls to element includes and such are contained within
- functions to prevent varaible collision in the main namespace.
- */
- Function print_form() {
- global $default;
- global $lang;
- global $new_user, $new_password, $new_login_disabled;
- global $session_id;
- global $user_domain_db;
- global $template_obj;
- $form_title = 'Add user';
- include( './templates/form/form_top.inc' );
- $value = 'User Attributes';
- $desc = 'These are the "basic" attributes a user has.';
- include( './templates/form/form_section_title.inc' );
- /* Virtual Domain Support */
- $desc_text = 'Domain';
- $name = 'new_domain_id';
- $possible = Array();
- $possible_vals = Array();
- $ret_vals = $user_domain_db->ListAll();
- if ( $ret_vals[ 0 ] == 1 ) {
- $cnt = $ret_vals[ 1 ];
- $arr = $ret_vals[ 2 ];
- for( $xxx = 0; $xxx < count( $arr ); $xxx++ ) {
- $t_obj = $arr[ $xxx ];
- $possible[] = $t_obj->domain_name;
- $possible_vals[] = $t_obj->domain_id;
- }
- }
- $possible[] = 'default';
- $possible_vals[] = 0;
- include( './templates/form/form_multiselect_elem.inc' );
- $value = $session_id;
- $name = 'session_id';
- include( './templates/form/form_hidden_elem.inc' );
- $value = $new_user;
- $desc_text = 'Username';
- $desc = 'This is your username, also known as your account name';
- $size = 50;
- $name = 'new_user';
- include( './templates/form/form_text_elem.inc' );
- $value = $new_password;
- $desc_text = 'Password';
- $desc = 'This is your password, that you should attempt to keep secret from other users.';
- $size = 50;
- $name = 'new_password';
- include( './templates/form/form_text_elem.inc' );
- $value = $new_login_enabled;
- $desc_text = 'Login disabled';
- $desc = 'This controls whether or not a user can login';
- $name = 'new_login_enabled';
- include( './templates/form/form_true_false_elem.inc' );
- $value = 'User Administraion Attributes';
- $desc = 'These are the "admin" attributes a user has.';
- include( './templates/form/form_section_title.inc' );
- $value = $new_add_users;
- $desc_text = 'Add users';
- $desc = 'The ability to add new users to the system.';
- $name = 'new_add_users';
- include( './templates/form/form_true_false_elem.inc' );
- $value = $new_edit_users;
- $desc_text = 'Edit users';
- $desc = 'The ability to edit existing users.';
- $name = 'new_edit_users';
- include( './templates/form/form_true_false_elem.inc' );
- $value = $new_delete_users;
- $desc_text = 'Delete users';
- $desc = 'The ability to delete existing users.';
- $name = 'new_delete_users';
- include( './templates/form/form_true_false_elem.inc' );
- include( './templates/form/form_bottom.inc' );
- }
- include( './templates/main.inc' );
- $form_mode = MANAGER_USER_ADD;
- ?>