form.inc
上传用户:xiao730204
上传日期:2007-01-04
资源大小:141k
文件大小:3k
源码类别:

WEB邮件程序

开发平台:

PHP

  1. <?php
  2. /*
  3. The Actual calls to element includes and such are contained within
  4. functions to prevent varaible collision in the main namespace.
  5. */
  6. Function print_form() {
  7. global $default;
  8. global $lang;
  9. global $user_db;
  10. global $admin_db;
  11. global $target_username;
  12. global $session_id;
  13. global $user_domain_obj;
  14. $temp_obj   = new User();
  15. $temp_obj->user_name = $target_username;
  16. $temp_obj->domain_id = $user_domain_obj->domain_id;
  17. $ret_vals   = $user_db->Get( $temp_obj );
  18. if ( $ret_vals[ 0 ] == 1 ) {
  19. $temp_obj = $ret_vals[ 1 ];
  20. $privs_obj  = new AdminPrivileges();
  21. $ret_vals2  = $admin_db->Get( $target_uid );
  22. $privs_obj  = $ret_vals2[ 1 ];
  23. if ( ! is_object( $privs_obj ) ) {
  24.    $privs_obj  = new AdminPrivileges();
  25. }
  26. $form_title = 'Edit user';
  27. include( './templates/form/form_top.inc' );
  28. $value      = $session_id;
  29. $name       = 'session_id';
  30. include( './templates/form/form_hidden_elem.inc' );
  31. $value      = $target_username;
  32. $name       = 'target_username';
  33. include( './templates/form/form_hidden_elem.inc' );
  34. $value      = $temp_obj->user_name;
  35. $desc_text  = 'Username';
  36. $desc       = 
  37. 'This is your username, also known as your account name';
  38. include( './templates/form/form_readonly_text_elem.inc' ); 
  39. $value      = $user_domain_obj->domain_name;
  40. $desc_text  = 'Domain';
  41. $desc       = 'The domain that you are a part of.';
  42. include( './templates/form/form_readonly_text_elem.inc' ); 
  43. $value      = $temp_obj->password;
  44. $desc_text  = 'Password';
  45. $desc       = 'This is your password, that you should attempt to keep secret from other users.';
  46. $size       = 50;
  47. $name       = 'edit_password';
  48. include( './templates/form/form_text_elem.inc' );
  49. $value      = $temp_obj->login_deny;
  50. $desc_text  = 'Login disabled';
  51. $desc       = 'This controls whether or not a user can login';
  52. $name       = 'edit_login_enabled';
  53. include( './templates/form/form_true_false_elem.inc' );
  54. $value      = 'User Administraion Attributes';
  55. $desc       = 'These are the "admin" attributes a user has.';
  56. include( './templates/form/form_section_title.inc' );
  57. $value      = $privs_obj->add_users;
  58. $desc_text  = 'Add users';
  59. $desc       = 'The ability to add new users to the system.';
  60. $name       = 'edit_add_users';
  61. include( './templates/form/form_true_false_elem.inc' );
  62. $value      = $privs_obj->edit_users;
  63. $desc_text  = 'Edit users';
  64. $desc       = 'The ability to edit existing users.';
  65. $name       = 'edit_edit_users';
  66. include( './templates/form/form_true_false_elem.inc' );
  67. $value      = $privs_obj->delete_users;
  68. $desc_text  = 'Delete users';
  69. $desc       = 'The ability to delete existing users.';
  70. $name       = 'edit_delete_users';
  71. include( './templates/form/form_true_false_elem.inc' );
  72. }
  73. include( './templates/form/form_bottom.inc' );
  74. }
  75. $form_mode     = MGR_USER_EDIT;
  76. include( './templates/main.inc' );
  77. ?>