Location: PHPKode > projects > Skrupel User Game Administration > menu.php
<?php
define("INSTALL_DIR",dirname(__FILE__));
include (INSTALL_DIR."/include/conf.inc.php");
set_template($sugaurl,"",dirname(__FILE__),$serverurl);

include ($sugapath."/include/header.inc.php");
include ($sugapath."/include/usercheck.inc.php");

if ($_GET["fu"]==1){
        //if logged in
        if($userlogin == 1){
                $userdaten_action = 'user_daten.php?fu=1" ';
                $userdaten_target = 'target="rahmen12"';
                $userdaten_label = 'Userdaten';
                $register_action = '#';
                $register_target = '';
                $register_label = '';
                if ($skrupel_admin==1){
                        $login_action ='admin.php?fu=1';
                        $login_target = 'target="rahmen12"';
                        $login_label = 'Administration';
                }
                else{
                        $login_action = '#';
                        $login_target = '';
                        $login_label = '';
                }
        }
        else{
                $userdaten_action = '#';
                $userdaten_target = '';
                $userdaten_label = '';
                $login_action = 'login.php?fu=1';
                $login_target = 'target="rahmen12"';
                $login_label = 'Login';
                $register_action = 'register.php?fu=1';
                $register_target = 'target="rahmen12"';
                $register_label = 'Registrieren';
        }
        
        //if allowed to create
        if($create == 1){
                $create_action = 'spiel_alpha.php?fu=1';
                $create_target = 'target="rahmen12"';
                $create_label = 'Erstellen';
                $start_action = '#';
                $start_target = '';
                $start_label = '';
                $del_action = 'loeschen.php?fu=1';
                $del_target = 'target="rahmen12"';
                $del_label = 'Löschen';
        }
        else{
                $create_action = '#';
                $create_target = '';
                $create_label = '';
                $start_action = '#';
                $start_target = '';
                $start_label = '';
                $del_action = '#';
                $del_target = '';
                $del_label = '';
        }
        
        if ($skrupel_admin==1){
                $edit_action = 'spiel_beta.php?fu=1';
                $edit_target = 'target="rahmen12"';
                $edit_label = 'Bearbeiten';
        }
        else{
                $edit_action = '#';
                $edit_target = '';
                $edit_label = '';
        }
        
        if($aktiv==1){
                $play_action = 'aktiv.php?fu=2';
                $play_target = 'target="rahmen12"';
                $play_label = 'Meine Teilnahme';
        }
        else{
                $play_action = '#';
                $play_target = '';
                $play_label = '';
        }
        
        $template->assign_block_vars('menu_fu1',array('ud_action'=>$userdaten_action,
                                                      'ud_target'=>$userdaten_target,
                                                      'ud_label' =>$userdaten_label,
                                                      'create_action'=>$create_action,
                                                      'create_target'=>$create_target,
                                                      'create_label' => $create_label,
                                                      'edit_action' => $edit_action,
                                                      'edit_target' => $edit_target,
                                                      'edit_label' => $edit_label,
                                                      'start_action'=>$start_action,
                                                      'start_target'=>$start_target,
                                                      'start_label' => $start_label,
                                                      'login_action'=>$login_action,
                                                      'login_target'=>$login_target,
                                                      'login_label' => $login_label,
                                                      'play_action' => $play_action,
                                                      'play_target' => $play_target,
                                                      'play_label' => $play_label,
                                                      'register_action' => $register_action,
                                                      'register_target' => $register_target,
                                                      'register_label' => $register_label,
                                                      'del_action'=>$del_action,
                                                      'del_target'=>$del_target,
                                                      'del_label' => $del_label,
                                                       ));
}
if ($_GET["fu"]==2){
        $template->assign_block_vars('menu_fu2',array());
}

$template->pparse('xhtmlhead');
$template->pparse('sugamenu');
?>




Return current item: Skrupel User Game Administration