// 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(); $fuFU->_delete_update_files(); // redirect user to home page $flot->_page_change("/"); } else { echo "error creating user.. :("; } } } } ?> <!DOCTYPE html> <html> <head>
function update_from_post() { # update the item from post variables # we can find out what post variables to look for by checking our oncology $flot = new Flot(); $ufUF = new UtilityFunctions(); $s_id = $ufUF->s_post_var("menu_id", false); if ($s_id) { $s_name = $ufUF->s_post_var("name", false); if ($s_name !== false) { $this->o_loaded_menu_object->title = urldecode($s_name); } $s_serialisation = $ufUF->s_post_var("serialisation", false); if ($s_serialisation !== false) { $this->o_loaded_menu_object->serialisation = urldecode($s_serialisation); } $this->datastore->_set_menu_data($this->o_loaded_menu_object); $this->datastore->b_save_datastore("menus"); // regenerate pages $flot->_render_all_pages(); } else { echo "no id"; } }