Beispiel #1
0
$cells .= ', cm.cupmatches_accepted2 AS cupmatches_accepted2, cm.cupmatches_tree_order AS cupmatches_tree_order';
$cells .= ', cs1.cupsquads_seed AS seed1, cs1.cupsquads_autoseed AS autoseed1';
$cells .= ', cs2.cupsquads_seed AS seed2, cs2.cupsquads_autoseed AS autoseed2';
$cells .= ', cm.cupmatches_seed1 AS cupmatches_seed1, cm.cupmatches_seed2 AS cupmatches_seed2';
$cells .= ', cm.cupmatches_score1 AS cupmatches_score1, cm.cupmatches_score2 AS cupmatches_score2';
$cells .= ', cm.cupmatches_match AS cupmatches_match, cm.cupmatches_nextmatch AS cupmatches_nextmatch';
$cells .= ', cm.cupmatches_id AS cupmatches_id';
$where = 'cm.cups_id = ' . $cups_id . ' AND cm.cupmatches_loserbracket = 0 AND cm.cupmatches_round = ';
$cupmatches = array();
for ($i = 1; $i <= $rounds; $i++) {
    $temp = cs_sql_select(__FILE__, $tables, $cells, $where . $i, 'cm.cupmatches_tree_order ASC', 0, 0);
    $run = 0;
    if (count($temp)) {
        foreach ($temp as $match) {
            $match['team1_name'] = cs_cups_team($cs_lang, $cup['cups_system'], $match['team1_id'], $match['team1_name'], $match['autoseed1'], $match['seed1'], true, true);
            $match['team2_name'] = cs_cups_team($cs_lang, $cup['cups_system'], $match['team2_id'], $match['team2_name'], $match['autoseed2'], $match['seed2'], true, true);
            $cupmatches[$i][$run++] = $match;
        }
    }
}
if (count($cupmatches) == 0) {
    echo $cs_lang['no_matches'];
    return;
}
// Calc-Defs
$count_matches = $cup['cups_teams'];
$lb = '';
include 'mods/cups/viewtree_head.php';
$round = 0;
$run = 0;
$match_run = 0;
Beispiel #2
0
                        if ($matchl['squad1_id'] != CS_CUPS_TEAM_BYE) {
                            $data['cups'][$run]['third'][0] = array('name' => cs_cups_team($cs_lang, $cup['cups_system'], $matchl['squad1_id'], $matchl['team1_name'], 1, 9999, true));
                        }
                    } else {
                        if ($matchl['squad2_id'] != CS_CUPS_TEAM_BYE) {
                            $data['cups'][$run]['third'][0] = array('name' => cs_cups_team($cs_lang, $cup['cups_system'], $matchl['squad2_id'], $matchl['team2_name'], 1, 9999, true));
                        }
                    }
                    break;
            }
            if ($matchw['cupmatches_winner'] == $matchw['squad1_id']) {
                $data['cups'][$run]['winner'] = cs_cups_team($cs_lang, $cup['cups_system'], $matchw['squad1_id'], $matchw['team1_name'], 1, 9999, true);
                $data['cups'][$run]['second'] = cs_cups_team($cs_lang, $cup['cups_system'], $matchw['squad2_id'], $matchw['team2_name'], 1, 9999, true);
            } else {
                $data['cups'][$run]['winner'] = cs_cups_team($cs_lang, $cup['cups_system'], $matchw['squad2_id'], $matchw['team2_name'], 1, 9999, true);
                $data['cups'][$run]['second'] = cs_cups_team($cs_lang, $cup['cups_system'], $matchw['squad1_id'], $matchw['team1_name'], 1, 9999, true);
            }
        } else {
            $data['cups'][$run]['if']['open'] = true;
        }
        $run++;
    }
} else {
    $data['if']['hascups'] = false;
    $data['count']['all'] = 0;
}
$cachedata = cs_subtemplate(__FILE__, $data, 'cups', 'halloffame');
if (function_exists('cs_datacache_load')) {
    cs_datacache_create('cups', 'halloffame', $key, $cachedata, 0);
}
echo $cachedata;