<?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
 function sbs_get_zone_name($land_id, $zone_id) {
    $zone_query = go_db_query("select zone_name from " . DB_TBL_ZONES . " where zone_land_id = '" . $land_id . "' and zone_id = '" . $zone_id . "'");
    if (go_db_num_rows($zone_query)) {
      $zone = go_db_fetch_array($zone_query);
      return $zone['zone_name'];
    } else {
      return $default_zone;
    }
  }  
  function sbs_get_lands($lands_id = '', $with_iso_codes = false) {
    $lands_array = array();
    if ($lands_id) {
      if ($with_iso_codes) {
        $lands = go_db_query("select lands_name, lands_iso_code_2, lands_iso_code_3 from " . DB_TBL_LANDS . " where lands_id = '" . $lands_id . "' order by lands_name");
        $lands_values = go_db_fetch_array($lands);
        $lands_array = array('lands_name' => $lands_values['lands_name'],
                                 'lands_iso_code_2' => $lands_values['lands_iso_code_2'],
                                 'lands_iso_code_3' => $lands_values['lands_iso_code_3']);
      } else {
        $lands = go_db_query("select lands_name from " . DB_TBL_LANDS . " where lands_id = '" . $lands_id . "'");
        $lands_values = go_db_fetch_array($lands);
        $lands_array = array('lands_name' => $lands_values['lands_name']);
      }
    } else {
      $lands = go_db_query("select lands_id, lands_name from " . DB_TBL_LANDS . " order by lands_name");
      while ($lands_values = go_db_fetch_array($lands)) {
        $lands_array[] = array('lands_id' => $lands_values['lands_id'],
                                   'lands_name' => $lands_values['lands_name']);
      }
    }
    return $lands_array;
  } 
function sbs_get_land_list($name, $selected = '', $parameters = '') { 
   $lands_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); 
   $lands = sbs_get_lands(); 
   $size = sizeof($lands); 
   for ($i=0; $i<$size; $i++) { 
     $lands_array[] = array('id' => $lands[$i]['lands_id'], 'text' => $lands[$i]['lands_name']); 
   } 
   return go_fetch_pull_down_menu($name, $lands_array, $selected, $parameters); 
}  
  ?>
<?php
    go_fetch_hidden_field($member['attendees_id']);    
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr>
    <td class="formAreaTitle"><?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">&nbsp;<?php echo TYPE_IN_ATTENDEES_ID; ?></td>
            <td class="main">&nbsp;
<?php
  if ($is_read_only) {
    echo $member['attendees_id'];
  } else {
    echo go_fetch_inputfeld('attendees_id', $member['attendees_id']) . '&nbsp;' . TYPE_IN_ATTENDEES_ID_TEXT;
  }
?></td>
          </tr>
		  <tr>
            <td class="main">&nbsp;<?php echo TYPE_IN_FIRST_NAME; ?></td>
            <td class="main">&nbsp;
<?php
  if ($is_read_only) {
    echo $member['attendees_firstname'];
  } else {
    echo go_fetch_inputfeld('firstname', $member['attendees_firstname']) . '&nbsp;' . TYPE_IN_FIRST_NAME_TEXT;
  }
?></td>
          </tr>
          <tr>
            <td class="main">&nbsp;<?php echo TYPE_IN_LAST_NAME; ?></td>
            <td class="main">&nbsp;
<?php
  if ($is_read_only) {
    echo $member['attendees_lastname'];
  } else {
    echo go_fetch_inputfeld('lastname', $member['attendees_lastname']) . '&nbsp;' . TYPE_IN_LAST_NAME_TEXT;
  }
?></td>
          </tr>
<?php 
?>
          <tr>
            <td class="main">&nbsp;<?php echo TYPE_IN_EMAIL_ADDRESS; ?></td>
            <td class="main">&nbsp;
<?php
  if ($is_read_only) {
    echo $member['attendees_email_address'];
  } else {
    echo go_fetch_inputfeld('email_address', $member['attendees_email_address']) . '&nbsp;' . TYPE_IN_EMAIL_ADDRESS_TEXT;
  }
