echo specialchars($row['country']) . "</td></tr>\n"; } if (!empty($row['members'])) { echo '<tr><td>Members: </td><td>' . nl2br(specialchars($row['members'])) . "</td></tr>\n"; } if (!empty($row['comments'])) { echo '<tr><td>Comments:</td><td>' . nl2br(specialchars($row['comments'])) . "</td></tr>\n"; } echo "</table></div>\n"; if (IS_ADMIN) { echo "<p class=\"nomorecol\">" . editLink('team', $id) . "\n" . delLink('team', 'teamid', $id) . "</p>\n\n"; } echo rejudgeForm('team', $id) . "\n\n"; if ($cid) { echo "<h3>Score</h3>\n\n"; putTeamRow($cdata, array($id)); } echo '<h3>Submissions'; if (isset($key)) { $keystr = ""; switch ($key) { case 'probid': $keystr = "problem"; break; case 'langid': $keystr = "language"; break; case 'judgehost': $keystr = "judgehost"; break; default:
} else { echo "not available</td></tr>\n"; } echo '<tr><td>Country:</td><td>' . specialchars($data['country']); if (is_readable($countryflag)) { echo ' <img src="' . $countryflag . '" alt="' . specialchars($data['country']) . "\" />"; } echo "</td></tr>\n"; if (!empty($data['comments'])) { echo '<tr><td>Comments:</td><td>' . nl2br(specialchars($data['comments'])) . "</td></tr>\n"; } echo "</table>\n\n"; if (IS_ADMIN) { echo "<p>" . editLink('team_affiliation', $data['affilid']) . "\n" . delLink('team_affiliation', 'affilid', $data['affilid'], $data['name']) . "</p>\n\n"; } echo "<h2>Teams from " . specialchars($data['name']) . "</h2>\n\n"; $listteams = array(); $teams = $DB->q('SELECT teamid,name FROM team WHERE affilid = %s', $id); if ($teams->count() == 0) { echo "<p class=\"nodata\">no teams</p>\n\n"; } else { echo "<table class=\"list\">\n<thead>\n" . "<tr><th scope=\"col\">ID</th><th scope=\"col\">teamname</th></tr>\n" . "</thead>\n<tbody>\n"; while ($team = $teams->next()) { $listteams[] = $team['teamid']; $link = '<a href="team.php?id=' . urlencode($team['teamid']) . '">'; echo "<tr><td>" . $link . "t" . specialchars($team['teamid']) . "</a></td><td>" . $link . specialchars($team['name']) . "</a></td></tr>\n"; } echo "</tbody>\n</table>\n\n"; putTeamRow($cdata, $listteams); } require LIBWWWDIR . '/footer.php';
$probdata = $DB->q('TABLE SELECT probid, shortname, name FROM problem INNER JOIN contestproblem USING (probid) WHERE cid = %i AND allow_submit = 1 ORDER BY shortname', $cid); putgetMainExtension($langdata); echo "function getProbDescription(probid)\n{\n"; echo "\tswitch(probid) {\n"; foreach ($probdata as $probinfo) { echo "\t\tcase '" . specialchars($probinfo['shortname']) . "': return '" . specialchars($probinfo['name']) . "';\n"; } echo "\t\tdefault: return '';\n\t}\n}\n\n"; } echo "initReload(" . $refreshtime . ");\n"; echo "// -->\n</script>\n"; // Put overview of team submissions (like scoreboard) putTeamRow($cdata, array($teamid)); echo "<div id=\"submitlist\">\n"; echo "<h3 class=\"teamoverview\">Submissions</h3>\n\n"; if ($fdata['cstarted']) { echo <<<HTML <script type="text/javascript"> \$(function() { \tvar matches = location.hash.match(/submitted=(\\d+)/); \tif (matches) { \t\tvar \$p = \$('<p class="submissiondone" />').html('submission done <a href="#">x</a>'); \t\t\$('#submitlist > .teamoverview').after(\$p); \t\t\$('table.submissions tr[data-submission-id=' + matches[1] + ']').addClass('highlight'); \t\t\$('.submissiondone a').on('click', function() { \t\t\t\$(this).parent().remove(); \t\t\t\$('table.submissions tr.highlight').removeClass('highlight');