Beispiel #1
0
    $Select = "SELECT EvCode FROM Events " . "WHERE EvTournament=" . StrSafe_DB($_SESSION['TourId']) . " AND EvElim" . $i . ">0 AND EvE" . $i . "ShootOff=1 ";
    $Rs = safe_r_sql($Select);
    if ($Rs && safe_num_rows($Rs) > 0) {
        $ElimEvent[$i] = safe_num_rows($Rs);
    }
}
list($asc, ) = ExportASC();
/*
 * preparo il vettore con i file che non sono pdf
 * Mentre lo faccio inizializzo il vettore per ciclare tra i pdf
 */
$pdfFiles = array($ToCode . '_report.pdf' => dirname(__FILE__) . '/FinalReport/PDFReport.php', $ToCode . '.pdf' => dirname(dirname(__FILE__)) . '/Qualification/PrnIndividual.php', $ToCode . '_team.pdf' => dirname(dirname(__FILE__)) . '/Qualification/PrnTeam.php');
$Tour = array();
$Tour[$ToCode . '.ianseo'] = gzcompress(serialize(export_tournament($_SESSION['TourId'], false)));
$Tour[$ToCode . '.asc'] = $asc;
$Tour[$ToCode . '.lst'] = ExportLSTInd();
$Tour[$ToCode . '_team.lst'] = ExportLSTTeam();
if ($ElimEvent[1] > 0 || $ElimEvent[2] > 0) {
    //$Tour[$ToCode . '_elim.pdf'] = URLWrapper($CFG->ROOT_DIR .'Elimination/PrnIndividual.php?Lang=' . SelectLanguage(). '&TourId=' . $_SESSION['TourId'] . '&ToFitarco=ignored&Dest=S');
    $pdfFiles[$ToCode . '_elim.pdf'] = dirname(dirname(__FILE__)) . '/Elimination/PrnIndividual.php';
}
if ($FinEventInd > 0) {
    $Tour[$ToCode . '_rank.lst'] = ExportLSTFinInd();
    //$Tour[$ToCode . '_rank.pdf'] = URLWrapper( $CFG->ROOT_DIR . 'Final/Individual/PrnRanking.php?Lang=' . SelectLanguage(). '&TourId=' . $_SESSION['TourId'] . '&ToFitarco=ignored&Dest=S');
    //$Tour[$ToCode . '_grid.pdf'] = URLWrapper( $CFG->ROOT_DIR . 'Final/Individual/PrnBracket.php?Lang=' . SelectLanguage(). '&TourId=' . $_SESSION['TourId'] . '&ToFitarco=ignored&Dest=S');
    $pdfFiles[$ToCode . '_abs.pdf'] = dirname(dirname(__FILE__)) . '/Qualification/PrnIndividualAbs.php';
    $pdfFiles[$ToCode . '_rank.pdf'] = dirname(dirname(__FILE__)) . '/Final/Individual/PrnRanking.php';
    $pdfFiles[$ToCode . '_grid.pdf'] = dirname(dirname(__FILE__)) . '/Final/Individual/PrnBracket.php';
}
if ($FinEventTeam > 0) {
    $Tour[$ToCode . '_rank_team.lst'] = ExportLSTFinTeam();
Beispiel #2
0
<?php

require_once dirname(dirname(__FILE__)) . '/config.php';
require_once 'Common/Fun_FormatText.inc.php';
require_once 'Fun_Qualification.local.inc.php';
if (!CheckTourSession()) {
    print get_text('CrackError');
    exit;
}
$ToCode = '';
$Select = "SELECT ToCode " . "FROM Tournament " . "WHERE ToId=" . StrSafe_DB($_SESSION['TourId']) . " ";
$Rs = safe_r_sql($Select);
if (safe_num_rows($Rs) == 1) {
    $row = safe_fetch($Rs);
    $ToCode = $row->ToCode;
}
$StrData = ExportLSTInd();
if (!isset($_REQUEST['ToFitarco'])) {
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Content-Disposition: attachment; filename=' . ($ToCode != '' ? $ToCode : 'exportlst') . '.lst');
    header('Content-type: text/tab-separated-values');
    print $StrData;
} else {
    $fp = fopen($_REQUEST['ToFitarco'], 'w');
    fputs($fp, $StrData);
    fclose($fp);
}