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>
169 lines
5.1 KiB
PHP
169 lines
5.1 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>
|
|
Portions created by the Initial Developer are Copyright (C) 2008-2020
|
|
the Initial Developer. All Rights Reserved.
|
|
|
|
Contributor(s):
|
|
Mark J Crane <markjcrane@fusionpbx.com>
|
|
*/
|
|
|
|
//includes files
|
|
require_once __DIR__ . "/require.php";
|
|
|
|
//start the session
|
|
if (!isset($_SESSION)) {
|
|
ini_set("session.cookie_httponly", true);
|
|
session_start();
|
|
}
|
|
|
|
//connect to the database if not initialized
|
|
$database = database::new();
|
|
|
|
//set the domains session
|
|
if (!isset($_SESSION['domains'])) {
|
|
$domain = new domains();
|
|
$domain->session();
|
|
$domain->set();
|
|
}
|
|
|
|
//if reloadxml then run the command
|
|
if (permission_exists('dialplan_edit') && isset($_SESSION["reload_xml"])) {
|
|
if (!empty($_SESSION["reload_xml"])) {
|
|
if (isset($_SESSION['apply_settings']) && $_SESSION['apply_settings'] == "true") {
|
|
//show the apply settings prompt
|
|
}
|
|
else {
|
|
//reload the access control list this also runs reloadxml
|
|
$response = event_socket::api('reloadxml');
|
|
$_SESSION["reload_xml"] = '';
|
|
unset($_SESSION["reload_xml"]);
|
|
usleep(500);
|
|
|
|
//clear the apply settings reminder
|
|
$_SESSION["reload_xml"] = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
//set the template base directory path
|
|
$template_base_path = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/themes';
|
|
|
|
//check if the template exists if it is missing then use the default
|
|
if (!file_exists($template_base_path.'/'.$_SESSION['domain']['template']['name'].'/template.php')) {
|
|
$_SESSION['domain']['template']['name'] = 'default';
|
|
}
|
|
|
|
//start the output buffer
|
|
include $template_base_path.'/'.$_SESSION['domain']['template']['name'].'/config.php';
|
|
|
|
//start the output buffer
|
|
ob_start();
|
|
|
|
//get the content
|
|
if (isset($_GET["c"])) {
|
|
$content = $_GET["c"]; //link
|
|
}
|
|
else {
|
|
$content = '';
|
|
}
|
|
|
|
//get the parent id
|
|
$sql = "select menu_item_parent_uuid from v_menu_items ";
|
|
$sql .= "where menu_uuid = :menu_uuid ";
|
|
$sql .= "and menu_item_link = :menu_item_link ";
|
|
$parameters['menu_uuid'] = $_SESSION['domain']['menu']['uuid'];
|
|
$parameters['menu_item_link'] = $_SERVER["SCRIPT_NAME"];
|
|
$_SESSION["menu_item_parent_uuid"] = $database->select($sql, $parameters, 'column');
|
|
unset($sql, $parameters);
|
|
|
|
//get the content
|
|
if (file_exists($_SERVER["PROJECT_ROOT"]."/app/content/app_config.php")) {
|
|
$sql = "select * from v_rss ";
|
|
$sql .= "where domain_uuid = :domain_uuid ";
|
|
$sql .= "and rss_category = 'content' ";
|
|
$sql .= "and rss_link = :content ";
|
|
$sql .= "and ( ";
|
|
$sql .= "length(rss_del_date) = 0 ";
|
|
$sql .= "or rss_del_date is null ";
|
|
$sql .= ") ";
|
|
$sql .= "order by rss_order asc ";
|
|
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
|
$parameters['content'] = empty($content) ? $_SERVER["PHP_SELF"] : $content;
|
|
$content_result = $database->select($sql, $parameters, 'all');
|
|
if (is_array($content_result) && @sizeof($content_result) != 0) {
|
|
foreach($content_result as $content_row) {
|
|
$template_rss_sub_category = $content_row['rss_sub_category'];
|
|
if (empty($content_row['rss_group'])) {
|
|
//content is public
|
|
$content_from_db = &$content_row['rss_description'];
|
|
if (!empty($content_row['rss_title'])) {
|
|
$page["title"] = $content_row['rss_title'];
|
|
}
|
|
}
|
|
else {
|
|
if (if_group($content_row[rss_group])) { //viewable only to designated group
|
|
$content_from_db = &$content_row[rss_description];
|
|
if (!empty($content_row['rss_title'])) {
|
|
$page["title"] = $content_row['rss_title'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
unset($sql, $parameters, $content_result, $content_row);
|
|
}
|
|
|
|
//button css class and styles
|
|
$button_icon_class = '';
|
|
$button_icon_style = 'padding: 3px;';
|
|
$button_label_class = 'button-label';
|
|
$button_label_style = 'padding-left: 5px; padding-right: 3px;';
|
|
$button_icons = (!empty($_SESSION['theme']['button_icons']['text'])) ? $button_icons = $_SESSION['theme']['button_icons']['text'] : '';
|
|
switch ($button_icons) {
|
|
case 'auto':
|
|
$button_label_class .= ' hide-md-dn';
|
|
break;
|
|
case 'only':
|
|
$button_label_style .= ' display: none;';
|
|
break;
|
|
case 'never':
|
|
$button_icon_class .= ' display: none;';
|
|
break;
|
|
case 'always':
|
|
break;
|
|
}
|
|
|
|
//get the input toggle style options: select, switch_round, switch_square
|
|
if (substr($settings->get('theme', 'input_toggle_style', 'switch_round'), 0, 6) == 'switch') {
|
|
$input_toggle_style_switch = true;
|
|
}
|
|
else {
|
|
$input_toggle_style_switch = false;
|
|
}
|
|
|
|
//start the output buffer
|
|
ob_start();
|
|
|
|
//for translate tool (if available)
|
|
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/translate/translate_header.php")) {
|
|
require_once("app/translate/translate_header.php");
|
|
}
|
|
|
|
?>
|