示例#1
0
echo $uid;
?>
" />
        Enter Puzzle ID to testadmin: <input type="text" name="pid" />
        <input type="submit" name="TestAdminPuzzle" value="Go" />
    </form>

    <br />
<?php 
$inTesting = count(getPuzzlesInTesting());
$numNeedAdmin = count(getPuzzlesNeedTestAdmin());
echo "There are currently <strong>{$inTesting} puzzles</strong> in testing<br/>";
echo "<strong>{$numNeedAdmin} puzzles</strong> need a testing admin</strong>";
echo "<br /><br />";
if (isTestingAdmin($uid)) {
    if (getPuzzleForTestAdminQueue($uid) == FALSE) {
        echo '<div class="emptylist">No Puzzles To Add</div><br/>';
    } else {
        ?>
        <form action="form-submit.php" method="post">
            <input type="hidden" name="uid" value="<?php 
        echo $uid;
        ?>
" />
            <input type="submit" name="getTestAdminPuzz" value="Get Puzzle" />
        </form>
<?php 
    }
    displayTestQueue($uid);
}
echo "<h2>Puzzles needing testadmin</h2>";
示例#2
0
    $breakthrough = $_POST['breakthrough'];
    $skills = $_POST['skills'];
    $fun = $_POST['fun'];
    $difficulty = $_POST['difficulty'];
    $when_return = $_POST['when_return'];
    insertFeedback($uid, $pid, $done, $time, $tried, $liked, $skills, $breakthrough, $fun, $difficulty, $when_return);
    $_SESSION['feedback'] = "Thank you for giving feedback on this puzzle!";
    if (strcmp($done, 'yes') == 0) {
        header("Location: " . URL . "/test.php?pid={$pid}");
    } else {
        header("Location: " . URL . "/testsolving.php");
    }
    exit(0);
}
if (isset($_POST['getTestAdminPuzz'])) {
    $p = getPuzzleForTestAdminQueue($uid);
    if ($p != FALSE) {
        addToTestAdminQueue($uid, $p);
    } else {
        $_SESSION['failedToAdd'] = TRUE;
    }
    header("Location: " . URL . "/testadmin.php");
    exit(0);
}
if (isset($_POST['postprod'])) {
    $pid = $_POST['pid'];
    pushToPostProd($uid, $pid);
    header("Location: " . URL . "/puzzle.php?pid={$pid}");
    exit(0);
}
if (isset($_POST['postprodAll'])) {