<?php

/**
 * 
 * Copyright (C) Die Randgruppe GmbH
 * 
 * http://www.randshop.com
 * http://www.dierandgruppe.com
 * 
 * Unter der Lizenz von Die Randgruppe GmbH:
 * http://www.randshop.com/Lizenz
 *  
 * $Author$
 * $Date$
 * $Revision$
 * 
 */

header("HTTP/1.0 404 Not Found"); 

session_start();

// Hauptkonfigurationsdatei
include_once("../../conf/config.inc.php");
include_once(DATEIPFAD . "conf/db.inc.php");
include_once(DATEIPFAD . "includes/shopinitialize.inc.php");
include_once(DATEIPFAD . "includes/functions.global.inc.php");
include_once(DATEIPFAD . "includes/functions.artikel.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.kategorie.inc.php");
include_once(DATEIPFAD . "includes/session_register.inc.php");
include_once(DATEIPFAD . "includes/functions.newsletter.inc.php");
include_once(DATEIPFAD . "includes/functions.news.inc.php");

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

// Header
include_once(DATEIPFAD . "includes/header.inc.php");
	
// Letzte globale Zusammenfassung z.B. fuer Warenkorbanzeige, bevor das Template geladen wird.
include_once(DATEIPFAD . "includes/footer.inc.php");


$EinstellungenFehlerseite = GetEinstellungen('', 'fehlerseite', '', $_SESSION['languageid']);

$tpl_fehler_404_headline = $EinstellungenFehlerseite->fehlerseite->fehler_404_headline;
$tpl_fehler_404_text = $EinstellungenFehlerseite->fehlerseite->fehler_404_text;

// Template
$contentFile = DATEIPFAD . "templates/" . $rowTemp->name . "/website/error/error_404.tpl";

// Template	
// Template
if($mobilestyle) {
    include_once(DATEIPFAD . "templates/" . $rowTemp->name . "/mobile/layout.phtml");
} else {
    include_once(DATEIPFAD . "templates/" . $rowTemp->name . "/website/index.tpl");
}
	
@mysql_close($db);
