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

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 $session_id;
  9. global $user_obj
  10. global $user_domain_obj;
  11. global $lang;
  12. global $user_db;
  13. global $target_username;
  14. $temp_obj = new User();
  15. $temp_obj->user_name = $target_username;
  16. $temp_obj->domain_id = $user_obj->domain_id;
  17. $user_db->debug->debug = true;
  18. $ret_vals = $user_db->Get( $temp_obj );
  19. $form_title = 'Delete user - confirmation';
  20. include( './templates/form/form_top.inc' );
  21. if ( $ret_vals[ 0 ] == 1 ) {
  22.    $temp_obj = $ret_vals[ 1 ];
  23.       echo( '<tr bgcolor="#a0b8c8">' );
  24.       echo( '<td colspan="2"><b>Attributes for : ' . $temp_obj->user_name . '@'. $user_domain_obj->domain_name . '</b></td>' );
  25.       echo( '</tr>' );
  26.       echo( "n" );
  27.       echo( '<tr bgcolor="#a0b8c8">' );
  28.       echo( '<td><b>User ID :</b></td>' );
  29.       echo( '<td>' . $temp_obj->user_id    . '</td>' );
  30.       echo( '</tr>' );
  31.       echo( "n" );
  32.       echo( '<tr bgcolor="#a0b8c8">' );
  33.       echo( '<td><b>UserName :</b></td>' );
  34.       echo( '<td>' . $temp_obj->user_name  . '</td>' );
  35.       echo( '</tr>' );
  36.       echo( "n" );
  37.       echo( '<tr bgcolor="#a0b8c8">' );
  38.       echo( '<td><b>Password :</b></td>' );
  39.       echo( '<td>' . $temp_obj->password  . '</td>' );
  40.       echo( '</tr>' );
  41.       echo( "n" );
  42.       echo( '<tr bgcolor="#a0b8c8">' );
  43.       echo( '<td><b>Login disabled :</b></td>' );
  44.       echo( '<td>' );
  45.       if ( $temp_obj->login_deny ) {
  46.          echo 'True'; 
  47.       } else {
  48.          echo 'False';
  49.       }
  50.       echo( '</td>' );
  51.       echo( '</tr>' );
  52.       echo( "n" );
  53.    } else {
  54.    echo( '<tr bgcolor="' . $default->item_bg . '">' );
  55.    echo( '<td>No users found with that id.</td>' );
  56.    echo( '</tr>' );
  57.    }
  58. $name = 'session_id';
  59. $value = $session_id;
  60. include( './templates/form/form_hidden_elem.inc' );
  61. $name = 'target_username';
  62. $value = $target_username;
  63. include( './templates/form/form_hidden_elem.inc' );
  64. $submit_text   = 'Delete';
  65. include( './templates/form/form_bottom.inc' );
  66. }
  67. $form_mode     = MGR_USER_DELETE;
  68. include( './templates/main.inc' );
  69. ?>