form.inc
上传用户:xiao730204
上传日期:2007-01-04
资源大小:141k
文件大小:2k
- <?php
- Function print_form() {
- global $default;
- global $lang;
- global $session_id;
- global $user_db;
- global $template_obj;
- global $target_username;
- global $target_domain_id;
- global $address_id;
- $customer_db = new CustomerInformation_Db();
- $customer_db = $customer_db->Db(
- $default->customer_db->driver,
- $default->customer_db
- );
- $address_obj = $customer_db->address->Get( $address_id );
- if ( ! is_object( $address_obj ) ) {
- $address_obj = new CustomerAddress();
- }
- $form_title = 'Edit address for ' . $target_username;
- include( './templates/form/form_top.inc' );
- $value = $session_id;
- $name = 'session_id';
- include( './templates/form/form_hidden_elem.inc' );
- $value = $target_username;
- $name = 'target_username';
- include( './templates/form/form_hidden_elem.inc' );
- $value = $target_domain_id;
- $name = 'target_domain_id';
- include( './templates/form/form_hidden_elem.inc' );
- $value = $address_id;
- $name = 'address_id';
- include( './templates/form/form_hidden_elem.inc' );
- $address_type = $address_obj->address_name;
- $desc_text = 'Address type';
- $name = 'address_type';
- $value = Array();
- $value[] = 'HOME';
- $value[] = 'WORK';
- include( './templates/form/form_multiselect_elem.inc' );
- $value = $address_obj->address;
- $desc_text = 'Address Line';
- $desc = '';
- $size = 50;
- $name = 'address';
- include( './templates/form/form_text_elem.inc' );
- $value = $address_obj->city;
- $desc_text = 'City';
- $desc = '';
- $size = 50;
- $name = 'city';
- include( './templates/form/form_text_elem.inc' );
- $value = $address_obj->state;
- $desc_text = 'State';
- $desc = '';
- $size = 50;
- $name = 'state';
- include( './templates/form/form_text_elem.inc' );
- $value = $address_obj->zip;
- $desc_text = 'Zip';
- $desc = '';
- $size = 50;
- $name = 'zip';
- include( './templates/form/form_text_elem.inc' );
- $country = $address_obj->country;
- $desc_text = 'Country';
- $name = 'country';
- $value = Array();
- $value[] = 'USA';
- include( './templates/form/form_multiselect_elem.inc' );
- include( './templates/form/form_bottom.inc' );
- }
- include( './templates/main.inc' );
- $form_mode = MANAGER_USER_EDIT_ADDRESS;
- ?>