. // // Announcments module for FreePBX 2.2+ // Copyright 2006 Greg MacLellan $action = isset($_POST['action']) ? $_POST['action'] : ''; if (isset($_POST['delete'])) $action = 'delete'; $tabindex = 0; $announcement_id = isset($_POST['announcement_id']) ? $_POST['announcement_id'] : false; $description = isset($_POST['description']) ? $_POST['description'] : ''; $recording_id = isset($_POST['recording_id']) ? $_POST['recording_id'] : ''; $allow_skip = isset($_POST['allow_skip']) ? $_POST['allow_skip'] : 0; $return_ivr = isset($_POST['return_ivr']) ? $_POST['return_ivr'] : 0; $noanswer = isset($_POST['noanswer']) ? $_POST['noanswer'] : 0; $post_dest = isset($_POST['post_dest']) ? $_POST['post_dest'] : ''; $repeat_msg = isset($_POST['repeat_msg']) ? $_POST['repeat_msg'] : ''; if (isset($_POST['goto0']) && $_POST['goto0']) { // 'ringgroup_post_dest' 'ivr_post_dest' or whatever $post_dest = $_POST[ $_POST['goto0'].'0' ]; } switch ($action) { case 'add': announcement_add($description, $recording_id, $allow_skip, $post_dest, $return_ivr, $noanswer, $repeat_msg); needreload(); redirect_standard(); break; case 'edit': announcement_edit($announcement_id, $description, $recording_id, $allow_skip, $post_dest, $return_ivr, $noanswer, $repeat_msg); needreload(); redirect_standard('extdisplay'); break; case 'delete': announcement_delete($announcement_id); needreload(); redirect_standard(); break; } ?>