<?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:55
  @author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
  @encode UTF-8
*/
global $process;
?>
<div id="login">

  <div class="warning">
    <?php $page->messageStack->_draw('login');?>
  </div>




	<div class="contentBox loginCustomer">
	  <h3><?php echo TEXT_RETURNING_CUSTOMER; ?></h3>

	  <?php echo tep_draw_form('login_form', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?>


	      <p>
		<label for="email_address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
		<?php echo tep_draw_input_field('email_address','email_address'); ?>
	      </p>

	      <p>
		<label for="password"><?php echo ENTRY_PASSWORD; ?></label>
		<?php echo tep_draw_password_field('password','passwordv'); ?>
	      </p>

	      <p class="infoText">
		<?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?>
	      </p>

	      <p class="formBt">
		<input type="submit" class="submitBtlogin" value="Me Connecter"  />
	      </p>
	  </form>
	</div>
	<div class="contentBox vistitorCart">
	  <?php if($cart->count_contents() > 0)
	    if ( ($replace=$page->prop_ctrl('text_visitor_cart', 'text_visitor_cart')) !=false) $replace();
	    else { echo '<p id="text_visitor_cart" class="infoText">'. TEXT_VISITORS_CART .'</p>'; } ?>
	</div>

	<div class="contentBox newCustomer">
	  <h3><?php echo HEADING_NEW_CUSTOMER; ?></h3>
  <span class="notice"><?php echo FORM_REQUIRED_INFORMATION; ?></span>
  <?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post') ;?>

    <fieldset>
      <legend><?php echo CATEGORY_PERSONAL; ?></legend>
      <?php if (_cst_bool('ACCOUNT_GENDER')): ?>
        <p >
          <label class="contact" ><?php echo ENTRY_GENDER; ?></label>
          <?php echo tep_draw_radio_field('gender','male','m') . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . tep_draw_radio_field('gender','female','f') . '&nbsp;&nbsp;' . FEMALE . '&nbsp;&nbsp;' . tep_draw_radio_field('gender','mlle','l') . '&nbsp;&nbsp;' . MLLE .'&nbsp;' . (tep_not_null(ENTRY_GENDER_TEXT) ? '<span class="notice">' . ENTRY_GENDER_TEXT . '</span>': ''); ?>
          <?php $page->messageStack->_draw_inline('gender'); ?>
        </p>
      <?php endif; ?>
      <p class="a50">
        <label class="contact"  for="firstname"><?php echo ENTRY_FIRST_NAME; ?></label>
        <?php echo tep_draw_input_field('firstname','firstname') . '&nbsp;' . (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="notice">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('firstname'); ?>
      </p>
      <p class="a50">
        <label class="contact"  for="lastname"><?php echo ENTRY_LAST_NAME; ?></label>
        <?php echo tep_draw_input_field('lastname','lastname') . '&nbsp;' . (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="notice">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('lastname'); ?>
      </p>
      <?php if (_cst_bool('ACCOUNT_DOB')) { ?>
        <p >
          <label class="contact"  for="dob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
          <?php echo tep_draw_input_field('dob','dob') . '&nbsp;' . (tep_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="notice">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
          <?php $page->messageStack->_draw_inline('dob'); ?>
        </p>
      <?php } ?>
      <p >
        <label class="contact"  for="email_address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
        <?php echo tep_draw_input_field('email_address','email_address') . '&nbsp;' . (tep_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="notice">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('email_address'); ?>
      </p>
      <p class="a50">
        <label class="contact"  for="password"><?php echo ENTRY_PASSWORD; ?></label>
        <?php echo tep_draw_password_field('password','password') . '&nbsp;' . (tep_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="notice">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('password'); ?>
      </p>
      <p class="a50">
        <label class="contact"  for="confirmation"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></label>
        <?php echo tep_draw_password_field('confirmation','confirmation') . '&nbsp;' . (tep_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="notice">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('confirmation'); ?>
      </p>
    </fieldset>

    <?php if (_cst_bool('ACCOUNT_COMPANY')): ?>
      <fieldset>
        <legend><?php echo CATEGORY_COMPANY; ?></legend>
        <p class="a50">
          <label class="contact"  for="company"><?php echo ENTRY_COMPANY; ?></label>
          <?php echo tep_draw_input_field('company','company') . '&nbsp;' . (tep_not_null(ENTRY_COMPANY_TEXT) ? '<span class="notice">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?>
        </p>
        <p class="a50">
          <label class="contact"  for="company"><?php echo ENTRY_COMPANY_TAX_ID; ?></label>
          <?php echo tep_draw_input_field('company_tax_id','company_tax_id') . '&nbsp;' . (tep_not_null(ENTRY_COMPANY_TAX_ID_TEXT) ? '<span class="notice">' . ENTRY_COMPANY_TAX_ID_TEXT . '</span>': ''); ?>
        </p>
      </fieldset>
    <?php  endif; ?>

    <fieldset>
      <legend><?php echo CATEGORY_ADDRESS; ?></legend>
      <p class="a50">
        <label class="contact"  for="street_address"><?php echo ENTRY_STREET_ADDRESS; ?></label>
        <?php echo tep_draw_input_field('street_address','street_address') . '&nbsp;' . (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="notice">' . ENTRY_STREET_ADDRESS_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('street_address'); ?>
      </p>
      <?php if (_cst_bool('ACCOUNT_SUBURB')): ?>
        <p class="a50">
          <label class="contact"  for="suburb"><?php echo ENTRY_SUBURB; ?></label>
          <?php echo tep_draw_input_field('suburb','suburb') . '&nbsp;' . (tep_not_null(ENTRY_SUBURB_TEXT) ? '<span class="notice">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?>
        </p>
      <?php endif; ?>
      <p class="a50">
        <label class="contact"  for="postcode"><?php echo ENTRY_POST_CODE; ?></label>
        <?php echo tep_draw_input_field('postcode','postcode') . '&nbsp;' . (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="notice">' . ENTRY_POST_CODE_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('postcode'); ?>
      </p>
      <p class="a50">
        <label class="contact"  for="city"><?php echo ENTRY_CITY; ?></label>
        <?php echo tep_draw_input_field('city','city') . '&nbsp;' . (tep_not_null(ENTRY_CITY_TEXT) ? '<span class="notice">' . ENTRY_CITY_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('city'); ?>
      </p>
 <p class="a50">
        <label class="contact"  for="telephone"><?php echo ENTRY_TELEPHONE_NUMBER; ?></label>
        <?php echo tep_draw_input_field('telephone','telephone') . '&nbsp;' . (tep_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="notice">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>': ''); ?>
        <?php $page->messageStack->_draw_inline('telephone'); ?>
      </p>
	   <?php if (_cst_bool('ACCOUNT_FAXNUM')): ?>
        <p class="a50">
          <label class="contact"  for="fax"><?php echo ENTRY_FAX_NUMBER; ?></label>
          <?php echo tep_draw_input_field('fax','fax') . '&nbsp;' . (tep_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="notice">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
        </p>
      <?php endif; ?>
      <?php if (_cst_bool('ACCOUNT_COUNTRY')): ?>
        <p class="a50">
          <label class="contact" ><?php echo ENTRY_COUNTRY; ?></label>
          <?php echo tep_get_country_list('country','country') . '&nbsp;' . (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="notice">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?>
          <?php $page->messageStack->_draw_inline('country'); ?>
        </p>
      <?php endif; ?>
      <?php if (_cst_bool('ACCOUNT_STATE')): ?>
        <p >
          <label class="contact"  for="state"><?php echo ENTRY_STATE; ?></label>
          <?php
          if ($process == true) {
            if ($entry_state_has_zones == true) {
            $zones_array = array();
            $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
            while ($zones_values = tep_db_fetch_array($zones_query)) {
              $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
            }
            echo tep_draw_pull_down_menu('state','state', $zones_array);
          } else {
            echo tep_draw_input_field('state','state');
          }
          } else {
            echo tep_draw_input_field('state','state');
          }

          if (tep_not_null(ENTRY_STATE_TEXT)) echo '&nbsp;<span class="notice">' . ENTRY_STATE_TEXT . '</span>' . "\n";
          ?>
          <?php $page->messageStack->_draw_inline('state'); ?>
        </p>
      <?php endif; ?>
    </fieldset>

      <!-- // BOF Customers extra fields -->
      <?php echo tep_get_extra_fields($customer_id,$languages_id);?>
      <?php $page->messageStack->_draw_inline('extra_fields'); ?>
      <!-- // EOF Customers extra fields -->

    <fieldset>
      <legend><?php echo CATEGORY_OPTIONS; ?></legend>
      <p >
        <label class="contact"  for="newsletter"><?php echo ENTRY_NEWSLETTER; ?></label>
        <?php echo tep_draw_checkbox_field('newsletter','newsletter','1') . '&nbsp;' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="notice">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?>
      </p>
    </fieldset>
    <p class="formBt ieExtractFieldset">
      <?php echo tep_draw_hidden_field('action','process'); ?>
      <input type="submit" class="submitBtlogin" value="Creer mon compte"  />
    </p>
  </form>




    <div class="bottom_prod_box_big"></div>
  </div>
</div>