?> </th></tr> <tr><th colspan="2"><?php print get_text('FilterRules'); ?> </th></tr> <tr class="Divider"><td colspan="2"></td></tr> <tr> <th class="TitleLeft" colspan="2"><?php print get_text('ScheduledMatches', 'Tournament'); ?> </th> </tr> <tr> <td colspan="2"><?php echo ComboSes(RowTour(), 'Teams'); ?> </td> </tr> <tr> <th class="TitleLeft" colspan="2"><?php print get_text('Event'); ?> </th> </tr> <tr> <td colspan="2"> <?php $Select = "SELECT EvCode,EvEventName " . "FROM Events " . "WHERE EvTournament = " . StrSafe_DB($_SESSION['TourId']) . "\tAND EvTeamEvent='1' AND EvFinalFirstPhase!=0 " . "ORDER BY EvProgr ASC "; $Rs = safe_r_sql($Select); print '<select name="d_Event[]" id="d_Event" multiple="multiple" onChange="javascript:ChangeEvent(1);">' . "\n";
$Rs = safe_r_sql($MySql); if (safe_num_rows($Rs) > 0) { echo get_text('Event') . '<br><select name="Event[]" multiple="multiple" id="d_Event" onChange="javascript:ChangeEvent(1);" size="8">'; while ($MyRow = safe_fetch($Rs)) { echo '<option value="' . $MyRow->EvCode . '">' . $MyRow->EvCode . ' - ' . get_text($MyRow->EvEventName, '', '', true) . '</option>'; } echo '</select>'; safe_free_result($Rs); } echo '</td><td width="30%" class="Center">'; echo '<select name="Phase" id="d_Phase" size="6">'; echo '<option value="">' . get_text('AllEvents') . '</option>'; echo '</select>'; echo '</td>'; echo '</tr>'; echo '<tr><td colspan="2" class="Center">' . ComboSes(RowTour(), 'Teams') . '</td></tr>'; echo '<tr>'; echo '<td colspan="2" class="left">'; echo '<input name="ScoreFilled" type="checkbox" value="1"> ' . get_text('ScoreFilled') . '<br>'; echo '<input name="IncEmpty" type="checkbox" value="1"> ' . get_text('ScoreIncEmpty') . '<br>'; echo '<input name="ScoreFlags" type="checkbox" value="1"> ' . get_text('ScoreFlags', 'Tournament') . '<br>'; if (module_exists("Barcodes")) { echo '<input name="Barcode" type="checkbox" checked value="1"> ' . get_text('ScoreBarcode', 'Tournament') . '<br>'; } foreach (AvailableApis() as $Api) { if (empty($_SESSION[$Api . '-Mode'])) { continue; } echo '<input name="QRCode[]" type="checkbox" checked value="' . $Api . '" > ' . get_text($Api . '-QRCode', 'Api') . '<br>'; } echo '</td>';
//($_REQUEST['d_Phase']==0 ? 1 : ($_REQUEST['d_Phase']==32 ? 48 :$_REQUEST['d_Phase']*2)); $NextPhase = ''; //($_REQUEST['d_Phase']>1 ? ($_REQUEST['d_Phase']==48 ? 32 : ($_REQUEST['d_Phase']==24 ? 16 : $_REQUEST['d_Phase']/2)) : 0); $PP = $PrecPhase; $NP = $NextPhase; $Sch = 0; if (!empty($_REQUEST['d_Event'])) { foreach ($_REQUEST['d_Event'] as $key => $val) { echo '<input type="hidden" name="d_Event[]" id="d_Event_' . $key . '" value="' . $val . '">' . "\n"; } } if (!empty($_REQUEST['x_Session']) and $_REQUEST['x_Session'] != -1) { $useSession = true; echo '<input type="hidden" name="x_Session" id="x_Session" value="' . $_REQUEST['x_Session'] . '">' . "\n"; $ComboArr = array(); ComboSes(RowTour(), 'Individuals', $ComboArr); // schedule attuale $actual = array_search($_REQUEST['x_Session'], $ComboArr); /* * La precedente deve esser per forza diversa da false ma nel caso non faccio nulla */ if ($actual !== false) { // prima imposto l'inizio e la fine uguale all'attuale $PP = $ComboArr[$actual]; $NP = $ComboArr[$actual]; // poi metto a posto if ($actual != 0) { $PP = $ComboArr[$actual - 1]; } if ($actual != count($ComboArr) - 1) { $NP = $ComboArr[$actual + 1];
//($_REQUEST['d_Phase']==0 ? 1 : $_REQUEST['d_Phase']*2); $NextPhase = ''; //($_REQUEST['d_Phase']>1 ? $_REQUEST['d_Phase']/2 : 0); $PP = $PrecPhase; $NP = $NextPhase; $Sch = 0; if (!empty($_REQUEST['d_Event'])) { foreach ($_REQUEST['d_Event'] as $key => $val) { echo '<input type="hidden" name="d_Event[]" id="d_Event_' . $key . '" value="' . $val . '">' . "\n"; } } if (!empty($_REQUEST['x_Session']) and $_REQUEST['x_Session'] != -1) { echo '<input type="hidden" name="x_Session" id="x_Session" value="' . $_REQUEST['x_Session'] . '">' . "\n"; $useSession = true; $ComboArr = array(); ComboSes(RowTour(), 'Teams', $ComboArr); // schedule attuale $actual = array_search($_REQUEST['x_Session'], $ComboArr); /* * La precedente deve esser per forza diversa da false ma nel caso non faccio nulla */ if ($actual !== false) { // prima imposto l'inizio e la fine uguale all'attuale $PP = $ComboArr[$actual]; $NP = $ComboArr[$actual]; // poi metto a posto if ($actual != 0) { $PP = $ComboArr[$actual - 1]; } if ($actual != count($ComboArr) - 1) { $NP = $ComboArr[$actual + 1];
if ($v != -1) { $HTTOK[] = $v; } } } } //exit(); } } } } $JS_SCRIPT = array('<script type="text/javascript" src="../Common/Fun_JS.inc.js"></script>', '<script type="text/javascript" src="Fun_JS.js"></script>'); $PAGE_TITLE = get_text('SetupTerminals', 'HTT'); include 'Common/Templates/head.php'; $ComboHHT = ComboHHT(); $ComboSes = ComboSes(RowTour()); ?> <form name="FrmParam" method="POST" action="<?php print $_SERVER["PHP_SELF"]; ?> "> <table class="Tabella"> <?php if (!$ResponseFromHHT) { echo '<tr class="error" style="height:35px;"><td colspan="5" class="Center LetteraGrande">' . get_text('HTTNotConnected', 'HTT') . '</td></tr>'; } ?> <tr><th class="Title" colspan="5"><?php print get_text('SetupTerminals', 'HTT'); ?> </th></tr>
<?php require_once dirname(dirname(__FILE__)) . '/config.php'; CheckTourSession(true); require_once 'Common/Fun_FormatText.inc.php'; require_once 'serial.php'; require_once 'Fun_HHT.local.inc.php'; $RowTour = RowTour(); $ComboHHT = ComboHHT(); $ComboSes = ComboSes($RowTour); $LettersCode = array('A' => chr(217), 'B' => chr(218), 'C' => chr(219), 'D' => chr(220)); $HTTOK = array(); $Disable = array(); $ResponseFromHHT = true; $Command = isset($_REQUEST['Command']) ? $_REQUEST['Command'] : null; $HTTs = isset($_REQUEST['HTT']) ? $_REQUEST['HTT'] : null; $Frames = array(); if (!is_null($Command)) { if ($Command == 'OK') { if (isset($_REQUEST['x_Session']) && $_REQUEST['x_Session'] != -1 && !is_null($HTTs) && is_array($HTTs) && !is_null($RowTour)) { //Carico i vuoti (se non è una finale) if (is_numeric($_REQUEST['x_Session'])) { $Sql = "SELECT SUBSTRING(AtTargetNo,2," . TargetNoPadding . ") as ChiTarget, SUBSTRING(AtTargetNo," . (TargetNoPadding + 2) . ",1) as ChiLetter "; $Sql .= "FROM AvailableTarget at "; $Sql .= "LEFT JOIN "; $Sql .= "(SELECT QuTargetNo FROM Qualifications AS q "; $Sql .= "INNER JOIN Entries AS e ON q.QuId=e.EnId AND e.EnTournament= " . StrSafe_DB($_SESSION['TourId']) . " AND EnAthlete=1) as Sq ON at.AtTargetNo=Sq.QuTargetNo "; $Sql .= "WHERE AtTournament = " . StrSafe_DB($_SESSION['TourId']) . " AND LEFT(AtTargetNo,1)='" . $_REQUEST['x_Session'] . "' AND Sq.QuTargetNo is NULL"; $Rs = safe_r_sql($Sql); //print $Sql;exit; if (safe_num_rows($Rs) > 0) {
echo '<tr>'; //Eventi echo '<td class="Center" width="70%">'; echo get_text('Event') . '<br><select name="Event[]" id="d_Event" onChange="javascript:ChangeEvent(0);" multiple="multiple" size="10">'; echo '<option value="">' . get_text('AllEvents') . '</option>'; foreach ($Events as $Event => $EventName) { echo '<option value="' . $Event . '">' . $Event . ' - ' . get_text($EventName, '', '', true) . '</option>'; } echo '</select>'; echo '</td><td width="30%" class="Center">'; echo get_text('Phase') . '<br><select name="Phase" id="d_Phase" size="6">'; echo '<option value="">' . get_text('AllEvents') . '</option>'; echo '</select>'; echo '</td>'; echo '</tr>'; echo '<tr><td colspan="2" class="Center">' . ComboSes(RowTour(), 'Individuals') . '</td></tr>'; echo '<tr>'; echo '<td colspan="2" class="left">'; echo '<input name="ScoreFilled" type="checkbox" value="1"> ' . get_text('ScoreFilled') . '<br>'; echo '<input name="IncEmpty" type="checkbox" value="1"> ' . get_text('ScoreIncEmpty') . '<br>'; echo '<input name="ScoreFlags" type="checkbox" value="1"> ' . get_text('ScoreFlags', 'Tournament') . '<br>'; if (module_exists("Barcodes")) { echo '<input name="Barcode" type="checkbox" checked value="1"> ' . get_text('ScoreBarcode', 'Tournament') . '<br>'; } foreach (AvailableApis() as $Api) { if (empty($_SESSION[$Api . '-Mode'])) { continue; } echo '<input name="QRCode[]" type="checkbox" checked value="' . $Api . '" > ' . get_text($Api . '-QRCode', 'Api') . '<br>'; } echo '</td>';
?> </th></tr> <tr><th colspan="2"><?php print get_text('FilterRules'); ?> </th></tr> <tr class="Divider"><td colspan="2"></td></tr> <tr> <th class="TitleLeft" colspan="2"><?php print get_text('ScheduledMatches', 'Tournament'); ?> </th> </tr> <tr> <td colspan="2"><?php echo ComboSes(RowTour(), 'Individuals'); ?> </td> </tr> <tr> <th class="TitleLeft" colspan="2"><?php print get_text('Event'); ?> </th> </tr> <tr> <td colspan="2"> <?php $Select = "SELECT EvCode,EvEventName " . "FROM Events " . "WHERE EvTournament = " . StrSafe_DB($_SESSION['TourId']) . "\tAND EvTeamEvent='0' AND EvFinalFirstPhase!=0 " . "ORDER BY EvProgr ASC "; $Rs = safe_r_sql($Select); print '<select name="d_Event[]" id="d_Event" multiple="multiple" onChange="javascript:ChangeEvent(0);">' . "\n";