Пример #1
0
if (DB::IsError($globals)) {
    die($globals->getMessage());
}
foreach ($globals as $global) {
    ${trim($global[0])} = $global[1];
}
$ReadForceIncomingHours = ReadForceIncomingHours(2);
if ($ReadForceIncomingHours != "none") {
    $WarningMsg = "This Incoming Call is in conflict with the Special Estension *60.<br>Please don't use both at the same time. SUBMIT CHANGES is Disabled.";
} else {
    $WarningMsg = "&nbsp;";
}
$unique_aas = getaas();
$extens = getextens();
$gresults = getgroups();
$queues = getqueues();
$miscs = getmiscdest();
echo "<h3>" . _("Incoming Calls <font class=\"contextcolor\">#2</font> (context: <font class=\"contextcolor\"> from-trunk-1</font>):") . "</h3>";
?>
<table width="99%" border="0" cellpadding="1" cellspacing="2">
<form name="incoming" action="config.php?mode=pbx&amp;display=<?php 
echo urlencode($dispnum);
?>
" method="post">
<tr><td>
<center><h5><a href="config.php?display=9&mode=pbx">Incoming #1</a> - <a href="config.php?display=17&mode=pbx">Incoming #2</a> - <a href="config.php?display=10&mode=pbx">Incoming #3</a> - <a href="config.php?display=13&mode=pbx">Incoming #4</a> - <a href="config.php?display=15&mode=pbx">Incoming #5</a> - <a href="config.php?display=5&mode=pbx">Incoming #6</a></h5></center>
</td></tr>
<tr><td><b><center class="Warning"><?php 
echo $WarningMsg;
?>
</center></b></td></tr>
Пример #2
0
      </header>
      <div class="demo-ribbon"></div>
      <main class="demo-main mdl-layout__content">
        <div class="demo-container mdl-grid">
          <div class="mdl-cell mdl-cell--2-col mdl-cell--hide-tablet mdl-cell--hide-phone"></div>
          <div class="demo-content mdl-color--white mdl-shadow--4dp content mdl-color-text--grey-800 mdl-cell mdl-cell--8-col">
            



            



			<?php 
