Home | ';
$search='Search | ';
$display_all = 'Display All | ';
$now_and_next= 'Now & Next | ';
$admin_login='Admin Login | ';
$logout='Logout | ';
$adminArea='Admin Area | ';
//Start a session and then check if session variable access is set to granted, if yes then set variable menu to 1 else set it to 0
function sessionCheck()
{
global $menu;
session_start();
if ($_SESSION["access"] == "granted")
{
$menu=1;
}
else
{
$menu=0;
}
}
//Function for displaying the menu links. If $menu equals 0 then display a link to the login page else display admin links
function menuType()
{
global $menu, $home, $search, $display_all, $admin_login, $logout, $adminArea, $now_and_next;
echo $home;
echo $now_and_next;
echo $search;
if($menu==0)
{
echo $admin_login;
}
else
{
echo $adminArea;
echo $logout;
}
}
?>