Ejemplo n.º 1
0
     * Then we get the template (which contains just the head)
     * much earlier than usual.
     */
    $content = new Content();
    $template = Template::create('admin_frame');
    $template->parse($content);
}
/*
 * When first loading the page, show options.
 */
if (count($_POST) === 0) {
    if (count($_GET) === 0) {
        $body = '<iframe id="content" src="?page=parse&amp;noframe=1"></iframe>';
    } elseif ($_GET['page'] == 'parse') {
        $parser->logger->flush_buffer = FALSE;
        if (!$parser->check_db_populated()) {
            ob_start();
            if (!$parser->test_environment()) {
                $errors = ob_get_contents();
                $body = '<p>
					It looks like this is a new installation of The State
					Decoded. Unfortunately, there are a few issues you need
					to resolve before we can do the rest of the setup.  Those
					errors are listed below.
					</p>
					<p class="errors">' . $errors . '</p>';
            } else {
                $body = '
				<form method="post" action="/admin/?page=setup&noframe=1">
					<h3>Setup</h3>
					<p>