Пример #1
0
if (!isset($member) || substr($_SERVER['PHP_SELF'], -11) != "console.php") {
    exit;
} else {
    $memberInfo = $member->get_info();
    $consoleObj->select($_GET['cID']);
    if (!$member->hasAccess($consoleObj)) {
        exit;
    }
}
include_once $prevFolder . "classes/squad.php";
$cID = $_GET['cID'];
$squadObj = new Squad($mysqli);
$counter = 0;
$dispSquadNames = "";
$arrSquads = $member->getSquadList();
if ($squadObj->getManageAllStatus()) {
    $arrSquads = array();
    $result = $mysqli->query("SELECT squad_id FROM " . $dbprefix . "squads ORDER BY name");
    while ($row = $result->fetch_assoc()) {
        $arrSquads[] = $row['squad_id'];
    }
}
$clickCounter = 0;
if (count($arrSquads) > 0) {
    foreach ($arrSquads as $squadID) {
        if ($squadObj->select($squadID)) {
            $intSquadMemberID = $squadObj->getSquadMemberID($memberInfo['member_id']);
            if ($squadObj->objSquadMember->select($intSquadMemberID) || $squadObj->getManageAllStatus()) {
                $squadMemberInfo = $squadObj->objSquadMember->get_info_filtered();
                if ($squadObj->objSquadRank->select($squadMemberInfo['squadrank_id']) || $squadObj->getManageAllStatus()) {
                    $squadRankInfo = $squadObj->objSquadRank->get_info_filtered();