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

WEB邮件程序

开发平台:

PHP

  1. <?php
  2. Function print_form() {
  3. global $default;
  4. global $lang;
  5. global $session_id;
  6. global $user_db;
  7. global $template_obj;
  8. global $target_username;
  9. global $target_domain_id;
  10. global $phone_id;
  11. $customer_db = new CustomerInformation_Db();
  12. $customer_db = $customer_db->Db(
  13.    $default->customer_db->driver,
  14.    $default->customer_db
  15. );
  16. $phone_obj = $customer_db->phone->Get( $phone_id );
  17. if ( ! is_object( $phone_obj ) ) {
  18.    $phone_obj = new CustomerPhoneNumber();
  19. }
  20. $form_title = 'Edit phone number for ' . $target_username;
  21. include( './templates/form/form_top.inc' );
  22. $value = $session_id;
  23. $name  = 'session_id';
  24. include( './templates/form/form_hidden_elem.inc' );
  25. $value = $target_username;
  26. $name  = 'target_username';
  27. include( './templates/form/form_hidden_elem.inc' );
  28. $value = $target_domain_id;
  29. $name  = 'target_domain_id';
  30. include( './templates/form/form_hidden_elem.inc' );
  31. $value = $phone_id;
  32. $name  = 'phone_id';
  33. include( './templates/form/form_hidden_elem.inc' );
  34. $phone_number_type = $phone_obj->phone_number_name;
  35. $desc_text = 'Phone type';
  36. $name      = 'phone_number_type';
  37. $value    = Array();
  38. $value[]  = 'HOME';
  39. $value[]  = 'WORK';
  40. $value[]  = 'MOBILE';
  41. include( './templates/form/form_multiselect_elem.inc' );
  42. $value      = $phone_obj->phone_number;
  43. $desc_text  = 'Phone Number';
  44. $desc       = '';
  45. $size       = 50;
  46. $name       = 'phone_number';
  47. include( './templates/form/form_text_elem.inc' );
  48. include( './templates/form/form_bottom.inc' );
  49. }
  50. include( './templates/main.inc' );
  51. $form_mode = MANAGER_USER_EDIT_PHONE;
  52. ?>