<?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 echo go_fetch_form('checkout_address', go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_66], '', 'SSL')) . go_fetch_hidden_field('action', 'process'); ?><table border="0" style="width:100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageGeneralsign"></td>
            <td class="pageGeneralsign" align="right"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php echo DB_TBL_ABOVE_SHIPPING_ADDRESS; ?></b></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoFrameInsides">
            <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
              <tr>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td> 
                <td class="main" style="width:50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_DESTINATION . '<br><br><a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_65], '', 'SSL') . '">' . go_picture_button('button_change_address.gif', PICTURE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
                <td align="right" style="width:50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="main" align="center" valign="top"><?php echo '<b>' . TITLE_SHIPPING_ADDRESS . '</b><br>' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_south_east.gif'); ?></td>
                    <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td> 
                    <td class="main" valign="top"><?php echo go_address_label($attendee_id, $sendto, true, ' ', '<br>'); ?></td>
                    <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td> 
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
<?php
  if (go_count_shipping_modules() > 0) {
?>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php echo DB_TBL_ABOVE_SHIPPING_METHOD; ?></b></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoFrameInsides">
            <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
<?php
    if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
              <tr>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td class="main" style="width:50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
                <td class="main" style="width:50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_east_south.gif'); ?></td>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
              </tr>
<?php
    } elseif ($free_shipping == false) {
?>
              <tr>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td class="main" style="width:100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
              </tr>
<?php
    }
    if ($free_shipping == true) {
        $customer_pickup = false;
        foreach($quotes as $q) {
            if($q['id'] === 'pickup') {
                $customer_pickup = true;
                break;
            }
        }
        if($customer_pickup) {
            $radio_buttons = 0;
            for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
                if($quotes[$i]['id'] !== 'pickup' and $quotes[$i]['id'] !== 'free') continue;
                ?>
                          <tr>
                            <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                            <td colspan="2"><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
                              <tr>
                                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                                <td class="main" colspan="3"><b><?php echo $quotes[$i]['module']; ?></b>&nbsp;<?php if (isset($quotes[$i]['icon']) && go_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>
                                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                              </tr>
            <?php
                   
                    if (isset($quotes[$i]['error'])) {
            ?>
                              <tr>
                                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                                <td class="main" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
                                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                              </tr>
            <?php
                    } else {
                      for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) { 
                        if (VERSANMODUL_EINSTELLUNG != 4){
                            $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);
                	    }
                        if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
                          echo '                  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
                        } else {
                          echo '                  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
                        }
            ?>
                                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                                <td class="main" style="width:75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>
            <?php
                        if ( ($n > 1) || ($n2 > 1) ) {
            ?>
                                <td class="main"><?php echo $currencies->format(go_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
                                <td class="main" align="right"><?php 
                                
                                if ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id'] AND VERSANMODUL_EINSTELLUNG == 2){
                                	echo go_fetch_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); 
                                }
                                if (VERSANMODUL_EINSTELLUNG != 2){
                                	echo go_fetch_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); 
                                }
                                ?></td>
            <?php
                        } else {
            ?>
                                <td class="main" align="right" colspan="2"><?php echo $currencies->format(go_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . go_fetch_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
            <?php
                        }
            ?>
                                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                              </tr>
            <?php
                        $radio_buttons++;
                        
                      }
                    }
            ?>
                            </table></td>
                            <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td> 
                          </tr>
            <?php
            	
                  }
        } else {

?>
              <tr>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td colspan="2" style="width:100%"><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                    <td class="main" colspan="3"><b><?php echo CONSTITUENT_SHIPPING_FREE_TEXT_TITLE; ?></b>&nbsp;<?php echo $quotes[$i]['icon']; ?></td>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                  </tr>
                  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                    <td class="main" style="width:100%"><?php echo sprintf(CONSTITUENT_SHIPPING_FREE_TEXT_DESCRIPTION, $currencies->format(CONSTITUENT_SHIPPING_FREE_SHIPPING_OVER)) . go_fetch_hidden_field('shipping', 'free_free'); ?></td>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                  </tr>
                </table></td>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td> 
              </tr>
        <?php
        }
    } else {
      $radio_buttons = 0;
      for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
      	
?>
              <tr>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td colspan="2"><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                    <td class="main" colspan="3"><b><?php echo $quotes[$i]['module']; ?></b>&nbsp;<?php if (isset($quotes[$i]['icon']) && go_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                  </tr>
<?php
       
        if (isset($quotes[$i]['error'])) {
?>
                  <tr>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                    <td class="main" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                  </tr>
<?php
        } else {
          for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) { 
            if (VERSANMODUL_EINSTELLUNG != 4){
                $checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);
    	    }
            if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
              echo '                  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
            } else {
              echo '                  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
            }
?>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                    <td class="main" style="width:75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>
<?php
            if ( ($n > 1) || ($n2 > 1) ) {
?>
                    <td class="main"><?php echo $currencies->format(go_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
                    <td class="main" align="right"><?php 
                    
                    if ($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id'] AND VERSANMODUL_EINSTELLUNG == 2){
                    	echo go_fetch_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); 
                    }
                    if (VERSANMODUL_EINSTELLUNG != 2){
                    	echo go_fetch_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); 
                    }
                    ?></td>
<?php
            } else {
?>
                    <td class="main" align="right" colspan="2"><?php echo $currencies->format(go_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . go_fetch_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
<?php
            }
?>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                  </tr>
<?php
            $radio_buttons++;
            
          }
        }
?>
                </table></td>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td> 
              </tr>
<?php
	
      }
    }
?>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
<?php
  }
?>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php echo DB_TBL_ABOVE_COMMENTS; ?></b></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoFrameInsides">
            <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
              <tr>
                <td><?php echo go_fetch_textarea_field('comments', 'soft', 48, 8); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoFrameInsides">
            <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
              <tr>
                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td class="main"><?php echo '<b>' . TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
                <td class="main" align="right"><?php echo go_picture_submit('button_continue.gif', PICTURE_BUTTON_CONTINUE); ?></td>
                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="0">
          <tr>
            <td style="width:25%"><table border="0" style="width:100%" cellspacing="0" cellpadding="0">
              <tr>
                <td style="width:50%" align="right"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'checkout_bullet.gif'); ?></td>
                <td style="width:50%"><?php echo go_fetch_dividing_up('pixel_silver.gif', '100%', '1'); ?></td>
              </tr>
            </table></td>
            <td style="width:25%"><?php echo go_fetch_dividing_up('pixel_silver.gif', '100%', '1'); ?></td>
            <td style="width:25%"><?php echo go_fetch_dividing_up('pixel_silver.gif', '100%', '1'); ?></td>
            <td style="width:25%"><table border="0" style="width:100%" cellspacing="0" cellpadding="0">
              <tr>
                <td style="width:50%"><?php echo go_fetch_dividing_up('pixel_silver.gif', '100%', '1'); ?></td>
                <td style="width:50%"><?php echo go_fetch_dividing_up('pixel_silver.gif', '1', '5'); ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td align="center" style="width:25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
            <td align="center" style="width:25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
            <td align="center" style="width:25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
            <td align="center" style="width:25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
          </tr>
        </table></td>
      </tr>
    </table></form>
<?php 
include('load_this/preloader_footer.php');
?>
