Exemplo n.º 1
0
Arquivo: ajax.php Projeto: nopuls/dzcp
require_once basePath . "/inc/menu-functions/shout.php";
require_once basePath . "/inc/menu-functions/teamspeak.php";
require_once basePath . "/inc/menu-functions/kalender.php";
require_once basePath . "/inc/menu-functions/team.php";
## SETTINGS ##
$time_start = generatetime();
lang($language);
$dir = "sites";
## SECTIONS ##
if (!isset($_GET['i'])) {
    $action = "";
} else {
    $action = $_GET['i'];
}
switch ($action) {
    case 'kalender':
        echo kalender($_GET['month'], $_GET['year']);
        break;
    case 'teams':
        echo team($_GET['tID']);
        break;
    case 'server':
        echo '<table class="hperc" cellspacing="0">' . server($_GET['serverID']) . '</table>';
        break;
    case 'shoutbox':
        echo '<table class="hperc" cellspacing="1">' . shout(1) . '</table>';
        break;
    case 'teamspeak':
        echo '<table class="hperc" cellspacing="0">' . teamspeak(1) . '</table>';
        break;
}
Exemplo n.º 2
0
    if (count($clanwars)) {
        echo kal_make_wars($clanwars, true);
    }
    if (count($birth)) {
        echo kal_make_birthday($birth, true);
    }
    if (count($news)) {
        echo kal_make_news($news, true);
    }
    if (count($events)) {
        echo kal_make_events($events, true);
    }
    $content = ob_get_contents();
    ob_end_clean();
    main_content(CALENDAR, $content, '', 1);
}
if (isset($_SESSION['rights']['public']['calendar']['view']) or isset($_SESSION['rights']['superadmin'])) {
    if (isset($_GET['action'])) {
        switch ($_GET['action']) {
            case 'viewday':
                calendar_view_day((int) $_GET['tag'], (int) $_GET['month'], (int) $_GET['year']);
                break;
            default:
                kalender();
        }
    } else {
        kalender();
    }
} else {
    table(ACCESS_DENIED, NO_ACCESS_RIGHTS);
}