<?php require_once 'Common/Fun_Sessions.inc.php'; require_once 'Common/Fun_FormatText.inc.php'; $Select = "SELECT EnCode as Bib, EnName AS Name, SesName, " . " PhPhoto, EnId, " . " upper(EnFirstName) AS FirstName, SUBSTRING(AtTargetNo,1,1) AS Session," . " SUBSTRING(AtTargetNo,2) AS TargetNo," . " CoCode AS NationCode, CoName AS Nation, EnClass AS ClassCode," . " EnDivision AS DivCode, EnAgeClass as AgeClass," . " EnSubClass as SubClass, EnStatus as Status " . "FROM AvailableTarget at " . "LEFT JOIN (SELECT EnTournament, QuTargetNo, EnId, EnCode, EnName, EnFirstName, CoCode, CoName, " . "EnClass, EnDivision, EnAgeClass, EnSubClass, EnStatus, EnIndClEvent, EnTeamClEvent, EnIndFEvent, EnTeamFEvent " . "FROM Qualifications AS q " . "INNER JOIN Entries AS e ON q.QuId=e.EnId AND e.EnTournament= " . StrSafe_DB($TourId) . " AND EnAthlete=1 " . "INNER JOIN Countries AS c ON e.EnCountry=c.CoId AND e.EnTournament=c.CoTournament" . ") as Sq ON at.AtTargetNo=Sq.QuTargetNo " . "LEFT JOIN Session on SUBSTRING(AtTargetNo,1,1) = SesOrder and EnTournament=SesTournament and SesType='Q' " . "LEFT JOIN Photos on EnId=PhEnId " . "WHERE" . " AtTournament = " . StrSafe_DB($TourId) . " AND EnCode IS NOT NULL " . ($TVsettings->TVPSession ? " AND SUBSTRING(AtTargetNo,1,1)= " . StrSafe_DB($TVsettings->TVPSession) . " " : "") . "ORDER BY AtTargetNo, CoCode, Name, CoName, FirstName "; $Rs = safe_r_sql($Select); //print $Select;exit; $oldTarget = 'x'; $tab = array(); $oldSession = 0; $Ath4Target = 0; //$fotow=min(200,intval($_SESSION['WINHEIGHT']/6)*4/3); // redefined later include_once 'Common/CheckPictures.php'; CheckPictures($TourCode); while ($MyRow = safe_fetch($Rs)) { if ($tab and ($oldTarget != intval($MyRow->TargetNo) or !isset($ret[$MyRow->Session]))) { // cambio di paglione o di turno, scarico le righe $tmpRow = ''; foreach ($tab as $row => $cols) { $tmpRow .= '<tr valign="' . ($row == 0 ? 'middle' : 'top') . '"' . ($row < 2 ? ' align="center"' : '') . '>'; foreach ($cols as $col) { if ($col) { $tmpRow .= '<td align="center">' . $col . '</td>'; } else { $tmpRow .= '<td> </td>'; } } $tmpRow .= '</tr>'; } $tmpRow .= '<tr style="height:2px;"><th colspan="' . $NumCol . '"></th></tr>'; $ret[$oldSession]['basso'] .= $tmpRow;
case 'image/jpg': case 'image/jpeg': $imgJPG = $_FILES['JPG']['tmp_name'][$edit]; break; default: debug_svela($_FILES['JPG']); cd_redirect('Countries.php#' . $edit); } $Image = addslashes(base64_encode(file_get_contents($imgJPG))); safe_w_sql("insert into Flags set FlCode='{$edit}', FlJPG='{$Image}', FlTournament={$_SESSION['TourId']} " . " on duplicate key update FlJPG='{$Image}'"); unlink($imgJPG); } cd_redirect('Countries.php#' . $edit); } require_once 'Common/CheckPictures.php'; CheckPictures(); $PAGE_TITLE = get_text('TourCountries', 'Tournament'); include 'Common/Templates/head.php'; echo '<form method="POST" ENCTYPE="multipart/form-data">'; echo '<table class="Tabella">'; echo '<tr>'; echo '<td colspan="4">'; echo '<a href="../Final/Team/PrnName.php?TeamLabel=1" target="_blank">' . get_text('TeamPlace', 'Tournament') . '</a>'; echo ' <a href="../Final/Team/PrnName.php?TeamLabel=1&local=1" target="_blank">' . get_text('TeamPlaceLocal', 'Tournament') . '</a>'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<th class="Title" width="15%" nowrap="nowrap">' . get_text('Country') . '</th>'; echo '<th class="Title">' . get_text('Nation') . '</th>'; echo '<th class="Title">' . get_text('SVGFile', 'Tournament') . '</th>'; echo '<th class="Title">' . get_text('Image', 'Tournament') . '</th>';
<?php require_once './config.php'; require_once 'Common/Fun_FormatText.inc.php'; require_once 'Common/Lib/ArrTargets.inc.php'; require_once 'Common/Fun_Phases.inc.php'; //require_once('Common/Fun_Phases.inc.php'); // checks and creates the necessary flags/pictures require_once 'Common/CheckPictures.php'; CheckPictures($TourCodeSafe); require_once 'Common/Lib/Obj_RankFactory.php'; require_once 'Common/Lib/CommonLib.php'; $Ind = array(); $Team = array(); $AbsInd = array(); $AbsTeam = array(); $Awards = array(); $RaiseFlag = 0; // finds out what is to be served! $MyQuery = "select * from BoinxSchedule where (BsType like 'Awa\\_%') and BsTournament={$TourId} " . "ORDER BY" . " BsType"; $Rs = safe_r_sql($MyQuery); while ($MyRow = safe_fetch($Rs)) { $tmp = explode('_', $MyRow->BsType); if ($tmp[1] == 'Ind') { $Ind[] = $tmp[2] . $tmp[3]; } elseif ($tmp[1] == 'Team') { $Team[] = $tmp[2] . $tmp[3]; } elseif ($tmp[1] == 'Abs') { $AbsInd[] = $tmp[2]; } elseif ($tmp[1] == 'AbsTeam') { $AbsTeam[] = $tmp[2];
$ViewAthls = (in_array('ATHL', $Columns) or in_array('ALL', $Columns)); $ViewByes = (in_array('BYE', $Columns) or in_array('ALL', $Columns)); $ViewFlags = (in_array('FLAG', $Columns) or in_array('ALL', $Columns)); $TotalColWidth = 7; foreach ($Columns as $sub) { if (substr($sub, 0, 5) == 'WIDTH') { $TotalColWidth = substr($sub, 6); } } //$View10s=(in_array('10', $Columns) or in_array('ALL', $Columns)); if ($TVsettings->TVPViewIdCard) { // opponents view with picture // check the pictures $fotow = min(200, intval($_SESSION['WINHEIGHT'] / 6) * 4 / 3, intval($_SESSION['WINWIDTH'] / 7)); include_once 'Common/CheckPictures.php'; CheckPictures($TourId); // do the job $NumCol = 4; foreach ($rankData['sections'] as $IdEvent => $section) { $colspan = $section['meta']['maxTeamPerson']; $SumCol = round(100 / ($colspan * 2), 0); $cols = ''; foreach (range(1, $colspan * 2) as $w) { $cols .= '<col width="' . $SumCol . '%"></col>'; } foreach ($section['phases'] as $IdPhase => $phase) { // Titolo della tabella $tmp = '<tr><th class="Title" colspan="' . $colspan * 2 . '">'; $tmp .= $section['meta']['eventName'] . " - " . $phase['meta']['phaseName']; $tmp .= '</th></tr>' . "\n"; $ret["{$IdEvent} - {$IdPhase}"]['head'] = $tmp;
$IncludePicture = !empty($_REQUEST['sticker_Picture']); $IncludeBarCode = !empty($_REQUEST['sticker_BarCode']); $Unit = $_REQUEST['sticker_Unit']; $MarTop = $_REQUEST['sticker_Top']; $MarLeftRight = $_REQUEST['sticker_Side']; $MarBottom = $_REQUEST['sticker_Bot']; $StickRows = $_REQUEST['sticker_Y']; $StickCols = $_REQUEST['sticker_X']; $ColIntMargin = $_REQUEST['sticker_InterCols']; $RowIntMargin = $_REQUEST['sticker_InterRows']; $PaperHeight = $_REQUEST['sticker_PageHeight']; $PaperWidth = $_REQUEST['sticker_PageWidth']; $pdf = new LabelPDF(); if ($IncludePicture) { include_once 'Common/CheckPictures.php'; CheckPictures('', true, false, true); // cancella le foto più vecchie di 1 giorno // prints all the pictures in the size specified... $MySQL = "select" . " PhEnId, concat(CoCode, ' (', EnCode, '-', EnFirstName, ')') code " . "from" . " Photos" . " inner join Entries on EnId=PhEnId " . " inner join Countries on EnCountry=CoId " . " left join Qualifications on EnId=QuId " . "where" . " EnTournament={$_SESSION['TourId']} " . (isset($_REQUEST["Session"]) && is_numeric($_REQUEST["Session"]) ? " AND SUBSTRING(QuTargetNo,1,1) = " . StrSafe_DB($_REQUEST["Session"]) . " " : '') . " and PhPhoto>'' order by code"; $q = safe_r_sql($MySQL); $pdf->addpage(); $NumCols = floor(($PaperWidth - 2 * $MarLeftRight) / max(1, $StickCols)); $HGap = ($PaperWidth - 2 * $MarLeftRight - $NumCols * $StickCols) / ($NumCols - 1); $NumRows = floor(($PaperHeight - $MarTop - $MarTop) / max(1, $StickRows + 3)); $VGap = ($PaperHeight - $MarTop - $MarTop - $NumRows * ($StickRows + 3)) / ($NumRows - 1); $X = $MarLeftRight; $Y = $MarTop; $pdf->SetFontSize(7); error_reporting(E_ALL); while ($r = safe_fetch($q)) { if (!is_file($file = $CFG->DOCUMENT_PATH . 'TV/Photos/' . $_SESSION['TourCodeSafe'] . '-En-' . $r->PhEnId . '.jpg')) {
<?php require_once './config.php'; require_once 'Common/Fun_FormatText.inc.php'; require_once 'Common/Fun_Sessions.inc.php'; if (!CheckTourSession()) { print get_text('CrackError'); exit; } if (!empty($_REQUEST['redraw'])) { include_once 'Common/CheckPictures.php'; CheckPictures('', true, false, !empty($_REQUEST['force'])); // cancella le foto più vecchie di 1 giorno } $PAGE_TITLE = get_text('TourMainInfo', 'Tournament'); include 'Common/Templates/head.php'; $MyRow = NULL; /*$Select = "SELECT ToId,ToType,ToCode,ToName,ToCommitee,ToComDescr,ToWhere,DATE_FORMAT(ToWhenFrom,'" . get_text('DateFmtDB') . "') AS DtFrom,DATE_FORMAT(ToWhenTo,'" . get_text('DateFmtDB') . "') AS DtTo, " . "DATE_FORMAT(ToWhenFrom,'%d') AS DtFromDay,DATE_FORMAT(ToWhenFrom,'%m') AS DtFromMonth,DATE_FORMAT(ToWhenFrom,'%Y') AS DtFromYear, " . "DATE_FORMAT(ToWhenTo,'%d') AS DtToDay,DATE_FORMAT(ToWhenTo,'%m') AS DtToMonth,DATE_FORMAT(ToWhenTo,'%Y') AS DtToYear, " . "ToNumSession, ToTar4Session1, ToTar4Session2,ToTar4Session3,ToTar4Session4,ToTar4Session5,ToTar4Session6,ToTar4Session7,ToTar4Session8,ToTar4Session9, " . "ToAth4Target1,ToAth4Target2,ToAth4Target3,ToAth4Target4,ToAth4Target5,ToAth4Target6,ToAth4Target7,ToAth4Target8, ToAth4Target9, " . "TtName,TtNumDist " . "FROM Tournament LEFT JOIN Tournament*Type ON ToType=TtId " . "WHERE ToId=" . StrSafe_DB($_SESSION['TourId']) . " ";*/ /*$Select = "SELECT ToId,ToType,ToCode,ToName,ToCommitee,ToComDescr,ToWhere,DATE_FORMAT(ToWhenFrom,'" . get_text('DateFmtDB') . "') AS DtFrom,DATE_FORMAT(ToWhenTo,'" . get_text('DateFmtDB') . "') AS DtTo, " . "DATE_FORMAT(ToWhenFrom,'%d') AS DtFromDay,DATE_FORMAT(ToWhenFrom,'%m') AS DtFromMonth,DATE_FORMAT(ToWhenFrom,'%Y') AS DtFromYear, " . "DATE_FORMAT(ToWhenTo,'%d') AS DtToDay,DATE_FORMAT(ToWhenTo,'%m') AS DtToMonth,DATE_FORMAT(ToWhenTo,'%Y') AS DtToYear, " . "ToNumSession, ToTar4Session1, ToTar4Session2,ToTar4Session3,ToTar4Session4,ToTar4Session5,ToTar4Session6,ToTar4Session7,ToTar4Session8,ToTar4Session9, "