示例#1
0
    } 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
$Select = "SELECT DISTINCT CONCAT(FSScheduledDate,' ',FSScheduledTime) AS MyDate,FSTeamEvent " . "FROM FinSchedule " . "WHERE FSTournament=" . StrSafe_DB($_SESSION['TourId']) . " and FSScheduledDate>0 " . "ORDER BY FSTeamEvent ASC,CONCAT(FSScheduledDate,FSScheduledTime) ASC ";
$Select = 'SELECT' . ' @Phase:=ifnull(2*pow(2,truncate(log2(fsmatchno/2),0)),1) Phase' . ' , @RealPhase:=truncate(@Phase/2, 0) RealPhase' . ' , CONCAT(FSScheduledDate,\' \',FSScheduledTime) AS MyDate' . ' , DATE_FORMAT(FSScheduledDate,"' . get_text('DateFmtDBshort') . '") AS Dt ' . ' , DATE_FORMAT(FSScheduledDate,"' . get_text('DateFmtDB') . '") AS Dat ' . ' , FSTeamEvent ' . ' , FSEvent ' . ' , EvFinalFirstPhase ' . ' , FSScheduledTime ' . 'FROM' . ' `FinSchedule` fs ' . " inner join Events on FSEvent=EvCode and FSTeamEvent=EvTeamEvent and FsTournament=EvTournament " . 'where' . ' FsTournament=' . $_SESSION['TourId'] . ' and fsscheduleddate >0 ' . 'group by ' . ' FsScheduledDate, ' . ' FsScheduledTime, ' . ' FsEvent, ' . ' Phase';
$tmp = array();
$Rs = safe_r_sql($Select);
if (safe_num_rows($Rs) > 0) {
    while ($MyRow = safe_fetch($Rs)) {
        if ($tmpCode = phaseEncode($MyRow->FSTeamEvent, $MyRow->MyDate, 0)) {
            if (!in_array(StrSafe_DB($tmpCode), $listCodes)) {
                $listCodes[] = StrSafe_DB($tmpCode);
            }
            $tmp[$tmpCode]['events'][get_text(namePhase($MyRow->EvFinalFirstPhase, $MyRow->RealPhase) . '_Phase')][] = $MyRow->FSEvent;
            $tmp[$tmpCode]['date'] = $MyRow->Dt . ' ' . substr($MyRow->FSScheduledTime, 0, 5) . ' ' . ($MyRow->FSTeamEvent == 0 ? get_text('FinInd', 'HTT') : get_text('FinTeam', 'HTT'));
            //$tmp[$tmpCode]['selected']= isset($_REQUEST['x_Session']) && $_REQUEST['x_Session']==$val ? ' selected' : '';
        }
    }
    foreach ($tmp as $k => $v) {
        $val = array();
        foreach ($v['events'] as $ph => $ev) {
            $val[] = $ph . ' (' . implode('+', $ev) . ')';
        }
        //					$ComboSes.='<option value="'.$k.'"'.$v['selected'].'>'.$v['date']  . ' '. implode('; ',$val).'</option>';
        echo '<tr id="row_' . $k . '">';
示例#2
0
    $out .= '<br/><br/>';
    $ComboScoreStart = '<select name="ScoreStart">' . "\n";
    for ($i = 0; $i <= 11; ++$i) {
        $ComboScoreStart .= '<option value="' . $i . '"' . ($ScoreStart == $i ? ' selected' : '') . '>' . ($i == 11 ? 'X' : $i) . '</option>' . "\n";
    }
    $ComboScoreStart .= '</select>' . "\n";
    $InputPhase = '';
    if (is_numeric($xSession)) {
        $InputPhase = '<select name="phase">' . "\n";
        $InputPhase .= '<option value="000">---</option>' . "\n";
        for ($i = 1; $i <= $RowTour->TtNumDist; ++$i) {
            //$v=str_pad($i,3,'0',STR_PAD_LEFT);
            $v = '0' . $Ses . $i;
            $InputPhase .= '<option value="' . $v . '"' . ($v == $Phase ? ' selected' : '') . '>' . $i . '</option>' . "\n";
        }
        $InputPhase .= '</select>' . "\n";
    } else {
        $encode = phaseEncode($What, $Ses, $Dist);
        $InputPhase = '<input type="hidden" name="phase" value="' . $encode . '">' . $encode;
    }
    $out .= '<table class="Tabella">' . "\n" . '<tr>' . '<td class="Title">&nbsp;</td>' . '<td class="Title">&nbsp;</td>' . '<td class="Title">' . get_text('FirstArrow', 'HTT') . '</td>' . '<td class="Title">' . get_text('LastArrow', 'HTT') . '</td>' . '<td class="Title">' . get_text('End (volee)') . '</td>' . '<td class="Title">' . get_text('Phase') . '<br/>(' . get_text('Distance', 'HTT') . ')</td>' . '<td class="Title">' . get_text('StartScore', 'HTT') . '</td>' . '<td class="Title">' . get_text('StoreTimeout', 'HTT') . '</td>' . '</tr>' . "\n" . '<tr>' . '<td class="Center"><input type="checkbox" name="chkSendSequence" value="1" ' . (isset($_REQUEST['chkSendSequence']) ? ' checked ' : '') . '/>' . get_text('SendInitSequence', 'HTT') . '</td>' . '<td class="Center">' . '<input type="button" id="btnPlus" value="+" onclick="incSeq();">' . '&nbsp;&nbsp;' . '<input type="button" id="btnMinus" value="-" onclick="decSeq();">' . '</td>' . '<td class="Center"><input type="text" id="firstArr" name="txtFirstArr" maxlength="2" size="3" value="' . $FirstArr . '" /></td>' . '<td class="Center"><input type="text" id="lastArr" name="txtLastArr" maxlength="2" size="3" value="' . $LastArr . '" /></td>' . '<td class="Center"><input type="text" id="volee" name="txtVolee" maxlength="2" size="3" value="' . $Volee . '" /></td>' . '<td class="Center">' . $InputPhase . '</td>' . '<td class="Center">' . $ComboScoreStart . '</td>' . '<td class="Center"><input type="text" id="txtStoreTo" name="txtStoreTo" maxlength="2" size="3" value="' . $StoreTimeout . '" /></td>' . '</tr>' . '</table>' . "\n";
    $out .= '<br/><br/>';
    //$out.=TableHTT(10,'FrmSetup',false,$HTTOK,array(),$Disable);
    $out .= SelectTableHTT(10, 'FrmSetup', false, $HTTOK, array(), $Disable, true);
    $out .= '<br/><div align="center">';
    $out .= '<input type="hidden" name="Command" value="OK"><input type="submit" value="' . get_text('CmdOk') . '"/>' . "\n";
    $out .= '</div>';
    $out .= '</form></div>' . "\n";
    print $out;
}
include 'Common/Templates/tail.php';