(GPLv2)
or write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA02110-1301, USA.
********************************************************************************/
if (stristr(htmlentities($_SERVER['PHP_SELF']), "block_navigator.php")) {
die("
Error: This file cannot be opened directly! |
");
}
global $dblink,$siteConfig,$userid;
$myrank = myRank();
echo "\n";
$nav_res = $dblink->get_list("SELECT * FROM memht_navigator ORDER BY position");
foreach ($nav_res as $nav_row) {
$type = intval($nav_row['type']);
$content = outCode($nav_row['content']);
$html = outCode($nav_row['html']);
$icon = outCode($nav_row['icon']);
//===TYPE===
//0 = Page
//1 = Manual link "url|name|target"
//2 = Spacer
//3 = HR line
//4 = HTML
//5 = Title
//6 = MyPage
if ($icon!="") { $icon = " "; }
switch($type) {
case 0:
$mtitle = "";
if ($pag = $dblink->get_row("SELECT titolo FROM memht_pagine WHERE nome='$content' AND enabled=1 AND rank<=$myrank")) {
$mtitle = outCode($pag['titolo']);
} else {
$pag = $dblink->get_row("SELECT title FROM memht_virtualpages WHERE name='$content' AND enabled=1 AND rank<=$myrank");
$mtitle = outCode($pag['title']);
}
echo ($mtitle!="") ? "" : "" ;
break;
case 1:
$link = explode("|",$content);
if (!eregi("http://",$link[0])) { $link[0] = "http://".$link[0]; }
if (isset($link[2])) {
echo "";
} else {
echo "";
}
break;
case 2:
echo "$icon
";
break;
case 3:
echo "
";
break;
case 4:
echo "$html
";
break;
case 5:
echo "$icon$content
";
break;
case 6:
$row = $dblink->get_row("SELECT id,title FROM memht_mypage WHERE id=$content");
$mtitle = outCode($row['title']);
echo "";
break;
}
}
if (isAuth($userid,3)) {
?>
" : "";
echo (isset($_COOKIE['hideadminmenu'])) ? "" : "" ;
}
?>