public function doConfigPageInit($page) { $request = $_REQUEST; $action = isset($request['action']) ? $request['action'] : ''; if (isset($request['delete'])) { $action = 'delete'; } $announcement_id = isset($request['announcement_id']) ? $request['announcement_id'] : false; $view = isset($request['view']) ? $request['view'] : 'form'; $description = isset($request['description']) ? $request['description'] : ''; $recording_id = isset($request['recording_id']) ? $request['recording_id'] : ''; $allow_skip = isset($request['allow_skip']) ? $request['allow_skip'] : 0; $return_ivr = isset($request['return_ivr']) ? $request['return_ivr'] : 0; $noanswer = isset($request['noanswer']) ? $request['noanswer'] : 0; $post_dest = isset($request['post_dest']) ? $request['post_dest'] : ''; $repeat_msg = isset($request['repeat_msg']) ? $request['repeat_msg'] : ''; if (isset($request['goto0']) && $request['goto0']) { // 'ringgroup_post_dest' 'ivr_post_dest' or whatever $post_dest = $request[$request['goto0'] . '0']; } switch ($action) { case 'add': $_REQUEST['extdisplay'] = announcement_add($description, $recording_id, $allow_skip, $post_dest, $return_ivr, $noanswer, $repeat_msg); needreload(); $this->freepbx->View->redirect_standard('extdisplay', 'view'); break; case 'edit': announcement_edit($announcement_id, $description, $recording_id, $allow_skip, $post_dest, $return_ivr, $noanswer, $repeat_msg); needreload(); $this->freepbx->View->redirect_standard('extdisplay', 'view'); break; case 'delete': announcement_delete($_REQUEST['extdisplay']); needreload(); $this->freepbx->View->redirect_standard(); break; } }
$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; } ?> </div> <div class="rnav"><ul> <?php