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 $address_id;
  11. $customer_db = new CustomerInformation_Db();
  12. $customer_db = $customer_db->Db(
  13.    $default->customer_db->driver,
  14.    $default->customer_db
  15. );
  16. $address_obj = $customer_db->address->Get( $address_id );
  17. if ( ! is_object( $address_obj ) ) {
  18.    $address_obj = new CustomerAddress();
  19. }
  20. $form_title = 'Edit address 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 = $address_id;
  32. $name  = 'address_id';
  33. include( './templates/form/form_hidden_elem.inc' );
  34. $address_type = $address_obj->address_name;
  35. $desc_text = 'Address type';
  36. $name      = 'address_type';
  37. $value    = Array();
  38. $value[]  = 'HOME';
  39. $value[]  = 'WORK';
  40. include( './templates/form/form_multiselect_elem.inc' );
  41. $value      = $address_obj->address;
  42. $desc_text  = 'Address Line';
  43. $desc       = '';
  44. $size       = 50;
  45. $name       = 'address';
  46. include( './templates/form/form_text_elem.inc' );
  47. $value      = $address_obj->city;
  48. $desc_text  = 'City';
  49. $desc       = '';
  50. $size       = 50;
  51. $name       = 'city';
  52. include( './templates/form/form_text_elem.inc' );
  53. $value      = $address_obj->state;
  54. $desc_text  = 'State';
  55. $desc       = '';
  56. $size       = 50;
  57. $name       = 'state';
  58. include( './templates/form/form_text_elem.inc' );
  59. $value      = $address_obj->zip;
  60. $desc_text  = 'Zip';
  61. $desc       = '';
  62. $size       = 50;
  63. $name       = 'zip';
  64. include( './templates/form/form_text_elem.inc' );
  65. $country   = $address_obj->country;
  66. $desc_text = 'Country';
  67. $name      = 'country';
  68. $value     = Array();
  69. $value[]   = 'USA';
  70. include( './templates/form/form_multiselect_elem.inc' );
  71. include( './templates/form/form_bottom.inc' );
  72. }
  73. include( './templates/main.inc' );
  74. $form_mode = MANAGER_USER_EDIT_ADDRESS;
  75. ?>