Exemple #1
0
    default:
}
// Generate bookmark
$vars = array();
foreach ($BookmarkVars as $var) {
    $_varpath = explode('/', $var);
    if (count($_varpath) == 2) {
        $vars[] = array_key_exists($_varpath[0], $_SESSION) && array_key_exists($_varpath[1], $_SESSION[$_varpath[0]]) ? $_SESSION[$_varpath[0]][$_varpath[1]] : '-';
    } else {
        $vars[] = array_key_exists($var, $_SESSION) ? $_SESSION[$var] : '-';
    }
}
ReportLog("New Bookmark: " . implode('|', $vars));
$_SESSION['bookmark'] = urlencode(base64_encode(implode('|', $vars)));
SendHeader(1);
navigator();
ShowMessages();
// Debugging
ob_start();
echo "Please: Enable debug prints in nfsen.php script manually (line 820)";
/*
print "_SESSION 1:\n";
print_r($_SESSION);
print "_POST:\n";
print_r($_POST);
print "_GET:\n";
print_r($_GET);
print "_COOKIE:\n";
print_r($_COOKIE);
*/
ReportLog(ob_get_contents());
function navigator($c, $parent, $arr = NULL)
{
    if (!$arr) {
        $arr = array();
    }
    if ($parent == 0) {
        return array_reverse($arr);
    }
    $row = _menuIdOrAlias($c, $parent);
    $arr[] = array('id' => $row['id'], 'name' => $row['name'], 'parent' => $row['parent']);
    $arr = navigator($c, $row['parent'], $arr);
    return $arr;
}