Esempio n. 1
0
function menu($action)
{
    global $menu_arr;
    // Debugging - Fenster �ffnen
    if ($_SESSION['debugging'] === true) {
        debug_open_window();
        debug_var('Seite: ', $_SERVER['PHP_SELF']);
        debug_var('Action: ', $_REQUEST);
        debug_msg('Debugging ist aktiv');
        debug_finish();
        $message = 'Debugging: aktiv!';
    }
    $html = '';
    $html .= '<h2>Menu</h2>' . "\n";
    $html .= '<ul>' . "\n";
    if (in_array($GLOBALS['CMS']['MENU01'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'NAVIGA') . '"><a href="#" onclick="javascript:start_form(\'naviga\');">' . $GLOBALS['CMS']['MENU01'] . '</a></li>' . "\n";
    }
    if (in_array($GLOBALS['CMS']['MENU02'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'SEITEN') . '"><a href="#" onclick="javascript:start_form(\'seiten\');">' . $GLOBALS['CMS']['MENU02'] . '</a></li>' . "\n";
    }
    if (in_array($GLOBALS['CMS']['MENU11'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'FRGMNT') . '"><a href="#" onclick="javascript:start_form(\'frgmnt\');">' . $GLOBALS['CMS']['MENU11'] . '</a></li>' . "\n";
    }
    if (in_array($GLOBALS['CMS']['MENU12'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'ADDONS') . '"><a href="#" onclick="javascript:start_form(\'addons\');">' . $GLOBALS['CMS']['MENU12'] . '</a></li>' . "\n";
    }
    if (in_array($GLOBALS['CMS']['MENU03'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'MEDIEN') . '"><a href="#" onclick="javascript:start_form(\'medien\');">' . $GLOBALS['CMS']['MENU03'] . '</a></li>' . "\n";
    }
    if (in_array($GLOBALS['CMS']['MENU10'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'CONFIG') . '"><a href="#" onclick="javascript:start_form(\'config\');">' . $GLOBALS['CMS']['MENU10'] . '</a></li>' . "\n";
    }
    if (in_array($GLOBALS['CMS']['MENU06'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'XLINKS') . '"><a href="#" onclick="javascript:start_form(\'xlinks\');">' . $GLOBALS['CMS']['MENU06'] . '</a></li>' . "\n";
    }
    if (in_array($GLOBALS['CMS']['MENU07'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'BACKUP') . '"><a href="#" onclick="javascript:start_form(\'backup\');">' . $GLOBALS['CMS']['MENU07'] . '</a></li>' . "\n";
    }
    if (in_array($GLOBALS['CMS']['MENU08'], $menu_arr)) {
        $html .= '<li class="' . set_class($action, 'DOKU') . '"><a href="#" onclick="javascript:start_form(\'docu\');">' . $GLOBALS['CMS']['MENU08'] . '</a></li>' . "\n";
    }
    $html .= '<li class="even">' . "\n";
    $html .= '<p><font color="#00CC00">' . $GLOBALS['TEXTE']['ANGEMELDET'] . ' ' . $_SESSION['username'] . '</font><br />' . "\n";
    if ($message != '') {
        $html .= $message;
    }
    $html .= '</p>' . "\n";
    $html .= '</li>' . "\n";
    $html .= '<li class="even"><a href="#" onclick="javascript:start_form(\'logout\');">' . $GLOBALS['CMS']['MENU09'] . '</a></li>' . "\n";
    $html .= '</ul>' . "\n";
    return $html;
}
Esempio n. 2
0
require_once FUNKTION . 'erzeuge_code.php';
/* Script fuer Google Analytics erstellen, falls ein GA-Konto gefunden wurde */
$ga_script = $cfg->google_analytics(GOOGLE_ANALYTICS);
// Test für den Einsatz von FirePHP
//ob_start();
/*
require_once('FirePHPCore/FirePHP.class.php');
$firephp = FirePHP::getInstance(true);
$var = array('i'=>10, 'j'=>20);
$firephp->setEnabled(true);
*/
//$firephp->log($action, 'Action');
//$firephp->log($_SESSION['debugging'], 'Debugging');
//ob_end_flush();
// Debugging kann aktiviert werden, indem &debug=1 an die URL angehängt wird.
require_once FUNKTION . 'debug.php';
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == 1) {
    $_SESSION['debugging'] = true;
}
// Debugging deaktivieren
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == 0) {
    $_SESSION['debugging'] = false;
}
// Debugging - Fenster öffnen
if ($_SESSION['debugging'] === true) {
    debug_var('Seite: ', $_SERVER['PHP_SELF']);
    debug_var('Action: ', $_REQUEST);
    debug_msg('Debugging ist aktiv');
    debug_finish();
    //echo 'Debugging aktiv!<br />';
}