예제 #1
0
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;
    }
}
예제 #2
0
파일: page.setcid.php 프로젝트: hardikk/HNH
<div class="rnav"><ul>
<?php 
echo '<li><a href="config.php?display=setcid&amp;type=' . $type . '">' . _('Add CallerID') . '</a></li>';
foreach (setcid_list() as $row) {
    echo '<li><a href="config.php?display=setcid&amp;type=' . $type . '&amp;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'];
        ?>