form.inc
上传用户:xiao730204
上传日期:2007-01-04
资源大小:141k
文件大小:2k
- <?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 $session_id;
- global $template_obj;
- global $lang;
- global $user_db;
- global $target_username;
- global $target_domain_id;
- $temp_obj = new User();
- $temp_obj->user_name = $target_username;
- $temp_obj->domain_id = $target_domain_id;
- $user_db->debug->debug = true;
- $ret_vals = $user_db->Get( $temp_obj );
- $form_title = 'Delete user - confirmation';
- include( './templates/form/form_top.inc' );
- if ( $ret_vals[ 0 ] == 1 ) {
- $temp_obj = $ret_vals[ 1 ];
- $value = 'Attributes for : ' . $temp_obj->user_name;
- include( './templates/form/form_section_title.inc' );
- $desc_text = 'User ID';
- $value = $temp_obj->user_id;
- include( './templates/form/form_readonly_text_elem.inc' );
- $desc_text = 'Username';
- $value = $temp_obj->user_name;
- include( './templates/form/form_readonly_text_elem.inc' );
- $desc_text = 'Password';
- $value = $temp_obj->password;
- include( './templates/form/form_readonly_text_elem.inc' );
- $desc_text = 'Login disabled';
- $value = '';
- if ( $temp_obj->login_deny ) {
- $value = 'True';
- } else {
- $value = 'False';
- }
- include( './templates/form/form_readonly_text_elem.inc' );
- } else {
- echo( '<tr ' . $default->item_bg . '>' );
- echo( '<td>No users found with that id.</td>' );
- echo( '</tr>' );
- }
- $name = 'session_id';
- $value = $session_id;
- include( './templates/form/form_hidden_elem.inc' );
- $name = 'target_username';
- $value = $target_username;
- include( './templates/form/form_hidden_elem.inc' );
- $name = 'target_domain_id';
- $value = $target_domain_id;
- include( './templates/form/form_hidden_elem.inc' );
- $submit_text = 'Delete';
- include( './templates/form/form_bottom.inc' );
- }
- $form_mode = MANAGER_USER_DELETE;
- include( './templates/main.inc' );
- ?>