if ($action == "add" && permission_exists('ivr_menu_add')) { //set the ivr_menu_uuid $ivr_menu_uuid = uuid(); $ivr->ivr_menu_uuid = $ivr_menu_uuid; //run the add method in the ivr menu class $ivr->add(); //set the message $_SESSION['message'] = $text['message-add']; } //update the data if ($action == "update" && permission_exists('ivr_menu_edit')) { //get the ivr_menu_uuid $ivr_menu_uuid = check_str($_REQUEST["id"]); //run the update method in the ivr menu class $ivr->ivr_menu_uuid = $ivr_menu_uuid; $ivr->update(); //set the message $_SESSION['message'] = $text['message-update']; } //add the ivr menu options if ($action == "add" && permission_exists('ivr_menu_add') || $action == "update" && permission_exists('ivr_menu_edit')) { require_once "resources/classes/database.php"; require_once "resources/classes/ivr_menu.php"; foreach ($ivr_menu_options as $row) { //seperate the action and the param $option_array = explode(":", $row["ivr_menu_option_param"]); $ivr_menu_option_action = array_shift($option_array); $ivr_menu_option_param = join(':', $option_array); //add the ivr menu option if (strlen($ivr_menu_option_action) > 0) { $ivr = new ivr_menu();