[ Index ]
 

Code source de osCommerce 2.2ms2-060817

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/catalog/includes/modules/ -> address_book_details.php (source)

   1  <?php
   2  /*
   3    $Id: address_book_details.php,v 1.10 2003/06/09 22:49:56 hpdl Exp $
   4  
   5    osCommerce, Open Source E-Commerce Solutions
   6    http://www.oscommerce.com
   7  
   8    Copyright (c) 2003 osCommerce
   9  
  10    Released under the GNU General Public License
  11  */
  12  
  13    if (!isset($process)) $process = false;
  14  ?>
  15  <table border="0" width="100%" cellspacing="0" cellpadding="2">
  16    <tr>
  17      <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  18        <tr>
  19          <td class="main"><b><?php echo NEW_ADDRESS_TITLE; ?></b></td>
  20          <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
  21        </tr>
  22      </table></td>
  23    </tr>
  24    <tr>
  25      <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
  26        <tr class="infoBoxContents">
  27          <td><table border="0" cellspacing="2" cellpadding="2">
  28  <?php
  29    if (ACCOUNT_GENDER == 'true') {
  30      if (isset($gender)) {
  31        $male = ($gender == 'm') ? true : false;
  32      } else {
  33        $male = ($entry['entry_gender'] == 'm') ? true : false;
  34      }
  35      $female = !$male;
  36  ?>
  37            <tr>
  38              <td class="main"><?php echo ENTRY_GENDER; ?></td>
  39              <td class="main"><?php echo tep_draw_radio_field('gender', 'm', $male) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('gender', 'f', $female) . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?></td>
  40            </tr>
  41  <?php
  42    }
  43  ?>
  44            <tr>
  45              <td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
  46              <td class="main"><?php echo tep_draw_input_field('firstname', $entry['entry_firstname']) . '&nbsp;' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?></td>
  47            </tr>
  48            <tr>
  49              <td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
  50              <td class="main"><?php echo tep_draw_input_field('lastname', $entry['entry_lastname']) . '&nbsp;' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?></td>
  51            </tr>
  52            <tr>
  53              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  54            </tr>
  55  <?php
  56    if (ACCOUNT_COMPANY == 'true') {
  57  ?>
  58            <tr>
  59              <td class="main"><?php echo ENTRY_COMPANY; ?></td>
  60              <td class="main"><?php echo tep_draw_input_field('company', $entry['entry_company']) . '&nbsp;' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?></td>
  61            </tr>
  62            <tr>
  63              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  64            </tr>
  65  <?php
  66    }
  67  ?>
  68            <tr>
  69              <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
  70              <td class="main"><?php echo tep_draw_input_field('street_address', $entry['entry_street_address']) . '&nbsp;' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>
  71            </tr>
  72  <?php
  73    if (ACCOUNT_SUBURB == 'true') {
  74  ?>
  75            <tr>
  76              <td class="main"><?php echo ENTRY_SUBURB; ?></td>
  77              <td class="main"><?php echo tep_draw_input_field('suburb', $entry['entry_suburb']) . '&nbsp;' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="inputRequirement">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?></td>
  78            </tr>
  79  <?php
  80    }
  81  ?>
  82            <tr>
  83              <td class="main"><?php echo ENTRY_POST_CODE; ?></td>
  84              <td class="main"><?php echo tep_draw_input_field('postcode', $entry['entry_postcode']) . '&nbsp;' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="inputRequirement">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?></td>
  85            </tr>
  86            <tr>
  87              <td class="main"><?php echo ENTRY_CITY; ?></td>
  88              <td class="main"><?php echo tep_draw_input_field('city', $entry['entry_city']) . '&nbsp;' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="inputRequirement">' . ENTRY_CITY_TEXT . '</span>': ''); ?></td>
  89            </tr>
  90  <?php
  91    if (ACCOUNT_STATE == 'true') {
  92  ?>
  93            <tr>
  94              <td class="main"><?php echo ENTRY_STATE; ?></td>
  95              <td class="main">
  96  <?php
  97      if ($process == true) {
  98        if ($entry_state_has_zones == true) {
  99          $zones_array = array();
 100          $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
 101          while ($zones_values = tep_db_fetch_array($zones_query)) {
 102            $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
 103          }
 104          echo tep_draw_pull_down_menu('state', $zones_array);
 105        } else {
 106          echo tep_draw_input_field('state');
 107        }
 108      } else {
 109        echo tep_draw_input_field('state', tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));
 110      }
 111  
 112      if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT;
 113  ?></td>
 114            </tr>
 115  <?php
 116    }
 117  ?>
 118            <tr>
 119              <td class="main"><?php echo ENTRY_COUNTRY; ?></td>
 120              <td class="main"><?php echo tep_get_country_list('country', $entry['entry_country_id']) . '&nbsp;' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
 121            </tr>
 122  <?php
 123    if ((isset($HTTP_GET_VARS['edit']) && ($customer_default_address_id != $HTTP_GET_VARS['edit'])) || (isset($HTTP_GET_VARS['edit']) == false) ) {
 124  ?>
 125            <tr>
 126              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 127            </tr>
 128            <tr>
 129              <td colspan="2" class="main"><?php echo tep_draw_checkbox_field('primary', 'on', false, 'id="primary"') . ' ' . SET_AS_PRIMARY; ?></td>
 130            </tr>
 131  <?php
 132    }
 133  ?>
 134          </table></td>
 135        </tr>
 136      </table></td>
 137    </tr>
 138  </table>


Généré le : Mon Nov 26 19:48:25 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics