Exemplo n.º 1
0
$EventArray = array();
$listCodes = array();
//$Select = "SELECT HeEventCode FROM HhtEvents WHERE HeHhtId=". StrSafe_DB($_REQUEST['Id']) . " AND HeTournament=" . StrSafe_DB($_SESSION['TourId']);
$Select = "SELECT HeEventCode,HeHhtId FROM HhtEvents WHERE HeTournament=" . StrSafe_DB($_SESSION['TourId']);
$Rs = safe_r_sql($Select);
while ($MyRow = safe_fetch($Rs)) {
    //$EventArray[] = $MyRow->HeEventCode;
    $EventArray[$MyRow->HeEventCode] = $MyRow->HeHhtId;
}
// Get the Session Names
$SesNames = array();
$q = safe_r_sql("select * from Session where Sestype='Q' and SesTournament={$_SESSION['TourId']}");
while ($r = safe_fetch($q)) {
    $SesNames[$r->SesOrder] = $r->SesName ? $r->SesName : get_text('QualSession', 'HTT') . ' ' . $r->SesOrder;
}
$RowTour = RowTour();
for ($i = 1; $i <= $RowTour->ToNumSession; $i++) {
    $tmpCode = phaseEncode(-1, $i, 1);
    echo '<tr id="row_' . $tmpCode . '">';
    echo '<td class="Center">';
    if (array_key_exists($tmpCode, $EventArray) && $EventArray[$tmpCode] != $_REQUEST['Id']) {
        echo "&nbsp;";
    } else {
        echo '<input type="checkbox" name="eventList" value="' . $tmpCode . '" id="chk_' . $tmpCode . '" ' . (array_key_exists($tmpCode, $EventArray) ? 'checked' : '') . ' onClick="saveHhtEvent(\'' . $tmpCode . '\')"></td>';
    }
    echo '</td>';
    echo '<td colspan="2">' . $SesNames[$i] . '</td>';
    echo '</tr>';
    $listCodes[] = StrSafe_DB($tmpCode);
}
// Finali
Exemplo n.º 2
0
//($_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];
Exemplo n.º 3
0
?>
</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";
Exemplo n.º 4
0
$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">&nbsp;' . get_text('ScoreFilled') . '<br>';
echo '<input name="IncEmpty" type="checkbox" value="1">&nbsp;' . get_text('ScoreIncEmpty') . '<br>';
echo '<input name="ScoreFlags" type="checkbox" value="1">&nbsp;' . get_text('ScoreFlags', 'Tournament') . '<br>';
if (module_exists("Barcodes")) {
    echo '<input name="Barcode" type="checkbox" checked value="1">&nbsp;' . get_text('ScoreBarcode', 'Tournament') . '<br>';
}
foreach (AvailableApis() as $Api) {
    if (empty($_SESSION[$Api . '-Mode'])) {
        continue;
    }
    echo '<input name="QRCode[]" type="checkbox" checked value="' . $Api . '" >&nbsp;' . get_text($Api . '-QRCode', 'Api') . '<br>';
}
echo '</td>';
Exemplo n.º 5
0
//($_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];
Exemplo n.º 6
0
                            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>
Exemplo n.º 7
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">&nbsp;' . get_text('ScoreFilled') . '<br>';
echo '<input name="IncEmpty" type="checkbox" value="1">&nbsp;' . get_text('ScoreIncEmpty') . '<br>';
echo '<input name="ScoreFlags" type="checkbox" value="1">&nbsp;' . get_text('ScoreFlags', 'Tournament') . '<br>';
if (module_exists("Barcodes")) {
    echo '<input name="Barcode" type="checkbox" checked value="1">&nbsp;' . get_text('ScoreBarcode', 'Tournament') . '<br>';
}
foreach (AvailableApis() as $Api) {
    if (empty($_SESSION[$Api . '-Mode'])) {
        continue;
    }
    echo '<input name="QRCode[]" type="checkbox" checked value="' . $Api . '" >&nbsp;' . get_text($Api . '-QRCode', 'Api') . '<br>';
}
echo '</td>';
Exemplo n.º 8
0
?>
</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";