Location: PHPKode > projects > Blogs manager > blogs/menu.php
<?php
ini_set("display_errors","1");
ini_set("display_startup_errors","1");
set_magic_quotes_runtime(0);

include("include/dbcommon.php");

if(!@$_SESSION["UserID"])
{
	header("Location: login.php");
	return;
}


include('libs/Smarty.class.php');
$smarty = new Smarty();

$conn=db_connect();
//	Before Process event
if(function_exists("BeforeProcessMenu"))
	BeforeProcessMenu($conn);


$smarty->assign("username",$_SESSION["UserID"]);
$smarty->assign("not_a_guest",$_SESSION["AccessLevel"] != ACCESS_LEVEL_GUEST);
$strPerm = GetUserPermissions("_authors");
$smarty->assign("allow__authors",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("_blogs");
$smarty->assign("allow__blogs",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("_comments");
$smarty->assign("allow__comments",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("_category");
$smarty->assign("allow__category",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("_policy");
$smarty->assign("allow__policy",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("chosen authors");
$smarty->assign("allow_chosen_authors",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("_rate");
$smarty->assign("allow__rate",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("help");
$smarty->assign("allow_help",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("_comments Report");
$smarty->assign("allow__comments_Report",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));
$strPerm = GetUserPermissions("categoriesblogs");
$smarty->assign("allow_categoriesblogs",!(strpos($strPerm, "A")===false && strpos($strPerm, "S")===false));

$templatefile="menu.htm";
if(function_exists("BeforeShowMenu"))
	BeforeShowMenu($smarty,$templatefile);

$smarty->display($templatefile);
?>
Return current item: Blogs manager