<?
//  Copyright (c) 2004-2005 randshop
//  http://www.randshop.com
//
//  Unter Lizenz von randshop
//	
//	Letzte Bearbeitung: 25.01.2005


session_start();

// Hauptkonfigurationsdatei
include_once("../../config.inc.php");
include_once(DATEIPFAD . "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.kategorie.inc.php");
//Sessionregister
include_once(DATEIPFAD . "includes/session_register.inc.php");
include_once(DATEIPFAD . "includes/global.inc.php");
include_once(DATEIPFAD . "includes/global_off.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");
}	

if($katId == "")
{
	$_SESSION['kat'] = "";
}

// Header
include(DATEIPFAD . "includes/header.inc.php");



if(((int)$_GET["id"]) && ($action != "konto") && ($action != "update"))
{
$abfrage = "SELECT * FROM " . TABLE_NAVI . " where id = ". (int)$_GET["id"];
$ergebnis = mysql_query($abfrage);
$row = mysql_fetch_object($ergebnis);

	$tpl_topHeadline = $row->headline;
	if($row->bigImage != "")
	{
		if(file_exists("../../images/dbimages/" . $row->bigImage))
		{
			$imageSize = getimagesize("../../images/dbimages/" . $row->bigImage);
			$tpl_topImage =  "<img src=\"../../images/dbimages/" . $row->bigImage . "\" width=\"" . $imageSize[0] . "\" height=\"" . $imageSize[1] . "\" border=\"0\" align=\"left\">\n";
		}
	}
	$tpl_topEintrag = nl2br(stripslashes($row->textEintrag)) . "\n";
	
	$contentFile = DATEIPFAD . "templates/" . $rowTemp->name . "/topnavi.tpl";
} else {
	$contentFile = DATEIPFAD . "templates/" . $rowTemp->name . "/kein_inhalt.tpl";
}
	
	
// Letzte globale Zusammenfassung z.B. fuer Warenkorbanzeige, bevor das Template geladen wird.
include(DATEIPFAD . "includes/footer.inc.php");


// Template
include(DATEIPFAD . "templates/" . $rowTemp->name . "/index.tpl");
	
@mysql_close($db);
?>
