<?php
/*
  www.oscGold.com (C) Kamelia-Net Jacek Krysiak
  modul oscGold wer 4.0
*/

tep_draw_hidden_field($account['customers_id']);

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
    <td class="main" valign="top">
      <table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
          <td class="formAreaTitle" style="color:#ff0000"><?php echo CATEGORY_CORRECT; ?></td>
        </tr>
        <tr>
          <td class="main">
            <table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
              <tr>
                <td class="main">
                  <table border="0" cellspacing="0" cellpadding="2">
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_CUSTOMERS_ID; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('customers_id', $account['customers_id'], 'size="50"') . '&nbsp;' . ENTRY_CUSTOMERS_ID_TEXT; ?> </td>
                    </tr>
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_FIRST_NAME; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('firstname', $account['customers_firstname'], 'size="50"') . '&nbsp;' . ENTRY_FIRST_NAME_TEXT; ?> </td>
                    </tr>
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_LAST_NAME; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('lastname', $account['customers_lastname'], 'size="50"') . '&nbsp;' . ENTRY_LAST_NAME_TEXT; ?> </td>
                    </tr>
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_EMAIL_ADDRESS; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('email_address', $account['customers_email_address'], 'size="50"') . '&nbsp;' . ENTRY_EMAIL_ADDRESS_TEXT; ?></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
    <td class="main" valign="top">
      <table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
          <td class="formAreaTitle"><?php echo CATEGORY_COMPANY; ?></td>
        </tr>
        <tr>
          <td class="main">
            <table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
              <tr>
                <td class="main">
                  <table border="0" cellspacing="0" cellpadding="2">
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_COMPANY; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('company', $address['entry_company'], 'size="50"') . '&nbsp;' . ENTRY_COMPANY_TEXT;?></td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr>
                <td class="main">
                  <table border="0" cellspacing="0" cellpadding="2">
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_NIP; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('nip', $address['entry_nip'], 'size="50"') . '&nbsp;' . ENTRY_COMPANY_TEXT;?></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <tr>
    <td class="main" valign="top">
      <table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
          <td class="formAreaTitle"><?php echo CATEGORY_ADDRESS; ?></td>
        </tr>
        <tr>
          <td class="main">
            <table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
              <tr>
                <td class="main">
                  <table border="0" cellspacing="0" cellpadding="2">
                    <tr>
                      <td class="main">&nbsp;<?php echo ENTRY_STREET_ADDRESS; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('street_address', $address['entry_street_address'], 'size="50"') . '&nbsp;' . ENTRY_STREET_ADDRESS_TEXT; ?></td>
                    </tr>
                    <?php if (ACCOUNT_SUBURB == 'true') { ?>
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_SUBURB; ?></td>
                      <td class="main" width="150">&nbsp;<?php echo tep_draw_input_field('suburb', $address['entry_suburb'], 'size="50"') . '&nbsp;' . ENTRY_SUBURB_TEXT; ?></td>
                    </tr>
                    <?php } ?>
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_POST_CODE; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('postcode', $address['entry_postcode'], 'size="50"') . '&nbsp;' . ENTRY_POST_CODE_TEXT; ?></td>
                    </tr>
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_CITY; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('city', $address['entry_city'], 'size="50"') . '&nbsp;' . ENTRY_CITY_TEXT;?></td>
                    </tr>
                    <?php
                    if (ACCOUNT_STATE == 'true') {
                      ?>
                      <tr>
                        <td class="main"><?php echo ENTRY_STATE; ?></td>
                        <td class="main">
                          <?php
                          // +Country-State Selector
                          $entry_state = tep_get_zone_name($address['entry_country_id'], $address['entry_zone_id'], $address['entry_state']);
                          $zones_array = array();
                          if( isset($HTTP_GET_VARS['Customer']) || isset($HTTP_GET_VARS['Customer_nr']) ) {
                            $zones_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . (int)$address['entry_country_id'] . "' order by zone_name");
                          } elseif ( isset($HTTP_GET_VARS['entry_country_id']) ) {
                            $zones_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $HTTP_GET_VARS['entry_country_id'] . "' order by zone_name");
                          } else {
                            $zones_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . STORE_COUNTRY . "' order by zone_name");
                          }
                          while ($zones_values = tep_db_fetch_array($zones_query)) {
                            $zones_array[] = array('id' => $zones_values['zone_id'], 'text' => $zones_values['zone_name']);
                          }
                          if (count($zones_array) > 0) {
                            echo tep_draw_pull_down_menu('state', $zones_array, $address['entry_zone_id']);
//                            echo tep_draw_hidden_field('state', '');
                          } else {
                            echo tep_draw_input_field('state', $entry_state);
                          }
                          // -Country-State Selector
                          ?>
                        </td>
                      </tr>
                      <?php
                    }
                    ?>
                    <tr>
                      <td class="main"><?php echo ENTRY_COUNTRY; ?></td>
                      <td class="main">
                        <?php
                        // +Country-State Selector
                        if( isset($HTTP_GET_VARS['Customer']) || isset($HTTP_GET_VARS['Customer_nr']) ) {
                          echo css_get_country_list('country',  $address['entry_country_id'], 'onChange="return refresh_form(create_order);"');
                        } elseif ( isset($HTTP_GET_VARS['entry_country_id']) ) {
                          echo css_get_country_list('country',  $HTTP_GET_VARS['entry_country_id'], 'onChange="return refresh_form(create_order);"');
                        } else {
                          echo css_get_country_list('country', STORE_COUNTRY, 'onChange="return refresh_form(create_order);"');
                        }
                        tep_draw_hidden_field('step', '3');
                        // -Country-State Selector
                        ?>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
    <td class="main" valign="top">
      <table border="0" width="100%" cellspacing="0" cellpadding="2">
        <tr>
          <td class="formAreaTitle"><?php echo CATEGORY_CONTACT; ?></td>
        </tr>
        <tr>
          <td class="main">
            <table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
              <tr>
                <td class="main">
                  <table border="0" cellspacing="0" cellpadding="2">
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_TELEPHONE_NUMBER; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('telephone', $account['customers_telephone'], 'size="50"') . '&nbsp;' . ENTRY_TELEPHONE_NUMBER_TEXT; ?> </td>
                    </tr>
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_FAX_NUMBER; ?></td>
                      <td class="main">&nbsp;<?php echo tep_draw_input_field('fax', $account['customers_fax'], 'size="50"') . '&nbsp;' . ENTRY_FAX_NUMBER_TEXT; ?></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr>
          <td class="formAreaTitle"><br><?php echo CATEGORY_ORDER_DETAILS; ?></td>
        </tr>
        <tr>
          <td class="main">
            <table border="0" width="100%" cellspacing="0" cellpadding="2" class="formArea">
              <tr>
                <td class="main">
                  <table border="0" cellspacing="0" cellpadding="2">
                    <tr>
                      <td class="main" width="150">&nbsp;<?php echo ENTRY_CURRENCY; ?></td>
                      <td class="main">&nbsp;<?php echo $SelectCurrencyBox ?></td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>

</table>