Beispiel #1
0
print '<td width = "' . $ColumnWidth . '"' . $thstyle . '>Результат</td>' . "\r\n";
print '</tr>' . "\r\n";
$sql = "select tu.teamuser_id, null as raiddeveloper_id,\n\t\t\t   \tt.team_name, t.team_id, \n\t\t               d.distance_name, r.raid_name, t.team_num, \n\t\t\t       r.raid_id, lp.levelpoint_name, t.team_dismiss,\n\t\t\t       lp.levelpoint_id, COALESCE(tu.teamuser_rank, 0.00000) as teamuser_rank  \n\t\t        from  TeamUsers tu\n\t\t\t      inner join  Teams t\n\t\t\t      on tu.team_id = t.team_id\n\t\t\t      inner join  Distances d\n\t\t\t      on t.distance_id = d.distance_id\n\t\t\t      inner join  Raids r\n\t\t\t      on d.raid_id = r.raid_id\n\t\t\t      left outer join TeamLevelDismiss  tld\n\t\t\t      on tu.teamuser_id = tld.teamuser_id\n\t\t\t      left outer join LevelPoints  lp\n\t\t\t      on tld.levelpoint_id = lp.levelpoint_id\n\t\t\twhere tu.teamuser_hide = 0 and tu.user_id = {$pUserId}\n\t\t\tUNION ALL \n\t\t\tselect  null as teamuser_id,  rd.raiddeveloper_id,  'cудьи' as team_name,  null as team_id, \n\t\t               '' as distance_name, r.raid_name, '' as team_num, \n\t\t\t       r.raid_id, null as levelpoint_name, null as team_dismiss,\n\t\t\t       null as levelpoint_id, null as teamuser_rank  \n\t\t        from  Users u\n\t\t\t      inner join RaidDevelopers rd\n\t\t\t      on u.user_id = rd.user_id\n\t\t\t      inner join  Raids r\n\t\t\t      on rd.raid_id = r.raid_id\n\t\t\twhere rd.raiddeveloper_hide = 0 and u.user_id = {$pUserId}\n\t\t\torder by raid_id desc ";
//echo 'sql '.$sql;
$Result = MySqlQuery($sql);
$TeamsCount = mysql_num_rows($Result);
while ($Row = mysql_fetch_assoc($Result)) {
    $TrClass = $TeamsCount % 2 == 0 ? 'yellow' : 'green';
    $TeamsCount--;
    print '<tr class="' . $TrClass . '">';
    $RaidDeveloper = $Row['raiddeveloper_id'];
    if ($RaidDeveloper) {
        print '<td><a href="?developers&RaidId=' . $Row['raid_id'] . '">судьи</a></td>';
        print "<td><br/></td><td>{$Row['raid_name']}</td><td>спасибо!</td>\r\n";
    } else {
        $TeamPlace = GetTeamPlace($Row['team_id']);
        $LevelPointId = $Row['levelpoint_id'];
        $TeamDismiss = $Row['team_dismiss'];
        $TeamPlaceResult = "";
        // Есть место команды и нет схода участника
        if ($TeamPlace > 0 and $LevelPointId == 0) {
            $TeamPlaceResult = "место <b>{$TeamPlace}</b>";
        }
        $TeamUserOff = "";
        //  сход участника
        if ($LevelPointId) {
            $TeamUserOff = "не явился(-ась) в <b>{$Row['levelpoint_name']}</b>";
        }
        if ($TeamDismiss) {
            $TeamUserOff = "команда не явилась на старт";
        }
Beispiel #2
0
		document.TlpForm.TeamLevelPointId.value = teamlevelpointid;
		document.TlpForm.action.value = 'TlpInfo';
		document.TlpForm.submit();
	}


	// 
</script>


<?php 
print '<br/>' . "\n";
// ============ Общее время команды
$sql = "select TIME_FORMAT(t.team_result, '%H:%i') as team_result from Teams t where t.team_id = {$TeamId}";
$TeamResult = CSql::singleValue($sql, 'team_result');
$TeamPlace = GetTeamPlace($TeamId);
$TeamPlaceResult = "";
if ($TeamResult == "00:00") {
    $TeamResult = "-";
}
if ($TeamPlace > 0) {
    $TeamPlaceResult = " Место <b>{$TeamPlace}</b>";
}
print "<b>Результаты.</b> Общее время с учетом штрафов и бонусов: <b title=\"Обновляется после сохранения результатов\">{$TeamResult}</b>{$TeamPlaceResult}\n";
print "<br/>\n";
if ($AllowEditResult == 1) {
    print "<br/>\n";
    // Выводим начало формы с точкой
    print '<form name="TlpForm" action="' . $MyPHPScript . '" method="post"  onSubmit="' . $OnSubmitResultFunction . '">' . "\n";
    print '<input type="hidden" name="action" value="">' . "\n";
    print '<input type="hidden" name="view" value="">' . "\n";