Location: PHPKode > projects > OpenBnet > OpenBnet_1.0_final/includes/cp.php
<?
// +----------------------------------------------------------------------+
// | OpenBnet  (B├╝rgernetz)                                               |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004 Joachim Seitz                                     |
// +----------------------------------------------------------------------+
// | Distributed under Artistic License                                   |
// +----------------------------------------------------------------------+

//menu user
if ($_GET['menu_close']){
   if ($_GET['menu_close']=="menu_profil") $_SESSION['menu_profil']=0;
   if ($_GET['menu_close']=="menu_firmen") $_SESSION['menu_firmen']=0;
   if ($_GET['menu_close']=="menu_verein") $_SESSION['menu_verein']=0;
}
elseif ($_GET['menu_open']){
   if ($_GET['menu_open']=="menu_profil") $_SESSION['menu_profil']=1;
   if ($_GET['menu_open']=="menu_firmen") $_SESSION['menu_firmen']=1;
   if ($_GET['menu_open']=="menu_verein") $_SESSION['menu_verein']=1;
}

if (!$_SESSION['menu_profil']){
   if ($_GET['menu_close']=="menu_profil") $_SESSION['menu_profil']=0;
}
if (!$_SESSION['menu_firmen']){
   if ($_GET['menu_close']=="menu_firmen") $_SESSION['menu_firmen']=0;
}
if (!$_SESSION['menu_verein']){
   if ($_GET['menu_close']=="menu_verein") $_SESSION['menu_verein']=0;
}
//menuser end

$tmpl = new vlibTemplate('templates/main.html');

if ($_SESSION['menu_firmen']==1) $tmpl->setVar('show_firmen', 1);
else $tmpl->setVar('show_firmen', 0);

if ($_SESSION['menu_verein']==1) $tmpl->setVar('show_verein', 1);
else $tmpl->setVar('show_verein', 0);

if ($_SESSION['menu_profil']==1) $tmpl->setVar('show_profil', 1);
else $tmpl->setVar('show_profil', 0);

if ($logged_in==0){
header('Location: index.php?page=login');
exit;
}

$queri = "SELECT * FROM $adminrechte_table WHERE werbn='$bn'";
$resuli = mysql_query($queri);
if(mysql_num_rows($resuli)) $tmpl->setVar('show_admin', 1);

$tmpl->setVar('nav', 'nav_main');
?>
Return current item: OpenBnet