コード例 #1
0
ファイル: index.php プロジェクト: rythos42/naflm
// Logout?
if ($_VISSTATE['POST_OUT'] = isset($_GET['logout'])) {
    $_GET['section'] = 'main';
    # Redirect logged out users to the main page.
    Coach::logout();
}
Mobile::setIsMobile($isMobile);
if ($isMobile && !Coach::isLoggedIn()) {
    // Redirect logged out mobile users to login
    $_GET['section'] = 'login';
}
if ($_VISSTATE['COOCKIE'] || $_VISSTATE['POST_IN'] || $_VISSTATE['POST_OUT']) {
    setupGlobalVars(T_SETUP_GLOBAL_VARS__POST_COACH_LOGINOUT);
}
if (Mobile::isMobile()) {
    HTMLOUT::mobile_frame_begin(isset($_SESSION['logged_in']) ? $coach->settings['theme'] : $settings['stylesheet']);
    # Make page frame, banner and menu.
    MTS('Header loaded, login auth, html frame generated');
    // Check if a menu-link was picked, and execute section code from sections.php accordingly.
    switch ($_GET['section']) {
        case 'login':
            sec_login();
            break;
        case 'matches':
            Match_HTMLOUT::userSched();
            break;
        case 'management':
            $teamId = Mobile_HTMLOUT::getSelectedTeamId();
            Team_HTMLOUT::teamManagementBox($teamId);
            break;
        default:
コード例 #2
0
ファイル: index.php プロジェクト: TheNAF/naflm
        $databaseVersion = SQLUpgrade::getCurrentDatabaseVersion();
        $fromVersion = $databaseVersion ? $databaseVersion : '075-080';
        // set to earliest auto-upgrade version by default
        if (!$databaseVersion || $fromVersion < $db_version) {
            echo '<div class="messagecontainer lightgreen">';
            if (!$databaseVersion) {
                echo '<div>Your database version cannot be determined. Your system will run <strong>all</strong> automatic upgrades.</div>';
            }
            echo '<div>Your database will now be upgraded to version ' . $db_version . '.</div>';
            upgrade_database_to_version($db_version, $fromVersion);
            echo '</div>';
        }
    }
}
if (Mobile::isMobile()) {
    HTMLOUT::mobile_frame_begin();
    # Make page frame, banner and menu.
    MTS('Header loaded, login auth, html frame generated');
    // Check if a menu-link was picked, and execute section code from sections.php accordingly.
    switch ($_GET['section']) {
        case 'login':
            sec_login();
            break;
        case 'matches':
            Match_HTMLOUT::userSched();
            break;
        case 'management':
            $teamId = Mobile_HTMLOUT::getSelectedTeamId();
            Team_HTMLOUT::teamManagementBox($teamId);
            break;
        default: