<?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 
  
  -----------------------------------------------------------------------
  
 ##################################################################################




*/
?>
    <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"><h1><?php echo ABOVE_TITLE;?></h1></td>
            <td class="pageGeneralsign" align="right">
<!--- Guthabenanzeige in Konto by Ede ---> 
<!--- modifiziert von Bert -->
<?php
$gv_query = go_db_query("select amount from " . DB_TBL_COUPON_GV_ATTENDEE . " where attendee_id = '" . $attendee_id . "'");
$gv_result = go_db_fetch_array($gv_query);
      if ($gv_result['amount'] > 0 ) {
          $hurtz = go_fetch_dividing_up();
          $hurtz =  VOUCHER_BALANCE .' :' . $currencies->format($gv_result['amount']) . '&nbsp;&nbsp;&nbsp;<br><br>' ;
          $hurtz .=  '<a href="'. go_href_link($GLOBALS['CONFIG_NAME_FILE']['main_bigware_28']) . '">';
          $hurtz .= go_picture_button('button_gv_shipping.gif', FRAME_SEND_TO_FRIEND) . '</a>' . '&nbsp;&nbsp;&nbsp;<br><br>' ;}
        echo $hurtz ; ?>
       <!--- Ende --->
          </td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
<?php
  if ($messageStack->size('member') > 0) {
?>
      <tr>
        <td><?php echo $messageStack->output('member'); ?></td>
      </tr>
      <tr>
        <td><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
      </tr>
<?php
  }
  if (go_count_attendee_orders() > 0) {
?>
      <tr>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php echo OVERVIEW_TITLE; ?></b></td>
            <td class="main"><?php echo '<a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_44], '', 'SSL') . '"><u>' . OVERVIEW_SHOW_ALL_ORDERS . '</u></a>'; ?></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 class="main" align="center" valign="top" style="width:130"><?php echo '<b>' . OVERVIEW_PREVIOUS_ORDERS . '</b><br>' . go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_south_east.gif'); ?></td>
                <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
<?php
    $orders_query = go_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_land, o.billing_name, o.billing_land, ot.text as order_total, s.orders_status_name from " . DB_TBL_ORDERS . " o, " . DB_TBL_ORDERS_TOTAL . " ot, " . DB_TBL_ORDERS_STATUS . " s where o.attendees_id = '" . (int)$attendee_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id desc limit 3");
    while ($orders = go_db_fetch_array($orders_query)) {
      if (go_not_null($orders['delivery_name'])) {
        $order_name = $orders['delivery_name'];
        $order_land = $orders['delivery_land'];
      } else {
        $order_name = $orders['billing_name'];
        $order_land = $orders['billing_land'];
      }
?>
                  <tr class="moduleRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo go_href_link($GLOBALS[CONFIG_NAME_FILE][member_history_more], 'order_id=' . $orders['orders_id'], 'SSL'); ?>'">
                    <td class="main" style="width:80"><?php echo go_date_short($orders['date_purchased']); ?></td>
                    <td class="main"><?php echo '#' . $orders['orders_id']; ?></td>
                    <td class="main"><?php echo go_output_string_protected($order_name) . ', ' . $order_land; ?></td>
                    <td class="main"><?php echo $orders['orders_status_name']; ?></td>
                    <td class="main" align="right"><?php echo $orders['order_total']; ?></td>
                    <td class="main" align="right"><?php echo '<a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][member_history_more], 'order_id=' . $orders['orders_id'], 'SSL') . '">' . go_picture_button('small_view.gif', SMALL_PICTURE_BUTTON_VIEW) . '</a>'; ?></td>
                  </tr>
<?php
    }
?>
                </table></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 MY_MEMBER_TITLE; ?></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 style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td style="width:60px"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'member_personal.gif'); ?></td>
                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="main"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_green.gif') . ' <a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_43], '', 'SSL') . '">' . MY_MEMBER_INFORMATION . '</a>'; ?></td>
                  </tr>
                  <tr>
                    <td class="main"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_green.gif') . ' <a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_15], '', 'SSL') . '">' . MY_MEMBER_DIRECTORY_TO_ADDRESS . '</a>'; ?></td>
                  </tr>
                  <tr>
                    <td class="main"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_green.gif') . ' <a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_48], '', 'SSL') . '">' . MY_MEMBER_PASSWORD . '</a>'; ?></td>
                  </tr>
                </table></td>
                <td style="width:10px" align="right"><?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="2">
          <tr>
            <td class="main"><b><?php echo MY_ORDERS_TITLE; ?></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 style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td style="width:60px"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'member_orders.gif'); ?></td>
                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="main"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_green.gif') . ' <a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_44], '', 'SSL') . '">' . MY_ORDERS_VIEW . '</a>'; ?></td>
                  </tr>
                </table></td>
                <td style="width:10px" align="right"><?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="2">
          <tr>
            <td class="main"><b><?php echo EMAIL_INFORMS_TITLE; ?></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 style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td style="width:60px"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'member_informs.gif'); ?></td>
                <td style="width:10px"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
                <td><table border="0" style="width:100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="main"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_green.gif') . ' <a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_47], '', 'SSL') . '">' . EMAIL_INFORMS_NEWSLETTERS . '</a>'; ?></td>
                  </tr>
                  <tr>
                    <td class="main"><?php echo go_picture(FOLDER_RELATIV_PIC_SYSTEM_TEMPLATES . 'arrow_green.gif') . ' <a href="' . go_href_link($GLOBALS[CONFIG_NAME_FILE][main_bigware_46], '', 'SSL') . '">' . EMAIL_INFORMS_ITEMS . '</a>'; ?></td>
                  </tr>
                </table></td>
                <td style="width:10px" align="right"><?php echo go_fetch_dividing_up('tranparentes.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      
<?php
			
			if (file_exists(FOLDER_ABSOLUT_CATALOG . 'modules/download')) {
			  require(FOLDER_ABSOLUT_CATALOG . 'modules/download/content/main_bigware_42.tpl.php');
			}	
?>
      
    </table>
