$s_action = $ufUf->s_get_var_from_allowed("action", array("view"), "view"); switch ($s_action) { case "view": $html_main_admin_content .= $admin_ui->html_requirements_list(); break; } break; case "flot": $s_action = $ufUf->s_get_var_from_allowed("action", array("regenerate", "list_pages"), false); switch ($s_action) { case "regenerate": $flot->_render_all_pages(); // back to same page $s_new_page = "/flot-admin/admin/index.php?section=items&message=" . urlencode("Flot has regenerated all pages"); $flot->_page_change($s_new_page); break; case "list_pages": // return json of all pages header('Content-Type: application/json'); echo json_encode($flot->oa_pages()); exit; break; } break; } } # # if we're still here, render a page for the user # $admin_ui->html_make_admin_page($admin_ui->s_admin_header($s_section), $admin_ui->html_make_left_menu($s_section), $html_main_admin_content, $html_main_admin_content_menu, $s_body_class);
require '../core/flot.php'; $flot = new Flot(); $AdminUI = new AdminUI(); # are we handling the log in form submission ? $flot->_handle_auth_attempt(); if ($flot->b_is_user_admin()) { # they're logged in so forward them to the admin page to manage the site $flot->_page_change("index.php"); } # serve them the log in form ?> <!DOCTYPE html> <html> <head> <?php echo $AdminUI->s_admin_header(); ?> </head> <body> <div class="container" style="max-width:300px;margin-top:150px;"> <!-- instruction, email, password, login/submit button --> <form role="form" method="post" name="login" action="login.php"> <div class="form-group"> <h1>login</h1> </div> <div class="form-group"> <input type="email" name="email" class="form-control" id="login_email" placeholder="email"> </div> <div class="form-group"> <input type="password" name="password" class="form-control" id="login_email" placeholder="password"> </div>