<?php
#############################################################
# Project:      bCounter                                    #
# File:         nav.php                                     #
# Decription:   bCounter navigation
#                                                           #
# Copyright (c) Alexander Bondar (http://bondar.de/)        #
#############################################################
?>
<div id="nav">
<ul>
<?php
    if ( strpos( $_SERVER["SCRIPT_NAME"], "install.php" ) == false ) {
        if ( $bCounterUser->is_signed_in() ) {
            echo '<li><a href="./"';
            switch ( $strLoad ){
                case 'stats':
                case 'details_browsers_all':
                case 'details_404':
                case 'details_hosts':
                case 'details_keywords':
                case 'details_libs':
                case 'details_os':
                case 'details_pages':
                case 'details_referer_all':
                case 'details_regions_humans':
                case 'details_regions_other':
                case 'details_searchengines':
                case 'details_searchengines_bots':
                case 'show_referer':
                case 'show_browser':
                    echo ' class="current"';
                    break;
            }
            echo'>Statistiken</a></li>';

            echo '<li><a href="./?load=visits_humans"';
            if ( $strLoad == "visits_humans" || $strLoad == "show_visit_human"  )
                echo ' class="current"';
            echo'>Menschen</a></li>';

            echo '<li><a href="./?load=visits_all"';
            switch ( $strLoad ){
                case 'visits_other':

                case 'visits_all':
                case 'visits_bots':
                case 'visits_libs':
                case 'visits_spam':
                case 'visits_undetermined':
                case 'visits_fakes':
                case 'show_visit':
                case 'show_visit_undetermined':
                case 'show_visit_fake':
                case 'show_visit_spam':
                case 'show_visit_lib':
                case 'show_visit_bot':
                    echo ' class="current"';
                    break;
            }
            echo'>Alle Besucher</a></li>';

            echo '<li><a href="./?load=weeks"';
            if ( $strLoad == "weeks" )
                echo ' class="current"';
            echo'>Wochenstatistiken</a></li>';

            echo '<li><a href="./?load=logfile"';
            if ( $strLoad == "logfile" )
                echo ' class="current"';
            echo'>Logfile</a></li>';

            echo '<li><a href="./?load=admin"';
            if ( $strLoad == "admin" || $strLoad == "admin_phpinfo" )
                echo ' class="current"';
            echo'>Administration</a></li>';

            echo '<li class="logout">
<form action="'.$_SERVER["REQUEST_URI"].'" method="post">
<input type="hidden" name="user-logout" value="logout" />
<p><input type="submit" value="Ausloggen" /></p>
</form>
</li>';

            switch ( $strLoad ){
                case 'visits_other':

                case 'visits_all':
                case 'visits_bots':
                case 'visits_libs':
                case 'visits_spam':
                case 'visits_undetermined':
                case 'visits_fakes':
                case 'show_visit':
                case 'show_visit_undetermined':
                case 'show_visit_fake':
                case 'show_visit_spam':
                case 'show_visit_lib':
                case 'show_visit_bot':
                    $strDivNav2 .= '<ul>';
                    $strDivNav2 .= '<li><a class="info">Kategorien:</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=visits_all"';
                    if ( $strLoad == "visits_all" || $strLoad == "show_visit" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>&Uuml;bersicht</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=visits_bots"';
                    if ( $strLoad == "visits_bots" || $strLoad == "show_visit_bot" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Suchroboter</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=visits_libs"';
                    if ( $strLoad == "visits_libs" || $strLoad == "show_visit_lib" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Programme</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=visits_spam"';
                    if ( $strLoad == "visits_spam" || $strLoad == "show_visit_spam" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Spambots</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=visits_fakes"';
                    if ( $strLoad == "visits_fakes" || $strLoad == "show_visit_fake" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Fakes</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=visits_undetermined"';
                    if ( $strLoad == "visits_undetermined" || $strLoad == "show_visit_undetermined" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Uneindeutige Kennungen</a></li>';

                    $strDivNav2 .= '</ul>';
                    break;
                case 'stats':
                case 'details_browsers_all':
                case 'details_404':
                case 'details_hosts':
                case 'details_keywords':
                case 'details_libs':
                case 'details_os':
                case 'details_pages':
                case 'details_referer_all':
                case 'details_regions_humans':
                case 'details_regions_other':
                case 'details_searchengines':
                case 'details_searchengines_bots':
                case 'show_referer':
                case 'show_browser':
                    $strDivNav2 .= '<ul>';
                    $strDivNav2 .= '<li><a class="info">Besucher:</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_browsers_all"';
                    if ( $strLoad == "details_browsers_all" || $strLoad == "show_browser" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Browser</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_os"';
                    if ( $strLoad == "details_os" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Betriebssysteme</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_pages"';
                    if ( $strLoad == "details_pages" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Seiten</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_regions_humans"';
                    if ( $strLoad == "details_regions_humans" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Herkunft Besucher</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_hosts"';
                    if ( $strLoad == "details_hosts" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Hosts</a></li>';

                    $strDivNav2 .= '</ul>'."\n".'';
                    $strDivNav2 .= '<div class="clear"></div>'."\n";



                    $strDivNav2 .= '<ul>';
                    $strDivNav2 .= '<li><a class="info">SEO:</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_keywords"';
                    if ( $strLoad == "details_keywords" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Suchbegriffe</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_searchengines"';
                    if ( $strLoad == "details_searchengines" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Suchmaschinen</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_searchengines_bots"';
                    if ( $strLoad == "details_searchengines_bots" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Einzelne Bots</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_referer_all"';
                    if ( $strLoad == "details_referer_all" || $strLoad == "show_referer" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Verweisende Domains</a></li>';

                    $strDivNav2 .= '</ul>'."\n".'';
                    $strDivNav2 .= '<div class="clear"></div>'."\n";



                    $strDivNav2 .= '<ul>';
                    $strDivNav2 .= '<li><a class="info">Sonstiges:</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_404"';
                    if ( $strLoad == "details_404" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>404-Anfragen</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_libs"';
                    if ( $strLoad == "details_libs" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Programme</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=details_regions_other"';
                    if ( $strLoad == "details_regions_other" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>Herkunft Sonstige</a></li>';


                    $strDivNav2 .= '</ul>'."\n".'';
                    $strDivNav2 .= '<div class="clear"></div>'."\n";

                    break;

                case 'admin':
                case 'admin_phpinfo':
                    $strDivNav2 .= '<ul>';

                    $strDivNav2 .= '<li><a href="./?load=admin"';
                    if ( $strLoad == "admin" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>&Uuml;bersicht</a></li>';

                    $strDivNav2 .= '<li><a href="./?load=admin_phpinfo"';
                    if ( $strLoad == "admin_phpinfo" )
                        $strDivNav2 .= ' class="current"';
                    $strDivNav2 .= '>PHP Info</a></li>';

                    $strDivNav2 .= '</ul>'."\n".'';
                    $strDivNav2 .= '<div class="clear"></div>'."\n";
                    break;
                default:
                    break;
            }
        }
    }else{
        echo '<li><a href="install.php"';
        if ( $strLoad == "step1" )
            echo ' class="current"';
        echo'>Schritt 1: &Uuml;berblick</a></li>';

        echo '<li><a href="install.php"';
        if ( $strLoad == "step2" )
            echo ' class="current"';
        echo'>Schritt 2: Installation durchf&uuml;hren</a></li>';
    }
?>
</ul>
</div>