コード例 #1
0
ファイル: Rot_qual_cat.php プロジェクト: brian-nelson/ianseo
<?php

require_once 'Common/Lib/Obj_RankFactory.php';
require_once 'Common/Fun_FormatText.inc.php';
$TourType = getTournamentType($TourId);
$TVsettings->EventFilter = MakeEventFilter($TVsettings->TVPEventInd);
$options = array('tournament' => $RULE->TVRTournament);
$options['dist'] = 0;
if (isset($TVsettings->TVPEventInd) && !empty($TVsettings->TVPEventInd)) {
    $options['events'] = explode('|', $TVsettings->TVPEventInd);
}
if (isset($TVsettings->TVPNumRows) && $TVsettings->TVPNumRows > 0) {
    $options['cutRank'] = $TVsettings->TVPNumRows;
}
if (isset($TVsettings->TVPSession) && $TVsettings->TVPSession > 0) {
    $options['session'] = $TVsettings->TVPSession;
}
if (!empty($_REQUEST['SubClass']) and !preg_match('/[^a-zA-Z0-9.-]/', $_REQUEST['SubClass'])) {
    $options['SubClass'] = $_REQUEST['SubClass'];
}
$Columns = isset($TVsettings->TVPColumns) && !empty($TVsettings->TVPColumns) ? explode('|', $TVsettings->TVPColumns) : array();
$ViewTeams = ((in_array('TEAM', $Columns) or in_array('ALL', $Columns)) and $TourType != 14);
$ViewDists = ((in_array('DIST', $Columns) or in_array('ALL', $Columns)) and $TVsettings->TVPViewPartials);
$View10s = ((in_array('10', $Columns) or in_array('ALL', $Columns)) and $TourType != 14);
$ViewX9s = (in_array('X9', $Columns) or in_array('ALL', $Columns));
$comparedTo = preg_grep('/^COMP:/', $Columns);
if (!empty($comparedTo)) {
    list(, $comparedTo) = explode(":", reset($comparedTo));
}
$options['comparedTo'] = $comparedTo;
$rank = Obj_RankFactory::create('SubClass', $options);
コード例 #2
0
ファイル: Rot_qual_t.php プロジェクト: brian-nelson/ianseo
<?php

require_once 'Common/Lib/Obj_RankFactory.php';
$TVsettings->EventFilter = MakeEventFilter($TVsettings->TVPEventTeam);
$options = array('tournament' => $RULE->TVRTournament);
$options['dist'] = 0;
if (isset($TVsettings->TVPEventTeam) && !empty($TVsettings->TVPEventTeam)) {
    $options['events'] = explode('|', $TVsettings->TVPEventTeam);
}
if (isset($TVsettings->TVPNumRows) && $TVsettings->TVPNumRows > 0) {
    $options['cutRank'] = $TVsettings->TVPNumRows;
}
if (isset($TVsettings->TVPSession) && $TVsettings->TVPSession > 0) {
    $options['session'] = $TVsettings->TVPSession;
}
$rank = Obj_RankFactory::create('DivClassTeam', $options);
$rank->read();
$rankData = $rank->getData();
if (count($rankData['sections']) == 0) {
    return '';
}
$Columns = isset($TVsettings->TVPColumns) && !empty($TVsettings->TVPColumns) ? explode('|', $TVsettings->TVPColumns) : array();
$ViewAths = (in_array('ATHL', $Columns) or in_array('ALL', $Columns));
$View10s = (in_array('10', $Columns) or in_array('ALL', $Columns));
$ViewX9s = (in_array('X9', $Columns) or in_array('ALL', $Columns));
$NumCol = 3 + $ViewAths + $View10s + $ViewX9s;
foreach ($rankData['sections'] as $IdEvent => $data) {
    // Titolo della tabella
    $tmp = '<tr><th class="Title" colspan="' . $NumCol . '">';
    $tmp .= $Arr_Pages[$TVsettings->TVPPage];
    $tmp .= '</th></tr>' . "\n";