function setcid_getdestinfo($dest) { if (substr(trim($dest), 0, 11) == 'app-setcid,') { $grp = explode(',', $dest); $id = $grp[1]; $thiscid = setcid_get($id); if (empty($thiscid)) { return array(); } else { return array('description' => sprintf(_("Set CallerID %s: "), $thiscid['description']), 'edit_url' => 'config.php?display=setcid&id=' . urlencode($id)); } } else { return false; } }
<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']; echo "<h2>" . _("Edit: ") . "{$description} ({$cid_name})" . "</h2>"; $usage_list = framework_display_destination_usage(setcid_getdest($extdisplay)); if (!empty($usage_list)) { ?> <tr><td colspan="2"> <a href="#" class="info"><?php echo $usage_list['text']; ?> :<span><?php echo $usage_list['tooltip']; ?>