Example #1
0
 function html_requirements_list()
 {
     $fr_FlotRequirements = new FlotRequirements();
     $fr_FlotRequirements->b_ongoing_requirements_met();
     $sa_reqs = $fr_FlotRequirements->sa_requirements_to_remedy();
     if (empty($sa_reqs)) {
         return '<div class="alert alert-success">no problems</div>';
     }
     $html_return = '<a class="btn btn-default btn-sm" href="' . S_BASE_EXTENSION . 'flot-admin/admin/index.php?section=requirements"><i class="glyphicon glyphicon-refresh"></i> re-check</a><hr/>';
     foreach ($sa_reqs as $s_problem) {
         $html_return .= '<div class="alert alert-danger">' . $s_problem . '</div>';
     }
     return $html_return;
 }
Example #2
0
<?php

# log in and forward user to route admin section
require_once 'flot-admin/core/base.php';
require S_BASE_PATH . 'flot-admin/core/flot.php';
$flot = new Flot();
$requirements = new FlotRequirements();
$ufUF = new UtilityFunctions();
$fuFU = new FileUtilities();
# are we handling the form submission?
if ($ufUF->b_post_vars()) {
    // user has entered an email and password okay
    if (isset($_POST["email"]) && isset($_POST["password"])) {
        // are the requirements met?
        if ($requirements->b_requirements_met()) {
            //
            // set up flot
            //
            $flot->_create_start_dirs();
            // add username/pass, store to datastore
            if ($flot->datastore->b_add_user($_POST["email"], sha1($_POST["password"]))) {
                // log the user in too, with the same email and password that was posted as part of their registration
                $flot->_handle_auth_attempt();
                # at a later date, add some starter items
                ## web page oncology
                ## a few pages
                ## a menu
                // generate all pages
                $flot->_render_all_pages();
                // delete this start.php page for security
                $flot->_delete_start_page();