function setcid_destinations() { global $module_page; $extens = array(); // it makes no sense to point at another callerid (and it can be an infinite loop) if ($module_page == 'setcid') { return false; } // return an associative array with destination and description foreach (setcid_list() as $row) { $extens[] = array('destination' => 'app-setcid,' . $row['cid_id'] . ',1', 'description' => $row['description']); } return $extens; }
redirect_standard('extdisplay'); break; case 'delete': setcid_delete($cid_id); needreload(); redirect_standard(); break; } ?> </div> <div class="rnav"><ul> <?php echo '<li><a href="config.php?display=setcid&type=' . $type . '">' . _('Add CallerID') . '</a></li>'; foreach (setcid_list() as $row) { echo '<li><a href="config.php?display=setcid&type=' . $type . '&extdisplay=' . $row['cid_id'] . '" class="rnavdata" rnavdata="' . $row['description'] . ',' . $row['cid_name'] . ',' . $row['cid_num'] . ',' . $row['dest'] . '">' . $row['description'] . '</a></li>'; } ?> </ul></div> <div class="content"> <?php if ($extdisplay) { // load $row = setcid_get($extdisplay); $description = $row['description']; $cid_name = $row['cid_name']; $cid_num = $row['cid_num']; $dest = $row['dest'];