<?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 große 
  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($_SERVER)) {
$_GET = &$_GET;
$_POST = &$_POST;
$_COOKIE = &$_COOKIE;
$_FILES = &$_FILES;
$_SERVER = &$_SERVER;
$_ENV = &$_ENV;
} 
if ($_POST['lizenzbestimmung'] == 'ON'){
	  require('load_this/load_bigware_11.php');
	  if (isset($_GET['action']) && ($_GET['action'] == 'process')) {
	    $email_address = go_db_producing_input($_POST['email_address']);
	    $password = go_db_producing_input($_POST['password']); 
	    $check_former_query = go_db_query("select former_id as login_id, former_groups_id as login_groups_id, former_firstname as login_firstname, former_email_address as login_email_address, former_password as login_password, former_modified as login_modified, former_logdate as login_logdate, former_lognum as login_lognum from " . DB_TBL_FORMER . " where former_email_address = '" . go_db_input($email_address) . "'");
	    if (!go_db_num_rows($check_former_query)) {
	      $_GET['login'] = 'fail';
	    } else {
	      $check_former = go_db_fetch_array($check_former_query); 
	      if (!go_validate_password($password, $check_former['login_password'])) {
	        $_GET['login'] = 'fail';
	      } else {
	        if (go_session_is_registered('password_forgotten')) {
	          go_session_unregister('password_forgotten');
	        }
	        $login_id = $check_former['login_id'];
	        $login_groups_id = $check_former[login_groups_id];
	        $login_firstname = $check_former['login_firstname'];
	        $login_email_address = $check_former['login_email_address'];
	        $login_logdate = $check_former['login_logdate'];
	        $login_lognum = $check_former['login_lognum'];
	        $login_modified = $check_former['login_modified'];
	        go_session_register('login_id');
	        go_session_register('login_groups_id');
	        go_session_register('login_first_name'); 
	        go_db_query("update " . DB_TBL_FORMER . " set former_logdate = now(), former_lognum = former_lognum+1 where former_id = '" . $login_id . "'");
	        if (($login_lognum == 0) || !($login_logdate) || ($login_email_address == "$email_address") || ($login_modified == '0000-00-00 00:00:00')) { 
	          go_forward(go_href_link(NAME_OF_FILE_FORMER_MEMBER));
	        } else {
	          go_forward(go_href_link(NAME_OF_FILE_DEFAULT));
	        }
	      }
	    }
	  }
	  require(FOLDER_RELATIV_LANGUAGES . $language . '/' . NAME_OF_FILE_LOGIN);
	?>
	<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
	<html <?php echo HTML_PARAMS; ?>>
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
	<title><?php echo TITLE; ?></title>
	<link rel="stylesheet" type="text/css" href="load_this/style.css">
	<script language="JavaScript" type="text/javascript">
	<!--
	 function toonFocus(){
	 if (document.forms.length>0){
	  for (var i=0; i< document.forms[0].elements.length; i++){
	   var oField = document.forms[0].elements[i];
	   if (oField.type!="hidden"){
	    oField.focus();
	    return;
	   }
	  }
	 }
	}
	//-->
	</script>
	</head>
	<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onload="toonFocus()">
	<?php 
	$login_ja = "764-hk&%(&%?!lsjdhfHFHF8990870987gkgRTT=))/%$/&%$$&/(%))=&=/&//&%($54";
	require(FOLDER_RELATIV_INCLUDES . 'load_bigware_9.php'); 
	?>
	<br>
	                                <p align="center">
	                                <center>
	                          <?php echo go_fetch_form('login', NAME_OF_FILE_LOGIN, 'action=process&language=de'); ?>
	                            <table width="280" border="0" cellspacing="0" cellpadding="2">
	                              <tr>
	                                <td class="login_heading" valign="top"><br></b></td>
	                              </tr>
	                              <tr>
	                                <td height="100%" valign="top" align="center">
	                                <table border="0" height="100%" cellspacing="0" cellpadding="1" bgcolor="#666666">
	                                  <tr><td><table border="0" width="100%" height="100%" cellspacing="3" cellpadding="2" bgcolor="#F0F0FF">
	<?php
	  if ($_GET['login'] == 'fail') {
	    $info_message = TEXT_LOGIN_ERROR;
	  }
	  if (isset($info_message)) {
	?>
	                                    <tr>
	                                      <td colspan="2" class="smallText" align="center"><?php echo $info_message; ?></td>
	                                    </tr>
	<?php
	  } else {
	?>
	                                    <tr>
	                                      <td colspan="2"><?php echo go_fetch_dividing_up('tranparentes.gif', '100%', '10'); ?></td>
	                                    </tr>
	<?php
	  }
	?>
	                                    <tr>
	                                      <td class="smallText"><img src="picture/email.gif"></td>
	                                      <td class="smallText"><?php echo TYPE_IN_EMAIL_ADDRESS; ?></td>
	                                      <td class="smallText"><?php echo go_fetch_inputfeld('email_address'); ?></td>
	                                    </tr>
	                                    <tr>
	                                      <td class="smallText"><img src="picture/pass.gif"></td>
	                                      <td class="smallText"><?php echo TYPE_IN_PASSWORD; ?></td>
	                                      <td class="smallText"><?php echo go_fetch_password_field('password'); ?>
	                                      <input type="hidden" value="ON" name="lizenzbestimmung">
	                                      </td>
	                                    </tr>
	                                    <tr>
	                                      <td colspan="3" align="right" valign="top"><?php echo go_picture_submit('button_confirm.gif', PICTURE_BUTTON_LOGIN); ?></td>
	                                    </tr>
	                                  </table></td></tr>
	                                </table>
	                                </td>
	                              </tr>
	                              <tr>
	                                <td valign="top" align="right"><?php echo '<a class="sub" href="' . go_href_link(NAME_OF_FILE_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a><span class="sub">&nbsp;</span>'; ?></td>
	                              </tr>
	                            </table>
	                          </form>
	<?php require(FOLDER_RELATIV_INCLUDES . 'load_bigware_7.php'); ?> 
	</body>
	</html>
<?php 
}
else{
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="ltr" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TEXT_SHOP_NAME ?></title>
<link rel="stylesheet" type="text/css" href="load_this/style.css">

</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<center>
<table style="BORDER-COLLAPSE: collapse" borderColor="#111111" cellSpacing="0" cellPadding="0" width="770" border="0">
  <tr>
    <td>
    <img src="picture/design_2_2.gif" width="19" height="20"></td>
    <td background="picture/design_3_2.gif">
    <img src="picture/design_3_2.gif" width="86" height="20"></td>
    <td background="picture/design_5_2.gif">
    <img height="20" src="picture/design_5_2.gif" width="220"></td>
    <td>
    <img src="picture/design_6_2.gif" width="27" height="20"></td>
  </tr>
  <tr>
    <td>
    <img height="100" src="picture/design_2_3.gif" width="19"></td>
    <td vAlign="top" width="724" bgColor="#a3c4e1" colSpan="2">
    <table style="BORDER-COLLAPSE: collapse" borderColor="#111111" cellSpacing="0" cellPadding="0" width="100%" border="0">
      <tr>
        <td vAlign="top">
        <!-- Navigation //--><center>
        <p><b><font face="Arial" color="#000000"><?php echo TEXT_LOGIN_ADM ?></font></b></p>
        </center>
        <!-- Navigation_eof//-->
        <p>
        <img height="35" src="picture/transparent.gif" width="20"><br>
		</td>
        <td align="right">
        <img src="picture/design_5_3.jpg" width="220" height="100"></td>
      </tr>
    </table>
    </td>
    <td>
    <img height="100" src="picture/design_6_3.gif" width="27"></td>
  </tr>
  <tr>
    <td>
    <img src="picture/design_2_4.gif" width="19" height="13"></td>
    <td background="picture/design_3_4.jpg">
    <img src="picture/design_3_4.jpg" width="86" height="13"></td>
    <td background="picture/design_5_4.jpg">
    <img height="13" src="picture/design_5_4.jpg" width="220"></td>
    <td>
    <img src="picture/design_6_4.gif" width="27" height="13"></td>
  </tr>
  <tr>
    <td background="picture/design_2_7.gif">
    <img src="picture/design_2_7.gif" width="19" height="325"></td>
    <td vAlign="top" bgColor="#f5f5f5" colSpan="2">
    <center>
    <form name="login" action="main_bigware_58.php" method="post">
    <input type="hidden" value="1" name="abgeschickt">
      <table cellSpacing="0" cellPadding="2" width="280" border="0">
        <tr>
          <td class="login_heading" vAlign="top">&nbsp;</td>
        </tr>
        <tr>
          <td vAlign="top" align="middle" height="100%">
          <table height="100%" cellSpacing="0" cellPadding="1" bgColor="#666666" border="0">
            <tr>
              <td>
              <table height="100%" cellSpacing="3" cellPadding="2" width="100%" bgColor="#f0f0ff" border="0">
                <tr>
                  <td colSpan="2">
                  <img height="10" alt src="picture/tranparentes.gif" width="100%" border="0"></td>
                </tr>
	<?php
	  if ($_POST['abgeschickt'] == '1') {
	    $info_message = '<font color="#FF0000">Sie müssen, bevor Sie sich einloggen können, den Lizenzbestimmungen zustimmen</font>';
	  }
	  if (isset($info_message)) {
	?>
	                                    <tr>
	                                      <td colspan="2" class="smallText" align="center"><?php echo $info_message; ?></td>
	                                    </tr>
	<?php
	  }
	?>
                <tr>
                  <td class="smallText" colspan="2">
                  <b><?php echo TEXT_ACCORDANCE ?></b></td>
                </tr>
                <tr>
                  <td class="smallText">
                  <img src="picture/Gesetze.gif" width="50" height="51"></td>
                  <td class="smallText"><?php echo TEXT_LICENSE ?><br>
                  <textarea rows="15" name="S1" cols="80">
<?php echo TEXT_LICENSE_AGREEMENT ?>

                  
                  
                  </textarea></td>
                </tr>
                <tr>
                  <td class="smallText" vAlign="top" align="right" colSpan="2">
                  <input type="checkbox" name="lizenzbestimmung" value="ON"><?php echo TEXT_CONFIRMATION ?><br><br>
                  <input title=" Submit " type="image" alt="Submit" src="lang_this/de/picture/buttons/button_confirm.gif" border="0" width="100" height="14"></td>
                </tr>
              </table>
              </td>
            </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td vAlign="top" align="right"><span class="sub">&nbsp;</span> </td>
        </tr>
      </table>
    </form>
    </center></td>
    <td background="picture/design_6_7.gif">
    <img src="picture/design_6_7.gif" width="27" height="325"></td>
  </tr>
  <tr>
    <td>
    <img src="picture/design_2_8.gif" width="19" height="18"></td>
    <td dir="ltr" background="picture/design_4_8.gif" colSpan="2">
    <img src="picture/design_4_8.gif" width="230" height="18"></td>
    <td>
    <img src="picture/design_6_8.gif" width="27" height="18"></td>
  </tr>
</table>
</center>
</body>
</html>
<?php 
}
?>