function queueprio_getdestinfo($dest)
{
    global $active_modules;
    if (substr(trim($dest), 0, 14) == 'app-queueprio,') {
        $exten = explode(',', $dest);
        $exten = $exten[1];
        $thisexten = queueprio_get($exten);
        if (empty($thisexten)) {
            return array();
        } else {
            $type = isset($active_modules['queueprio']['type']) ? $active_modules['queueprio']['type'] : 'setup';
            return array('description' => sprintf(_("Queue Priority: %s"), $thisexten['description']), 'edit_url' => 'config.php?display=queueprio&type=' . $type . '&extdisplay=' . urlencode($exten));
        }
    } else {
        return false;
    }
}
Beispiel #2
0
<?php

$extdisplay = isset($_REQUEST['extdisplay']) ? $_REQUEST['extdisplay'] : '';
$usagehtml = '';
if ($extdisplay != '') {
    // load
    $row = queueprio_get($extdisplay);
    $usage_list = framework_display_destination_usage(queueprio_getdest($extdisplay));
    if (!empty($usage_list)) {
        $usagehtml = '<div class="well well-info>"';
        $usagehtml .= '<h3>' . $usage_list['text'] . '</h3>';
        $usagehtml .= $usage_list['tooltip'];
        $usagehtml .= '</div>';
    }
    $description = $row['description'];
    $queue_priority = $row['queue_priority'];
    $dest = $row['dest'];
    $delURL = '?display=queueprio&action=delete&queueprio_id=' . $extdisplay;
    $subhead = "<h2>" . _("Edit: ") . "{$description} ({$queue_priority})" . "</h2>";
} else {
    $description = '';
    $queue_priority = '0';
    $dest = '';
    $delURL = '';
    $subhead = "<h2>" . _("Add Queue Priority") . "</h2>";
}
echo $subhead;
echo $usagehtml;
?>
<form name="editQueuePriority" id="editQueuePriority" class="fpbx-submit" action="" method="post" onsubmit="return checkQueuePriority(editQueuePriority);" data-fpbx-delete="<?php 
echo $delURL;