</p> </form>'; } else { $args['parser'] = $parser; $body = show_admin_forms($args); } } } elseif ($_POST['action'] == 'setup') { /* * Step through each parser method. */ if ($parser->test_environment() !== FALSE) { $body = '<p>Environment test succeeded</p>'; if ($parser->populate_db() !== FALSE) { $body .= '<p>Database successfully setup.</p>'; $body .= $parser->run_migrations(); $body .= '<p>Migration complete.</p>'; $body .= '<p><a href="/admin/?page=parse&noframe=1">Back to Admin Dashboard</a></p>'; } else { echo '<p>There was an error setting up the database. Please review <a href="http://docs.statedecoded.com/">the documentation</a> to confirm that you have everything <a href="http://docs.statedecoded.com/installation.html">installed</a> and <a href="http://docs.statedecoded.com/config.html">configured</a> properly.</p>'; } } else { echo '<p>There was an error setting up the database. The issues encountered should appear above. Please review <a href="http://docs.statedecoded.com/">the documentation</a>