mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
* Change the data type to boolean
* Use boolean values in SQL and Conditional Statements
* Schema Data Types: Drop views so that alter tables statements complete
* Update settings.php
* Add extension for call_screen_enabled
* Gateway handle boolean
Add the boolean toggle
- distinct_to
- caller_id_in_from
- supress_cng
- extension_in_contact
- contact_in_ping
* Update gateways.php
* Update voicemail_edit.php
* Replace the ${caller_id_name} with the extensions caller id name
* Phrase - Edit: Update slide toggle with new select beneath.
* Update the input toggle style
* Set the input_toggle_style_switch as boolean
* Update the input toggle style
* Theme: Adjust CSS to wrap description text on form fields.
* Add domain_uuid and domain_name to the SQL SELECT
* Unset the parameters to fix the next query
* Gateway: Integrate new slide toggle switch.
* Dashboard: Update the input toggle style (#7499)
* Dashboard: Update the input toggle style
* Update dashboard_widget_edit.php
* Update dashboard_edit.php
* Inbound Route - Add: Integrate new slide toggle switch and boolean.
* User Settings: Integrate new slide toggle switch.
* Call Block Edit: Update the input toggle style (#7500)
* Bridge Edit: Update the input toggle style (#7501)
* Update phrases.php
* Update domain_edit.php
* Domain Settings Edit: Update the input toggle style
* User Edit: Update the input toggle style
* Update install.php
* Remove fields marked as deprecated
* Use boolean in the select statement
* Streams: New slide toggle and boolean.
* Streams: Remove unnecessary default.
* Queues (FIFO): New slide toggle.
* Call Detail Records: Update the input toggle style (#7503)
* Call Detail Records: Update the input toggle style
* Update xml_cdr_extension_summary.php
* Update xml_cdr_extension_summary.php
* Update xml_cdr_extension_summary.php
* Call Centers: Update the input toggle style (#7502)
* Call Centers: Update the input toggle style
* Update call_center_agent_edit.php
* Conference Centers: Update the input toggle style (#7506)
* Conference Centers: Update the input toggle style
* Update app_config.php
* Update conference_center_edit.php
* Use boolean data type (#7505)
* Call Flow Edit: Update the input toggle style (#7504)
* Devices: Update the input toggle style
* IVR Menus: New slide toggle.
* IVR Menu: Remove deprected file.
* SIP Profile - Edit: New slide toggle.
* Device Profiles: Update the input toggle style
* Ring Groups - List: Fix syntax.
* Theme: Fire onchange event when switching slide toggle control.
* Device Vendors: Update the input toggle style
* Update enabled boolean
* Update device_edit.php
* Ring Groups: New slide toggle.
* Update domain_edit.php
* Email Templates: Update the input toggle style
* Header: Correct default value on input toggle style.
* Default/Domain/User Settings: Adjust Select option label for better clarity.
* Use true boolean types for switch theme toggle or drop-down box (#7507)
* Groups: Update the input toggle style
* Conference Controls: Update the input toggle style (#7509)
* Conference Controls: Update the input toggle style
* Update conference_control_edit.php
* Update conference_control_details.php
* Update conference_control_detail_edit.php
* Conferences: Update the input toggle style (#7511)
* Use true boolean types for switch theme toggle or drop-down box (#7513)
* Dialplans: Update the input toggle style
Also updated outbound route add
* Ring Group: Only adjust ring group forward destination top margin when slide toggle enabled.
* Default/Domain/User Settings - List: Adjust for new 'Select Box' label on input_toggle_style value.
* Use true boolean types for switch theme toggle or drop-down box (#7514)
* Call Forward / Follow Me: Minor javascript adjustments to mirror previous behavior.
* Ring Groups [Dashboard]: New slide toggle.
* Get the contacts details with a seperate SQL Query
* Remove debug info
* Destinations: Update the input toggle style
* Conference Profiles: Update the input toggle style (#7515)
* Conference Profiles: Update the input toggle style
* Update conference_profiles.php
* Update conference_profile_params.php
* Update conference_profile_param_edit.php
* Update conference_profile_edit.php
* Extensions: Update the input toggle style
* Contacts: Update the input toggle style (#7517)
* Contacts: Update the input toggle style
* Update contact_address_edit.php
* Update contact_attachment_edit.php
* Update contact_edit.php
* Update contact_email_edit.php
* Update contact_phone_edit.php
* Update contact_relation_edit.php
* Update contact_setting_edit.php
* Update contact_url_edit.php
* Update contacts.php
* Voicemails: New slide toggle.
* Voicemail Greeting: New slide toggle.
* Modules: New slide toggle.
* Recordings: New slide toggle
* Variables: New slide toggle.
* Time Conditions: New slide toggle.
* Extensions - List: Remove invalid column name.
* Extension Settings: New slide toggle.
* Number Translations: New slide toggle and boolean.
* Sofia global settings: Update the input toggle style
* Update alter table convert to boolean
* Fix contact relation search (#7518)
* Sip Profile Edit: Fix setting enabled labels (#7519)
* Sip Profile Edit: Fix setting enabled labels
* Update sip_profile_edit.php
* Update dialplan_edit.php (#7520)
* Update SQL queries to use true/false for contact primary settings (#7521)
* Update SQL queries to use true/false for contact primary settings
* Update contacts_vcard.php
* Update email.php
* Update totp.php
* Update contact_url_edit.php
* Update contact_email_edit.php
* Update contact_address_edit.php
* Update contact_attachment_edit.php
* Update contact_phone_edit.php
* Add a database views method
* Add database view groups
* Add database users view
* Add database call_recordings view
* Update users.php
* Add database view call block
* Update schema to use the database views method
* Update conference.conf.lua boolean
* Update directory.lua boolean
* Update callcenter.conf.lua agent_status boolean
* Update sofia.conf.lua boolean
* Update number translations lua boolean
* Update directory.lua boolean
* Update group_call.lua fix the cache
* Update reverse-auth-lookup.lua boolean
* Update directory.lua boolean
* Use concat instead of ||
* Update index.lua
---------
Co-authored-by: fusionate <nate@fusionpbx.com>
Co-authored-by: Alex <alex@fusionpbx.com>
Co-authored-by: frytimo <tim@fusionpbx.com>
395 lines
18 KiB
PHP
395 lines
18 KiB
PHP
<?php
|
|
/*
|
|
FusionPBX
|
|
Version: MPL 1.1
|
|
|
|
The contents of this file are subject to the Mozilla Public License Version
|
|
1.1 (the "License"); you may not use this file except in compliance with
|
|
the License. You may obtain a copy of the License at
|
|
http://www.mozilla.org/MPL/
|
|
|
|
Software distributed under the License is distributed on an "AS IS" basis,
|
|
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
for the specific language governing rights and limitations under the
|
|
License.
|
|
|
|
The Original Code is FusionPBX
|
|
|
|
The Initial Developer of the Original Code is
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
|
Copyright (C) 2008-2025
|
|
All Rights Reserved.
|
|
|
|
Contributor(s):
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
|
Tony Fernandez <tfernandez@smartip.ca>
|
|
*/
|
|
|
|
//includes files
|
|
require_once dirname(__DIR__, 2) . "/resources/require.php";
|
|
require_once "resources/check_auth.php";
|
|
|
|
//check permissions
|
|
if (permission_exists('xml_cdr_search_advanced')) {
|
|
//access granted
|
|
}
|
|
else {
|
|
echo "access denied";
|
|
exit;
|
|
}
|
|
|
|
//add multi-lingual support
|
|
$language = new text;
|
|
$text = $language->get();
|
|
|
|
//declare variables
|
|
$direction = "";
|
|
$caller_id_name = "";
|
|
$caller_id_number = "";
|
|
$destination_number = "";
|
|
$context = "";
|
|
$start_stamp_begin = "";
|
|
$start_stamp_end = "";
|
|
$answer_stamp_begin = "";
|
|
$answer_stamp_end = "";
|
|
$end_stamp_begin = "";
|
|
$end_stamp_end = "";
|
|
$duration_min = "";
|
|
$duration_max = "";
|
|
$billsec = "";
|
|
$hangup_cause = "";
|
|
$xml_cdr_uuid = "";
|
|
$bridge_uuid = "";
|
|
$accountcode = "";
|
|
$read_codec = "";
|
|
$write_codec = "";
|
|
$remote_media_ip = "";
|
|
$network_addr = "";
|
|
$mos_score = "";
|
|
|
|
//get the list of extensions
|
|
$sql = "select extension_uuid, extension, number_alias from v_extensions ";
|
|
$sql .= "where domain_uuid = :domain_uuid ";
|
|
$sql .= "order by extension asc, number_alias asc ";
|
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
|
$extensions = $database->select($sql, $parameters, 'all');
|
|
|
|
//get the ring groups
|
|
if (permission_exists('xml_cdr_search_ring_groups')) {
|
|
$sql = "select ring_group_uuid, ring_group_name, ring_group_extension from v_ring_groups ";
|
|
$sql .= "where domain_uuid = :domain_uuid ";
|
|
$sql .= "and ring_group_enabled = true ";
|
|
$sql .= "order by ring_group_extension asc ";
|
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
|
$ring_groups = $database->select($sql, $parameters, 'all');
|
|
}
|
|
|
|
//get the ivr menus
|
|
if (permission_exists('xml_cdr_search_ivr_menus')) {
|
|
$sql = "select ivr_menu_uuid, ivr_menu_name, ivr_menu_extension from v_ivr_menus ";
|
|
$sql .= "where domain_uuid = :domain_uuid ";
|
|
$sql .= "and ivr_menu_enabled = true ";
|
|
$sql .= "order by ivr_menu_extension asc ";
|
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
|
$ivr_menus = $database->select($sql, $parameters, 'all');
|
|
}
|
|
|
|
//get the call center queues
|
|
if (permission_exists('xml_cdr_search_call_center_queues')) {
|
|
$sql = "select call_center_queue_uuid, queue_name, queue_extension from v_call_center_queues ";
|
|
$sql .= "where domain_uuid = :domain_uuid ";
|
|
$sql .= "order by queue_extension asc ";
|
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
|
$call_center_queues = $database->select($sql, $parameters, 'all');
|
|
}
|
|
|
|
//send the header
|
|
$document['title'] = $text['title-advanced_search'];
|
|
require_once "resources/header.php";
|
|
|
|
//javascript to toggle input/select boxes
|
|
echo "<script type='text/javascript'>";
|
|
echo " function toggle(field) {";
|
|
echo " if (field == 'source') {";
|
|
echo " document.getElementById('caller_extension_uuid').selectedIndex = 0;";
|
|
echo " document.getElementById('caller_id_number').value = '';";
|
|
echo " $('#caller_extension_uuid').toggle();";
|
|
echo " $('#caller_id_number').toggle();";
|
|
echo " if ($('#caller_id_number').is(':visible')) { $('#caller_id_number').trigger('focus'); } else { $('#caller_extension_uuid').trigger('focus'); }";
|
|
echo " }";
|
|
echo " }";
|
|
echo "</script>";
|
|
|
|
//start the html form
|
|
if (isset($_GET['redirect']) && $_GET['redirect'] == 'xml_cdr_statistics') {
|
|
echo "<form method='get' action='xml_cdr_statistics.php'>\n";
|
|
}
|
|
else {
|
|
echo "<form method='get' action='xml_cdr.php'>\n";
|
|
}
|
|
|
|
echo "<div class='action_bar' id='action_bar'>\n";
|
|
echo " <div class='heading'><b>".$text['title-advanced_search']."</b></div>\n";
|
|
echo " <div class='actions'>\n";
|
|
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'xml_cdr.php']);
|
|
echo button::create(['type'=>'submit','label'=>$text['button-search'],'icon'=>$settings->get('theme', 'button_icon_search'),'id'=>'btn_save']);
|
|
echo " </div>\n";
|
|
echo " <div style='clear: both;'></div>\n";
|
|
echo "</div>\n";
|
|
|
|
echo "<div class='card'>\n";
|
|
echo "<table cellpadding='0' cellspacing='0' border='0' width='100%'>\n";
|
|
echo " <tr>\n";
|
|
echo " <td width='50%' style='vertical-align: top;'>\n";
|
|
|
|
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
|
echo " <tr>\n";
|
|
echo " <td width='30%' class='vncell' valign='top' nowrap='nowrap'>\n";
|
|
echo " ".$text['label-direction']."\n";
|
|
echo " </td>\n";
|
|
echo " <td width='70%' class='vtable' align='left'>\n";
|
|
echo " <select name='direction' class='formfld'>\n";
|
|
echo " <option value=''></option>\n";
|
|
if ($direction == "inbound") {
|
|
echo " <option value='inbound' selected='selected'>".$text['label-inbound']."</option>\n";
|
|
}
|
|
else {
|
|
echo " <option value='inbound'>".$text['label-inbound']."</option>\n";
|
|
}
|
|
if ($direction == "outbound") {
|
|
echo " <option value='outbound' selected='selected'>".$text['label-outbound']."</option>\n";
|
|
}
|
|
else {
|
|
echo " <option value='outbound'>".$text['label-outbound']."</option>\n";
|
|
}
|
|
if ($direction == "local") {
|
|
echo " <option value='local' selected='selected'>".$text['label-local']."</option>\n";
|
|
}
|
|
else {
|
|
echo " <option value='local'>".$text['label-local']."</option>\n";
|
|
}
|
|
echo " </select>\n";
|
|
|
|
if (permission_exists('xml_cdr_b_leg')){
|
|
echo " <select name='leg' class='formfld'>\n";
|
|
echo " <option value='' selected='selected'></option>\n";
|
|
echo " <option value='a'>a-leg</option>\n";
|
|
echo " <option value='b'>b-leg</option>\n";
|
|
echo " </select>\n";
|
|
}
|
|
|
|
echo " </td>\n";
|
|
echo " </tr>\n";
|
|
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-caller_id_name']."</td>"; //source name
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='caller_id_name' value='".escape($caller_id_name)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-extension']."</td>"; //source number
|
|
echo " <td class='vtable'>";
|
|
echo " <select class='formfld' name='extension_uuid' id='extension_uuid'>\n";
|
|
echo " <option value=''></option>";
|
|
if (is_array($extensions) && @sizeof($extensions) != 0) {
|
|
foreach ($extensions as $row) {
|
|
$selected = (!empty($caller_extension_uuid) && $row['extension_uuid'] == $caller_extension_uuid) ? "selected" : null;
|
|
echo " <option value='".escape($row['extension_uuid'])."' ".escape($selected).">".((is_numeric($row['extension'])) ? escape($row['extension']) : escape($row['number_alias'])." (".escape($row['extension']).")")."</option>";
|
|
}
|
|
}
|
|
unset($sql, $parameters, $extensions, $row, $selected);
|
|
echo " </select>\n";
|
|
echo " <input type='text' class='formfld' style='display: none;' name='caller_id_number' id='caller_id_number' value='".escape($caller_id_number)."'>\n";
|
|
echo " <input type='button' id='btn_toggle_source' class='btn' name='' alt='".$text['button-back']."' value='◁' onclick=\"toggle('source');\">\n";
|
|
echo " </td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-destination']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='destination_number' value='".escape($destination_number)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-context']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='context' value='".escape($context)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-start_range']."</td>";
|
|
echo " <td class='vtable'>";
|
|
echo " <div class='row'>\n";
|
|
echo " <div class='col-sm-12'>";
|
|
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_begin' id='start_stamp_begin' placeholder='".$text['label-from']."' value='".escape($start_stamp_begin)."'>";
|
|
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#start_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='start_stamp_end' id='start_stamp_end' placeholder='".$text['label-to']."' value='".escape($start_stamp_end)."'>";
|
|
echo " </div>\n";
|
|
echo " </div>\n";
|
|
echo " </td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-answer_range']."</td>";
|
|
echo " <td class='vtable'>";
|
|
echo " <div class='row'>\n";
|
|
echo " <div class='col-sm-12'>";
|
|
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#answer_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='answer_stamp_begin' id='answer_stamp_begin' placeholder='".$text['label-from']."' value='".escape($answer_stamp_begin)."'>";
|
|
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#answer_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='answer_stamp_end' id='answer_stamp_end' placeholder='".$text['label-to']."' value='".escape($answer_stamp_end)."'>";
|
|
echo " </div>\n";
|
|
echo " </div>\n";
|
|
echo " </td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-end_range']."</td>";
|
|
echo " <td class='vtable'>";
|
|
echo " <div class='row'>\n";
|
|
echo " <div class='col-sm-12'>";
|
|
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#end_stamp_begin' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='end_stamp_begin' id='end_stamp_begin' placeholder='".$text['label-from']."' value='".escape($end_stamp_begin)."'>";
|
|
echo " <input type='text' class='formfld datetimepicker' data-toggle='datetimepicker' data-target='#end_stamp_end' onblur=\"$(this).datetimepicker('hide');\" style='min-width: 115px; width: 115px;' name='end_stamp_end' id='end_stamp_end' placeholder='".$text['label-to']."' value='".escape($end_stamp_end)."'>";
|
|
echo " </div>\n";
|
|
echo " </div>\n";
|
|
echo " </td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-duration']." (".$text['label-seconds'].")</td>";
|
|
echo " <td class='vtable'>\n";
|
|
echo " <input type='text' class='formfld' style='min-width: 75px; width: 75px;' name='duration_min' value='".escape($duration_min)."' placeholder=\"".$text['label-minimum']."\">\n";
|
|
echo " <input type='text' class='formfld' style='min-width: 75px; width: 75px;' name='duration_max' value='".escape($duration_max)."' placeholder=\"".$text['label-maximum']."\">\n";
|
|
echo " </td>";
|
|
echo " </tr>";
|
|
if (permission_exists('xml_cdr_all')) {
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['button-show_all']."</td>";
|
|
echo " <td class='vtable'>\n";
|
|
if ($input_toggle_style_switch) {
|
|
echo " <span class='switch'>\n";
|
|
}
|
|
echo " <select class='formfld' id='showall' name='showall'>\n";
|
|
echo " <option value='false'>".$text['option-false']."</option>\n";
|
|
echo " <option value='true' ".(isset($_REQUEST['show']) && $_REQUEST['show'] == "all" ? "selected='selected'" : null).">".$text['option-true']."</option>\n";
|
|
echo " </select>\n";
|
|
if ($input_toggle_style_switch) {
|
|
echo " <span class='slider'></span>\n";
|
|
echo " </span>\n";
|
|
}
|
|
echo " <td>";
|
|
echo " </tr>";
|
|
}
|
|
echo "</table>";
|
|
|
|
echo " </td>";
|
|
echo " <td width='50%' style='vertical-align: top;'>\n";
|
|
|
|
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
|
|
echo " <tr>";
|
|
echo " <td width='30%' class='vncell'>".$text['label-billsec']."</td>";
|
|
echo " <td width='70%' class='vtable'><input type='text' class='formfld' name='billsec' value='".escape($billsec)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-hangup_cause']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='hangup_cause' value='".escape($hangup_cause)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-uuid']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='xml_cdr_uuid' value='".escape($xml_cdr_uuid)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-bridge_uuid']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='bleg_uuid' value='".escape($bridge_uuid)."'></td>";
|
|
echo " </tr>";
|
|
if (permission_exists('xml_cdr_account_code')) {
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-accountcode']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='accountcode' value='".escape($accountcode)."'></td>";
|
|
echo " </tr>";
|
|
}
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-read_codec']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='read_codec' value='".escape($read_codec)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-write_codec']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='write_codec' value='".escape($write_codec)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-remote_media_ip']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='remote_media_ip' value='".escape($remote_media_ip)."'></td>";
|
|
echo " </tr>";
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-network_addr']."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='network_addr' value='".escape($network_addr)."'></td>";
|
|
echo " </tr>";
|
|
if (isset($_SESSION['cdr']['field']) && is_array($_SESSION['cdr']['field'])) {
|
|
foreach ($_SESSION['cdr']['field'] as $field) {
|
|
$array = explode(",", $field);
|
|
$field_name = end($array);
|
|
$field_label = ucwords(str_replace("_", " ", $field_name));
|
|
$field_label = str_replace("Sip", "SIP", $field_label);
|
|
if ($field_name != "destination_number") {
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".escape($field_label)."</td>";
|
|
echo " <td class='vtable'><input type='text' class='formfld' name='".escape($field_name)."' value='".escape($$field_name)."'></td>";
|
|
echo " </tr>";
|
|
}
|
|
}
|
|
}
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-mos_score']."</td>";
|
|
echo " <td class='vtable'>";
|
|
echo " <select name='mos_comparison' class='formfld'>\n";
|
|
echo " <option value=''></option>\n";
|
|
echo " <option value='less'><</option>\n";
|
|
echo " <option value='greater'>></option>\n";
|
|
echo " <option value='lessorequal'><=</option>\n";
|
|
echo " <option value='greaterorequal'>>=</option>\n";
|
|
echo " <option value='equal'>=</option>\n";
|
|
echo " <option value='notequal'><></option>\n";
|
|
echo " </select>\n";
|
|
echo " <input type='text' class='formfld' name='mos_score' value='".escape($mos_score)."'>\n";
|
|
echo " </td>";
|
|
echo " </tr>\n";
|
|
|
|
if (permission_exists('xml_cdr_search_call_center_queues')) {
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-call_center_queue']."</td>";
|
|
echo " <td class='vtable'>";
|
|
echo " <select class='formfld' name='call_center_queue_uuid' id='call_center_queue_uuid'>\n";
|
|
echo " <option value=''></option>";
|
|
if (is_array($call_center_queues) && @sizeof($call_center_queues) != 0) {
|
|
foreach ($call_center_queues as $row) {
|
|
$selected = ($row['call_center_queue_uuid'] == $call_center_queue_uuid) ? "selected" : null;
|
|
echo " <option value='".escape($row['call_center_queue_uuid'])."' ".escape($selected).">".((is_numeric($row['queue_extension'])) ? escape($row['queue_extension']." (".$row['queue_name'].")") : escape($row['queue_extension'])." (".escape($row['queue_extension']).")")."</option>";
|
|
}
|
|
}
|
|
echo " </select>\n";
|
|
echo " </td>";
|
|
echo " </tr>\n";
|
|
unset($sql, $parameters, $call_center_queues, $row, $selected);
|
|
}
|
|
|
|
if (permission_exists('xml_cdr_search_ring_groups')) {
|
|
echo " <tr>";
|
|
echo " <td class='vncell'>".$text['label-ring_group']."</td>";
|
|
echo " <td class='vtable'>";
|
|
echo " <select class='formfld' name='ring_group_uuid' id='ring_group_uuid'>\n";
|
|
echo " <option value=''></option>";
|
|
if (is_array($ring_groups) && @sizeof($ring_groups) != 0) {
|
|
foreach ($ring_groups as $row) {
|
|
$selected = ($row['ring_group_uuid'] == $ring_group_uuid) ? "selected" : null;
|
|
echo " <option value='".escape($row['ring_group_uuid'])."' ".escape($selected).">".((is_numeric($row['ring_group_extension'])) ? escape($row['ring_group_extension']." (".$row['ring_group_name'].")") : escape($row['ring_group_extension'])." (".escape($row['ring_group_extension']).")")."</option>";
|
|
}
|
|
}
|
|
echo " </select>\n";
|
|
echo " </td>";
|
|
echo " </tr>\n";
|
|
unset($sql, $parameters, $ring_groups, $row, $selected);
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo " </td>";
|
|
echo " </tr>";
|
|
echo "</table>";
|
|
echo "</div>\n";
|
|
echo "<br><br>";
|
|
|
|
echo "</form>";
|
|
|
|
//include footer
|
|
require_once "resources/footer.php";
|
|
|
|
?>
|