示例#1
0
<?php

echo "<nav><div id=\"menutop\">\n";
echo "<a target=\"_top\" href=\"index.php\" accesskey=\"o\">overview</a>\n";
if (have_problemtexts()) {
    echo "<a target=\"_top\" href=\"problems.php\" accesskey=\"t\">problems</a>\n";
}
if (have_printing()) {
    echo "<a target=\"_top\" href=\"print.php\" accesskey=\"p\">print</a>\n";
}
echo "<a target=\"_top\" href=\"scoreboard.php\" accesskey=\"b\">scoreboard</a>\n";
if (checkrole('jury') || checkrole('balloon')) {
    echo "<a target=\"_top\" href=\"../jury/\" accesskey=\"j\">→jury</a>\n";
}
echo "</div>\n\n<div id=\"menutopright\">\n";
putClock();
echo "</div></nav>\n\n";
示例#2
0
/**
 * Outputs bulleted list of problem statements for this contest
 */
function putProblemTextList()
{
    global $cid, $cdata, $DB;
    $fdata = calcFreezeData($cdata);
    if (!have_problemtexts()) {
        echo "<p class=\"nodata\">No problem texts available for this contest.</p>\n\n";
    } elseif (!$fdata['cstarted']) {
        echo "<p class=\"nodata\">Problem texts will appear here at contest start.</p>\n\n";
    } else {
        // otherwise, display list
        $res = $DB->q('SELECT probid,shortname,name,color,problemtext_type
		               FROM problem INNER JOIN contestproblem USING (probid)
		               WHERE cid = %i AND allow_submit = 1 AND
		               problemtext_type IS NOT NULL ORDER BY shortname', $cid);
        if ($res->count() > 0) {
            echo "<ul>\n";
            while ($row = $res->next()) {
                print '<li> ' . '<img src="../images/' . urlencode($row['problemtext_type']) . '.png" alt="' . htmlspecialchars($row['problemtext_type']) . '" /> <a href="problem.php?id=' . urlencode($row['probid']) . '">' . 'Problem ' . htmlspecialchars($row['shortname']) . ': ' . htmlspecialchars($row['name']) . "</a></li>\n";
            }
            echo "</ul>\n";
        }
    }
}