Ejemplo n.º 1
0
function miscapps_get_config($engine)
{
    global $ext;
    switch ($engine) {
        case 'asterisk':
            foreach (miscapps_list(true) as $row) {
                if ($row['enabled']) {
                    $ext->add('app-miscapps-' . $row['miscapps_id'], $row['ext'], '', new ext_noop('Running miscapp ' . $row['miscapps_id'] . ': ' . $row['description']));
                    $ext->add('app-miscapps-' . $row['miscapps_id'], $row['ext'], '', new ext_macro('user-callerid'));
                    $ext->add('app-miscapps-' . $row['miscapps_id'], $row['ext'], '', new ext_goto($row['dest']));
                    $ext->addInclude('from-internal-additional', 'app-miscapps-' . $row['miscapps_id']);
                }
            }
            break;
    }
}
Ejemplo n.º 2
0
    $title = _("Add Misc Application");
    $id = "None";
    $delurl = '';
    //Enable by default
    $enabled = true;
}
//bootnav
$bootnav = '';
$bootnav .= '<div class="col-sm-3 hidden-xs bootnav">';
$bootnav .= '<div class="list-group">';
if ($extdisplay == '') {
    $bootnav .= '<a href="config.php?display=miscapps&amp;type=setup" class="list-group-item active">' . _("Add Misc Application") . '</a>';
} else {
    $bootnav .= '<a href="config.php?display=miscapps&amp;type=setup" class="list-group-item">' . _("Add Misc Application") . '</a>';
}
foreach (miscapps_list() as $row) {
    $bootnav .= '<a class="list-group-item ' . ($extdisplay == $row['miscapps_id'] ? 'active' : '') . '" href="config.php?display=miscapps&amp;type=setup&amp;extdisplay=' . $row['miscapps_id'] . '">' . $row['description'] . '</a>';
}
$bootnav .= '</div>';
$bootnav .= '</div>';
//end bootnav
$warn = '';
if (!empty($conflict_url)) {
    $warn .= '<div class="alert alert-danger" role="alert">';
    $warn .= '<i class="glyphicon glyphicon-exclamation-sign"></i>&nbsp;<h5>' . _("Conflicting Extensions") . '</h5>';
    $warn .= '<ul class="list-group">';
    foreach ($conflict_url as $cu) {
        $warn .= '<li class="list-group-item" id="iteminuse">' . $cu . '</li>';
    }
    $warn .= '</ul>';
    $warn .= '</div>';
Ejemplo n.º 3
0
<?php

global $db;
global $amp_conf;
$miscapps_arr = miscapps_list();
foreach ($miscapps_arr as $item) {
    echo "removing " . $item['description'] . "..";
    miscapps_delete($item['miscapps_id']);
    echo "done<br>\n";
}
echo "dropping table miscapps..";
sql("DROP TABLE IF EXISTS `miscapps`");
echo "done<br>\n";