function leave_spellcheck_mode($ppage)
{
    global $userP;
    // The user has requested a return from spellcheck mode.
    // The response that we send will replace the frame/document
    // containing the spellcheck form.
    if ($userP['i_type'] == 0) {
        // standard interface:
        // The spellcheck document (containing text only) is in 'textframe'.
        // So the response we generate will go into 'textframe'.
        // So generate just the (normal-mode) text frame of the std interface.
        echo_text_frame_std($ppage);
    } else {
        // enhanced interface:
        // The spellcheck document (containing image+text) is in 'proofframe'.
        // So the response we generate will go into 'proofframe'.
        // So generate the (normal-mode) image-and-text doc of the enh interface.
        echo_proof_frame($ppage);
    }
}
        $round = get_Round_for_project_state($proj_state);
        // If the user can manage the project, they'll most likely want to look at the
        // project state once the last page has been done. This is especially true of,
        // for example, missing page projects and the like. Redirect these users to
        // the project page.
        $project = new Project($projectid);
        if ($project->can_be_managed_by_user($pguser)) {
            $body = $err . "<br> " . sprintf(_("Return to the <a %s>project page</a>."), "href='{$code_url}/project.php?id={$projectid}' target='_top'");
        } else {
            $body = $err . "<br> " . sprintf(_("Return to the <a %s>project listing page</a>."), "href='round.php?round_id={$round->id}' target='_top'");
        }
        $title = _("Unable to get an available page");
        slim_header($title);
        echo $body;
        exit;
    }
    setDebounceInfo($lpage->projectid);
    $ppage = new PPage($lpage, $proj_state);
}
echo_proof_frame($ppage);
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
function setDebounceInfo($project)
{
    dpsession_page_set($project . '|' . time());
}
function getDebounceInfo()
{
    list($project, $time) = explode("|", dpsession_page_get());
    return array('project' => $project, 'pageTime' => $time);
}
// vim: sw=4 ts=4 expandtab