Didn't work:
//
// Generate the "navigator" that appears at the top of every page
//
function generate_navlinks()
{
global $pun_config, $lang_common, $cookie, $cur_user;
// Home and Userlist should always be displayed
$links[] = '<a href="index.php">'.$lang_common['Home'].'</a> | <a href="userlist.php">'.$lang_common['User list'].'</a> | <a href="downloads/index.php">'.$lang_common['Downloads'].'</a>';
if ($pun_config['o_rules'] == '1')
$links[] = '<a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';
if ($cookie['is_guest'])
{
if ($pun_config['o_search'] == '1' && $pun_config['p_guests_search'] == '1')
$links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<a href="register.php">'.$lang_common['Register'].'</a> | <a href="login.php">'.$lang_common['Login'].'</a>';
$info = $lang_common['Not logged in'];
}
else
{
if ($cur_user['status'] < PUN_MOD)
{
if ($pun_config['o_search'] == '1')
$links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<a href="profile.php?id='.$cur_user['id'].'">'.$lang_common['Profile'].'</a>';
$links[] = '<a href="login.php?action=out">'.$lang_common['Logout'].'</a>';
}
else
{
$links[] = '<a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<a href="profile.php?id='.$cur_user['id'].'">'.$lang_common['Profile'].'</a>';
$links[] = '<a href="admin_index.php">'.$lang_common['Admin'].'</a>';
$links[] = '<a href="login.php?action=out">'.$lang_common['Logout'].'</a>';
}
}
return implode(' | ', $links);
}