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