$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': # get the id, find the item, then try replacing the attributes $item_id = $ufUf->s_post_var("item_id", false); if ($item_id) { // we have an item id, now we'll try and get the corresponding item information $o_item = $flot->datastore->get_item_data($item_id); $o_full_item = $flot->datastore->o_get_full_item($item_id); if ($o_item && isset($o_full_item)) { $Item = new Item($o_item); $Item->_set_full_item($o_full_item); $Item->update_from_post();