Esempio n. 1
0
                    LEFT JOIN team t ON (t.teamid = c.recipient)
                    LEFT JOIN team f ON (f.teamid = c.sender)
                    WHERE c.cid = %i AND c.sender = %i
                    ORDER BY submittime DESC, clarid DESC', $cid, $teamid);
$clarifications = $DB->q('SELECT c.*, cp.shortname, t.name AS toname, f.name AS fromname,
                          u.mesgid AS unread
                          FROM clarification c
                          LEFT JOIN problem p USING (probid)
                          LEFT JOIN contestproblem cp USING (probid, cid)
                          LEFT JOIN team t ON (t.teamid = c.recipient)
                          LEFT JOIN team f ON (f.teamid = c.sender)
                          LEFT JOIN team_unread u ON (c.clarid=u.mesgid AND u.teamid = %i)
                          WHERE c.cid = %i AND c.sender IS NULL
                          AND ( c.recipient IS NULL OR c.recipient = %i )
                          ORDER BY c.submittime DESC, c.clarid DESC', $teamid, $cid, $teamid);
echo "<h3 class=\"teamoverview\">Clarifications</h3>\n";
# FIXME: column width and wrapping/shortening of clarification text
if ($clarifications->count() == 0) {
    echo "<p class=\"nodata\">No clarifications.</p>\n\n";
} else {
    putClarificationList($clarifications, $teamid);
}
echo "<h3 class=\"teamoverview\">Clarification Requests</h3>\n";
if ($requests->count() == 0) {
    echo "<p class=\"nodata\">No clarification requests.</p>\n\n";
} else {
    putClarificationList($requests, $teamid);
}
echo addForm('clarification.php', 'get') . "<p>" . addSubmit('request clarification') . "</p>" . addEndForm();
echo "</div>\n";
require LIBWWWDIR . '/footer.php';
Esempio n. 2
0
            LEFT JOIN problem p USING(probid)
            LEFT JOIN contestproblem cp USING (probid, cid)
            LEFT JOIN team t ON (t.teamid = c.recipient)
            LEFT JOIN team f ON (f.teamid = c.sender)
            LEFT JOIN contest co USING (cid)
            WHERE c.cid IN (%Ai) ';
$newrequests = $DB->q($sqlbody . 'AND c.sender IS NOT NULL AND c.answered = 0
                          ORDER BY submittime DESC, clarid DESC', $contestids);
$oldrequests = $DB->q($sqlbody . 'AND c.sender IS NOT NULL AND c.answered != 0
                          ORDER BY submittime DESC, clarid DESC', $contestids);
$clarifications = $DB->q($sqlbody . 'AND c.sender IS NULL AND ( c.respid IS NULL OR c.recipient IS NULL )
                          ORDER BY submittime DESC, clarid DESC', $contestids);
echo '<h3 id="newrequests">' . "New Requests:</h3>\n";
if ($newrequests->count() == 0) {
    echo "<p class=\"nodata\">No new clarification requests.</p>\n\n";
} else {
    putClarificationList($newrequests, NULL);
}
echo '<h3 id="oldrequests">' . "Old Requests:</h3>\n";
if ($oldrequests->count() == 0) {
    echo "<p class=\"nodata\">No old clarification requests.</p>\n\n";
} else {
    putClarificationList($oldrequests, NULL);
}
echo '<h3 id="clarifications">' . "General Clarifications:</h3>\n";
if ($clarifications->count() == 0) {
    echo "<p class=\"nodata\">No general clarifications.</p>\n\n";
} else {
    putClarificationList($clarifications, NULL);
}
require LIBWWWDIR . '/footer.php';