Пример #1
0
/** If this is ours, we return it, otherwise we return false
 *  We use just use customappsreg and not the display because it
 *  is a per-module routine
 */
function customappsreg_getdestinfo($dest)
{
    global $active_modules;
    $thisexten = customappsreg_customdests_get($dest);
    if (empty($thisexten)) {
        return false;
    } else {
        $type = isset($active_modules['customappsreg']['type']) ? $active_modules['customappsreg']['type'] : 'tool';
        return array('description' => sprintf(_("Custom Destination: %s"), $thisexten['description']), 'edit_url' => 'config.php?display=customdests&type=' . $type . '&extdisplay=' . urlencode($dest));
    }
}
Пример #2
0
<?php 
echo '<li><a href="config.php?display=' . $display . '&amp;type=' . $type . '">' . _('Add Custom Destination') . '</a></li>';
foreach (customappsreg_customdests_list() as $row) {
    $descr = $row['description'] != '' ? $row['description'] : '(' . $row['custom_dest'] . ')';
    echo '<li><a href="config.php?display=' . $display . '&amp;type=' . $type . '&amp;extdisplay=' . $row['custom_dest'] . '" class="">' . $descr . '</a></li>';
}
?>
</ul></div>

<div class="content">

<?php 
if ($custom_dest != '') {
    // load
    $usage_list = framework_display_destination_usage(customappsreg_customdests_getdest($custom_dest));
    $row = customappsreg_customdests_get($custom_dest);
    $description = $row['description'];
    $notes = $row['notes'];
    $disp_description = $row['description'] != '' ? $row['description'] : '(' . $row['custom_dest'] . ')';
    echo "<h2>" . _("Edit: ") . "{$disp_description}" . "</h2>";
} else {
    echo "<h2>" . _("Add Custom Destination") . "</h2>";
}
$helptext = _("Custom Destinations allows you to register your custom destinations that point to custom dialplans and will also 'publish' these destinations as available destinations to other modules. This is an advanced feature and should only be used by knowledgeable users. If you are getting warnings or errors in the notification panel about CUSTOM destinations that are correct, you should include them here. The 'Unknown Destinations' chooser will allow you to choose and insert any such destinations that the registry is not aware of into the Custom Destination field.");
echo $helptext;
?>

<form name="editCustomDest" action="<?php 
$_SERVER['PHP_SELF'];
?>
" method="post" onsubmit="return checkCustomDest(editCustomDest);">