<?php
/*
###################################################################################
  Bigware Shop 2.3
  Release Datum: 23.08.2015
  
  Bigware Shop
  http://www.bigware.de

  Copyright (c) 2015 Bigware LTD
  (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
  (c) 2015	Bigware LTD

  Copyrightvermerke duerfen nicht entfernt werden.
  ------------------------------------------------------------------------
  Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
  der GNU General Public License, wie von der Free Software Foundation
  veroeffentlicht, weitergeben und/oder modifizieren, entweder gemaess Version 2 
  der Lizenz oder (nach Ihrer Option) jeder spaeteren Version.
  Die Veroeffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen
  von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die
  implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FUER EINEN
  BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.
  
  Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
  Programm erhalten haben. Falls nicht, schreiben Sie an die Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.

  Infos:
  ------------------------------------------------------------------------
  Der Bigware Shop wurde vor vielen Jahren bereits aus dem bekannten Shopsystem osCommerce
  weiter- und neuentwickelt.
  Der Bigware Shop legt im hohen Masse Wert auf Bedienerfreundlichkeit, beinhaltet eine leichte
  Installation, viele neue professionelle Werkzeuge und zeichnet sich aus durch eine grosse 
  Community, die bei Problemen weiterhelfen kann.
  
  Der Bigware Shop ist auf jedem System lauffaehig, welches eine PHP Umgebung
  (ab PHP 4.1.3) und mySQL zur Verfuegung stellt und auf Linux basiert.
 
  Hilfe erhalten Sie im Forum auf www.bigware.de 
  
  -----------------------------------------------------------------------
  
 ##################################################################################




*/
?>
<?php
  if (!isset($process)) $process = false;
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td class="main"><b><?php echo NEW_ADDRESS_TITLE; ?></b></td>
        <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
      <tr class="infoFrameInsides">
        <td><table border="0" cellspacing="2" cellpadding="2">
<?php
  if (MEMBER_GENDER == 'true') {
    if (isset($gender)) {
      $male = ($gender == 'm') ? true : false;
    } else {
      $male = ($entry['entry_gender'] == 'm') ? true : false;
    }
    $female = !$male;
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_GENDER; ?></td>
            <td class="main"><?php echo go_fetch_radio_field('gender', 'm', $male) . '&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;' . go_fetch_radio_field('gender', 'f', $female) . '&nbsp;&nbsp;' . FEMALE . '&nbsp;' . (go_not_null(TYPE_IN_GENDER_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_GENDER_TEXT . '</span>': ''); ?></td>
          </tr>
<?php
  }
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_FIRST_NAME; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('firstname', $entry['entry_firstname']) . '&nbsp;' . (go_not_null(TYPE_IN_FIRST_NAME_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_FIRST_NAME_TEXT . '</span>': ''); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TYPE_IN_LAST_NAME; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('lastname', $entry['entry_lastname']) . '&nbsp;' . (go_not_null(TYPE_IN_LAST_NAME_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_LAST_NAME_TEXT . '</span>': ''); ?></td>
          </tr>
		  <!-- B2B start -->
		  <!--PIVACF start-->
<?php
if ($language == 'italian') {
	if (MEMBER_CF == 'true') {
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_CF; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('cf', $entry['entry_cf']) . '&nbsp;' . ((go_not_null(TYPE_IN_CF_TEXT) && (MEMBER_CF_REQ=='true')) ? '<span class="inputRequirement">' . TYPE_IN_CF_TEXT . '</span>': ''); ?></td>
          </tr>
<?php
	}
} 
?>
		  <!-- B2B end -->
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
          </tr>
<?php
  if (MEMBER_COMPANY == 'true') {
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_COMPANY; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('company', $entry['entry_company']) . '&nbsp;' . (go_not_null(TYPE_IN_COMPANY_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_COMPANY_TEXT . '</span>': ''); ?></td>
          </tr>
		  <!-- B2B start -->
		  <!--PIVACF start-->
<?php
  }
?>
<?php
  if (MEMBER_PIVA == 'true') {
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_PIVA; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('piva', $entry['entry_piva']) . '&nbsp;' . ((go_not_null(TYPE_IN_PIVA_TEXT) && (MEMBER_PIVA_REQ == 'true')) ? '<span class="inputRequirement">' . TYPE_IN_PIVA_TEXT . '</span>': ''); ?></td>
          </tr>                 
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
          </tr>
<?php
  }
?>
		  <!-- B2B end -->
          <tr>
            <td class="main"><?php echo TYPE_IN_STREET_ADDRESS; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('street_address', $entry['entry_street_address']) . '&nbsp;' . (go_not_null(TYPE_IN_STREET_ADDRESS_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_STREET_ADDRESS_TEXT . '</span>': ''); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TYPE_IN_STREET_ADDRESS2; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('street_address2', $entry['entry_street_address2']) . '&nbsp;'; ?></td>
          </tr>
<?php
  if (MEMBER_SUBURB == 'true') {
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_SUBURB; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('suburb', $entry['entry_suburb']) . '&nbsp;' . (go_not_null(TYPE_IN_SUBURB_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_SUBURB_TEXT . '</span>': ''); ?></td>
          </tr>
<?php
  }
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_POST_CODE; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('postcode', $entry['entry_postcode']) . '&nbsp;' . (go_not_null(TYPE_IN_POST_CODE_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_POST_CODE_TEXT . '</span>': ''); ?></td>
          </tr>
          <tr>
            <td class="main"><?php echo TYPE_IN_CITY; ?></td>
            <td class="main"><?php echo go_fetch_inputfeld('city', $entry['entry_city']) . '&nbsp;' . (go_not_null(TYPE_IN_CITY_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_CITY_TEXT . '</span>': ''); ?></td>
          </tr>
<?php
  if (MEMBER_STATE == 'true') {
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_STATE; ?></td>
            <td class="main">
<?php
    if ($process == true) {
      if ($entry_state_has_zones == true) {
        $zones_array = array();
        $zones_query = go_db_query("select zone_name from " . DB_TBL_ZONES . " where zone_land_id = '" . (int)$land . "' order by zone_name");
        while ($zones_values = go_db_fetch_array($zones_query)) {
          $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
        }
        echo go_fetch_pull_down_menu('state', $zones_array);
      } else {
        echo go_fetch_inputfeld('state');
      }
    } else {
      echo go_fetch_inputfeld('state', go_get_zone_name($entry['entry_land_id'], $entry['entry_zone_id'], $entry['entry_state']));
    }
    if (go_not_null(TYPE_IN_STATE_TEXT)) echo '&nbsp;<span class="inputRequirement">' . TYPE_IN_STATE_TEXT;
?></td>
          </tr>
<?php
  }
?>
          <tr>
            <td class="main"><?php echo TYPE_IN_LAND; ?></td>
            <td class="main"><?php echo go_get_land_list('land', $entry['entry_land_id']) . '&nbsp;' . (go_not_null(TYPE_IN_LAND_TEXT) ? '<span class="inputRequirement">' . TYPE_IN_LAND_TEXT . '</span>': ''); ?></td>
          </tr>
<?php
  if ((isset($_GET['change']) && ($attendee_default_address_id != $_GET['change'])) || (isset($_GET['change']) == false) ) {
?>
          <tr>
            <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
          </tr>
          <tr>
            <td colspan="2" class="main"><?php echo go_fetch_checkbox_field('primary', 'on', false, 'id="primary"') . ' ' . SET_AS_PRIMARY; ?></td>
          </tr>
<?php
  }
?>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
