function announcement_getdestinfo($dest) { global $active_modules; if (substr(trim($dest), 0, 17) == 'app-announcement-') { $exten = explode(',', $dest); $exten = substr($exten[0], 17); $thisexten = announcement_get($exten); if (empty($thisexten)) { return array(); } else { $type = isset($active_modules['announcement']['type']) ? $active_modules['announcement']['type'] : 'setup'; return array('description' => sprintf(_("Announcement: %s"), $thisexten['description']), 'edit_url' => 'config.php?display=announcement&type=' . $type . '&extdisplay=' . urlencode($exten)); } } else { return false; } }
<?php // Eventually I recon the drawListMenu could be built into the new component class thus making // the relevent page.php file unnessassary echo '<li><a href="config.php?display=announcement&type=setup">' . _('Add Announcement') . '</a></li>'; foreach (announcement_list() as $row) { echo '<li><a href="config.php?display=announcement&type=setup&extdisplay=' . $row[0] . '" class="">' . $row[1] . '</a></li>'; } ?> </ul></div> <div class="content"> <?php if ($extdisplay) { // load $row = announcement_get($extdisplay); $description = $row['description']; $recording_id = $row['recording_id']; $allow_skip = $row['allow_skip']; $post_dest = $row['post_dest']; $return_ivr = $row['return_ivr']; $noanswer = $row['noanswer']; $repeat_msg = $row['repeat_msg']; } ?> <form name="editAnnouncement" action="<?php $_SERVER['PHP_SELF']; ?> " method="post" onsubmit="return checkAnnouncement(editAnnouncement);"> <input type="hidden" name="extdisplay" value="<?php echo $extdisplay;