[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

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

   1  <?php
   2  /*

   3  $Id: address_book_details.php 10 2006-06-22 03:56:08Z user $

   4  

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax

   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      $male = $female = false;
  31      if (isset($gender)) {
  32        $male = ($gender == 'm') ? true : false;
  33        $female = !$male;
  34      } elseif (isset($entry['entry_gender'])) {
  35        $male = ($entry['entry_gender'] == 'm') ? true : false;
  36        $female = !$male;
  37      }
  38  ?>
  39            <tr>
  40              <td class="main"><?php echo ENTRY_GENDER; ?></td>
  41              <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>
  42            </tr>
  43  <?php
  44    }
  45  ?>
  46            <tr>
  47              <td class="main"><?php echo ENTRY_FIRST_NAME; ?></td>
  48              <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>
  49            </tr>
  50            <tr>
  51              <td class="main"><?php echo ENTRY_LAST_NAME; ?></td>
  52              <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>
  53            </tr>
  54            <tr>
  55              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  56            </tr>
  57  <?php
  58    if (ACCOUNT_COMPANY == 'true') {
  59  ?>
  60            <tr>
  61              <td class="main"><?php echo ENTRY_COMPANY; ?></td>
  62              <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>
  63            </tr>
  64  <?php // BOF: MOD - Separate Pricing Per Customer
  65     if (tep_not_null($entry['entry_company_tax_id'])) {
  66     ?>
  67            <tr>
  68              <td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?></td>
  69              <td class="main"><?php echo $entry['entry_company_tax_id'] ; ?></td>
  70            </tr>
  71   <?php
  72     } else { // end if (tep_not_null($entry['entry_company_tax_id'])) 
  73   ?>       <tr>
  74              <td class="main"><?php echo ENTRY_COMPANY_TAX_ID; ?></td>
  75              <td class="main"><?php echo tep_draw_input_field('company_tax_id') . '&nbsp;' . (tep_not_null(ENTRY_COMPANY_TAX_ID_TEXT) ? '<span class="inputRequirement">' . ENTRY_COMPANY_TAX_ID_TEXT . '</span>': ''); ?></td>
  76            </tr>
  77   <?php
  78     } // end else 

  79  // EOF: MOD - Separate Pricing Per Customer

  80  ?>
  81            <tr>
  82              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  83            </tr>
  84  <?php
  85    }
  86  ?>
  87            <tr>
  88              <td class="main"><?php echo ENTRY_STREET_ADDRESS; ?></td>
  89              <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>
  90            </tr>
  91  <?php
  92    if (ACCOUNT_SUBURB == 'true') {
  93  ?>
  94            <tr>
  95              <td class="main"><?php echo ENTRY_SUBURB; ?></td>
  96              <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>
  97            </tr>
  98  <?php
  99    }
 100  ?>
 101            <tr>
 102              <td class="main"><?php echo ENTRY_POST_CODE; ?></td>
 103              <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>
 104            </tr>
 105            <tr>
 106              <td class="main"><?php echo ENTRY_CITY; ?></td>
 107              <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>
 108            </tr>
 109  <?php
 110    if (ACCOUNT_STATE == 'true') {
 111  ?>
 112            <tr>
 113              <td class="main"><?php echo ENTRY_STATE; ?></td>
 114              <td class="main">
 115  <?php
 116  // BOF: MOD - Country-State Selector

 117  //  if ($process == true) {

 118  //    if ($entry_state_has_zones == true) {

 119      $zones_array = array();
 120  //      $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");

 121      $zones_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$entry['entry_country_id'] . "' order by zone_name");
 122      while ($zones_values = tep_db_fetch_array($zones_query)) {
 123  //        $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);

 124        $zones_array[] = array('id' => $zones_values['zone_id'], 'text' => $zones_values['zone_name']);
 125      }
 126      if (count($zones_array) > 0) {
 127        echo tep_draw_pull_down_menu('zone_id', $zones_array, $entry['entry_zone_id']);
 128        echo tep_draw_hidden_field('state', '');
 129      } else {
 130  //    echo tep_draw_input_field('state', tep_get_zone_name($entry['entry_country_id'], $entry['entry_zone_id'], $entry['entry_state']));

 131        echo tep_draw_input_field('state', $entry['entry_state']);
 132      }
 133  // EOF: MOD - Country-State Selector

 134  
 135      if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . ENTRY_STATE_TEXT;
 136  ?></td>
 137            </tr>
 138  <?php
 139    }
 140  ?>
 141            <tr>
 142              <td class="main"><?php echo ENTRY_COUNTRY; ?></td>
 143  <?php /* LINE CHANGED: MOD - Country-State Selector */
 144  /*          <td class="main"><?php echo tep_get_country_list('country', $entry['entry_country_id']) . ' ' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td> */

 145  ?>
 146              <td class="main"><?php echo tep_get_country_list('country', $entry['entry_country_id'],'onChange="return refresh_form(addressbook);"') . '&nbsp;' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="inputRequirement">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?></td>
 147            </tr>
 148  <?php
 149    if ((isset($HTTP_GET_VARS['edit']) && ($customer_default_address_id != $HTTP_GET_VARS['edit'])) || (isset($HTTP_GET_VARS['edit']) == false) ) {
 150  ?>
 151            <tr>
 152              <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 153            </tr>
 154            <tr>
 155              <td colspan="2" class="main"><?php echo tep_draw_checkbox_field('primary', 'on', false, 'id="primary"') . ' ' . SET_AS_PRIMARY; ?></td>
 156            </tr>
 157  <?php
 158    }
 159  ?>
 160          </table></td>
 161        </tr>
 162      </table></td>
 163    </tr>
 164  </table>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7