コード例 #1
0
ファイル: functions.inc.php プロジェクト: hardikk/HNH
function miscdests_get_config($engine)
{
    global $ext;
    // is this the best way to pass this?
    switch ($engine) {
        case "asterisk":
            $contextname = 'ext-miscdests';
            $fctemplate = '/\\{(.+)\\:(.+)\\}/';
            if (is_array($destlist = miscdests_list())) {
                foreach ($destlist as $item) {
                    $miscdest = miscdests_get($item['0']);
                    $miscid = $miscdest['id'];
                    $miscdescription = $miscdest['description'];
                    $miscdialdest = $miscdest['destdial'];
                    // exchange {mod:fc} for the relevent feature codes in $miscdialdest
                    $miscdialdest = preg_replace_callback($fctemplate, "miscdests_lookupfc", $miscdialdest);
                    // write out the dialplan details
                    $ext->add($contextname, $miscid, '', new ext_noop('MiscDest: ' . $miscdescription));
                    $ext->add($contextname, $miscid, '', new ext_goto('from-internal,' . $miscdialdest . ',1', ''));
                }
            }
            break;
    }
}
コード例 #2
0
ファイル: page.miscdests.php プロジェクト: hardikk/HNH
    foreach ($miscdests as $miscdest) {
        echo "<li><a id=\"" . ($extdisplay == $miscdest[0] ? 'current' : '') . "\" href=\"config.php?display=" . urlencode($dispnum) . "&id=" . urlencode($miscdest[0]) . "\">{$miscdest[1]}</a></li>";
    }
}
?>
</ul></div>


<div class="content">
<?php 
if ($action == 'delete') {
    echo '<br><h3>' . _("Misc Destination") . ' ' . $extdisplay . ' ' . _("deleted") . '!</h3><br><br><br><br><br><br><br><br>';
} else {
    if ($extdisplay) {
        //get details for this meetme
        $thisMiscDest = miscdests_get($extdisplay);
        //create variables
        $description = "";
        $destdial = "";
        extract($thisMiscDest);
    }
    $helptext = _("Misc Destinations are for adding destinations that can be used by other FreePBX modules, generally used to route incoming calls. If you want to create feature codes that can be dialed by internal users and go to various destinations, please see the <strong>Misc Applications</strong> module.");
    if ($extdisplay) {
        ?>
	<h2><?php 
        echo _("Misc Destination:") . " " . $description;
        ?>
</h2>
<?php 
        $usage_list = framework_display_destination_usage(miscdests_getdest($extdisplay));
        $delURL = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . '&action=delete';
コード例 #3
0
ファイル: miscdests.php プロジェクト: shinichi85/voiperopen
        $prevtag .= " | ";
    }
    print "{$prevtag} <a onFocus='this.blur()' href='?mode=pbx&display=" . $dispnum . "&skip={$nextskip}'>[NEXT]</a>";
}
print "</div></center></li>";
?>
</div>


<div class="content">
<?php 
if ($action == 'delete') {
    echo '<br><h3>' . _("Misc Destination") . ' ' . $extdisplay . ' ' . _("deleted") . '!</h3><br><br><br><br><br><br><br><br>';
} else {
    if ($extdisplay) {
        $thisMiscDest = miscdests_get($extdisplay, $context);
        $extension = "";
        $descr = "";
        extract($thisMiscDest);
    }
    $delURL = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . '&action=delete';
    ?>

	
<?php 
    if ($extdisplay) {
        ?>
	<h3><?php 
        echo _("Misc Destination:") . " " . $description;
        ?>
</h3>