} } if (isset($_POST["AddTimeslotItem"])) { echo TimeslotItemTable::add_timeslot_item($_POST["itemName"], $_POST["timeslotName"]); } if (isset($_POST["RemoveTimeslotItem"])) { echo TimeslotItemTable::remove_timeslot_item($_POST["itemName"], $_POST["timeslotName"]); } if (isset($_POST["UpdateTimeslotFactor"])) { echo TimeslotItemTable::update_timeslot_factor($_POST["tsiId"], $_POST["factor"]); } if (isset($_POST["updateItems"])) { echo ItemTable::update_item_details($_POST["itemId"], $_POST["itemName"], $_POST["itemUnit"]); } if (isset($_POST["updateRoundingOption"])) { echo ItemTable::update_rounding_option($_POST["roundingOption"], $_POST["itemId"]); } if (isset($_POST["updateRoundingFactor"])) { echo ItemTable::update_rounding_factor($_POST["roundingFactor"], $_POST["itemId"]); } if (isset($_POST["addRecipeItem"])) { echo RecipeItemTable::add_recipe_item($_POST["itemId"], $_POST["recipeId"]); } if (isset($_POST["deleteRecipeItem"])) { echo RecipeItemTable::delete_recipe_item($_POST["itemId"], $_POST["recipeId"]); } if (isset($_POST["getRecipeItems"])) { $result = RecipeItemTable::get_recipe_items($_POST["recipeId"]); if ($result) { echo '<ul class="category_list" id="categorized_list" >'; while ($row = $result->fetch_assoc()) {