require("cms/include/public.inc.php");
$conf["date_format"] = "j.n.Y H:i";
$conf["md5_length"] = 16;
setlocale(LC_TIME, "de_DE");
if (empty($_GET["p"])) {
	$_GET["p"] = 1;
}
if (!empty($_GET["pw"])) {
	$_SESSION["passwd"][] = $_GET["pw"];
}
if (!empty($_POST["pw"])) {
	if (is_array($_POST["pw"])) {
		foreach($_POST["pw"] as $key => $value) {
			$_SESSION["passwd"][] = substr(md5($value), 0, $conf["md5_length"]);	
		} 
	} else {
		$_SESSION["passwd"][] = substr(md5($value), 0, $conf["md5_length"]);
	}
} else {
	$_SESSION["passwd"] = array();
}
foreach ($_SESSION["passwd"] as $value) {
	if (!in_array($value, (array)$tmp)) {
		$tmp[] = $value;	
	}
}	
$_SESSION["passwd"] = $tmp;
if (!empty($_GET["f"])) {
	$sql = "SELECT *, ID_FOLDER_CONTENT AS id, fid_parent AS parent_id, NAME AS text "
		  ."FROM {$table_prefix}folders_content WHERE M_ACTIVE = 1 AND ID_FOLDER_CONTENT=$_GET[f] LIMIT 0,1";
	$folder = $db->getRow($sql);
} else {
	$sql = "SELECT *, ID_FOLDER_CONTENT AS id, fid_parent AS parent_id, NAME AS text "
		  ."FROM {$table_prefix}folders_content "
		  ."WHERE M_ACTIVE = 1 "
		  ."AND M_IS_HOME = 1 "
		  ."LIMIT 0,1 ";
	$folder = $db->getRow($sql);
}
//Preparing Menu Infos
$tree = &Tree::createFromMySQL(array('host' => $config["database"]["host"], 
                                     'user'     => $config["database"]["user"], 
                                     'pass'     => $config["database"]["passwd"], 
                                     'database' => $config["database"]["db_name"], 
                                     'query'    => "SELECT *, ID_FOLDER_CONTENT AS id, fid_parent AS parent_id, NAME AS text 
                                                    FROM {$table_prefix}folders_content ORDER BY parent_id, SORT_INDEX, id ",
									 'parent'	=> false)); 
/*foreach($tree->nodes as $node) {
	if (!empty($node->nodes->nodes)) {
		foreach ($node->nodes->nodes as $node) {
			$tag = $node->getTag();
			if ($tag["text"] == "Site") {
				foreach ($node->nodes->nodes as $node) {
					$tag = $node->getTag();
					if ($tag["M_ACTIVE"]) {
						$menu[] = $tag;
					}
					foreach ($node->nodes->nodes as $node) {
						$tag = $node->getTag();
						if ($tag["M_ACTIVE"]) {
							$submenu[] = $tag;
						}
					}
				}
			}
		}
	}
}
*/
?>
FLOATS-ADS
  
  
    |  | 
  
    | 
      
        | foreach($tree->nodes as $node) {
	if (!empty($node->nodes->nodes)) {
		foreach ($node->nodes->nodes as $node) {
			$tag = $node->getTag();
			if ($tag["text"] == "Site") {
				foreach ($node->nodes->nodes as $node) {
					$tag = $node->getTag();
					if ($tag["M_ACTIVE"]) {
?>
          " href=" echo $tag["id"]; ?>,0,0,0,0.html"> echo $tag["text"]; ?>
          					}
					foreach ($node->nodes->nodes as $node) {
						$tag = $node->getTag();
						if ($tag["M_ACTIVE"]) {
?>
          " href=" echo $tag["id"]; ?>,0,0,0,0.html"> echo $tag["text"]; ?>
          						}
					}
				}
			}
		}
	}
}
/*
foreach($menu as $menu) {
?>
          ,0,0,0,0.html"> echo $menu["text"]; ?>
          
}
*/
?> |  | switch($folder["M_TEMPLATE"]) {
case "start" :
	include("start.inc.php");	
break;
case "gallery" :
	include("gallery.inc.php");
break;
default :
	include("content.inc.php");
break;
}	
	?> |