$queues = getqueues($conn);
foreach ($queues as $queue) {
    ?>
				<div class="demo-card-wide mdl-card mdl-shadow--2dp" style="margin-top:20px; left:27%;">
			  <div class="mdl-card__title">
			    <h2 class="mdl-card__title-text"><?php 
    echo $queue->location;
    ?>
</h2>
			  </div>
			  <div class="mdl-card__actions mdl-card--border">
			    <a class="mdl-button mdl-button--colored mdl-js-button mdl-js-ripple-effect">
			       <?php 
    echo '<a href="/restaurant.php/?id=' . $queue->id . '">' . $queue->name . '</a><br>';
    ?>
			    </a>
Пример #3
0
function ivrdrawselects($formName, $goto, $i)
{
    $unique_aas = getaas();
    $extens = getextens();
    $gresults = getgroups();
    $queues = getqueues();
    $miscdest = getmiscdest();
    if (isset($extens)) {
        //get voicemail
        $uservm = getVoicemail();
        $vmcontexts = array_keys($uservm);
        foreach ($extens as $thisext) {
            $extnum = $thisext[0];
            // search vm contexts for this extensions mailbox
            foreach ($vmcontexts as $vmcontext) {
                if (isset($uservm[$vmcontext][$extnum])) {
                    $vmname = $uservm[$vmcontext][$extnum]['name'];
                    $vmboxes[] = array($extnum, '"' . $vmname . '" <' . $extnum . '>');
                }
            }
        }
    }
    $selectHtml = '<table border="0" cellpadding="1" cellspacing="2" id="loopdestination"';
    if ($goto == "") {
        $selectHtml .= 'style="display:none;"';
    }
    $selectHtml .= '>';
    $selectHtml .= '<tr><td><h5>Set Destination:</h5></td></tr>';
    $selectHtml .= '<tr><td></td></tr>';
    $selectHtml .= '<tr><td><input type="hidden" name="goto' . $i . '" value="">';
    $selectHtml .= '<input type="radio" onFocus="this.blur()" name="goto_indicate' . $i . '" value="ivr" onclick="javascript:document.' . $formName . '.goto' . $i . '.value=\'ivr\';" onkeypress="javascript:if (event.keyCode == 0 || (document.all && event.keyCode == 13)) document.' . $formName . '.goto' . $i . '.value=\'ivr\';" ' . (strpos($goto, 'aa_') === false ? '' : 'CHECKED=CHECKED') . ' /> ' . _("Digital Receptionist") . ': ';
    $selectHtml .= '<select name="ivr' . $i . '">';
    if (isset($unique_aas)) {
        foreach ($unique_aas as $unique_aa) {
            $menu_id = $unique_aa[0];
            $menu_name = $unique_aa[1];
            $selectHtml .= '<option value="' . $menu_id . '" ' . (strpos($goto, $menu_id) === false ? '' : 'SELECTED') . '>' . ($menu_name ? $menu_name : 'Menu ID' . $menu_id) . '</option>';
        }
    }
    $selectHtml .= '</select></td></tr>';
    $selectHtml .= '<tr><td><input type="radio" onFocus="this.blur()" name="goto_indicate' . $i . '" value="extension" onclick="javascript:document.' . $formName . '.goto' . $i . '.value=\'extension\';" onkeypress="javascript:if (event.keyCode == 0 || (document.all && event.keyCode == 13)) document.' . $formName . '.goto' . $i . '.value=\'extension\';" ' . (strpos($goto, 'ext-local') === false ? '' : 'CHECKED=CHECKED') . '/> ' . _("Extension") . ': ';
    $selectHtml .= '<select name="extension' . $i . '">';
    if (isset($extens)) {
        foreach ($extens as $exten) {
            $selectHtml .= '<option value="' . $exten[0] . '" ' . (strpos($goto, $exten[0]) === false ? '' : 'SELECTED') . '>' . $exten[1] . '</option>';
        }
    }
    $selectHtml .= '</select></td></tr>';
    $selectHtml .= '<tr><td><input type="radio" onFocus="this.blur()" name="goto_indicate' . $i . '" value="voicemail" onclick="javascript:document.' . $formName . '.goto' . $i . '.value=\'voicemail\';" onkeypress="javascript:if (event.keyCode == 0 || (document.all && event.keyCode == 13)) document.' . $formName . '.goto' . $i . '.value=\'voicemail\';" ' . (strpos($goto, 'vm') === false ? '' : 'CHECKED=CHECKED') . (strpos($goto, 'ext-local,${VM_PREFIX}') === false ? '' : 'CHECKED=CHECKED') . ' /> ' . _("Voicemail") . ': ';
    $selectHtml .= '<select name="voicemail' . $i . '">';
    if (isset($vmboxes)) {
        foreach ($vmboxes as $exten) {
            $selectHtml .= '<option value="' . $exten[0] . '" ' . (strpos($goto, $exten[0]) === false ? '' : 'SELECTED') . '>' . $exten[1] . '</option>';
        }
    }
    $selectHtml .= '</select></td></tr>';
    $selectHtml .= '<tr><td><input type="radio" onFocus="this.blur()" name="goto_indicate' . $i . '" value="group" onclick="javascript:document.' . $formName . '.goto' . $i . '.value=\'group\';" onkeypress="javascript:if (event.keyCode == 0 || (document.all && event.keyCode == 13)) document.' . $formName . '.goto' . $i . '.value=\'group\';" ' . (strpos($goto, 'ext-group') === false ? '' : 'CHECKED=CHECKED') . ' /> ' . _("Ring Group") . ': ';
    $selectHtml .= '<select name="group' . $i . '">';
    if (isset($gresults)) {
        foreach ($gresults as $gresult) {
            $selectHtml .= '<option value="' . $gresult[0] . '" ' . (strpos(',' . $goto . ',', ',' . $gresult[0] . ',') === false ? '' : 'SELECTED') . '>' . $gresult[0] . ':' . $gresult[1] . '</option>';
        }
    }
    $selectHtml .= '</select></td></tr>';
    $selectHtml .= '<tr><td><input type="radio" onFocus="this.blur()" name="goto_indicate' . $i . '" value="queue" onclick="javascript:document.' . $formName . '.goto' . $i . '.value=\'queue\';" onkeypress="javascript:if (event.keyCode == 0 || (document.all && event.keyCode == 13)) document.' . $formName . '.goto' . $i . '.value=\'queue\';" ' . (strpos($goto, 'ext-queues') === false ? '' : 'CHECKED=CHECKED') . ' /> ' . _("Queue") . ': ';
    $selectHtml .= '<select name="queue' . $i . '">';
    if (isset($queues)) {
        foreach ($queues as $queue) {
            $selectHtml .= '<option value="' . $queue[0] . '" ' . (strpos($goto, $queue[0]) === false ? '' : 'SELECTED') . '>' . $queue[0] . ':' . $queue[1] . '</option>';
        }
    }
    $selectHtml .= '</select></td></tr>';
    $selectHtml .= '<tr><td><input type="radio" onFocus="this.blur()" name="goto_indicate' . $i . '" value="miscdest" onclick="javascript:document.' . $formName . '.goto' . $i . '.value=\'miscdest\';" onkeypress="javascript:if (event.keyCode == 0 || (document.all && event.keyCode == 13)) document.' . $formName . '.goto' . $i . '.value=\'miscdest\';" ' . (strpos($goto, 'ext-miscdests') === false ? '' : 'CHECKED=CHECKED') . '/> ' . _("Misc Destinations") . ': ';
    $selectHtml .= '<select name="miscdest' . $i . '">';
    if (isset($miscdest)) {
        foreach ($miscdest as $miscdests) {
            $selectHtml .= '<option value="' . $miscdests[0] . '" ' . (strpos($goto, $miscdests[0]) === false ? '' : 'SELECTED') . '>' . $miscdests[0] . ':' . $miscdests[1] . '</option>';
        }
    }
    $selectHtml .= '</select></td></tr>';
    $selectHtml .= '<tr><td><input type="radio" onFocus="this.blur()" name="goto_indicate' . $i . '" value="dial" ' . (strpos($goto, 'outbound-allroutes') === false ? '' : 'CHECKED=CHECKED') . ' />';
    $selectHtml .= ' <a href="#" class="info">' . _("Custom Dial<span>You can include an extension on a remote system, or an external number (Outbound Routing must contain a valid route for external numbers)</span>") . '</a>:';
    $hackstart = strpos($goto, ',') + 1;
    $selectHtml .= '<input type="text" size="20" name="dial_args' . $i . '" value="' . (strpos($goto, 'outbound-allroutes') === false ? '' : substr($goto, $hackstart, -2)) . '" />';
    $selectHtml .= '</td></tr>';
    $selectHtml .= '</table>';
    return $selectHtml;
}