<?php
/**
  @licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
  @portion code Copyright (c) 2002 osCommerce
  @package osCSS-2 <www http://www.oscss.org>
  @version 2.1.0
  @date  16/09/10, 21:52
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8
*/
$account = $page->_call('customer','the_customer');
?>
<div id="accountEdit">
  <?php $page->messageStack->_draw('account_edit');?>

  <h2 class="content title <?php echo $language ;?>"><?php echo HEADING_TITLE_7; ?></h2>

  <p class="notice"><?php echo FORM_REQUIRED_INFORMATION; ?></p>

  <?php echo tep_draw_form('account_edit', tep_href_link(FILENAME_ACCOUNT, 'action=edit', 'SSL'), 'post', 'onsubmit="return check_form(account_edit);"') ;?>

    <fieldset class="account">
      <legend><?php echo MY_ACCOUNT_TITLE; ?></legend>

      <?php if ( $page->_draw_in_page('ACCOUNT_GENDER')) {
        $male =  ($account['customers_gender'] == 'm' ? true : false);
        $female = ($account['customers_gender'] == 'f'? true : false);
        $mlle = ($account['customers_gender'] == 'l' ? true : false);
        ?>
        <p class="gender">
          <label><?php echo ENTRY_GENDER; ?></label>
          <?php echo tep_draw_radio_field('gender','male', 'm', $male) ;?>
          <?php echo MALE ;?>
          <?php echo tep_draw_radio_field('gender','female', 'f', $female) ;?>
          <?php echo FEMALE ;?>
          <?php echo tep_draw_radio_field('gender','mlle', 'l', $mlle) ;?>
          <?php echo MLLE ;?>
          <?php echo (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="inputRequirement">' . ENTRY_GENDER_TEXT . '</span>': ''); ?>
        </p>
      <?php } ?>

      <p>
        <label for="accountEditFirstname"><?php echo ENTRY_FIRST_NAME; ?></label>
                <?php echo tep_draw_input_field('firstname','accountEditFirstname', $account['customers_firstname']) . '&nbsp;' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>
      </p>

      <p>
        <label for="accountEditLastname"><?php echo ENTRY_LAST_NAME; ?></label>
        <?php echo tep_draw_input_field('lastname','accountEditLastname', $account['customers_lastname']) . '&nbsp;' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?>
      </p>

      <?php if ( $page->_draw_in_page('ACCOUNT_DOB')) { ?>
                  <p>
          <label for="accountEditDob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
          <?php echo tep_draw_input_field('dob','accountEditDob', tep_date_short($account['customers_dob'])) . '&nbsp;' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="inputRequirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
          </p>
      <?php } ?>

      <p>
        <label for="accountEditEmail"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
        <?php echo tep_draw_input_field('email_address', 'accountEditEmail',$account['customers_email_address']) . '&nbsp;' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
      </p>

      <p>
        <label for="accountEditPhone"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>
        <?php echo tep_draw_input_field('telephone','accountEditPhone', $account['customers_telephone']) . '&nbsp;' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?>
      </p>

      <?php if (_cst_bool('ACCOUNT_FAXNUM')): ?>
	<p>
	  <label for="accountEditFax"><?php echo ENTRY_FAX_NUMBER; ?></label>
	  <?php echo tep_draw_input_field('fax', 'accountEditFax',$account['customers_fax']) . '&nbsp;' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="inputRequirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
	</p>
      <?php endif; ?>

      <!-- // BOF Customers extra fields -->
      <?php echo tep_get_extra_fields($customer_id, $languages_id)?>
      <!-- // EOF Customers extra fields -->


      <p class="formBt"><?php echo tep_draw_hidden_field('action', 'process') ;?><input type="submit" class="submitBt" value="<?php echo IMAGE_BUTTON_CONTINUE; ?>"  /></p>
    </fieldset>
  </form>

  <div class="navBt">
   <?php echo '<a class="navBt" href="' . tep_href_link(FILENAME_ACCOUNT) . '">' . IMAGE_BUTTON_BACK . '</a>'; ?>
  </div>

  <!-- extra divs to add extra pictures. -->
  <div class="extraDiv1"><span></span></div>
  <div class="extraDiv2"><span></span></div>
  <div class="extraDiv3"><span></span></div>
  <div class="extraDiv4"><span></span></div>
  <div class="extraDiv5"><span></span></div>

</div>