?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
<?php
  if (MEMBER_COMPANY == 'true') {
?>  
  <tr>
    <td class="formAreaTitle"><br><?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">&nbsp;<?php echo TYPE_IN_COMPANY; ?></td>
            <td class="main">&nbsp;
<?php
    if ($is_read_only) {
      echo $address['entry_company'];
    } else {
      echo go_fetch_inputfeld('company', $address['entry_company']) . '&nbsp;' . TYPE_IN_COMPANY_TEXT;
    }
?></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
<?php
  }
?>
  <tr>
    <td class="formAreaTitle"><br><?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 TYPE_IN_STREET_ADDRESS; ?></td>
            <td class="main">&nbsp;
<?php
  if ($is_read_only) {
    echo $address['entry_street_address'];
  } else {
    echo go_fetch_inputfeld('street_address', $address['entry_street_address']) . '&nbsp;' . TYPE_IN_STREET_ADDRESS_TEXT;
  }
?></td>
          </tr>
<?php
  if (MEMBER_SUBURB == 'true') {
?>
          <tr>
            <td class="main">&nbsp;<?php echo TYPE_IN_SUBURB; ?></td>
            <td class="main">&nbsp;
<?php
    if ($is_read_only) {
      echo $address['entry_suburb'];
    } else {
      echo go_fetch_inputfeld('suburb', $address['entry_suburb']) . '&nbsp;' . TYPE_IN_SUBURB_TEXT;
    }
?></td>
          </tr>
<?php
  }
?>
          <tr>
            <td class="main">&nbsp;<?php echo TYPE_IN_POST_CODE; ?></td>
            <td class="main">&nbsp;
<?php
  if ($is_read_only) {
    echo $address['entry_postcode'];
  } else {
    echo go_fetch_inputfeld('postcode', $address['entry_postcode']) . '&nbsp;' . TYPE_IN_POST_CODE_TEXT;
  }
?></td>
          </tr>
          <tr>
            <td class="main">&nbsp;<?php echo TYPE_IN_CITY; ?></td>
            <td class="main">&nbsp;
<?php
  if ($is_read_only) {
    echo $address['entry_city'];
  } else {
    echo go_fetch_inputfeld('city', $address['entry_city']) . '&nbsp;' . TYPE_IN_CITY_TEXT;
  }
?></td>
          </tr>
<?php
  if (MEMBER_STATE == 'true') {
?>
          <tr>
            <td class="main">&nbsp;<?php echo TYPE_IN_STATE; ?></td>
            <td class="main">&nbsp;
<?php
    $state = sbs_get_zone_name($land, $zone_id, $state);
    if ($is_read_only) {
      echo sbs_get_zone_name($address['entry_land_id'], $member['entry_zone_id'], $member['entry_state']);
    } else {
      echo go_fetch_inputfeld('state', sbs_get_zone_name($address['entry_land_id'], $address['entry_zone_id'], $address['entry_state'])) . '&nbsp;' . TYPE_IN_STATE_TEXT;
    }
?></td>
             </tr>
<?php
     }
?>
             <tr>
               <td class="main">&nbsp;
<?php
 echo TYPE_IN_LAND;
 ?></td>
               <td class="main">&nbsp;
<?php
	if ($is_read_only) {
           echo go_get_land_name($address['entry_land_id']);
	} else { 
	echo go_fetch_inputfeld('land', go_get_land_name($address['entry_land_id'])) . '&nbsp;' . TYPE_IN_LAND_TEXT;
     }
?>
<?php
	 go_fetch_hidden_field('step', '3')
?>
</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="formAreaTitle"><br><?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">&nbsp;<?php echo TYPE_IN_TELEPHONE_NUMBER; ?></td>
            <td class="main">&nbsp;
<?php
  if ($is_read_only) {
    echo $member['attendees_telephone'];
  } else {
    echo go_fetch_inputfeld('telephone', $member['attendees_telephone']) . '&nbsp;' . TYPE_IN_TELEPHONE_NUMBER_TEXT;
  }
?>
<?php
 ?>
<?php 
?>
</table>