23rd March, 2006. $action = isset($_REQUEST['action'])?$_REQUEST['action']:''; $id = isset($_REQUEST['id'])?$_REQUEST['id']:''; $dircontext = isset($_SESSION["AMP_user"]->_deptname)?$_SESSION["AMP_user"]->_deptname:''; $nbroptions = isset($_REQUEST['nbroptions'])?$_REQUEST['nbroptions']:'3'; if (empty($dircontext)) $dircontext = 'default'; // So. Lets check to make sure everything's happy ivr_init(); switch ($action) { case "add": $id = ivr_get_ivr_id('Unnamed'); // Set the defaults $def['timeout'] = 5; $def['ena_directdial'] = 'CHECKED'; $def['ena_directory'] = 'CHECKED'; ivr_sidebar($id); ivr_show_edit($id, 3, $def); break; case "edit": ivr_sidebar($id); ivr_show_edit($id, $nbroptions, $_POST); break; case "edited": if (isset($_REQUEST['delete'])) { sql("DELETE from ivr where ivr_id='$id'"); sql("DELETE FROM ivr_dests where ivr_id='$id'"); needreload(); } else { ivr_do_edit($id, $_POST); ivr_sidebar($id); if (isset($_REQUEST['increase'])) $nbroptions++; if (isset($_REQUEST['decrease'])) { $nbroptions--; } if ($nbroptions < 1) $nbroptions = 1; //ivr_show_edit($id, $nbroptions, $_POST); $url = 'config.php?type=setup&display=ivr&action=edit&id='.$id.'&nbroptions='.$nbroptions; redirect($url); break; } default: ivr_sidebar($id); ?>

"; echo _("You use the Digital Receptionist to make IVR's, Interactive Voice Responce systems.")."
\n"; echo _("When creating a menu option, apart from the standard options of 0-9,* and #, you can also use 'i' and 't' destinations.")."\n"; echo _("'i' is used when the caller pushes an invalid button, and 't' is used when there is no response.")."\n"; echo _("If those options aren't supplied, the default 't' is to replay the menu three times and then hang up,")."\n"; echo _("and the default 'i' is to say 'Invalid option, please try again' and replay the menu.")."\n"; echo _("After three invalid attempts, the line is hung up.")."\n"; ?>

\n"; } function ivr_show_edit($id, $nbroptions, $post) { global $db; $ivr_details = ivr_get_details($id); $ivr_dests = ivr_get_dests($id); ?>

" />
:

>
>
>
>

You must install and enable the \"Systems Recordings\" Module to edit this option")?>

">   ">   1) { ?> ">

\n"; } else { echo "\n"; } ?> ">   ">   1) { ?> ">
\n"; } function drawdestinations($count, $sel, $dest, $ivr_ret) { ?>
The return path will be to any IVR that was in the call path prior to this IVR which could lead to strange results if there was an IVR called in the call path but not immediately before this")?>
>


Leave blank to remove

query($sql); if(DB::IsError($result)) { return false; } } return true; } return true; } ?>