- <?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 $user_db;
- global $admin_db;
- global $target_username;
- global $target_domain_id;
- global $session_id;
- global $template_obj;
- $temp_obj = new User();
- $temp_obj->user_name = $target_username;
- $temp_obj->domain_id = $target_domain_id;
- $ret_vals = $user_db->Get( $temp_obj );
- if ( $ret_vals[ 0 ] == 1 ) {
- $temp_obj = $ret_vals[ 1 ];
- $privs_obj = new AdminPrivileges();
- $ret_vals2 = $admin_db->Get( $target_uid );
- $privs_obj = $ret_vals2[ 1 ];
- if ( ! is_object( $privs_obj ) ) {
- $privs_obj = new AdminPrivileges();
- }
- $form_title = 'Edit user';
- include( './templates/form/form_top.inc' );
- $value = $session_id;
- $name = 'session_id';
- include( './templates/form/form_hidden_elem.inc' );
- $value = $target_username;
- $name = 'target_username';
- include( './templates/form/form_hidden_elem.inc' );
- $value = $target_domain_id;
- $name = 'target_domain_id';
- include( './templates/form/form_hidden_elem.inc' );
- $value = $temp_obj->user_name;
- $desc_text = 'Username';
- $desc =
- 'This is your username, also known as your account name';
- include( './templates/form/form_readonly_text_elem.inc' );
- $value = $temp_obj->domain_id;
- $desc_text = 'Domain';
- $desc = 'The domain that you are a part of.';
- include( './templates/form/form_readonly_text_elem.inc' );
- $value = $temp_obj->password;
- $desc_text = 'Password';
- $desc = 'This is your password, that you should attempt to keep secret from other users.';
- $size = 50;
- $name = 'edit_password';
- include( './templates/form/form_text_elem.inc' );
- $value = $temp_obj->login_deny;
- $desc_text = 'Login disabled';
- $desc = 'This controls whether or not a user can login';
- $name = 'edit_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 = $privs_obj->add_users;
- $desc_text = 'Add users';
- $desc = 'The ability to add new users to the system.';
- $name = 'edit_add_users';
- include( './templates/form/form_true_false_elem.inc' );
- $value = $privs_obj->edit_users;
- $desc_text = 'Edit users';
- $desc = 'The ability to edit existing users.';
- $name = 'edit_edit_users';
- include( './templates/form/form_true_false_elem.inc' );
- $value = $privs_obj->delete_users;
- $desc_text = 'Delete users';
- $desc = 'The ability to delete existing users.';
- $name = 'edit_delete_users';
- include( './templates/form/form_true_false_elem.inc' );
- }
- include( './templates/form/form_bottom.inc' );
- }
- $form_mode = MANAGER_USER_EDIT;
- include( './templates/main.inc' );
- ?>