$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(); $fuFU->_delete_update_files(); // redirect user to home page $flot->_page_change("/"); } else { echo "error creating user.. :("; } } } } ?> <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="<?php echo S_BASE_EXTENSION; ?> flot-admin/admin/css/bootstrap.min.css"> <link rel="stylesheet" href="<?php
<?php # kill session and forward somewhere? $s_b_p = str_replace($_SERVER['SCRIPT_NAME'], "", str_replace("\\", "/", $_SERVER['SCRIPT_FILENAME'])) . '/'; require_once $s_b_p . 'flot-admin/core/base.php'; require_once S_BASE_PATH . 'flot-admin/core/flot.php'; $flot = new Flot(); if ($flot->b_is_user_admin()) { # kill session $flot->_kill_session(); } $flot->_page_change("/flot-admin/admin/login.php");
<?php # manage site /* this page handles both gets and sets. ideally we could check for post vars, process set request, then location change to a get however we also need to show invalid post requests? maybe we could just do that client side. */ require_once '../../flot-admin/core/base.php'; require_once '../../flot-admin/core/flot.php'; $flot = new Flot(); $admin_ui = new AdminUI(); if (!$flot->b_is_user_admin()) { # forward them to login page $flot->_page_change("/flot-admin/admin/login.php"); } $html_main_admin_content = ""; $html_main_admin_content_menu = ""; $s_body_class = ""; $s_section = ""; $ufUf = new UtilityFunctions(); if ($ufUf->b_post_vars()) { # # handle post request # $s_action = $ufUf->s_post_var_from_allowed("action", array("edit"), "edit"); $s_section = $ufUf->s_post_var_from_allowed("section", array("items", "elements", "pictures", "menus", "settings", "oncologies"), "items"); switch ($s_section) { case "items": switch ($s_action) { case 'edit':
<?php # log in and forward user to route admin section 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>