Exemplo n.º 1
0
function maybeDisplayWarning($uid, $pid)
{
    if (isTesterOnPuzzle($uid, $pid)) {
        return;
    }
    ?>
        <div class="warning">
                <strong class='impt'>WARNING:</strong> You are not marked as a current testsolver.<br>
                Please use the puzzle version, and wiki page, that were current when you started solving, NOT the ones listed below (if they differ).<br/>
                If in doubt, email <?php 
    echo HELP_EMAIL;
    ?>
        </div>
<?php 
}
Exemplo n.º 2
0
function canTestAdminPuzzle($uid, $pid)
{
    return !isEditorOnPuzzle($uid, $pid) && !isTesterOnPuzzle($uid, $pid) && isPuzzleInAddToTestAdminQueue($pid);
}
Exemplo n.º 3
0
require_once "config.php";
require_once "html.php";
require_once "db-func.php";
require_once "utils.php";
// Redirect to the login page, if not logged in
$uid = isLoggedIn();
// Get puzzle id
$pid = isValidPuzzleURL();
// Start HTML
$title = "Puzzle {$pid}";
if (USING_CODENAMES) {
    $title .= ": " . getCodename($pid);
}
head("", $title);
// Is the user testing this puzzle?
if (isTesterOnPuzzle($uid, $pid)) {
    echo "You are currently testing this puzzle.";
    foot();
    exit(0);
}
// Does the user have permission to see this page?
if (!canViewPuzzle($uid, $pid)) {
    echo "<div class='errormsg'>You do not have permission to view this puzzle.</div>";
    foot();
    exit(0);
}
// Record this user's visit (in two ways)
$lastVisit = updateLastVisit($uid, $pid);
if (!isEditorChief($uid) && !isCohesion($uid)) {
    addSpoiledUserQuietly($uid, $pid);
    if ($_GET['discuss'] && isEditorAvailable($uid, $pid) && !isEditorChief($uid)) {