Meine navigation sieht man jetzt, funzt aber nicht, es kommt sofort eine Error 404
Mein index.php Seite
PHP-Code:
<?php
error_reporting (E_ALL);
//****Was ich definieren muss*********
if (!defined ('NL')) {
define ('NL', "\n");
}
//************************************
//******Eingefügtes**************
require 'includes/head.php';
require 'includes/navi.php';
require 'includes/footer.php';
//************************************
//******Css und Javascript Zeugs daß eingefügt werden muß******
$title = 'FUNERARIUM';
$my_css_arr = array ('css/main_style.css', 'css/header.css', 'css/navi.css','css/view.css','css/index.css',
'css/footer.css','css/ie.css', 'css/ie6.css');
$my_js_arr = array ('js/main.js', 'js/swfobject.js');
//************************************
//********Head*******
$head = Bhead ($title, $my_css_arr, $my_js_arr);
print $head;
//************************************
//********Navi*******
$level_1 = !empty($_GET['l1']) ? $_GET['l1'] : 'index';
$level_2 = !empty($_GET['l2']) ? $_GET['l2'] : '';
$navi = BNavi ($topic_arr, $level_1, $level_2);
//************************************
//********Footer*******
$footer = footer ();
//************************************
//****Waat een am Content geseit***********
$allowed_files = array('news','biography','releases','up','demo','valley','nocthule','reviews','pictures',
'pic_members','pic_2003','pic_valley','pic_2006','pic_nocthule','contact','order');
$file_path = in_array($level_1,$allowed_files)
&& is_file('contents/' . $level_1 . '.php')
?'contents/'.$level_1.'.php':'contents/index.php';
ob_start();
include ($file_path);
$contents = ob_get_contents();
ob_end_clean();
print <<<END
<body>
<div id="main">
<div id="header">
</div>
<div id="navi">
$navi
</div>
<div id="view">
$contents
</div>
<div id="footer">
$footer
</div>
</div>
</body>
</html>
END;
?>
Meine Navi.php Seite
PHP-Code:
<?php
error_reporting (E_ALL);
//****Was ich definieren muss*********
if (!defined ('NL')) {
define ('NL', "\n");
}
define ('VIRTUAL_ROOT','');
//************************************
//******Eingefügtes**************
require 'includes/navi_topics.php';
//************************************
//*****Navigation***********
function BNavi ($topic_arr, $level_1, $level_2){
$navi = '<ul id="' . 'top_navi">' . NL;
foreach($topic_arr as $key => $value_arr){
$sub_navi = '';
if(!empty($value_arr['items'])) {
$sub_navi .= NL . ' <ul class="sub_navi">' . NL;
foreach($value_arr['items'] as $sub_key => $sub_value_arr) {
if($sub_key != $level_2) {
$open = '<a href="' . VIRTUAL_ROOT . '/index.php?l1=' . $value_arr['id']
. $sub_value_arr['id'] . '"' . '>';
$close = ' </a>';
}
else {
$open = '<span>';
$close = ' </span>';
}
$sub_navi .= ' <li>' . $open . $sub_value_arr['navi'] . $close . '</li>' . NL;
}
$sub_navi .= ' </ul>' . NL . '';
}
if($key != $level_1) {
$open = '<a href="' . VIRTUAL_ROOT . '/index.php?l1=' . $value_arr['id']
. $value_arr['id'] . '"' . '>';
$close = ' </a>';
}
else {
$open = '<span>';
$close = ' </span>';
}
$navi .= ' <li>' . $open . $value_arr['navi'] . $close . $sub_navi . '</li>' . NL;
}
$navi .= '</ul>' . NL;
return $navi;
}
?>
So ich hoffe ihr könnt mir helfen. Das wäre Super
Mfg
Sandy