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

  Copyright (c) 2012 Bigware LTD
  (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
  (c) 2012	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 
  
  -----------------------------------------------------------------------
  
 ##################################################################################




*/
?>
<font color="#FF0000"><b><?php echo $error_message ?></b></font>
    <?php echo go_fetch_form('payment_order_way', go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_7], '', 'SSL'), 'post', 'onsubmit="return check_form();"'); ?><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>
<?php
  if (isset($_GET['payment_error']) && is_object(${$_GET['payment_error']}) && ($error = ${$_GET['payment_error']}->get_error())) {
?>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><font color="#FF0000"><b><?php echo go_output_string_protected($error['title']); ?></b></font></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
          <tr class="infoBoxNoticeContents">
            <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:100%" valign="top"><?php echo go_output_string_protected($error['error']); ?></td>
                <td><?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>
<?php
  }
?>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php echo DB_TBL_ABOVE_BILLING_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_SELECTED_BILLING_DESTINATION; ?><br><br><?php echo '<a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_50], '', '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"><b><?php echo TITLE_BILLING_ADDRESS; ?></b><br><?php echo 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, $billto, 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>
      <tr>
        <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php echo DB_TBL_ABOVE_PAYMENT_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
  $selection = $payment_modules->selection();   
    $gid = go_get_attendee_group_id($attendee_id);
  $check_query = go_db_query("select group_payment_unallowed from " .  DB_TBL_ATTENDEES_GROUPS . " where attendees_group_id = '" . $gid . "'");
  $check = go_db_fetch_array($check_query);
  $group_payment_unallowed = preg_split('/,/',$check['group_payment_unallowed']);
  for($i=0, $n=sizeof($selection);$i<$n; $i++){
      foreach($group_payment_unallowed as $p){
        if(trim(strtoupper($p))==trim(strtoupper($selection[$i][id]))){
           unset($selection[$i]);#Remove the unallowed payment method
        }
      }
  }
  //sort($selection); 
  
  if (sizeof($selection) > 1) {
?>
              <tr>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td class="main" style="width:50%; padding-bottom: 10px;" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
                <td class="main" style="width:50%" valign="top" align="right"><b><?php //echo TITLE_PLEASE_SELECT; ?></b><br><?php //echo 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
  } else {
?>
              <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_PAYMENT_INFORMATION; ?></td>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
              </tr>
<?php
  }
  $radio_buttons = 0;
  for ($i=0, $n=sizeof($selection); $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">
<?php
    if ( ($selection[$i]['id'] == $payment) || ($n == 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" align="left" style="width: 50px;">
                        <?php
                        if (sizeof($selection) > 1) {
                            echo go_fetch_radio_field('payment', $selection[$i]['id'], '', 'style="width:30px; height:30px;"');
                        } else {
                            echo go_fetch_hidden_field('payment', $selection[$i]['id']);
                        }
                        ?>
                    </td>
                    <td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                  </tr>
<?php
    if (isset($selection[$i]['error'])) {
?>
                  <tr>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                    <td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                  </tr>
<?php
    } elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>
                  <tr>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                    <td colspan="4"><table border="0" cellspacing="0" cellpadding="2">
<?php
      for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
                      <tr>
                        <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                        <td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
                        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                        <td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
                        <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                      </tr>
<?php
      }
?>
                    </table></td>
                    <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                  </tr>
<?php
    }
?>
                </table></td>
                <td><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
              </tr>
<?php
    $radio_buttons++;
  }
?>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
<?php
	if (go_session_is_registered('cc_id') && $cc_id) {
	    $couponjavascript = '<table cellpadding="0" cellspacing="0" border="0"><tr><td class="smalltext" valign="top">' . CART_COUPON . '</td><td class="smalltext" align="right"  valign="top">' . '<a href="javascript:couponpopupWindow(\'' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_56], 'bigID=' . $cc_id) . '\')">' . CART_COUPON_INFO2 . '</a>' . '</td></tr></table><br>';
	}
  echo $order_total_modules->crchange_selection();
?>
      <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', '60', '5'); ?></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"><b><?php echo 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_fetch_dividing_up('pixel_silver.gif', '1', '5'); ?></td>
                <td style="width:50%"><?php echo go_fetch_dividing_up('pixel_silver.gif', '100%', '1'); ?></td>
              </tr>
            </table></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><?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%"><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="checkoutBarFrom"><?php echo '<a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_66], '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
            <td align="center" style="width:25%" class="checkoutBarCurrent"><?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');
?>
