Exemplo n.º 1
0
<?php

include "../config.php";
include "../include/common.php";
include "../include/db_connect.php";
include "../include/session.php";
include "../include/chk.php";
include "../include/apply_submit.php";
if (isset($_SESSION['root'])) {
    $mismatches = false;
    if (isset($_REQUEST['club_id'])) {
        if (isset($_REQUEST['act'])) {
            checkMismatchedApplications($_REQUEST['club_id'], true);
            $mismatches = array("Errors should be fixed. Click <a href=\"check_mismatch.php?club_id=" . $_REQUEST['club_id'] . "\">here</a> to refresh.");
        } else {
            $mismatches = checkMismatchedApplications($_REQUEST['club_id']);
        }
    }
    $clubInfo = listClubs();
    get_page_advanced("check_mismatch", "root", array('mismatches' => $mismatches, 'clubInfo' => $clubInfo));
} else {
    header('Location: index.php');
}
Exemplo n.º 2
0
<?php

include "include/common.php";
include "config.php";
include "include/db_connect.php";
include "include/session.php";
include "include/apply_submit.php";
if (isset($_REQUEST['id'])) {
    $clubInfo = clubInfo($_REQUEST['id']);
    get_page('affclubs_info', array('clubInfo' => $clubInfo));
} else {
    $clubList = listClubs(true);
    get_page('affclubs', array('clubList' => $clubList));
}
Exemplo n.º 3
0
    } else {
        $subrankTitle = $ranksList[$rank]['subranks'][$subrank]['name'];
    }
}
if ($customFormatFunction) {
    $formatFunction = $customFormatFunction;
} else {
    $formatFunction = "formatOLCScore";
}
if ($customRankHeader) {
    $rankHeader = $customRankHeader;
} else {
    $rankHeader = _OLC_TOTAL_SCORE;
}
if ($listClubs) {
    listClubs($subrankTitle, $rankHeader, "score", "score", $formatFunction);
} else {
    listCategory($subrankTitle, $rankHeader, "score", "score", $formatFunction);
}
?>
</div>
<?php 
function listCategory($legend, $header, $category, $key, $formatFunction = "")
{
    global $pilots;
    global $Theme, $countries;
    global $moduleRelPath;
    global $CONF_compItemsPerPage;
    global $page_num, $pagesNum, $startNum, $itemsNum;
    global $op, $cat;
    global $countHowMany;
Exemplo n.º 4
0
        $club_data = clubInfo($_REQUEST['club']);
        $club_name = $club_data[0];
        if ($_REQUEST['mode'] == "apply") {
            $result = startApplication($_SESSION['user_id'], $_REQUEST['club']);
            if ($result == 0) {
                $inform["success"] = "Started application for {$club_name}!";
            } else {
                if ($result == -1) {
                    $inform["warn"] = "You have already started the application for {$club_name}";
                } else {
                    if ($result == -2) {
                        $inform["error"] = "This club does not exist!";
                    } else {
                        if ($result == -3) {
                            $inform["error"] = "{$club_name} is not open yet! Try again after the open date!";
                        } else {
                            $inform["error"] = "Internal error!";
                        }
                    }
                }
            }
        } else {
            addSubscription($_SESSION['user_id'], $_REQUEST['club']);
            $inform["success"] = "Subscribed to {$club_name}! You will now recieve messages from {$club_name}";
        }
    }
    $clubList = listClubs();
    get_page_advanced("addclub", "apply", array("clubs" => $clubList, "inform" => $inform));
} else {
    get_page_advanced("message", "apply", array("title" => "Not Logged In", "message" => "You cannot access the application because you are not logged in. Please <a href=\"../login.php\">login first</a>."));
}