<?php
	
	session_start();

	// Hauptkonfigurationsdatei
	include_once("../../conf/config.inc.php");
	include_once(DATEIPFAD . "conf/db.inc.php");
	if(KUNDENGRUPPEN) {
		include_once(DATEIPFAD . "includes/functions.mod.kundengruppen.inc.php");
	} else {
		include_once(DATEIPFAD . "includes/functions.kundengruppen.inc.php");
	}
	include_once(DATEIPFAD . "includes/functions.artikel.inc.php");
	include_once(DATEIPFAD . "includes/functions.rabattstaffeln.inc.php");
	include_once(DATEIPFAD . "includes/functions.versandart.inc.php");
	include_once(DATEIPFAD . "includes/functions.zahlungsart.inc.php");
	include_once(DATEIPFAD . "includes/functions.kunden.inc.php");
	include_once(DATEIPFAD . "includes/functions.mail.inc.php");
	include_once(DATEIPFAD . "includes/functions.shopeinstellung.inc.php");
	include_once(DATEIPFAD . "includes/functions.warenkorb.inc.php");
	include_once(DATEIPFAD . "includes/functions.land.inc.php");
	include_once(DATEIPFAD . "includes/functions.waehrung.inc.php");
	include_once(DATEIPFAD . "includes/functions.kategorie.inc.php");
	if(RECHNUNGSWESEN) {
		include_once(DATEIPFAD . "includes/functions.mod.bestellungen.inc.php");
	} else {
		include_once(DATEIPFAD . "includes/functions.bestellungen.inc.php");
	}
	if(ARTIKELDOWNLOAD) {
		include_once(DATEIPFAD . "includes/functions.mod.download.inc.php");
	}
	include_once(DATEIPFAD . "includes/functions.global.inc.php");
	include_once(DATEIPFAD . "includes/crypt.inc.php");

	// Spracheninclude
	if (@fopen(DATEIPFAD . "includes/language/langu_" . $_SESSION["langu"] . ".inc.php",r)) {
		include_once(DATEIPFAD . "includes/language/langu_" . $_SESSION["langu"] . ".inc.php");
	} else {
		include_once(DATEIPFAD . "includes/language/langu_de.inc.php");
	}	

	// Bestellung erfolgreich
	if ($_GET["pn"] == 1) {
	
		// Ruecksprung im Opener aktivieren
		$JavaScriptString = "<script language=\"javascript\">";
		$JavaScriptString .= "opener.location.href = '" . URLPFAD_SSL . "themes/bestellen/index.php?formaction=s3&pn=1&agb=1'";
		$JavaScriptString .= "</script>";
		
		// Text setzen
		$tpl_paypal_meldung = $s_be_sofortueberweisung_erfolgreich;
		
	} else {
		
		// Ruecksprung im Opener aktivieren
		$JavaScriptString = "<script language=\"javascript\">";
		$JavaScriptString .= "opener.location.href = '" . URLPFAD_SSL . "themes/bestellen/index.php?formaction=s2'";
		$JavaScriptString .= "</script>";
		
		// Text setzen
		$tpl_paypal_meldung = $s_be_sofortueberweisung_probleme;
		
	} 
	
	include_once(DATEIPFAD . "includes/header.inc.php");

?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $_SESSION["languageisocode"]?>" xml:lang="<?php echo $_SESSION["languageisocode"]?>">
	<head>
		<?php echo $HeadTitle?>
		<?php echo $HeadDescription?>
		<?php echo $HeadKeywords?>
		<?php echo $HeadAuthor?>
		<?php echo $HeadCopy?>
		<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET?>" />
		<meta name="publisher-email" content="info@dierandgruppe.com" />
		<meta name="identifier-url" content="http://www.randshop.com" />
		<link rel="stylesheet" type="text/css" href="<?php echo URLPFAD?>css/layout_allgemein.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo URLPFAD?>css/rahmenlayout.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo URLPFAD?>css/contentlayout.css" />
		<script language="JavaScript" type="text/javascript" src="<?php echo URLPFAD?>js_function/global.js"></script>
		<?php echo $JavaScriptString?>
</head>
<body>

		
<div id="wrapper">

<div id="eyecatcher"></div>
<div id="eyecatcher2"></div>


	
	<div id="branding">
		<div class="logoPosition">
			<a href="<?php echo URLPFAD;?>index.php"><?php echo $logoImage?></a>
		</div>
	</div>
	



	<div id="content">
		<div id="mainContent">
			<?php echo $tpl_paypal_meldung?>
		</div>
		
	</div>	
	
</div>	
		
		
</body>
</html>