Merge branch 'master' into vm-deleted-queue

This commit is contained in:
FusionPBX 2025-02-19 10:05:26 -07:00 committed by GitHub
commit 6c99c32ca9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
98 changed files with 8945 additions and 1971 deletions

View File

@ -45,4 +45,3 @@ $array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user';
$y++;
?>

View File

@ -216,7 +216,7 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "call_center";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "record_name";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "\${sip_from_user}-\${sip_to_user}-\${strftime(%Y)}\${strftime(%b)}\${strftime(%d)}.\${record_ext}";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "\${sip_from_user}-\${sip_to_user}-\${strftime(%Y)}\${strftime(%b)}\${strftime(%d)}-\${uuid}.\${record_ext}";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Custom name for call recording. Options: \${record_ext}, \${sip_from_user}, \${sip_to_user}, \${caller_id_number}, \${uuid}";
$y++;

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2024
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -42,6 +42,10 @@
$language = new text;
$text = $language->get();
//initialize database and settings
$database = database::new();
$settings = new settings(['database' => $database, $_SESSION['domain_uuid'] ?? '', $_SESSION['user_uuid'] ?? '']);
//set the defaults
$queue_name = '';
$queue_extension = '';
@ -61,24 +65,24 @@
$action = "add";
}
//get the domain_uuid
//get the domain details
$domain_uuid = $_SESSION['domain_uuid'];
$domain_name = $_SESSION['domain_name'];
//initialize the destinations object
//initialize the destination object
$destination = new destinations;
//get total call center queues count from the database, check limit, if defined
if ($action == 'add') {
if (!empty($_SESSION['limit']['call_center_queues']['numeric'])) {
if (!empty($settings->get('limit','call_center_queues', ''))) {
$sql = "select count(*) from v_call_center_queues ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$total_call_center_queues = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
if ($total_call_center_queues >= $_SESSION['limit']['call_center_queues']['numeric']) {
message::add($text['message-maximum_queues'].' '.$_SESSION['limit']['call_center_queues']['numeric'], 'negative');
if ($total_call_center_queues >= $settings->get('limit','call_center_queues', 0)) {
message::add($text['message-maximum_queues'].' '.$settings->get('limit','call_center_queues', ''), 'negative');
header('Location: call_center_queues.php');
return;
}
@ -124,7 +128,7 @@
$queue_context = $_POST["queue_context"];
}
else if ($action == 'add') {
$queue_context = $_SESSION['domain_name'];
$queue_context = $domain_name;
}
//remove invalid characters
@ -149,7 +153,6 @@
$sql .= "and t.call_center_queue_uuid = q.call_center_queue_uuid; ";
$parameters['domain_uuid'] = $domain_uuid;
$parameters['call_center_tier_uuid'] = $call_center_tier_uuid;
$database = new database;
$tiers = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
@ -168,7 +171,7 @@
if ($esl->is_connected()) {
//callcenter_config tier del [queue_name] [agent_name]
if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid)) {
$cmd = "callcenter_config tier del ".$queue_extension."@".$_SESSION['domain_name']." ".$call_center_agent_uuid;
$cmd = "callcenter_config tier del ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid;
$response = event_socket::api($cmd);
}
}
@ -181,7 +184,6 @@
$p = permissions::new();
$p->add('call_center_tier_delete', 'temp');
$database = new database;
$database->app_name = 'call_centers';
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
$database->delete($array);
@ -205,7 +207,6 @@
$sql = "select * from v_call_center_queues ";
$sql .= "where call_center_queue_uuid = :call_center_queue_uuid ";
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
$database = new database;
$row = $database->select($sql, $parameters, 'row');
if (!empty($row)) {
//if (!permission_exists('call_center_queue_domain')) {
@ -298,8 +299,8 @@
//add the recording path if needed
if (!empty($queue_greeting)) {
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$queue_greeting)) {
$queue_greeting_path = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$queue_greeting;
if (file_exists($settings->get('switch','recordings', '').'/'.$domain_name.'/'.$queue_greeting)) {
$queue_greeting_path = $settings->get('switch','recordings', '').'/'.$domain_name.'/'.$queue_greeting;
}
else {
$queue_greeting_path = trim($queue_greeting);
@ -371,8 +372,8 @@
//add definable export variables can be set in default settings
$export_variables = 'call_center_queue_uuid,sip_h_Alert-Info';
if (!empty($_SESSION['call_center']['export_vars'])) {
foreach ($_SESSION['call_center']['export_vars'] as $export_variable) {
if (!empty($settings->get('call_center','export_vars', []))) {
foreach ($settings->get('call_center','export_vars', []) as $export_variable) {
$export_variables .= ','.$export_variable;
}
}
@ -413,7 +414,7 @@
if (!empty($queue_cc_exit_keys)) {
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($queue_cc_exit_keys)."\"/>\n";
}
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($queue_extension)."@".$_SESSION["domain_name"]."\"/>\n";
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($queue_extension)."@".$domain_name."\"/>\n";
if ($destination->valid($queue_timeout_app.':'.$queue_timeout_data)) {
$dialplan_xml .= " <action application=\"".xml::sanitize($queue_timeout_app)."\" data=\"".xml::sanitize($queue_timeout_data)."\"/>\n";
}
@ -439,7 +440,6 @@
$p->add("dialplan_edit", "temp");
//save to the data
$database = new database;
$database->app_name = 'call_centers';
$database->app_uuid = '95788e50-9500-079e-2807-fd530b0ea370';
$database->save($array);
@ -457,7 +457,7 @@
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$_SESSION["domain_name"]);
$cache->delete("dialplan:".$domain_name);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
@ -496,19 +496,19 @@
*/
//add the agent
if (is_numeric($queue_extension) && is_uuid($call_center_agent_uuid) && is_numeric($tier_level) && is_numeric($tier_position)) {
$cmd = "callcenter_config tier add ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level." ".$tier_position;
$cmd = "callcenter_config tier add ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid." ".$tier_level." ".$tier_position;
$response = event_socket::api($cmd);
}
usleep(200);
//agent set level
if (is_numeric($queue_extension) && is_numeric($tier_level)) {
$cmd = "callcenter_config tier set level ".$queue_extension."@".$_SESSION["domain_name"]." ".$call_center_agent_uuid." ".$tier_level;
$cmd = "callcenter_config tier set level ".$queue_extension."@".$domain_name." ".$call_center_agent_uuid." ".$tier_level;
$response = event_socket::api($cmd);
}
usleep(200);
//agent set position
if (is_numeric($queue_extension) && is_numeric($tier_position)) {
$cmd = "callcenter_config tier set position ".$queue_extension."@".$_SESSION["domain_name"]." ".$tier_position;
$cmd = "callcenter_config tier set position ".$queue_extension."@".$domain_name." ".$tier_position;
$response = event_socket::api($cmd);
}
usleep(200);
@ -538,7 +538,6 @@
$sql .= "and call_center_queue_uuid = :call_center_queue_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid;
$database = new database;
$call_center_queues = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
@ -587,17 +586,16 @@
$sql .= "order by tier_level asc, tier_position asc, a.agent_name asc";
$parameters['domain_uuid'] = $domain_uuid;
$parameters['call_center_queue_uuid'] = $call_center_queue_uuid ?? null;
$database = new database;
$tiers = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
//add an empty row to the tiers array
if (count($tiers) == 0) {
$rows = $_SESSION['call_center']['agent_add_rows']['numeric'] ?? null;
$rows = $settings->get('call_center','agent_add_rows', null);
$id = 0;
}
if (count($tiers) > 0) {
$rows = $_SESSION['call_center']['agent_edit_rows']['numeric'];
$rows = $settings->get('call_center','agent_edit_rows', null);
$id = count($tiers)+1;
}
for ($x = 0; $x < $rows; $x++) {
@ -615,7 +613,6 @@
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "order by agent_name asc";
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$agents = $database->select($sql, $parameters, 'all');
unset($sql, $parameters);
@ -624,6 +621,7 @@
$audio_files[0] = $sounds->get();
unset($sounds);
//get the list of sounds
if (permission_exists('call_center_announce_sound')) {
$sounds = new sounds;
$sounds->sound_types = ['recordings'];
@ -646,7 +644,7 @@
if (empty($queue_tier_rule_no_agent_no_wait)) { $queue_tier_rule_no_agent_no_wait = "true"; }
if (empty($queue_discard_abandoned_after)) { $queue_discard_abandoned_after = "900"; }
if (empty($queue_abandoned_resume_allowed)) { $queue_abandoned_resume_allowed = "false"; }
if (empty($queue_context)) { $queue_context = $_SESSION['domain_name']; }
if (empty($queue_context)) { $queue_context = $domain_name; }
//create token
$object = new token;
@ -667,12 +665,8 @@
}
//set the record_template
if (empty($_SESSION['call_center']['record_name']['text'])) {
$record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.\${record_ext}";
}
else {
$record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/".$_SESSION['call_center']['record_name']['text'];
}
$record_template = $settings->get('switch','recordings', '')."/".$domain_name."/archive/";
$record_template .= $settings->get('call_center','record_name', "\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.\${record_ext}");
//show the content
if (permission_exists('recording_play') || permission_exists('recording_download')) {
@ -757,7 +751,7 @@
}
echo "</div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'call_center_queues.php']);
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme','button_icon_back', ''),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'call_center_queues.php']);
if ($action == "update") {
if (permission_exists('call_center_wallboard')) {
@ -765,10 +759,10 @@
}
//echo button::create(['type'=>'button','label'=>$text['button-stop'],'icon'=>$_SESSION['theme']['button_icon_stop'],'link'=>'cmd.php?cmd=unload&id='.urlencode($call_center_queue_uuid)]);
//echo button::create(['type'=>'button','label'=>$text['button-start'],'icon'=>$_SESSION['theme']['button_icon_start'],'link'=>'cmd.php?cmd=load&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$_SESSION['theme']['button_icon_reload'],'link'=>'cmd.php?cmd=reload&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'style'=>'margin-right: 15px;','link'=>PROJECT_PATH.'/app/call_center_active/call_center_active.php?queue_name='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$settings->get('theme','button_icon_reload', ''),'link'=>'cmd.php?cmd=reload&id='.urlencode($call_center_queue_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-view'],'icon'=>$settings->get('theme','button_icon_view', ''),'style'=>'margin-right: 15px;','link'=>PROJECT_PATH.'/app/call_center_active/call_center_active.php?queue_name='.urlencode($call_center_queue_uuid)]);
}
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save']);
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$settings->get('theme','button_icon_save', ''),'id'=>'btn_save']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
@ -791,7 +785,7 @@
echo " ".$text['label-extension']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='number' name='queue_extension' maxlength='255' min='0' step='1' value=\"".escape($queue_extension)."\" required='required' placeholder=\"".($_SESSION['call_center']['extension_range']['text'] ?? '')."\">\n";
echo " <input class='formfld' type='number' name='queue_extension' maxlength='255' min='0' step='1' value=\"".escape($queue_extension)."\" required='required' placeholder=\"".$settings->get('call_center','extension_range', '')."\">\n";
echo "<br />\n";
echo $text['description-extension']."\n";
echo "</td>\n";
@ -818,8 +812,8 @@
if ($key == 'recordings') {
if (
!empty($instance_value) &&
($instance_value == $row["value"] || $instance_value == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.$row["value"]) &&
file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.pathinfo($row["value"], PATHINFO_BASENAME))
($instance_value == $row["value"] || $instance_value == $settings->get('switch','recordings', '')."/".$domain_name.'/'.$row["value"]) &&
file_exists($settings->get('switch','recordings', '')."/".$domain_name.'/'.pathinfo($row["value"], PATHINFO_BASENAME))
) {
$selected = "selected='selected'";
$playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME);
@ -862,7 +856,7 @@
case 'ogg' : $mime_type = 'audio/ogg'; break;
}
echo "<audio id='recording_audio_".$instance_id."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$instance_id."')\" onended=\"recording_reset('".$instance_id."');\" src='".($playable ?? '')."' type='".($mime_type ?? '')."'></audio>";
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$settings->get('theme','button_icon_play', ''),'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
unset($playable, $mime_type);
}
echo "<br />\n";
@ -1318,8 +1312,8 @@
if ($key == 'recordings') {
if (
!empty($instance_value) &&
($instance_value == $row["value"] || $instance_value == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.$row["value"]) &&
file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].'/'.pathinfo($row["value"], PATHINFO_BASENAME))
($instance_value == $row["value"] || $instance_value == $settings->get('switch','recordings', '')."/".$domain_name.'/'.$row["value"]) &&
file_exists($settings->get('switch','recordings', '')."/".$domain_name.'/'.pathinfo($row["value"], PATHINFO_BASENAME))
) {
$selected = "selected='selected'";
$playable = '../recordings/recordings.php?action=download&type=rec&filename='.pathinfo($row["value"], PATHINFO_BASENAME);
@ -1362,7 +1356,7 @@
case 'ogg' : $mime_type = 'audio/ogg'; break;
}
echo "<audio id='recording_audio_".$instance_id."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".$instance_id."')\" onended=\"recording_reset('".$instance_id."');\" src='".($playable ?? '')."' type='".($mime_type ?? '')."'></audio>";
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$settings->get('theme','button_icon_play', ''),'id'=>'recording_button_'.$instance_id,'style'=>'display: '.(!empty($mime_type) ? 'inline' : 'none'),'onclick'=>"recording_play('".$instance_id."', document.getElementById('".$instance_id."').value, document.getElementById('".$instance_id."').options[document.getElementById('".$instance_id."').selectedIndex].parentNode.getAttribute('data-type'))"]);
unset($playable, $mime_type);
}
echo "<br />\n";

View File

@ -253,9 +253,6 @@
if (is_array($call_recordings) && @sizeof($call_recordings) != 0) {
$x = 0;
foreach ($call_recordings as $row) {
//add padding to the call recording length
$call_recording_length_padding = (!empty($row['call_recording_length'])) ? str_pad($row['call_recording_length'], 2, '0', STR_PAD_LEFT) : '';
//playback progress bar
if (permission_exists('call_recording_play')) {
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['call_recording_uuid'])."' style='display: none;' onclick=\"recording_seek(event,'".escape($row['call_recording_uuid'])."')\"><td id='playback_progress_bar_background_".escape($row['call_recording_uuid'])."' class='playback_progress_bar_background' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['call_recording_uuid'])."'></span></td>".(permission_exists('xml_cdr_details') ? "<td class='action-button' style='border-bottom: none !important;'></td>" : null)."</tr>\n";
@ -301,7 +298,7 @@
}
echo " </td>\n";
}
echo " <td class='right overflow hide-sm-dn shrink'>".($row['call_recording_length'] <= 59 ? '0:' : null).escape($call_recording_length_padding)."</td>\n";
echo " <td class='right overflow hide-sm-dn shrink'>".escape(gmdate("G:i:s", $row['call_recording_length']))."</td>\n";
echo " <td class='overflow center no-wrap'>".escape($row['call_recording_date_formatted'])." <span class='hide-sm-dn'>".escape($row['call_recording_time_formatted'])."</span></td>\n";
echo " <td class='left hide-sm-dn shrink'>".($row['call_direction'] != '' ? escape($text['label-'.$row['call_direction']]) : null)."</td>\n";
if (permission_exists('xml_cdr_details')) {

View File

@ -72,7 +72,7 @@
}
//get the call recording extension
$record_extension = $settings->get('call_recordings', 'record_extension', 'wav');
$record_extension = $settings->get('call_recordings', 'record_extension', 'mp3');
//get total destination count from the database, check limit, if defined
if (!permission_exists('destination_domain')) {
@ -462,7 +462,6 @@
}
//authorized specific dialplan_detail_type that are safe, sanitize all other values
$dialplan_detail_type = $settings->get('dialplan', 'destination', '');
switch ($dialplan_detail_type) {
case 'destination_number':
break;

View File

@ -52,22 +52,33 @@ if (!class_exists('destinations')) {
private $list_page;
private $table;
private $uuid_prefix;
private $database;
private $settings;
/**
* Called when the object is created
*/
public function __construct($settings = null) {
public function __construct($setting_array = []) {
//open a database connection
if (empty($setting_array['database'])) {
$this->database = database::new();
} else {
$this->database = $setting_array['database'];
}
//get the settings object
if (empty($setting_array['settings'])) {
$this->settings = new settings();
} else {
$this->settings = $setting_array['settings'];
}
//set the domain details
if (is_null($this->domain_uuid)) {
$this->domain_uuid = $_SESSION['domain_uuid'];
}
//get the email queue settings
if (!isset($settings)) {
$this->settings = new settings();
}
//assign private variables
$this->app_name = 'destinations';
$this->app_uuid = '5ec89622-b19c-3559-64f0-afde802ab139';
@ -180,8 +191,7 @@ if (!class_exists('destinations')) {
$sql = "select domain_name from v_domains ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $this->domain_uuid;
$database = new database;
$this->domain_name = $database->select($sql, $parameters, 'column');
$this->domain_name = $this->database->select($sql, $parameters, 'column');
//initialize variable
$response = '';
@ -252,8 +262,7 @@ if (!class_exists('destinations')) {
}
$sql .= "order by ".trim($row['order_by']);
$sql = str_replace("\${domain_uuid}", $this->domain_uuid, $sql);
$database = new database;
$result = $database->select($sql, null, 'all');
$result = $this->database->select($sql, null, 'all');
$this->destinations[$x]['result']['sql'] = $sql;
$this->destinations[$x]['result']['data'] = $result;
@ -550,9 +559,6 @@ if (!class_exists('destinations')) {
//set the global variables
global $db_type;
//connect to the database
$database = new database;
//set default values
$destination_name = '';
$destination_id = '';
@ -561,7 +567,7 @@ if (!class_exists('destinations')) {
$sql = "select domain_name from v_domains ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $this->domain_uuid;
$this->domain_name = $database->select($sql, $parameters, 'column');
$this->domain_name = $this->database->select($sql, $parameters, 'column');
//get the destinations
if (!is_array($this->destinations)) {
@ -625,7 +631,7 @@ if (!class_exists('destinations')) {
}
$sql .= "order by ".trim($row['order_by']);
$sql = str_replace("\${domain_uuid}", $this->domain_uuid, $sql);
$result = $database->select($sql, null, 'all');
$result = $this->database->select($sql, null, 'all');
$this->destinations[$x]['result']['sql'] = $sql;
$this->destinations[$x]['result']['data'] = $result;
@ -764,14 +770,11 @@ if (!class_exists('destinations')) {
//set the global variables
global $db_type;
//connect to the database
$database = new database;
//get the domain_name
$sql = "select domain_name from v_domains ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $this->domain_uuid;
$this->domain_name = $database->select($sql, $parameters, 'column');
$this->domain_name = $this->database->select($sql, $parameters, 'column');
//get the destinations
if (!is_array($this->destinations)) {
@ -836,7 +839,7 @@ if (!class_exists('destinations')) {
}
$sql .= "order by ".trim($row['order_by']);
$sql = str_replace("\${domain_uuid}", $this->domain_uuid, $sql);
$result = $database->select($sql, null, 'all');
$result = $this->database->select($sql, null, 'all');
$this->destinations[$x]['result']['sql'] = $sql;
$this->destinations[$x]['result']['data'] = $result;
@ -1063,8 +1066,7 @@ if (!class_exists('destinations')) {
$sql = "select dialplan_uuid, destination_context from v_destinations ";
$sql .= "where destination_uuid = :destination_uuid ";
$parameters['destination_uuid'] = $record['uuid'];
$database = new database;
$row = $database->select($sql, $parameters, 'row');
$row = $this->database->select($sql, $parameters, 'row');
unset($sql, $parameters);
//include dialplan in array
@ -1086,10 +1088,9 @@ if (!class_exists('destinations')) {
$p->add('dialplan_detail_delete', 'temp');
//execute delete
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->delete($array);
$this->database->app_name = $this->app_name;
$this->database->app_uuid = $this->app_uuid;
$this->database->delete($array);
unset($array);
//revoke temporary permissions
@ -1255,8 +1256,7 @@ if (!class_exists('destinations')) {
if (!(!empty($_GET['show']) && $_GET['show'] === 'all' && permission_exists('destination_summary_all'))) {
$parameters['domain_uuid'] = $this->domain_uuid;
}
$database = new database;
$summary = $database->select($sql, $parameters, 'all');
$summary = $this->database->select($sql, $parameters, 'all');
unset($parameters);
//if (!empty($this->start_stamp_begin) && !empty($this->start_stamp_end)) {

View File

@ -224,6 +224,9 @@
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "device_serial_number";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "device_model";
//$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
@ -462,6 +465,11 @@
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "device_serial_number";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['search'] = 'true';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "device_model";
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = "phone_model";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";

View File

@ -77,6 +77,7 @@ if ($domains_processed == 1) {
unset($sql, $device_keys);
//set the device profile keys
if ($database->column_exists('v_device_keys', 'device_profile_uuid')) {
$sql = "select count(*) from v_device_profile_keys ";
$num_rows = $database->select($sql, null, 'column');
if ($num_rows == 0) {
@ -119,8 +120,10 @@ if ($domains_processed == 1) {
}
}
unset($sql, $device_profile_keys);
}
//set the device profile settings
if ($database->column_exists('v_device_settings', 'device_profile_uuid')) {
$sql = "select count(*) from v_device_profile_settings ";
$num_rows = $database->select($sql, null, 'column');
if ($num_rows == 0) {
@ -157,6 +160,7 @@ if ($domains_processed == 1) {
}
}
unset($sql, $device_profile_keys);
}
//add device vendor functions to the database
$sql = "select count(*) from v_device_vendors; ";
@ -247,6 +251,7 @@ if ($domains_processed == 1) {
$sql = "update v_device_lines set label = display_name where label is null;\n";
$database->execute($sql);
unset($sql);
}
?>

View File

@ -3198,6 +3198,32 @@ $text['label-device_location']['zh-cn'] = "地点";
$text['label-device_location']['ja-jp'] = "位置";
$text['label-device_location']['ko-kr'] = "위치";
$text['label-device_serial_number']['en-us'] = "Serial Number";
$text['label-device_serial_number']['en-gb'] = "Serial Number";
$text['label-device_serial_number']['ar-eg'] = "";
$text['label-device_serial_number']['de-at'] = "";
$text['label-device_serial_number']['de-ch'] = "";
$text['label-device_serial_number']['de-de'] = "";
$text['label-device_serial_number']['el-gr'] = "";
$text['label-device_serial_number']['es-cl'] = "";
$text['label-device_serial_number']['es-mx'] = "";
$text['label-device_serial_number']['fr-ca'] = "";
$text['label-device_serial_number']['fr-fr'] = "";
$text['label-device_serial_number']['he-il'] = "";
$text['label-device_serial_number']['it-it'] = "";
$text['label-device_serial_number']['ka-ge'] = "";
$text['label-device_serial_number']['nl-nl'] = "";
$text['label-device_serial_number']['pl-pl'] = "";
$text['label-device_serial_number']['pt-br'] = "";
$text['label-device_serial_number']['pt-pt'] = "";
$text['label-device_serial_number']['ro-ro'] = "";
$text['label-device_serial_number']['ru-ru'] = "";
$text['label-device_serial_number']['sv-se'] = "";
$text['label-device_serial_number']['uk-ua'] = "";
$text['label-device_serial_number']['zh-cn'] = "";
$text['label-device_serial_number']['ja-jp'] = "";
$text['label-device_serial_number']['ko-kr'] = "";
$text['label-device_key_vendor']['en-us'] = "Vendor";
$text['label-device_key_vendor']['en-gb'] = "Vendor";
$text['label-device_key_vendor']['ar-eg'] = "البائع";
@ -6634,6 +6660,32 @@ $text['description-device_location']['zh-cn'] = "输入设备位置。";
$text['description-device_location']['ja-jp'] = "デバイスの場所を入力します。";
$text['description-device_location']['ko-kr'] = "장치 위치를 입력합니다.";
$text['description-device_serial_number']['en-us'] = "Enter the device serial number.";
$text['description-device_serial_number']['en-gb'] = "Enter the device serial number.";
$text['description-device_serial_number']['ar-eg'] = "";
$text['description-device_serial_number']['de-at'] = "";
$text['description-device_serial_number']['de-ch'] = "";
$text['description-device_serial_number']['de-de'] = "";
$text['description-device_serial_number']['el-gr'] = "";
$text['description-device_serial_number']['es-cl'] = "";
$text['description-device_serial_number']['es-mx'] = "";
$text['description-device_serial_number']['fr-ca'] = "";
$text['description-device_serial_number']['fr-fr'] = "";
$text['description-device_serial_number']['he-il'] = "";
$text['description-device_serial_number']['it-it'] = "";
$text['description-device_serial_number']['ka-ge'] = "";
$text['description-device_serial_number']['nl-nl'] = "";
$text['description-device_serial_number']['pl-pl'] = "";
$text['description-device_serial_number']['pt-br'] = "";
$text['description-device_serial_number']['pt-pt'] = "";
$text['description-device_serial_number']['ro-ro'] = "";
$text['description-device_serial_number']['ru-ru'] = "";
$text['description-device_serial_number']['sv-se'] = "";
$text['description-device_serial_number']['uk-ua'] = "";
$text['description-device_serial_number']['zh-cn'] = "";
$text['description-device_serial_number']['ja-jp'] = "";
$text['description-device_serial_number']['ko-kr'] = "";
$text['description-device_time_zone']['en-us'] = "Enter the time zone.";
$text['description-device_time_zone']['en-gb'] = "Enter the time zone.";
$text['description-device_time_zone']['ar-eg'] = "أدخل المنطقة الزمنية";

View File

@ -119,12 +119,12 @@
//$device_provisioned_ip = $_POST["device_provisioned_ip"];
$domain_uuid = $_POST["domain_uuid"];
$device_label = $_POST["device_label"];
$device_label = $_POST["device_label"];
$device_user_uuid = $_POST["device_user_uuid"];
$device_username = $_POST["device_username"];
$device_password = $_POST["device_password"];
$device_vendor = $_POST["device_vendor"];
$device_location = $_POST["device_location"];
$device_serial_number = $_POST["device_serial_number"];
$device_uuid_alternate = $_POST["device_uuid_alternate"] ?? null;
$device_model = $_POST["device_model"] ?? null;
$device_firmware_version = $_POST["device_firmware_version"] ?? null;
@ -270,6 +270,9 @@
if (permission_exists('device_location')) {
$array['devices'][0]['device_location'] = $device_location;
}
if (permission_exists('device_serial_number')) {
$array['devices'][0]['device_serial_number'] = $device_serial_number;
}
if (permission_exists('device_alternate')) {
$array['devices'][0]['device_uuid_alternate'] = is_uuid($device_uuid_alternate) ? $device_uuid_alternate : null;
}
@ -517,12 +520,12 @@
$device_provisioned_ip = $row["device_provisioned_ip"];
$domain_uuid = $row["domain_uuid"];
$device_label = $row["device_label"];
$device_label = $row["device_label"];
$device_user_uuid = $row["device_user_uuid"];
$device_username = $row["device_username"];
$device_password = $row["device_password"];
$device_vendor = $row["device_vendor"];
$device_location = $row["device_location"];
$device_serial_number = $row["device_serial_number"];
$device_uuid_alternate = $row["device_uuid_alternate"];
$device_model = $row["device_model"];
$device_firmware_version = $row["device_firmware_version"];
@ -1917,6 +1920,19 @@
echo "</tr>\n";
}
if (permission_exists('device_serial_number')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-device_serial_number']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='device_serial_number' maxlength='255' value=\"".escape($device_serial_number ?? '')."\"/>\n";
echo "<br />\n";
echo $text['description-device_serial_number']."\n";
echo "</td>\n";
echo "</tr>\n";
}
if (permission_exists('device_model')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";

View File

@ -101,17 +101,6 @@
$total_devices = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
//get the domains if user has permission for show all
$domains = [];
if ($has_device_domain_all) {
$rows = $database->select("select domain_uuid, domain_name from v_domains where domain_enabled = 'true'");
if (!empty($rows)) {
foreach ($rows as $row) {
$domains[$row['domain_uuid']] = $row['domain_name'];
}
}
}
//get the devices profiles
$sql = "select * from v_device_profiles ";
$sql .= "where true ";
@ -196,7 +185,11 @@
$offset = $rows_per_page * $page;
//get the list
$sql = "select d.*, d2.device_label as alternate_label, ";
$sql = "select ";
if (isset($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
$sql .= "d3.domain_name, ";
}
$sql .="d.*, d2.device_label as alternate_label, ";
$sql .= "to_char(timezone(:time_zone, d.device_provisioned_date), 'DD Mon YYYY') as provisioned_date_formatted, \n";
$sql .= "to_char(timezone(:time_zone, d.device_provisioned_date), 'HH12:MI:SS am') as provisioned_time_formatted \n";
$sql .= "from v_devices as d, v_devices as d2 ";
@ -426,7 +419,7 @@
echo " </td>\n";
}
if (!empty($_GET['show']) && $_GET['show'] == "all" && permission_exists('device_all')) {
echo " <td>".escape($domains[$row['domain_uuid']])."</td>\n";
echo " <td>".escape($row['domain_name'])."</td>\n";
}
echo " <td class='no-wrap'>";
echo permission_exists('device_edit') ? "<a href='".$list_row_url."'>".escape(format_device_address($row['device_address']))."</a>" : escape(format_device_address($row['device_address']));

View File

@ -11,12 +11,17 @@
//include files
include "resources/classes/permissions.php";
include_once "resources/phpmailer/class.phpmailer.php";
include_once "resources/phpmailer/class.smtp.php";
//increase limits
set_time_limit(0);
//ini_set('max_execution_time',1800); //30 minutes
ini_set('memory_limit', '512M');
//connect to the database
$database = database::new();
//save the arguments to variables
$script_name = $argv[0];
if (!empty($argv[1])) {
@ -76,7 +81,7 @@
//prevent the process running more than once
if ($pid_exists) {
//echo "Cannot lock pid file {$pid_file}\n";
echo "Cannot lock pid file {$pid_file}\n";
exit;
}
@ -125,15 +130,10 @@
}
}
//includes
include_once "resources/phpmailer/class.phpmailer.php";
include_once "resources/phpmailer/class.smtp.php";
//get the email details to send
$sql = "select * from v_email_queue ";
$sql .= "where email_queue_uuid = :email_queue_uuid ";
$parameters['email_queue_uuid'] = $email_queue_uuid;
$database = new database();
$row = $database->select($sql, $parameters, 'row');
if (is_array($row)) {
$domain_uuid = $row["domain_uuid"];

View File

@ -233,7 +233,7 @@
$p->add('event_guard_log_edit', 'temp');
$database->app_name = 'event guard';
$database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637';
$database->save($array);
$database->save($array, false);
//$message = $database->message;
$p->delete('event_guard_log_edit', 'temp');
unset($array);
@ -353,7 +353,7 @@
$p->add('event_guard_log_add', 'temp');
$database->app_name = 'event guard';
$database->app_uuid = 'c5b86612-1514-40cb-8e2c-3f01a8f6f637';
$database->save($array);
$database->save($array, false);
$p->delete('event_guard_log_add', 'temp');
//send debug information to the console

View File

@ -38,13 +38,56 @@
exit;
}
//initialize the database object
$database = new database;
//get the domain and user UUIDs
$domain_uuid = $domain_uuid ?? '';
$user_uuid = $user_uuid ?? '';
//add multi-lingual support
$language = new text;
$text = $language->get();
//initialize the core objects
$domain_uuid = $_SESSION['domain_uuid'] ?? '';
$user_uuid = $_SESSION['user_uuid'] ?? '';
$config = config::load();
$database = database::new(['config' => $config]);
$domain_name = $database->select('select domain_name from v_domains where domain_uuid = :domain_uuid', ['domain_uuid' => $domain_uuid], 'column');
$settings = new settings(['database' => $database, 'domain_uuid' => $domain_uuid, 'user_uuid' => $user_uuid]);
//set defaults
$limit_extensions = $settings->get('limit', 'extensions', null);
$limit_devices = $settings->get('limit', 'devices', null);
$extension_limit_max = $settings->get('extension', 'limit_max', 5);
$extension_call_timeout = $settings->get('extension', 'call_timeout', 30);
$extension_max_registrations = $settings->get('extension', 'max_registrations', null);
$extension_password_length = $settings->get('extension', 'password_length', 20); //set default to 20
$extension_password_strength = $settings->get('extension', 'password_strength', 4); //set default to use numbers, Upper/Lowercase letters, special characters
$extension_user_record_default = $settings->get('extension', 'user_record_default', '');
$provision_path = $settings->get('provision', 'path', '');
$provision_line_label = $settings->get('provision','line_label', null);
$provision_line_display_name = $settings->get('provision','line_display_name', null);
$provision_outbound_proxy_primary = $settings->get('provision','outbound_proxy_primary', null);
$provision_outbound_proxy_secondary = $settings->get('provision','outbound_proxy_primary', null);
$provision_server_address_primary = $settings->get('provision','outbound_proxy_primary', null);
$provision_server_address_secondary = $settings->get('provision','outbound_proxy_primary', null);
$provision_line_sip_port = $settings->get('provision','line_sip_port', null);
$provision_line_sip_transport = $settings->get('provision','line_sip_transport', null);
$provision_line_register_expires = $settings->get('provision','line_register_expires', null);
$theme_input_toggle_style = $settings->get('theme','input_toggle_style', ''); //set default to empty string
$voicemail_password_length = $settings->get('voicemail', 'password_length', 6); //set default to 6
$voicemail_transcription_enabled_default = $settings->get('voicemail', 'transcription_enabled_default', false); //set default to false
$voicemail_enabled_default = $settings->get('voicemail', 'enabled_default', true);
$switch_voicemail = $settings->get('switch', 'voicemail', '/var/lib/freeswitch/storage/voicemail') . "/default/$domain_name";
$switch_extensions = $settings->get('switch', 'extensions', '/etc/freeswitch/directory');
$switch_sounds = $settings->get('switch', 'sounds', '/usr/share/freeswitch/sounds');
$transcribe_enabled = $settings->get('transcribe', 'enabled', false);
//cast to integers if they have values
if ($limit_extensions !== null) $limit_extensions = intval($limit_extensions);
if ($limit_devices !== null) $limit_devices = intval($limit_devices);
if ($extension_password_length !== null) $extension_password_length = intval($extension_password_length);
if ($extension_max_registrations !== null) $extension_max_registrations = intval($extension_max_registrations);
//set the action as an add or an update
if (!empty($_REQUEST["id"]) && is_uuid($_REQUEST["id"])) {
$action = "update";
@ -57,16 +100,16 @@
//get total extension count from the database, check limit, if defined
if ($action == 'add') {
if (!empty($_SESSION['limit']['extensions']['numeric'])) {
$sql = "select count(*) ";
if ($limit_extensions > 0) {
$sql = "select count(extension_uuid) ";
$sql .= "from v_extensions ";
$sql .= "where domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['domain_uuid'] = $domain_uuid;
$total_extensions = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);
if ($total_extensions >= $_SESSION['limit']['extensions']['numeric']) {
message::add($text['message-maximum_extensions'].' '.$_SESSION['limit']['extensions']['numeric'], 'negative');
if ($total_extensions >= $limit_extensions) {
message::add($text['message-maximum_extensions'].' '.$limit_extensions, 'negative');
header('Location: extensions.php'.(isset($page) && is_numeric($page) ? '?page='.$page : null));
exit;
}
@ -176,14 +219,14 @@
$user_uuid = $_POST["extension_users"][0]["user_uuid"] ?? null;
//device provisioning variables
if (is_array($_POST["devices"]) && @sizeof($_POST["devices"]) != 0) {
if (!empty($_POST["devices"])) {
//get the devices
$sql = "select count(device_uuid) from v_devices ";
$sql .= "where domain_uuid = :domain_uuid ";
if (!permission_exists('device_all') && !permission_exists('device_domain_all')) {
$sql .= "and device_user_uuid = :user_uuid ";
$parameters['user_uuid'] = $_SESSION['user_uuid'];
$parameters['user_uuid'] = $user_uuid;
}
$sql .= "order by device_address asc ";
$parameters['domain_uuid'] = $domain_uuid;
@ -195,8 +238,8 @@
!empty($device["device_address"]) &&
strtolower($device["device_address"]) == 'uuid' &&
(
!isset($_SESSION['limit']['devices']['numeric']) ||
$total_devices < $_SESSION['limit']['devices']['numeric']
$limit_devices === null ||
$total_devices < $limit_devices
)) {
$device_address = strtolower(uuid());
}
@ -229,7 +272,7 @@
$parameters['device_address'] = $device_address;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row)) {
if ($_SESSION['domain_uuid'] == $row['domain_uuid']) {
if ($domain_uuid == $row['domain_uuid']) {
$device_uuid = $row['device_uuid'];
$device_domain_name = $row['device_domain_name'];
$device_unique = true;
@ -314,7 +357,7 @@
$domain_uuid = $_POST["domain_uuid"];
}
else {
$domain_uuid = $_SESSION['domain_uuid'];
$domain_uuid = $domain_uuid;
}
//validate the token
@ -345,10 +388,8 @@
}
//prevent users from bypassing extension limit by using range
if (!empty($_SESSION['limit']['extensions']['numeric'])) {
if (isset($total_extensions) && ($total_extensions ?? 0) + $range > $_SESSION['limit']['extensions']['numeric']) {
$range = $_SESSION['limit']['extensions']['numeric'] - $total_extensions;
}
if (isset($total_extensions) && ($total_extensions ?? 0) + $range > $limit_extensions) {
$range = $limit_extensions - $total_extensions;
}
//add or update the database
@ -401,10 +442,23 @@
//extension exists
}
else {
//password permission not assigned get the password from the database
if ($action == "update" && !permission_exists('extension_password')) {
$sql = "select password from v_extensions ";
$sql .= "where extension_uuid = :extension_uuid ";
$sql .= "and domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $domain_uuid;
$parameters['extension_uuid'] = $extension_uuid;
$row = $database->select($sql, $parameters, 'row');
if (is_array($row) && @sizeof($row) != 0) {
$password = $row["password"];
}
unset($sql, $parameters, $row);
}
//get the password length and strength
$password_length = $_SESSION["extension"]["password_length"]["numeric"];
$password_strength = $_SESSION["extension"]["password_strength"]["numeric"];
$password_length = $extension_password_length;
$password_strength = $extension_password_strength;
//extension does not exist add it
if ($action == "add" || $range > 1) {
@ -415,7 +469,7 @@
//prepare the values for mwi account
if (!empty($mwi_account) && strpos($mwi_account, '@') === false) {
$mwi_account .= "@".$_SESSION['domain_name'];
$mwi_account .= "@".$domain_name;
}
//generate a password
@ -479,7 +533,7 @@
}
else {
if ($action == "add") {
$array["extensions"][$i]["max_registrations"] = $_SESSION['extension']['max_registrations']['numeric'];
$array["extensions"][$i]["max_registrations"] = $extension_max_registrations;
}
}
if (permission_exists("extension_limit")) {
@ -491,7 +545,7 @@
}
else {
if ($action == "add") {
$array["extensions"][$i]["user_context"] = $_SESSION['domain_name'];
$array["extensions"][$i]["user_context"] = $domain_name;
}
}
if (permission_exists('extension_missed_call')) {
@ -592,11 +646,11 @@
}
//get the dislplay label
if ($_SESSION['provision']['line_label']['text'] == 'auto') {
if ($provision_line_label == 'auto') {
$line_label = $extension;
}
else {
$line_label = $_SESSION['provision']['line_label']['text'];
$line_label = $provision_line_label;
$line_label = str_replace("\${name}", $name, $line_label);
$line_label = str_replace("\${effective_caller_id_name}", $effective_caller_id_name, $line_label);
$line_label = str_replace("\${caller_id_name}", $effective_caller_id_name, $line_label);
@ -609,11 +663,11 @@
}
//get the dislplay name
if ($_SESSION['provision']['line_display_name']['text'] == 'auto') {
if ($provision_line_display_name == 'auto') {
$line_display_name = $name;
}
else {
$line_display_name = $_SESSION['provision']['line_display_name']['text'];
$line_display_name = $provision_line_display_name;
$line_display_name = str_replace("\${name}", $name, $line_display_name);
$line_display_name = str_replace("\${effective_caller_id_name}", $effective_caller_id_name, $line_display_name);
$line_display_name = str_replace("\${caller_id_name}", $effective_caller_id_name, $line_display_name);
@ -627,14 +681,14 @@
//send a message to the user the device is not unique
if (!$device_unique) {
$message = $text['message-duplicate'].(if_group("superadmin") && $_SESSION["domain_name"] != $device_domain_name ? ": ".$device_domain_name : null);
$message = $text['message-duplicate'].(if_group("superadmin") && $domain_name != $device_domain_name ? ": ".$device_domain_name : null);
message::add($message,'negative');
}
//build the devices array
if ($device_unique && $device_address != '000000000000') {
$array["devices"][$j]["device_uuid"] = $device_uuids[$d];
$array["devices"][$j]["domain_uuid"] = $_SESSION['domain_uuid'];
$array["devices"][$j]["domain_uuid"] = $domain_uuid;
$array["devices"][$j]["device_address"] = $device_address;
$array["devices"][$j]["device_label"] = $extension;
if (!empty($device_vendor)) {
@ -646,21 +700,21 @@
$array["devices"][$j]["device_enabled"] = "true";
$array["devices"][$j]["device_lines"][0]["device_uuid"] = $device_uuids[$d];
$array["devices"][$j]["device_lines"][0]["device_line_uuid"] = uuid();
$array["devices"][$j]["device_lines"][0]["domain_uuid"] = $_SESSION['domain_uuid'];
$array["devices"][$j]["device_lines"][0]["server_address"] = $_SESSION['domain_name'];
$array["devices"][$j]["device_lines"][0]["outbound_proxy_primary"] = $_SESSION['provision']['outbound_proxy_primary']['text'];
$array["devices"][$j]["device_lines"][0]["outbound_proxy_secondary"] = $_SESSION['provision']['outbound_proxy_secondary']['text'];
$array["devices"][$j]["device_lines"][0]["server_address_primary"] = $_SESSION['provision']['server_address_primary']['text'];
$array["devices"][$j]["device_lines"][0]["server_address_secondary"] = $_SESSION['provision']['server_address_secondary']['text'];
$array["devices"][$j]["device_lines"][0]["domain_uuid"] = $domain_uuid;
$array["devices"][$j]["device_lines"][0]["server_address"] = $domain_name;
if ($provision_outbound_proxy_primary !== null) $array["devices"][$j]["device_lines"][0]["outbound_proxy_primary"] = $provision_outbound_proxy_primary;
if ($provision_outbound_proxy_secondary !== null) $array["devices"][$j]["device_lines"][0]["outbound_proxy_secondary"] = $provision_outbound_proxy_secondary;
if ($provision_server_address_primary !== null) $array["devices"][$j]["device_lines"][0]["server_address_primary"] = $provision_server_address_primary;
if ($provision_server_address_secondary !== null) $array["devices"][$j]["device_lines"][0]["server_address_secondary"] = $provision_server_address_secondary;
$array["devices"][$j]["device_lines"][0]["label"] = $line_label;
$array["devices"][$j]["device_lines"][0]["display_name"] = $line_display_name;
$array["devices"][$j]["device_lines"][0]["user_id"] = $extension;
$array["devices"][$j]["device_lines"][0]["auth_id"] = $extension;
$array["devices"][$j]["device_lines"][0]["password"] = $password;
$array["devices"][$j]["device_lines"][0]["line_number"] = is_numeric($line_numbers[$d]) ? $line_numbers[$d] : '1';
$array["devices"][$j]["device_lines"][0]["sip_port"] = $_SESSION['provision']['line_sip_port']['numeric'];
$array["devices"][$j]["device_lines"][0]["sip_transport"] = $_SESSION['provision']['line_sip_transport']['text'];
$array["devices"][$j]["device_lines"][0]["register_expires"] = $_SESSION['provision']['line_register_expires']['numeric'];
if ($provision_line_sip_port !== null) $array["devices"][$j]["device_lines"][0]["sip_port"] = $provision_line_sip_port;
if ($provision_line_sip_transport !== null) $array["devices"][$j]["device_lines"][0]["sip_transport"] = $provision_line_sip_transport;
if ($provision_line_register_expires !== null) $array["devices"][$j]["device_lines"][0]["register_expires"] = $provision_line_register_expires;
$array["devices"][$j]["device_lines"][0]["enabled"] = "true";
}
@ -676,7 +730,7 @@
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/voicemails')) {
//set the voicemail password
if (empty($voicemail_password)) {
$voicemail_password = generate_password($_SESSION['voicemail']['password_length']['numeric'], 1);
$voicemail_password = generate_password($voicemail_password_length, 1);
}
//add the voicemail to the array
@ -698,8 +752,8 @@
$voicemail_uuid = uuid();
$voicemail_tutorial = 'true';
//if adding a mailbox and don't have the transcription permission, set the default transcribe behavior
if (!permission_exists('voicemail_transcription_enabled') && isset($_SESSION['voicemail']['transcription_enabled_default']['boolean'])) {
$voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean'];
if (!permission_exists('voicemail_transcription_enabled')) {
$voicemail_transcription_enabled = $voicemail_transcription_enabled_default;
}
}
@ -725,8 +779,8 @@
$array["voicemails"][$i]["voicemail_description"] = $description;
//make sure the voicemail directory exists
if (!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id)) {
mkdir($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id, 0770, true);
if (!file_exists($switch_voicemail.'/'.$voicemail_id)) {
mkdir($switch_voicemail."/".$voicemail_id, 0770, true);
}
}
@ -759,8 +813,8 @@
$sql .= "and server_address = :server_address ";
$sql .= "and user_id = :user_id ";
$parameters['password'] = $password;
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['server_address'] = $_SESSION['domain_name'];
$parameters['domain_uuid'] = $domain_uuid;
$parameters['server_address'] = $domain_name;
$parameters['user_id'] = $extension;
$database->execute($sql, $parameters);
unset($sql, $parameters);
@ -773,7 +827,7 @@
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and device_key_value = :device_key_value ";
$parameters['device_key_label'] = $effective_caller_id_name;
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$parameters['domain_uuid'] = $domain_uuid;
$parameters['device_key_value'] = $extension;
$database->execute($sql, $parameters);
unset($sql, $parameters);
@ -795,7 +849,7 @@
if (permission_exists('extension_add') || permission_exists('extension_edit')) {
//synchronize configuration
if (!empty($_SESSION['switch']['extensions']['dir']) && is_writable($_SESSION['switch']['extensions']['dir'])) {
if (is_writable($switch_extensions)) {
require_once "app/extensions/resources/classes/extension.php";
$ext = new extension;
$ext->xml();
@ -803,13 +857,11 @@
}
//write the provision files
if (!empty($_SESSION['provision']['path']['text'])) {
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/provision')) {
if (!empty($provision_path) && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/provision')) {
$prov = new provision;
$prov->domain_uuid = $domain_uuid;
$response = $prov->write();
}
}
//clear the cache
if (!permission_exists("extension_user_context") && $action == "update") {
@ -929,8 +981,8 @@
}
else {
$voicemail_file = $_SESSION['voicemail']['voicemail_file']['text'];
$voicemail_local_after_email = $_SESSION['voicemail']['keep_local']['boolean'];
$voicemail_file = $settings->get('voicemail', 'voicemail_file', 'attach');
$voicemail_local_after_email = $settings->get('voicemail','keep_local', true);
}
//get the device lines
@ -953,7 +1005,7 @@
$sql .= "where domain_uuid = :domain_uuid ";
if (!permission_exists('device_all') && !permission_exists('device_domain_all')) {
$sql .= "and device_user_uuid = :user_uuid ";
$parameters['user_uuid'] = $_SESSION['user_uuid'];
$parameters['user_uuid'] = $user_uuid;
}
$sql .= "order by device_address asc ";
$parameters['domain_uuid'] = $domain_uuid;
@ -1031,30 +1083,30 @@
$toll_allow = str_replace(':',',', $toll_allow ?? '');
//get installed languages
$language_paths = glob($_SESSION["switch"]['sounds']['dir']."/*/*/*");
$language_paths = glob($switch_sounds."/*/*/*");
foreach ($language_paths as $key => $path) {
$path = str_replace($_SESSION["switch"]['sounds']['dir'].'/', "", $path);
$path = str_replace($switch_sounds.'/', "", $path);
$path_array = explode('/', $path);
if (count($path_array) <> 3 || strlen($path_array[0]) <> 2 || strlen($path_array[1]) <> 2) {
unset($language_paths[$key]);
}
$language_paths[$key] = str_replace($_SESSION["switch"]['sounds']['dir']."/","",$language_paths[$key] ?? '');
$language_paths[$key] = str_replace($switch_sounds."/","",$language_paths[$key] ?? '');
if (empty($language_paths[$key])) {
unset($language_paths[$key]);
}
}
//set the defaults
if (empty($user_context)) { $user_context = $_SESSION['domain_name']; }
if (empty($max_registrations)) { $max_registrations = $_SESSION['extension']['max_registrations']['numeric'] ?? ''; }
if (empty($user_context)) { $user_context = $domain_name; }
if (empty($max_registrations)) { $max_registrations = $extension_max_registrations ?? ''; }
if (empty($accountcode)) { $accountcode = get_accountcode(); }
if (empty($limit_max)) { $limit_max = $_SESSION['extension']['limit_max']['numeric'] ?? 5; }
if (empty($limit_max)) { $limit_max = $extension_limit_max; }
if (empty($limit_destination)) { $limit_destination = '!USER_BUSY'; }
if (empty($call_timeout)) { $call_timeout = $_SESSION['extension']['call_timeout']['numeric'] ?? 30; }
if (empty($call_timeout)) { $call_timeout = $extension_call_timeout; }
if (empty($call_screen_enabled)) { $call_screen_enabled = 'false'; }
if (empty($user_record)) { $user_record = $_SESSION['extension']['user_record_default']['text']; }
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $_SESSION['voicemail']['transcription_enabled_default']['boolean']; }
if (empty($voicemail_enabled)) { $voicemail_enabled = $_SESSION['voicemail']['enabled_default']['boolean']; }
if (empty($user_record)) { $user_record = $extension_user_record_default; }
if (empty($voicemail_transcription_enabled)) { $voicemail_transcription_enabled = $voicemail_transcription_enabled_default; }
if (empty($voicemail_enabled)) { $voicemail_enabled = $voicemail_enabled_default; }
if (empty($enabled)) { $enabled = 'true'; }
//create token
@ -1119,7 +1171,7 @@
}
echo "</div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>'extensions.php'.(isset($page) && is_numeric($page) ? '?page='.$page : null)]);
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'id'=>'btn_back','link'=>'extensions.php'.(isset($page) && is_numeric($page) ? '?page='.$page : null)]);
if ($action == 'update') {
$button_margin = 'margin-left: 15px;';
if (permission_exists('xml_cdr_view')) {
@ -1131,14 +1183,14 @@
unset($button_margin);
}
if (permission_exists('extension_setting_view')) {
echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$_SESSION['theme']['button_icon_settings'],'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/app/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]);
echo button::create(['type'=>'button','label'=>$text['button-settings'],'icon'=>$settings->get('theme', 'button_icon_settings'),'id'=>'btn_settings','style'=>'','link'=>PROJECT_PATH.'/app/extension_settings/extension_settings.php?id='.urlencode($extension_uuid)]);
}
if (permission_exists('extension_copy')) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$_SESSION['theme']['button_icon_copy'],'id'=>'btn_copy','style'=>'margin-left: 15px;','onclick'=>"copy_extension();"]);
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$settings->get('theme', 'button_icon_copy'),'id'=>'btn_copy','style'=>'margin-left: 15px;','onclick'=>"copy_extension();"]);
}
}
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>'submit_form();']);
echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$settings->get('theme', 'button_icon_save'),'id'=>'btn_save','style'=>'margin-left: 15px;','onclick'=>'submit_form();']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
@ -1152,7 +1204,7 @@
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
if ($action == "add" || permission_exists("extension_extension")) {
echo " <input class='formfld' type='text' name='extension' autocomplete='new-password' maxlength='255' value=\"".escape($extension ?? '')."\" required='required' placeholder=\"".($_SESSION['extension']['extension_range']['text'] ?? '')."\">\n";
echo " <input class='formfld' type='text' name='extension' autocomplete='new-password' maxlength='255' value=\"".escape($extension ?? '')."\" required='required' placeholder=\"".$settings->get('extension','extension_range','')."\">\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-extension']."\n";
@ -1257,7 +1309,7 @@
}
echo " </select>";
if ($action == "update") {
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add']]);
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add')]);
}
echo " <br>\n";
}
@ -1391,7 +1443,7 @@
}
}
}
if (permission_exists('device_address_uuid') && (!isset($_SESSION['limit']['devices']['numeric']) || $total_devices < $_SESSION['limit']['devices']['numeric'])) {
if (permission_exists('device_address_uuid') && ($limit_devices === null || $total_devices < $limit_devices)) {
echo " <option disabled='disabled'></option>\n";
echo " <option value='UUID'>".$text['label-generate']."</option>\n";
}
@ -1426,7 +1478,7 @@
echo " </td>\n";
if (is_array($device_lines) && @sizeof($device_lines) != 0) {
echo " <td>\n";
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add']]);
echo button::create(['type'=>'submit','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add')]);
echo " </td>\n";
}
echo " </tr>\n";
@ -1775,7 +1827,7 @@
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('voicemail_transcription_enabled') && ($_SESSION['transcribe']['enabled']['boolean'] ?? '') == "true") {
if (permission_exists('voicemail_transcription_enabled') && $transcribe_enabled) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-voicemail_transcription_enabled']."\n";
@ -1891,10 +1943,10 @@
echo " ".$text['label-call_group']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (!empty($_SESSION['call_group']['name']) && is_array($_SESSION['call_group']['name'])) {
if (!empty($settings->get('call_group', 'name')) && is_array($settings->get('call_group', 'name'))) {
echo " <select class='formfld' name='call_group'>\n";
echo " <option value=''></option>\n";
foreach ($_SESSION['call_group']['name'] as $name) {
foreach ($settings->get('call_group', 'name') as $name) {
if ($name == $call_group) {
echo " <option value='".escape($name)."' selected='selected'>".escape($name)."</option>\n";
}
@ -2258,7 +2310,7 @@
echo " ".$text['label-enabled']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
if (substr($_SESSION['theme']['input_toggle_style']['text'], 0, 6) == 'switch') {
if (substr($settings->get('theme', 'input_toggle_style'), 0, 6) == 'switch') {
echo " <label class='switch'>\n";
echo " <input type='checkbox' id='enabled' name='enabled' value='true' ".($enabled == 'true' ? "checked='checked'" : null).">\n";
echo " <span class='slider'></span>\n";
@ -2298,7 +2350,7 @@
echo "<input type='hidden' name='extension_uuid' value='".escape($extension_uuid)."'>\n";
echo "<input type='hidden' name='id' id='id' value='".escape($extension_uuid)."'>";
if (!permission_exists('extension_domain')) {
echo "<input type='hidden' name='domain_uuid' id='domain_uuid' value='".$_SESSION['domain_uuid']."'>";
echo "<input type='hidden' name='domain_uuid' id='domain_uuid' value='".$domain_uuid."'>";
}
echo "<input type='hidden' name='delete_type' id='delete_type' value=''>";
echo "<input type='hidden' name='delete_uuid' id='delete_uuid' value=''>";

View File

@ -312,7 +312,23 @@
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "The information contained in this facsimile is intended for the sole confidential use of the recipient(s) designated above, and may contain confidential and legally privileged information. If you are not the intended recipient, you are hereby notified that the review, disclosure, dissemination, distribution, copying, duplication in any form, and taking of any action in regards to the contents of this document - except with respect to its direct delivery to the intended recipient - is strictly prohibited. Please notify the sender immediately and destroy this cover sheet and all attachments. If stored or viewed electronically, please permanently delete it from your system.";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Notice displayed in the footer of the cover sheet.";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default text to populate the Footer field of a new fax (displayed below the box on the cover sheet).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "034a7f00-9455-4354-978e-7978d193f675";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "cover_message";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default text to populate the Message field of a new fax (displayed inside the box on the cover sheet).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "760eb1ec-249a-4482-bdc4-3fd35d604db9";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "cover_message_height";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "6.15";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the default height (inches) of the Message box on the cover sheet.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e907df99-6b3a-4864-bd11-681888f20289";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax";
@ -320,7 +336,7 @@
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default information displayed beneath the logo in the header of the cover sheet.";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Default text to populate the Header field of a new fax (displayed near the top of the cover sheet, beneath the logo).";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8338a404-3966-416e-b4f9-a1ac36c37bd1";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax";

View File

@ -568,7 +568,13 @@ if (!function_exists('fax_split_dtmf')) {
unset($yn);
}
else {
$pdf->Rect($x + 0.5, $y + 3.4, 7.5, 6.25, 'D');
//determine cover message box height, and difference, to adjust footer position accordingly
$cover_message_height = $setting->get('fax','cover_message_height');
$cover_message_height = (float) ($cover_message_height ?? 6.15);
$height_difference = 6.15 - $cover_message_height;
// draw message box
$pdf->Rect($x + 0.5, $y + 3.4, 7.5, $cover_message_height, 'D');
$y = $pdf->GetY();
}
@ -577,7 +583,7 @@ if (!function_exists('fax_split_dtmf')) {
$pdf->SetAutoPageBreak(true, 0.6);
$pdf->SetTopMargin(0.6);
$pdf->SetFont("helvetica", "", 8);
$pdf->SetXY($x + 0.5, $y + 0.6);
$pdf->SetXY($x + 0.5, $y + 0.6 - (float) ($height_difference ?? 0));
$pdf->MultiCell(7.5, 0.75, $fax_footer, 0, 'C', false);
}
$pdf->SetAutoPageBreak(false);
@ -746,7 +752,7 @@ if (!function_exists('fax_split_dtmf')) {
$fax_file = $dir_fax_sent."/".$fax_instance_uuid.".tif";
$common_variables = "fax_queue_uuid=".$fax_queue_uuid.",";
$common_variables .= "fax_uuid=" . $fax_uuid . ",";
//$common_variables .= "accountcode='".$fax_accountcode."',";
$common_variables .= "accountcode='".$fax_accountcode."',";
$common_variables .= "sip_h_accountcode='".$fax_accountcode."',";
$common_variables .= "domain_uuid=".$domain_uuid.",";
$common_variables .= "domain_name=".$domain_name.",";
@ -760,6 +766,8 @@ if (!function_exists('fax_split_dtmf')) {
if (!empty($provider_prefix)) {
$common_variables .= "provider_prefix='".$provider_prefix."',";
}
$common_variables .= "hangup_after_bridge=true,";
$common_variables .= "continue_on_fail=true,";
if (!empty($fax_numbers)) {
foreach ($fax_numbers as $fax_number) {
@ -1160,7 +1168,7 @@ if (!defined('STDIN')) {
echo " ".$text['label-fax-message']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <textarea type='text' name='fax_message' class='formfld' ".$required." style='width: 65%; height: 175px;'></textarea>\n";
echo " <textarea type='text' name='fax_message' class='formfld' ".$required." style='width: 65%; height: 175px;'>".$setting->get('fax','cover_message')."</textarea>\n";
echo "<br />\n";
echo " ".$text['description-fax-message']."\n";
echo "</td>\n";

View File

@ -76,6 +76,14 @@
$apps[$x]['default_settings'][$y]['default_setting_value'] = "30";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Number of days to retain the fax queue logs in the database for the maintenance app.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5506cf35-e19d-4f02-ab9d-43fd0f8460f7";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax_queue";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "prefer_local";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Determine whether fax calls should attempt to stay local or route to the provider.";
//$y++;
//$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "afd729d9-cf69-4793-a140-21093814d314";
//$apps[$x]['default_settings'][$y]['default_setting_category'] = "fax_queue";

View File

@ -224,6 +224,23 @@
//sending the fax
if ($fax_status == 'waiting' || $fax_status == 'trying' || $fax_status == 'busy') {
//get the provider_prefix from the domain_variables dialplan
$sql = "select dialplan_detail_data from v_dialplan_details ";
$sql .= "where dialplan_uuid in ( ";
$sql .= " select dialplan_uuid from v_dialplans ";
$sql .= " where dialplan_name = 'domain-variables' ";
$sql .= " and domain_uuid = :domain_uuid ";
$sql .= ") ";
$sql .= "and dialplan_detail_data like 'provider_prefix%' ";
$sql .= "and dialplan_detail_enabled = 'true' ";
$parameters['domain_uuid'] = $domain_uuid;
$row = $database->select($sql, $parameters, 'row');
$dialplan_detail_data = $row["dialplan_detail_data"];
unset($sql, $parameters, $row);
if (!empty($dialplan_detail_data)) {
$provider_prefix = explode('=', $dialplan_detail_data)[1];
}
//create event socket handle
$esl = event_socket::create();
if (!$esl->is_connected()) {
@ -280,6 +297,8 @@
}
//check to see if the destination number is local
$local_destination = false;
if ($setting->get('fax_queue','prefer_local', false)) {
$sql = "select count(destination_uuid) ";
$sql .= "from v_destinations ";
$sql .= "where (";
@ -291,11 +310,11 @@
$sql .= ") ";
$parameters['destination_number'] = $fax_number;
$destination_count = $database->select($sql, $parameters, 'column');
$local_destination = false;
if ($destination_count > 0) {
$local_destination = true;
$route_array[] = 'loopback/'.$fax_number.'/public';
}
}
//define the fax file
$common_variables = '';
@ -308,6 +327,8 @@
$common_variables .= "fax_ident='" . escape_quote($fax_caller_id_number) . "',";
$common_variables .= "fax_header='" . escape_quote($fax_caller_id_name) . "',";
$common_variables .= "fax_file='" . escape_quote($fax_file) . "',";
$common_variables .= "hangup_after_bridge=true,";
$common_variables .= "continue_on_fail=true,";
//add the fax destination number variables
if ($local_destination) {
@ -315,9 +336,13 @@
$common_variables .= "sip_req_user=".$fax_number.",";
}
//prepare the fax command
if (empty($route_array)) {
$channel_variables["toll_allow"] = !empty($fax_toll_allow) ? $fax_toll_allow : null;
$route_array = outbound_route_to_bridge($domain_uuid, $fax_prefix . $fax_number, $channel_variables);
if (empty($route_array)) {
//send the internal call to the registered extension
if (count($route_array) == 0) {
//check for valid extension
$sql = "select count(extension_uuid) ";
@ -329,18 +354,36 @@
$extension_count = $database->select($sql, $parameters, 'column');
if ($extension_count > 0) {
//send the internal call to the registered extension
$route_array[] = "user/".$fax_number."@".$domain_name;
$fax_uri = "user/".$fax_number."@".$domain_name;
}
else {
$fax_uri = '';
$fax_status = 'failed';
}
}
}
else {
foreach($route_array as $key => $bridge) {
//add the bridge to the fax_uri, after first iteration add the delimiter
if ($key == 0) {
$fax_uri = $bridge;
}
else {
$fax_uri .= '|'.$bridge;
}
//add the provider_prefix
if (!empty($provider_prefix)) {
$fax_uri = preg_replace('/\${provider_prefix}/', $provider_prefix, $fax_uri);
}
//remove switch ${variables} from the bridge statement
$fax_uri = preg_replace('/\${[^}]+}/', '', $fax_uri);
}
}
//set the origination uuid
if (!is_uuid($origination_uuid)) {
$origination_uuid = uuid();
}
//build a list of fax variables
$dial_string = $common_variables;
@ -362,8 +405,7 @@
//connect to event socket and send the command
if ($fax_status != 'failed' && file_exists($fax_file)) {
//send the fax and try another route if the fax fails
foreach($route_array as $route) {
$fax_command = "originate {" . $dial_string . ",fax_uri=".$route."}" . $route." &txfax('".$fax_file."')";
$fax_command = "originate {" . $dial_string . ",fax_uri=".$fax_uri."}" . $fax_uri." &txfax('".$fax_file."')";
$fax_response = event_socket::api($fax_command);
$response = str_replace("\n", "", $fax_response);
$response = trim(str_replace("+OK", "", $response));
@ -371,13 +413,11 @@
//originate command accepted
$uuid = $response;
echo "uuid: ".$uuid."\n";
break;
}
else {
//originate command failed (-ERR INVALID_GATEWAY or other errors)
echo "response: ".$response."\n";
}
}
//set the fax file name without the extension
$fax_instance_id = pathinfo($fax_file, PATHINFO_FILENAME);

View File

@ -396,14 +396,11 @@
echo " <div class='heading'><b>".$text['title-fifo']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$button_icon_back,'id'=>'btn_back','collapse'=>'hide-xs','style'=>'margin-right: 15px;','link'=>'fifo.php']);
// if ($action == 'update') {
// if (permission_exists('fifo_member_add')) {
// echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$button_icon_copy,'id'=>'btn_copy','name'=>'btn_copy','style'=>'display: none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
// }
// if (permission_exists('fifo_member_delete')) {
// echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$button_icon_delete,'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none; margin-right: 15px;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
// }
// }
if ($action == 'update') {
if (permission_exists('fifo_member_delete')) {
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$button_icon_delete,'id'=>'btn_delete','name'=>'action','value'=>'delete','style'=>'display: none; margin-right: 15px;']);
}
}
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$button_icon_save,'id'=>'btn_save','collapse'=>'hide-xs']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
@ -482,7 +479,7 @@
echo " <th class='vtablereq'>".$text['label-member_enabled']."</th>\n";
if (is_array($fifo_members) && @sizeof($fifo_members) > 1 && permission_exists('fifo_member_delete')) {
echo " <td class='vtable edit_delete_checkbox_all' onmouseover=\"swap_display('delete_label_details', 'delete_toggle_details');\" onmouseout=\"swap_display('delete_label_details', 'delete_toggle_details');\">\n";
echo " <span id='delete_label_details'>".$text['label-action']."</span>\n";
echo " <span id='delete_label_details'>".$text['label-delete']."</span>\n";
echo " <span id='delete_toggle_details'><input type='checkbox' id='checkbox_all_details' name='checkbox_all' onclick=\"edit_all_toggle('details'); checkbox_on_change(this);\"></span>\n";
echo " </td>\n";
}

View File

@ -980,7 +980,7 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "flyingvoice_voice_vad";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "numeric";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set 1 = On, 0 = Off (default)";
$y++;

View File

@ -42,6 +42,9 @@
$language = new text;
$text = $language->get();
//connect to the database
$database = database::new();
//define defaults
$action = '';
$search = '';
@ -112,7 +115,6 @@
$sql .= ")";
$parameters['search'] = '%'.$search.'%';
}
$database = new database;
$num_rows = $database->select($sql, $parameters ?? '', 'column');
//prepare to page the results
@ -147,7 +149,6 @@
}
$sql .= order_by($order_by, $order, 'ivr_menu_name', 'asc', $sort);
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
$ivr_menus = $database->select($sql, $parameters ?? '', 'all');
unset($sql, $parameters);

View File

@ -74,4 +74,3 @@
}
?>

View File

@ -210,7 +210,7 @@
//get the domain_uuid
$sql = "select domain_uuid from v_domains ";
$sql .= "where domain_name = :domain_name ";
$sql .= "where lower(domain_name) = lower(:domain_name) ";
$parameters['domain_name'] = $domain_name;
$domain_uuid = $database->select($sql, $parameters, 'column');
unset($sql, $parameters);

View File

@ -802,20 +802,11 @@
//set the variables
$line_number = $row['line_number'];
$register_expires = $row['register_expires'];
$sip_transport = strtolower($row['sip_transport']);
$sip_port = $row['sip_port'];
$sip_transport = strtolower($row['sip_transport'] ?? 'tcp');
$sip_port = $row['sip_port'] ?? '5060';
//set defaults
if (empty($register_expires)) { $register_expires = "120"; }
if (empty($sip_transport)) { $sip_transport = "tcp"; }
if (!isset($sip_port)) {
if ($line_number == "" || $line_number == "1") {
$sip_port = "5060";
}
else {
$sip_port = "506".($line_number + 1);
}
}
//convert seconds to minutes for grandstream
if ($device_vendor == 'grandstream') {

View File

@ -12,10 +12,7 @@
$text = $language->get($_SESSION['domain']['language']['code'], dirname($dashboard_url));
//get the dashboard label
$dashboard_label = $text['title-'.$dashboard_key];
if (empty($dashboard_label)) {
$dashboard_label = $dashboard_name;
}
$dashboard_label = $text['title-'.$dashboard_key] ?? $dashboard_name;
//prepare variables
$dashboard_target = ($dashboard_target == 'new') ? '_blank' : '_self';
@ -25,9 +22,7 @@
}
//channel count
if ($esl == null) {
$esl = event_socket::create();
}
//registration count
if ($esl->is_connected() && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/registrations/")) {
@ -41,6 +36,7 @@
//get the total enabled extensions
$sql = "select count(*) as count from v_extensions ";
$sql .= "where enabled = 'true' ";
$parameters = null;
if (!permission_exists("registration_all")) {
$sql .= "and domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
@ -59,7 +55,7 @@
echo " <span class='hud_title' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\">".escape($dashboard_label)."</span>";
echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\"><i class=\"fas ".$dashboard_icon."\"></i></span>\n";
echo " <span style=\"background-color: ".($row['dashboard_number_background_color'] ?? '#5d5ce3')."; color: ".($row['dashboard_number_text_color'] ?? '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$active_registrations." / ".($active_registrations + $inactive_registrations)."</span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#5d5ce3')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$active_registrations." / ".($active_registrations + $inactive_registrations)."</span>\n";
echo " </div>\n";
echo " </div>\n";
if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") {

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -123,6 +123,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -90,16 +90,35 @@
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>

View File

@ -48,6 +48,34 @@
<action function="play-file" data="voicemail/vm-save_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
@ -93,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -118,6 +118,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -104,6 +104,25 @@
</input>
</macro>
<macro name="voicemail_deleted_message_count">
<input pattern="^(1):(.*)$" break_on_match="true">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-message.wav"/>
</match>
</input>
<input pattern="^(\d+):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-you_have.wav"/>
<action function="say" data="$1" method="pronounced" type="items"/>
<action function="play-file" data="voicemail/vm-$2.wav"/>
<action function="play-file" data="voicemail/vm-messages.wav"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>

View File

@ -65,6 +65,31 @@
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
<input pattern="^deleted:([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
<match>
<action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-undelete_message.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$2" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-message_envelope.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$3" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-return_call.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-delete_recording.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$5" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-to_forward.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$6" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$7" method="pronounced" type="name_spelled"/>
</match>
</input>
</macro>
<!-- copied from vm/voicemail_ivr.xml, as not functioning there -->
@ -96,6 +121,17 @@
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^deleted:([0-9#*])$">
<match>
<!-- Deleted messages -->
<action function="say" data="4" method="pronounced" type="name_spelled"/>
<action function="play-file" data="voicemail/vm-deleted.wav"/>
<action function="play-file" data="voicemail/vm-messages_alt.wav"/>
<action function="play-file" data="voicemail/vm-press.wav"/>
<action function="say" data="$1" method="pronounced" type="name_spelled"/>
<action function="execute" data="sleep(100)"/>
</match>
</input>
<input pattern="^advanced:([0-9#*])$">
<match>
<!-- For advanced options -->

View File

@ -418,9 +418,9 @@ log = require "resources.functions.log".ring_group
local sql = "SELECT * FROM v_email_templates ";
sql = sql .. "WHERE (domain_uuid = :domain_uuid or domain_uuid is null) ";
sql = sql .. "AND template_language = :template_language ";
sql = sql .. "AND template_category = 'missed' "
sql = sql .. "AND template_enabled = 'true' "
sql = sql .. "ORDER BY domain_uuid DESC "
sql = sql .. "AND template_category = 'missed' ";
sql = sql .. "AND template_enabled = 'true' ";
sql = sql .. "ORDER BY domain_uuid DESC ";
local params = {domain_uuid = domain_uuid, template_language = default_language.."-"..default_dialect};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[voicemail] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");

View File

@ -82,7 +82,6 @@
message_number = message_number + 1;
end
--clear the variable
db_voicemail_uuid = '';
messages_to_delete = {};

View File

@ -243,6 +243,112 @@ $text['message-unavailable']['zh-cn'] = "不可用";
$text['message-unavailable']['ja-jp'] = "利用不可";
$text['message-unavailable']['ko-kr'] = "없는";
$text['label-service']['en-us'] = 'Service';
$text['label-service']['en-gb'] = 'Service';
$text['label-service']['ar-eg'] = 'خدمة';
$text['label-service']['de-at'] = 'Service';
$text['label-service']['de-ch'] = 'Service';
$text['label-service']['de-de'] = 'Service';
$text['label-service']['el-gr'] = 'Υπηρεσία';
$text['label-service']['es-cl'] = 'Servicio';
$text['label-service']['es-mx'] = 'Servicio';
$text['label-service']['fr-ca'] = 'Service';
$text['label-service']['fr-fr'] = 'Service';
$text['label-service']['he-il'] = 'שֵׁרוּת';
$text['label-service']['it-it'] = 'Servizio';
$text['label-service']['ka-ge'] = 'სერვისი';
$text['label-service']['nl-nl'] = 'Dienst';
$text['label-service']['pl-pl'] = 'Praca';
$text['label-service']['pt-br'] = 'Serviço';
$text['label-service']['pt-pt'] = 'Serviço';
$text['label-service']['ro-ro'] = 'Serviciu';
$text['label-service']['ru-ru'] = 'Услуга';
$text['label-service']['sv-se'] = 'Service';
$text['label-service']['uk-ua'] = 'Сервіс';
$text['label-service']['tr-tr'] = 'Hizmet';
$text['label-service']['zh-cn'] = '服务';
$text['label-service']['ja-jp'] = 'サービス';
$text['label-service']['ko-kr'] = '서비스';
$text['label-running']['en-us'] = "Running";
$text['label-running']['en-gb'] = "Running";
$text['label-running']['ar-eg'] = "فعال";
$text['label-running']['de-at'] = "Aktiv";
$text['label-running']['de-ch'] = "Aktiv";
$text['label-running']['de-de'] = "Aktiv";
$text['label-running']['el-gr'] = "Τρέξιμο";
$text['label-running']['es-cl'] = "Corriendo";
$text['label-running']['es-mx'] = "Corriendo";
$text['label-running']['fr-ca'] = "Actif";
$text['label-running']['fr-fr'] = "Actif";
$text['label-running']['he-il'] = "ריצה";
$text['label-running']['it-it'] = "Attivo";
$text['label-running']['ka-ge'] = "გაშვებულია";
$text['label-running']['nl-nl'] = "Aktief";
$text['label-running']['pl-pl'] = "Uruchomiony";
$text['label-running']['pt-br'] = "Em execução";
$text['label-running']['pt-pt'] = "Em execução";
$text['label-running']['ro-ro'] = "Alergare";
$text['label-running']['ru-ru'] = "Запущено";
$text['label-running']['sv-se'] = "Löpning";
$text['label-running']['uk-ua'] = "Запущено";
$text['label-running']['tr-tr'] = "Koşma";
$text['label-running']['zh-cn'] = "跑步";
$text['label-running']['ja-jp'] = "ランニング";
$text['label-running']['ko-kr'] = "달리기";
$text['label-yes']['en-us'] = "Yes";
$text['label-yes']['en-gb'] = "Yes";
$text['label-yes']['ar-eg'] = "نعم";
$text['label-yes']['de-at'] = "Ja";
$text['label-yes']['de-ch'] = "Ja";
$text['label-yes']['de-de'] = "Ja";
$text['label-yes']['el-gr'] = "Ναί";
$text['label-yes']['es-cl'] = "Si";
$text['label-yes']['es-mx'] = "Si";
$text['label-yes']['fr-ca'] = "Oui";
$text['label-yes']['fr-fr'] = "Oui";
$text['label-yes']['he-il'] = "כן";
$text['label-yes']['it-it'] = "Si";
$text['label-yes']['nl-nl'] = "Ja";
$text['label-yes']['pl-pl'] = "Tak";
$text['label-yes']['pt-br'] = "Sim";
$text['label-yes']['pt-pt'] = "Sim";
$text['label-yes']['ro-ro'] = "da";
$text['label-yes']['ru-ru'] = "Да";
$text['label-yes']['sv-se'] = "Ja";
$text['label-yes']['uk-ua'] = "Так";
$text['label-yes']['tr-tr'] = "Evet";
$text['label-yes']['zh-cn'] = "是的";
$text['label-yes']['ja-jp'] = "はい";
$text['label-yes']['ko-kr'] = "";
$text['label-no']['en-us'] = "No";
$text['label-no']['en-gb'] = "No";
$text['label-no']['ar-eg'] = "لا";
$text['label-no']['de-at'] = "Nein";
$text['label-no']['de-ch'] = "Nein";
$text['label-no']['de-de'] = "Nein";
$text['label-no']['el-gr'] = "Οχι";
$text['label-no']['es-cl'] = "No";
$text['label-no']['es-mx'] = "No";
$text['label-no']['fr-ca'] = "Non";
$text['label-no']['fr-fr'] = "Non";
$text['label-no']['he-il'] = "לא";
$text['label-no']['it-it'] = "No";
$text['label-no']['nl-nl'] = "Nee";
$text['label-no']['pl-pl'] = "Nie";
$text['label-no']['pt-br'] = "Não ";
$text['label-no']['pt-pt'] = "Não";
$text['label-no']['ro-ro'] = "Nu";
$text['label-no']['ru-ru'] = "Нет";
$text['label-no']['sv-se'] = "Nej";
$text['label-no']['uk-ua'] = "Ні";
$text['label-no']['tr-tr'] = "HAYIR";
$text['label-no']['zh-cn'] = "";
$text['label-no']['ja-jp'] = "いいえ";
$text['label-no']['ko-kr'] = "아니요";
$text['label-os']['en-us'] = "Operating System";
$text['label-os']['en-gb'] = "Operating System";
$text['label-os']['ar-eg'] = "מערכת הפעלה";

View File

@ -46,8 +46,8 @@ $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '41befc82-c65a-499e-9e29-513a3dd7974a';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'beade936-846b-4f02-986c-a2de6fa762c2';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin';
$x++;
$x++;
$array['dashboard'][$x]['dashboard_uuid'] = 'bb76f7fc-669f-41dd-a636-6ddaee5deae1';
$array['dashboard'][$x]['dashboard_name'] = 'System Counts';
$array['dashboard'][$x]['dashboard_path'] = 'system/system_counts';
@ -61,6 +61,21 @@ $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'a772d2a8-7c1f-4453-b77b-2e15b510a78d';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'bb76f7fc-669f-41dd-a636-6ddaee5deae1';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin';
$x++;
$array['dashboard'][$x]['dashboard_uuid'] = '2a0a6742-bd2d-449a-88ac-b3ed255c9f8e';
$array['dashboard'][$x]['dashboard_name'] = 'System Services';
$array['dashboard'][$x]['dashboard_path'] = 'system/system_services';
$array['dashboard'][$x]['dashboard_column_span'] = '1';
$array['dashboard'][$x]['dashboard_row_span'] = '2';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_order'] = '110';
$array['dashboard'][$x]['dashboard_enabled'] = 'false';
$array['dashboard'][$x]['dashboard_description'] = 'A list of showing the count of active and inactive services';
$y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '719d8a56-00b2-437e-83c0-a9e5005a53c5';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '4bd3e11d-f4cd-4e37-8e7b-445e1e4aa7d5';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin';
//$y++;
//$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '127382ae-0dd1-45eb-869c-56a708220de5';
//$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'bb76f7fc-669f-41dd-a636-6ddaee5deae1';

View File

@ -21,8 +21,8 @@
echo "<div class='hud_box'>\n";
$c = 0;
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
$row_style['0'] = "row_style0";
$row_style['1'] = "row_style1";
//disk usage
if (PHP_OS == 'FreeBSD' || PHP_OS == 'Linux') {
@ -37,16 +37,16 @@
if (!empty($percent_disk_usage)) {
//add half doughnut chart
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_disk_usage_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-disk_usage']."</a></span>\n";
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") {
?>
<div class='hud_chart' style='width: 175px;'><canvas id='system_status_chart'></canvas></div>
<div class='hud_chart' style='width: 175px;'><canvas id='system_disk_usage_chart'></canvas></div>
<script>
const system_status_chart = new Chart(
document.getElementById('system_status_chart').getContext('2d'),
const system_disk_usage_chart = new Chart(
document.getElementById('system_disk_usage_chart').getContext('2d'),
{
type: 'doughnut',
data: {
@ -102,133 +102,60 @@
}
if ($dashboard_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_system_status_details'>";
echo "<div class='hud_details hud_box' id='hud_system_disk_usage_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n";
echo "<th class='hud_heading' width='50%'>".$text['label-item']."</th>\n";
echo "<th class='hud_heading' style='text-align: right;'>".$text['label-value']."</th>\n";
echo " <th class='hud_heading' width='50%'>".($text['label-mount_point'] ?? 'Mount Point')."</th>\n";
echo " <th class='hud_heading' style='text-align: center;'>".($text['label-size'] ?? 'Size')."</th>\n";
echo " <th class='hud_heading' style='text-align: center;'>".($text['label-used'] ?? 'Used')."</th>\n";
echo " <th class='hud_heading' style='text-align: right;'>".($text['label-available'] ?? 'Available')."</th>\n";
echo "</tr>\n";
//pbx version
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".(isset($_SESSION['theme']['title']['text'])?$_SESSION['theme']['title']['text']:'FusionPBX')."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".software::version()."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
//os uptime
if (stristr(PHP_OS, 'Linux')) {
$prefix = 'up ';
$linux_uptime = shell_exec('uptime -p');
$uptime = substr($linux_uptime, strlen($prefix));
if (!empty($uptime)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-system_uptime']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$uptime."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
//memory usage (for available memory, use "free | awk 'FNR == 3 {print $4/($3+$4)*100}'" instead)
if (stristr(PHP_OS, 'Linux')) {
$free = shell_exec("/usr/bin/which free");
$awk = shell_exec("/usr/bin/which awk");
$percent_memory = round((float)shell_exec(escapeshellcmd($free." | ".$awk." 'FNR == 3 {print $3/($3+$4)*100}'")), 1);
if (!empty($percent_memory)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-memory_usage']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$percent_memory."%</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
//memory available
if (stristr(PHP_OS, 'Linux')) {
$result = trim(shell_exec('free -hw | grep \'Mem:\' | cut -d\' \' -f 55-64'));
if (!empty($result)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-memory_available']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$result."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
//disk usage
if (stristr(PHP_OS, 'Linux')) {
//calculated above
if (!empty($percent_disk_usage)) {
if (permission_exists('system_view_hdd')) {
$system_information = [];
if (stristr(PHP_OS, 'Linux') || stristr(PHP_OS, 'FreeBSD')) {
$shell_result = shell_exec('df -hP');
if (!empty($shell_result)) {
$lines = explode("\n",$shell_result);
//name the columns
$column_names = preg_split("/[\s,]+/", $lines[0]);
$col_file_system = array_search('Filesystem', $column_names, true); //usually 0
$col_size = array_search('Size', $column_names, true); //usually 1
$col_used = array_search('Used', $column_names, true); //usually 2
$col_available = array_search('Avail', $column_names, true); //usually 3
$col_mount_point = array_search('Mounted', $column_names, true); //usually 5 but can be 4
//skip heading line by starting at 1
for ($i = 1; $i < count($lines); $i++) {
$line = $lines[$i];
$columns = preg_split("/[\s,]+/", $line);
$system_information['os']['disk'][$i-1]['file_system'] = $columns[$col_file_system];
$system_information['os']['disk'][$i-1][ 'size' ] = $columns[ $col_size ];
$system_information['os']['disk'][$i-1][ 'used' ] = $columns[ $col_used ];
$system_information['os']['disk'][$i-1][ 'available' ] = $columns[ $col_available ];
$system_information['os']['disk'][$i-1]['mount_point'] = $columns[$col_mount_point];
}
}
foreach ($system_information['os']['disk'] as $disk) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-disk_usage']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$percent_disk_usage."%</td>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: left;'>".$disk['mount_point']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$disk[ 'size' ]."</td>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: center;'>".$disk[ 'used' ]."</td>\n";
echo " <td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$disk[ 'available' ]."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
}
else if (stristr(PHP_OS, 'WIN')) {
//db connections
switch ($db_type) {
case 'pgsql':
$sql = "select count(*) from pg_stat_activity";
break;
case 'mysql':
$sql = "show status where `variable_name` = 'Threads_connected'";
break;
default:
unset($sql);
if (!empty($db_path) && !empty($dbfilename)) {
$tmp = shell_exec("lsof ".realpath($db_path).'/'.$dbfilename);
$tmp = explode("\n", $tmp);
$connections = sizeof($tmp) - 1;
}
}
if (!empty($sql)) {
if (!isset($database)) { $database = new database; }
$connections = $database->select($sql, null, 'column');
unset($sql);
}
if (!empty($connections)) {
echo "<tr class='tr_link_void'>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'>".$text['label-database_connections']."</td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$connections."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
//channel count
$esl = event_socket::create();
if ($esl->is_connected()) {
$tmp = event_socket::api('status');
$matches = Array();
preg_match("/(\d+)\s+session\(s\)\s+\-\speak/", $tmp, $matches);
$channels = !empty($matches[1]) ? $matches[1] : 0;
$tr_link = "href='".PROJECT_PATH."/app/calls_active/calls_active.php'";
echo "<tr ".$tr_link.">\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-channels']."</a></td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$channels."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
//registration count
if ($esl->is_connected() && file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/registrations/")) {
$registration = new registrations;
$registrations = $registration->count();
$tr_link = "href='".PROJECT_PATH."/app/registrations/registrations.php'";
echo "<tr ".$tr_link.">\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text'><a ".$tr_link.">".$text['label-registrations']."</a></td>\n";
echo "<td valign='top' class='".$row_style[$c]." hud_text' style='text-align: right;'>".$registrations."</td>\n";
echo "</tr>\n";
$c = ($c) ? 0 : 1;
}
echo "</table>\n";
echo "</div>";
//$n++;
echo "<span class='hud_expander' onclick=\"$('#hud_system_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
echo "<span class='hud_expander' onclick=\"$('#hud_system_disk_usage_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
}
echo "</div>\n";

View File

@ -0,0 +1,175 @@
<?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-2024
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Mark J Crane <markjcrane@fusionpbx.com>
* Tim Fry <tim@fusionpbx.com>
*/
//includes files
require_once dirname(__DIR__, 4) . "/resources/require.php";
//check permissions
require_once "resources/check_auth.php";
if (permission_exists('xml_cdr_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
$dashboard_name = "System Services";
//function to parse a FusionPBX service from a .service file
if (!function_exists('get_classname')) {
function get_classname(string $file) {
$parsed = parse_ini_file($file);
$exec_cmd = $parsed['ExecStart'];
$parts = explode(' ', $exec_cmd);
$php_file = $parts[1] ?? '';
if (!empty($php_file)) {
return $php_file;
}
return '';
}
}
//function to check for running process
if (!function_exists('is_running')) {
function is_running(string $name) {
$output = '';
//escape for better safety
$name = escapeshellarg($name);
// Use pgrep to search for the program by its name
$output = shell_exec("ps -aux | grep $name | grep -v grep");
// If there is a process id then the program is running
return ($output !== null && strlen($output) > 0);
}
}
//load installed services
$files = glob(PROJECT_ROOT . '/*/*/resources/service/*.service');
$services = [];
$total_running = 0;
foreach ($files as $file) {
$service = get_classname($file);
//check if the service name was found
if (!empty($service)) {
$basename = basename($service, '.php');
//clean up the name
//$basename = ucwords(str_replace('_', ' ', $basename));
//check if service is running
$services[$basename] = is_running($service);
//keep total count for charts
if ($services[$basename]) {
++$total_running;
}
}
}
//track total installed services for charts
$total_services = count($services);
//add multi-lingual support
$text = (new text())->get($settings->get('domain','language','en-us'), 'core/user_settings');
//show the results
echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".($dashboard_details_state == 'disabled' ?: "onclick=\"$('#hud_system_services_details').slideToggle('fast'); toggle_grid_row_end('$dashboard_name')\""). ">\n";
echo " <span class='hud_title'>System Services</span>\n";
echo " <div class='hud_chart' style='width: 250px;'><canvas id='system_services_chart'></canvas></div>\n";
echo " </div>\n";
echo " <script>\n";
echo " const system_services_chart = new Chart (\n";
echo " document.getElementById('system_services_chart').getContext('2d'),\n";
echo " {\n";
echo " type: 'doughnut',\n";
echo " data: {\n";
echo " labels: ['Active: $total_running' , 'Inactive: ".$total_services-$total_running."'],\n";
echo " datasets: [{\n";
echo " data: ['5','".$total_services-$total_running."'],\n";
echo " backgroundColor: [\n";
echo " '".$settings->get('theme', 'dashboard_system_counts_chart_main_color','#2a9df4')."',\n";
echo " '".$settings->get('theme', 'dashboard_system_counts_chart_sub_color','#d4d4d4')."'\n";
echo " ],\n";
echo " borderColor: '".$settings->get('theme', 'dashboard_chart_border_color')."',\n";
echo " borderWidth: '".$settings->get('theme', 'dashboard_chart_border_width')."'\n";
echo " }]\n";
echo " },\n";
echo " options: {\n";
echo " plugins: {\n";
echo " chart_number: {\n";
echo " text: '$total_services'\n";
echo " },\n";
echo " legend: {\n";
echo " display: true,\n";
echo " position: 'right',\n";
echo " labels: {\n";
echo " usePointStyle: true,\n";
echo " pointStyle: 'rect',\n";
echo " color: '$dashboard_heading_text_color'\n";
echo " }\n";
echo " }\n";
echo " }\n";
echo " },\n";
echo " plugins: [{\n";
echo " id: 'chart_number',\n";
echo " beforeDraw(chart, args, options) {\n";
echo " const {ctx, chartArea: {top, right, bottom, left, width, height} } = chart;\n";
echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n";
echo " ctx.textBaseline = 'middle';\n";
echo " ctx.textAlign = 'center';\n";
echo " ctx.fillStyle = '$dashboard_number_text_color';\n";
echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n";
echo " ctx.save();\n";
echo " }\n";
echo " }]\n";
echo " }\n";
echo " );\n";
echo " </script>\n";
if ($dashboard_details_state != 'disabled') {
echo " <div class='hud_details hud_box' id='hud_system_services_details'>\n";
echo " <table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo " <tr>\n";
echo " <th class='hud_heading' width='50%'>".($text['label-service'] ?? 'Service')."</th>\n";
echo " <th class='hud_heading' width='50%' style='text-align: center; padding-left: 0; padding-right: 0;'>".($text['label-running'] ?? 'Running')."</th>\n";
echo " </tr>\n";
$row_style[false] = "row_style0";
$row_style[true] = "row_style1";
$c = true;
foreach ($services as $name => $enabled) {
echo " <tr>\n";
echo " <td valign='top' class='{$row_style[$c]}' hud_text>$name</td>\n";
echo " <td valign='top' class='{$row_style[$c]}' hud_text style='text-align: center;'>" . ($enabled ? $text['label-yes'] ?? 'Yes' : $text['label-no'] ?? 'No') . "</td>\n";
echo " </tr>\n";
$c = !$c;
}
echo " </table>\n";
echo " </div>\n";
}
echo "</div>\n";

View File

@ -111,7 +111,7 @@
echo "<span class='hud_content'>\n";
echo "<div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n";
echo " <span style=\"background-color: ".($row['dashboard_number_background_color'] ?? '#03c04a')."; color: ".($row['dashboard_number_text_color'] ?? '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$messages['new']."</span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#03c04a')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$messages['new']."</span>\n";
echo " </div>\n";
echo "</span>";
}

View File

@ -89,6 +89,7 @@
//set the variables from the HTTP values
$voicemail_id = $_POST["voicemail_id"];
$voicemail_id_previous = $_POST["voicemail_id_previous"];
$voicemail_password = $_POST["voicemail_password"];
$greeting_id = $_POST["greeting_id"];
$voicemail_options = $_POST["voicemail_options"];
@ -261,9 +262,21 @@
$p->delete('voicemail_option_add', 'temp');
$p->delete('voicemail_destination_add', 'temp');
//make sure the voicemail directory exists
//create or rename voicemail directory as needed
if (is_numeric($voicemail_id)) {
if (!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id)) {
// old and new voicemail ids differ, old directory exists and new doesn't, rename directory
if (
!empty($voicemail_id_previous) && is_numeric($voicemail_id_previous) && $voicemail_id_previous != $voicemail_id &&
file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id_previous) &&
!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id)
) {
rename(
$_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id_previous, // previous
$_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id // new
);
}
// new directory doesn't exist, create
else if (!file_exists($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id)) {
mkdir($_SESSION['switch']['voicemail']['dir']."/default/".$_SESSION['domain_name']."/".$voicemail_id, 0770);
}
}
@ -560,6 +573,7 @@
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='voicemail_id' maxlength='255' autocomplete='new-password' value='".escape($voicemail_id)."'>\n";
echo " <input type='hidden' name='voicemail_id_previous' value='".escape($voicemail_id)."'>\n";
echo " <input type='text' style='display: none;' disabled='disabled'>\n"; //help defeat browser auto-fill
echo "<br />\n";
echo $text['description-voicemail_id']."\n";

View File

@ -267,6 +267,21 @@
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$y++;
$apps[$x]['permissions'][$y]['name'] = 'xml_cdr_extension_view';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'xml_cdr_extension_add';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'xml_cdr_extension_edit';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'xml_cdr_extension_delete';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'xml_cdr_extension_all';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
//default settings
$y=0;
@ -856,6 +871,85 @@
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
//xml cdr extensions
$y++;
$apps[$x]['db'][$y]['table']['name'] = 'v_xml_cdr_extensions';
$apps[$x]['db'][$y]['table']['parent'] = '';
$z = 0;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'xml_cdr_extension_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'domain_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_domains';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'domain_uuid';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'xml_cdr_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_xml_cdr";
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'extension_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'start_stamp';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '1';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'end_stamp';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '1';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'duration';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'insert_date';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'insert_user';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'update_date';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'update_user';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = '';
//schema details
$y++;
$apps[$x]['db'][$y]['table']['name'] = "v_xml_cdr_json";

View File

@ -243,6 +243,32 @@ $text['label-name']['zh-cn'] = "姓名";
$text['label-name']['ja-jp'] = "名前";
$text['label-name']['ko-kr'] = "이름";
$text['label-volume']['en-us'] = "Volume";
$text['label-volume']['en-gb'] = "Volume";
$text['label-volume']['ar-eg'] = "";
$text['label-volume']['de-at'] = "";
$text['label-volume']['de-ch'] = "";
$text['label-volume']['de-de'] = "";
$text['label-volume']['el-gr'] = "";
$text['label-volume']['es-cl'] = "";
$text['label-volume']['es-mx'] = "";
$text['label-volume']['fr-ca'] = "";
$text['label-volume']['fr-fr'] = "";
$text['label-volume']['he-il'] = "";
$text['label-volume']['it-it'] = "";
$text['label-volume']['nl-nl'] = "";
$text['label-volume']['pl-pl'] = "";
$text['label-volume']['pt-br'] = "";
$text['label-volume']['pt-pt'] = "";
$text['label-volume']['ro-ro'] = "";
$text['label-volume']['ru-ru'] = "";
$text['label-volume']['sv-se'] = "";
$text['label-volume']['uk-ua'] = "";
$text['label-volume']['tr-tr'] = "";
$text['label-volume']['zh-cn'] = "";
$text['label-volume']['ja-jp'] = "";
$text['label-volume']['ko-kr'] = "";
$text['label-minutes']['en-us'] = "Minutes";
$text['label-minutes']['en-gb'] = "Minutes";
$text['label-minutes']['ar-eg'] = "دقائق";
@ -3240,6 +3266,32 @@ $text['label-answer']['zh-cn'] = "回答";
$text['label-answer']['ja-jp'] = "答え";
$text['label-answer']['ko-kr'] = "答え";
$text['label-asr']['en-us'] = "ASR";
$text['label-asr']['en-gb'] = "ASR";
$text['label-asr']['ar-eg'] = "";
$text['label-asr']['de-at'] = "";
$text['label-asr']['de-ch'] = "";
$text['label-asr']['de-de'] = "";
$text['label-asr']['el-gr'] = "";
$text['label-asr']['es-cl'] = "";
$text['label-asr']['es-mx'] = "";
$text['label-asr']['fr-ca'] = "";
$text['label-asr']['fr-fr'] = "";
$text['label-asr']['he-il'] = "";
$text['label-asr']['it-it'] = "";
$text['label-asr']['nl-nl'] = "";
$text['label-asr']['pl-pl'] = "";
$text['label-asr']['pt-br'] = "";
$text['label-asr']['pt-pt'] = "";
$text['label-asr']['ro-ro'] = "";
$text['label-asr']['ru-ru'] = "";
$text['label-asr']['sv-se'] = "";
$text['label-asr']['uk-ua'] = "";
$text['label-asr']['tr-tr'] = "";
$text['label-asr']['zh-cn'] = "";
$text['label-asr']['ja-jp'] = "";
$text['label-asr']['ko-kr'] = "";
$text['label-aloc']['en-us'] = "ALOC";
$text['label-aloc']['en-gb'] = "ALOC";
$text['label-aloc']['ar-eg'] = "ALOC";
@ -3672,6 +3724,84 @@ $text['description-mos']['zh-cn'] = "平均意见得分";
$text['description-mos']['ja-jp'] = "平均意見スコア";
$text['description-mos']['ko-kr'] = "평균 의견 점수";
$text['description-volume']['en-us'] = "Inbound, Outbound, and Local";
$text['description-volume']['en-gb'] = "Inbound, Outbound, and Local";
$text['description-volume']['ar-eg'] = "";
$text['description-volume']['de-at'] = "";
$text['description-volume']['de-ch'] = "";
$text['description-volume']['de-de'] = "";
$text['description-volume']['el-gr'] = "";
$text['description-volume']['es-cl'] = "";
$text['description-volume']['es-mx'] = "";
$text['description-volume']['fr-ca'] = "";
$text['description-volume']['fr-fr'] = "";
$text['description-volume']['he-il'] = "";
$text['description-volume']['it-it'] = "";
$text['description-volume']['nl-nl'] = "";
$text['description-volume']['pl-pl'] = "";
$text['description-volume']['pt-br'] = "";
$text['description-volume']['pt-pt'] = "";
$text['description-volume']['ro-ro'] = "";
$text['description-volume']['ru-ru'] = "";
$text['description-volume']['sv-se'] = "";
$text['description-volume']['uk-ua'] = "";
$text['description-volume']['tr-tr'] = "";
$text['description-volume']['zh-cn'] = "";
$text['description-volume']['ja-jp'] = "";
$text['description-volume']['ko-kr'] = "";
$text['description-calls-per-minute']['en-us'] = "average minutes / calls per minute answered";
$text['description-calls-per-minute']['en-gb'] = "average minutes / calls per minute answered";
$text['description-calls-per-minute']['ar-eg'] = "";
$text['description-calls-per-minute']['de-at'] = "";
$text['description-calls-per-minute']['de-ch'] = "";
$text['description-calls-per-minute']['de-de'] = "";
$text['description-calls-per-minute']['el-gr'] = "";
$text['description-calls-per-minute']['es-cl'] = "";
$text['description-calls-per-minute']['es-mx'] = "";
$text['description-calls-per-minute']['fr-ca'] = "";
$text['description-calls-per-minute']['fr-fr'] = "";
$text['description-calls-per-minute']['he-il'] = "";
$text['description-calls-per-minute']['it-it'] = "";
$text['description-calls-per-minute']['nl-nl'] = "";
$text['description-calls-per-minute']['pl-pl'] = "";
$text['description-calls-per-minute']['pt-br'] = "";
$text['description-calls-per-minute']['pt-pt'] = "";
$text['description-calls-per-minute']['ro-ro'] = "";
$text['description-calls-per-minute']['ru-ru'] = "";
$text['description-calls-per-minute']['sv-se'] = "";
$text['description-calls-per-minute']['uk-ua'] = "";
$text['description-calls-per-minute']['tr-tr'] = "";
$text['description-calls-per-minute']['zh-cn'] = "";
$text['description-calls-per-minute']['ja-jp'] = "";
$text['description-calls-per-minute']['ko-kr'] = "";
$text['description-asr']['en-us'] = "Answer-Seizure Ratio (% of calls answered)";
$text['description-asr']['en-gb'] = "Answer-Seizure Ratio (% of calls answered)";
$text['description-asr']['ar-eg'] = "";
$text['description-asr']['de-at'] = "";
$text['description-asr']['de-ch'] = "";
$text['description-asr']['de-de'] = "";
$text['description-asr']['el-gr'] = "";
$text['description-asr']['es-cl'] = "";
$text['description-asr']['es-mx'] = "";
$text['description-asr']['fr-ca'] = "";
$text['description-asr']['fr-fr'] = "";
$text['description-asr']['he-il'] = "";
$text['description-asr']['it-it'] = "";
$text['description-asr']['nl-nl'] = "";
$text['description-asr']['pl-pl'] = "";
$text['description-asr']['pt-br'] = "";
$text['description-asr']['pt-pt'] = "";
$text['description-asr']['ro-ro'] = "";
$text['description-asr']['ru-ru'] = "";
$text['description-asr']['sv-se'] = "";
$text['description-asr']['uk-ua'] = "";
$text['description-asr']['tr-tr'] = "";
$text['description-asr']['zh-cn'] = "";
$text['description-asr']['ja-jp'] = "";
$text['description-asr']['ko-kr'] = "";
$text['description-aloc']['en-us'] = "Average Length of Call";
$text['description-aloc']['en-gb'] = "Average Length of Call";
$text['description-aloc']['ar-eg'] = "متوسط طول المحادثة";

View File

@ -33,10 +33,26 @@ if (!class_exists('xml_cdr')) {
class xml_cdr {
/**
* define variables
* Internal array structure that is populated from the database
* @var array Array of settings loaded from Default Settings
*/
private $settings;
/**
* Set in the constructor. Must be a database object and cannot be null.
* @var database Database Object
*/
private $database;
/**
* Set in the constructor. This can be null.
* @var destinations Object
*/
private $destinations;
/**
* define variables
*/
public $array;
public $fields;
public $setting;
@ -78,12 +94,26 @@ if (!class_exists('xml_cdr')) {
/**
* Called when the object is created
*/
public function __construct() {
//connect to the database
$this->database = new database;
public function __construct($setting_array = []) {
//get the email queue settings
$this->setting = new settings();
//open a database connection
if (empty($setting_array['database'])) {
$this->database = database::new();
} else {
$this->database = $setting_array['database'];
}
//get the settings object
if (empty($setting_array['settings'])) {
$this->settings = new settings();
} else {
$this->settings = $setting_array['settings'];
}
//get the destinations object
if (!empty($setting_array['destinations'])) {
$this->destinations = $setting_array['destinations'];
}
//assign private variables (for delete method)
$this->app_name = 'xml_cdr';
@ -100,23 +130,23 @@ if (!class_exists('xml_cdr')) {
public function log($message) {
//save the log if enabled is true
if ($this->setting->get('log', 'enabled', false)) {
if ($this->settings->get('log', 'enabled', false)) {
//save the log to the php error log
if ($this->setting->get('log', 'type') == 'error_log') {
if ($this->settings->get('log', 'type') == 'error_log') {
error_log($message);
}
//save the log to the syslog server
if ($this->setting->get('log', 'type') == 'syslog') {
if ($this->settings->get('log', 'type') == 'syslog') {
openlog("XML CDR", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, $message);
closelog();
}
//save the log to the file system
if ($this->setting->get('log', 'text') == 'file') {
$fp = fopen($this->setting->get('server', 'temp').'/xml_cdr.log', 'a+');
if ($this->settings->get('log', 'text') == 'file') {
$fp = fopen($this->settings->get('server', 'temp').'/xml_cdr.log', 'a+');
if (!$fp) {
return;
}
@ -205,8 +235,8 @@ if (!class_exists('xml_cdr')) {
$this->fields[] = "hangup_cause_q850";
$this->fields[] = "sip_hangup_disposition";
if (!empty($this->setting->get('cdr', 'field'))) {
foreach ($this->setting->get('cdr', 'field') as $field) {
if (!empty($this->settings->get('cdr', 'field'))) {
foreach ($this->settings->get('cdr', 'field') as $field) {
$field_name = end(explode(',', $field));
$this->fields[] = $field_name;
}
@ -226,8 +256,8 @@ if (!class_exists('xml_cdr')) {
if (!empty($this->array)) {
//set the directory
if (!empty($this->setting->get('switch', 'log'))) {
$xml_cdr_dir = $this->setting->get('switch', 'log').'/xml_cdr';
if (!empty($this->settings->get('switch', 'log'))) {
$xml_cdr_dir = $this->settings->get('switch', 'log').'/xml_cdr';
}
//add the temporary permission
@ -309,6 +339,9 @@ if (!class_exists('xml_cdr')) {
//remove invalid numeric xml tags
$xml_string = preg_replace('/<\/?\d+>/', '', $xml_string);
//replace xml tag name <set api_hangup_hook> with <api_hangup_hook>
$xml_string = preg_replace('/(<\/?)(set )([^>]*>)/', '$1$3', $xml_string);
//disable xml entities
if (PHP_VERSION_ID < 80000) { libxml_disable_entity_loader(true); }
@ -316,18 +349,18 @@ if (!class_exists('xml_cdr')) {
$xml = simplexml_load_string($xml_string, 'SimpleXMLElement', LIBXML_NOCDATA);
if ($xml === false) {
//set the directory
if (!empty($this->setting->get('switch', 'log'))) {
$xml_cdr_dir = $this->setting->get('switch', 'log').'/xml_cdr';
if (!empty($this->settings->get('switch', 'log'))) {
$xml_cdr_dir = $this->settings->get('switch', 'log').'/xml_cdr';
}
//failed to load the XML, move the XML file to the failed directory
if (!empty($xml_cdr_dir)) {
if (!file_exists($xml_cdr_dir.'/failed')) {
if (!mkdir($xml_cdr_dir.'/failed', 0660, true)) {
if (!file_exists($xml_cdr_dir.'/failed/invalid_xml')) {
if (!mkdir($xml_cdr_dir.'/failed/invalid_xml', 0660, true)) {
die('Failed to create '.$xml_cdr_dir.'/failed');
}
}
rename($xml_cdr_dir.'/'.$this->file, $xml_cdr_dir.'/failed/'.$this->file);
rename($xml_cdr_dir.'/'.$this->file, $xml_cdr_dir.'/failed/invalid_xml/'.$this->file);
}
//return without saving the invalid xml
@ -335,11 +368,11 @@ if (!class_exists('xml_cdr')) {
}
//skip call detail records for calls blocked by call block
if (isset($xml->variables->call_block) && !empty($this->setting->get('call_block', 'save_call_detail_record'))) {
if ($xml->variables->call_block == 'true' && $this->setting->get('call_block', 'save_call_detail_record') == 'false') {
if (isset($xml->variables->call_block) && !empty($this->settings->get('call_block', 'save_call_detail_record'))) {
if ($xml->variables->call_block == 'true' && $this->settings->get('call_block', 'save_call_detail_record') == 'false') {
//delete the xml cdr file
if (!empty($this->setting->get('switch', 'log'))) {
$xml_cdr_dir = $this->setting->get('switch', 'log').'/xml_cdr';
if (!empty($this->settings->get('switch', 'log'))) {
$xml_cdr_dir = $this->settings->get('switch', 'log').'/xml_cdr';
if (file_exists($xml_cdr_dir.'/'.$this->file)) {
unlink($xml_cdr_dir.'/'.$this->file);
}
@ -368,8 +401,8 @@ if (!class_exists('xml_cdr')) {
$duplicate_uuid = true;
//remove the file as the record already exists in the database
if (!empty($this->setting->get('switch', 'log'))) {
$xml_cdr_dir = $this->setting->get('switch', 'log').'/xml_cdr';
if (!empty($this->settings->get('switch', 'log'))) {
$xml_cdr_dir = $this->settings->get('switch', 'log').'/xml_cdr';
if (file_exists($xml_cdr_dir.'/'.$this->file)) {
unlink($xml_cdr_dir.'/'.$this->file);
}
@ -615,8 +648,8 @@ if (!class_exists('xml_cdr')) {
$domain_uuid = urldecode($xml->variables->domain_uuid);
//sanitize the caller ID
$caller_id_name = preg_replace('#[^a-zA-Z 0-9\-\.]#', '', $caller_id_name);
$caller_id_number = preg_replace('#[^0-9\-]#', '', $caller_id_number);
$caller_id_name = preg_replace('#[^a-zA-Z0-9\-.\#*@ ]#', '', $caller_id_name);
$caller_id_number = preg_replace('#[^0-9\-\#\*]#', '', $caller_id_number);
//misc
$this->array[$key][0]['ring_group_uuid'] = urldecode($xml->variables->ring_group_uuid);
@ -794,8 +827,8 @@ if (!class_exists('xml_cdr')) {
}
//dynamic cdr fields
if (!empty($this->setting->get('cdr', 'field'))) {
foreach ($this->setting->get('cdr', 'field') as $field) {
if (!empty($this->settings->get('cdr', 'field'))) {
foreach ($this->settings->get('cdr', 'field') as $field) {
$fields = explode(",", $field);
$field_name = end($fields);
$this->fields[] = $field_name;
@ -907,7 +940,7 @@ if (!class_exists('xml_cdr')) {
//check to see if file exists with the default file name and path
if (empty($record_name)) {
$path = $this->setting->get('switch', 'recordings').'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
$path = $this->settings->get('switch', 'recordings').'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
if (file_exists($path.'/'.$uuid.'.wav')) {
$record_path = $path;
$record_name = $uuid.'.wav';
@ -922,7 +955,7 @@ if (!class_exists('xml_cdr')) {
//last check - check to see if file exists with the bridge_uuid for the file name and path
if (empty($record_name)) {
$bridge_uuid = urldecode($xml->variables->bridge_uuid) ?: $last_bridge;
$path = $this->setting->get('switch', 'recordings').'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
$path = $this->settings->get('switch', 'recordings').'/'.$domain_name.'/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
if (file_exists($path.'/'.$bridge_uuid.'.wav')) {
$record_path = $path;
$record_name = $bridge_uuid.'.wav';
@ -957,7 +990,7 @@ if (!class_exists('xml_cdr')) {
$this->json = json_encode($xml);
//save to the database in xml format
if ($this->setting->get('cdr', 'format') == "xml" && $this->setting->get('cdr', 'storage') == "db") {
if ($this->settings->get('cdr', 'format') == "xml" && $this->settings->get('cdr', 'storage') == "db") {
$this->array[$key][0]['xml'] = $xml_string;
}
@ -1009,7 +1042,7 @@ if (!class_exists('xml_cdr')) {
$this->array[$key][0]['call_flow'] = json_encode($this->call_flow());
//save to the database in json format
if ($this->setting->get('cdr', 'format') == "json" && $this->setting->get('cdr', 'storage') == "db") {
if ($this->settings->get('cdr', 'format') == "json" && $this->settings->get('cdr', 'storage') == "db") {
$key = 'xml_cdr_json';
$this->array[$key][0]['xml_cdr_json_uuid'] = uuid();
$this->array[$key][0]['xml_cdr_uuid'] = $uuid;
@ -1018,10 +1051,10 @@ if (!class_exists('xml_cdr')) {
}
//save the call log to the database
if ($this->setting->get('cdr', 'call_log_enabled', false) && !empty($this->setting->get('switch', 'log')) && $this->setting->get('cdr', 'storage') == "db") {
if ($this->settings->get('cdr', 'call_log_enabled', false) && !empty($this->settings->get('switch', 'log')) && $this->settings->get('cdr', 'storage') == "db") {
//get the log content
$log_content = '';
$handle = @fopen($this->setting->get('switch', 'log').'/freeswitch.log', "r");
$handle = @fopen($this->settings->get('switch', 'log').'/freeswitch.log', "r");
if ($handle) {
while (!feof($handle)) {
$line = stream_get_line($handle, 0, "\n");
@ -1044,13 +1077,13 @@ if (!class_exists('xml_cdr')) {
}
//store xml cdr on the file system as a file
if ($this->setting->get('cdr', 'storage') == "dir" && $error != "true") {
if ($this->settings->get('cdr', 'storage') == "dir" && $error != "true") {
if (!empty($uuid)) {
$tmp_dir = $this->setting->get('switch', 'log').'/xml_cdr/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
$tmp_dir = $this->settings->get('switch', 'log').'/xml_cdr/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
if(!file_exists($tmp_dir)) {
mkdir($tmp_dir, 0770, true);
}
if ($this->setting->get('cdr', 'format') == "xml") {
if ($this->settings->get('cdr', 'format') == "xml") {
$tmp_file = $uuid.'.xml';
$fh = fopen($tmp_dir.'/'.$tmp_file, 'w');
fwrite($fh, $xml_string);
@ -1140,8 +1173,8 @@ if (!class_exists('xml_cdr')) {
public function call_flow_summary($call_flow_array) {
//set the time zone
if (!empty($this->setting->get('domain', 'time_zone'))) {
$time_zone = $this->setting->get('domain', 'time_zone');
if (!empty($this->settings->get('domain', 'time_zone'))) {
$time_zone = $this->settings->get('domain', 'time_zone');
}
else {
$time_zone = date_default_timezone_get();
@ -1151,8 +1184,9 @@ if (!class_exists('xml_cdr')) {
date_default_timezone_set($time_zone);
//get the destination select list
$destination = new destinations;
$destination_array = $destination->get('dialplan');
if ($this->destinations) {
$destination_array = $this->destinations->get('dialplan');
}
//add new rows when callee_id_number exists
$new_rows = 0;
@ -1278,6 +1312,15 @@ if (!class_exists('xml_cdr')) {
$app['status'] = 'routed';
}
//add the source if there is a value
if (!empty($row["caller_profile"]["username"])) {
$app_source = $this->find_app($destination_array, $row["caller_profile"]["username"]);
$app['source_number'] = $row["caller_profile"]["username"];
$app['source_uuid'] = $app_source['uuid'];
$app['source_name'] = $app_source['name'];
$app['source_label'] = $app_source['label'];
}
//outbound routes
if ($this->call_direction == 'outbound') {
$status = 'missed';
@ -1288,7 +1331,6 @@ if (!class_exists('xml_cdr')) {
if (!empty($row["caller_profile"]["username"])) {
//add to the application array
$app['application'] = 'extensions';
$app['source'] = $row["caller_profile"]["username"];
$app['status'] = $status;
$app['name'] = '';
$app['label'] = 'extensions';
@ -1362,25 +1404,35 @@ if (!class_exists('xml_cdr')) {
}
//build the application urls
$destination_url = "/app/".($app['application'] ?? '')."/".$destination->singular($app['application'] ?? '')."_edit.php?id=".($app["uuid"] ?? '');
if (!empty($app['application'])) {
//build the source url
$source_url = '';
if (!empty($app["source_uuid"])) {
$source_url = "/app/".($app['application'] ?? '')."/".$this->singular($app['application'] ?? '')."_edit.php?id=".($app["source_uuid"] ?? '');
}
//build the destination url
$destination_url = '';
$destination_url = "/app/".($app['application'] ?? '')."/".$this->singular($app['application'] ?? '')."_edit.php?id=".($app["uuid"] ?? '');
$application_url = "/app/".($app['application'] ?? '')."/".($app['application'] ?? '').".php";
if (!empty($app['application']) && $app['application'] == 'call_centers') {
$destination_url = "/app/".($app['application'] ?? '')."/".$destination->singular($app['application'] ?? '')."_queue_edit.php?id=".($app["uuid"] ?? '');
$application_url = "/app/".($app['application'] ?? '')."/".$destination->singular($app['application'] ?? '')."_queues.php";
if ($app['application'] == 'call_centers') {
$destination_url = "/app/".($app['application'] ?? '')."/".$this->singular($app['application'] ?? '')."_queue_edit.php?id=".($app["uuid"] ?? '');
$application_url = "/app/".($app['application'] ?? '')."/".$this->singular($app['application'] ?? '')."_queues.php";
}
}
//add the application and destination details
$language2 = new text;
$text2 = $language2->get($this->setting->get('domain', 'language'), 'app/'.($app['application'] ?? ''));
$text2 = $language2->get($this->settings->get('domain', 'language'), 'app/'.($app['application'] ?? ''));
$call_flow_summary[$x]["application_name"] = ($app['application'] ?? '');
$call_flow_summary[$x]["application_label"] = trim($text2['title-'.($app['application'] ?? '')] ?? '');
$call_flow_summary[$x]["call_direction"] = $this->call_direction;
$call_flow_summary[$x]["application_url"] = $application_url;
if ($this->call_direction == 'outbound') {
$call_flow_summary[$x]["source_uuid"] = ($app['uuid'] ?? '');
$call_flow_summary[$x]["source_number"] = $app['source'];
$call_flow_summary[$x]["source_label"] = ($app['label'] ?? '');
$call_flow_summary[$x]["source_uuid"] = ($app['source_uuid'] ?? '');
$call_flow_summary[$x]["source_number"] = ($app['source_number'] ?? '');
$call_flow_summary[$x]["source_label"] = ($app['source_label'] ?? '');
$call_flow_summary[$x]["source_url"] = $destination_url;
$call_flow_summary[$x]["source_name"] = $app['description'] ?? '';
//$call_flow_summary[$x]["source_description"] = $app['description'] ?? '';
@ -1391,14 +1443,14 @@ if (!class_exists('xml_cdr')) {
$call_flow_summary[$x]["destination_description"] = '';
}
else {
$call_flow_summary[$x]["source_uuid"] = '';
$call_flow_summary[$x]["source_number"] = '';
$call_flow_summary[$x]["source_label"] = '';
$call_flow_summary[$x]["source_url"] = '';
$call_flow_summary[$x]["source_uuid"] = ($app['source_uuid'] ?? '');
$call_flow_summary[$x]["source_number"] = ($app['source_number'] ?? '');
$call_flow_summary[$x]["source_label"] = ($app['source_label'] ?? '');
$call_flow_summary[$x]["source_url"] = ($source_url ?? '');
$call_flow_summary[$x]["destination_name"] = ($app['description'] ?? '');
$call_flow_summary[$x]["destination_uuid"] = ($app['uuid'] ?? '');
$call_flow_summary[$x]["destination_label"] = ($app['label'] ?? '');
$call_flow_summary[$x]["destination_url"] = $destination_url;
$call_flow_summary[$x]["destination_url"] = $destination_url ?? '';
//$call_flow_summary[$x]["destination_description"] = $app['description'] ?? '';
}
$call_flow_summary[$x]["destination_number"] = $row["caller_profile"]["destination_number"];
@ -1413,8 +1465,8 @@ if (!class_exists('xml_cdr')) {
//add the call flow times
$call_flow_summary[$x]["start_epoch"] = round($profile_created_epoch);
$call_flow_summary[$x]["end_epoch"] = round($profile_end_epoch);
$call_flow_summary[$x]["start_stamp"] = date("Y-m-d H:i:s", $profile_created_epoch);
$call_flow_summary[$x]["end_stamp"] = date("Y-m-d H:i:s", $profile_end_epoch);
$call_flow_summary[$x]["start_stamp"] = date("Y-m-d H:i:s", (int)$profile_created_epoch);
$call_flow_summary[$x]["end_stamp"] = date("Y-m-d H:i:s", (int)$profile_end_epoch);
$call_flow_summary[$x]["duration_seconds"] = round($profile_end_epoch - $profile_created_epoch);
$call_flow_summary[$x]["duration_formatted"] = gmdate("G:i:s",(int)$call_flow_summary[$x]["duration_seconds"]);
unset($app);
@ -1497,8 +1549,8 @@ if (!class_exists('xml_cdr')) {
}
}
public function moved_to_failed($failed_file) {
$xml_cdr_dir = $this->setting->get('switch', 'log', '/var/log/freeswitch').'/xml_cdr';
public function move_to_failed($failed_file) {
$xml_cdr_dir = $this->settings->get('switch', 'log', '/var/log/freeswitch').'/xml_cdr';
if (!file_exists($xml_cdr_dir.'/failed')) {
if (!mkdir($xml_cdr_dir.'/failed', 0660, true)) {
die('Failed to create '.$xml_cdr_dir.'/failed');
@ -1511,7 +1563,7 @@ if (!class_exists('xml_cdr')) {
* get xml from the filesystem and save it to the database
*/
public function read_files() {
$xml_cdr_dir = $this->setting->get('switch', 'log').'/xml_cdr';
$xml_cdr_dir = $this->settings->get('switch', 'log').'/xml_cdr';
$dir_handle = opendir($xml_cdr_dir);
$x = 0;
while($file = readdir($dir_handle)) {
@ -1611,9 +1663,9 @@ if (!class_exists('xml_cdr')) {
//authentication for xml cdr http post
if (!defined('STDIN')) {
if ($this->setting->get('cdr', 'http_enabled')) {
if ($this->settings->get('cdr', 'http_enabled')) {
//get the contents of xml_cdr.conf.xml
$conf_xml_string = file_get_contents($this->setting->get('switch', 'conf').'/autoload_configs/xml_cdr.conf.xml');
$conf_xml_string = file_get_contents($this->settings->get('switch', 'conf').'/autoload_configs/xml_cdr.conf.xml');
//parse the xml to get the call detail record info
try {
@ -1643,7 +1695,7 @@ if (!class_exists('xml_cdr')) {
//if http enabled is set to false then deny access
if (!defined('STDIN')) {
if ($this->setting->get('cdr', 'http_enabled') == "false") {
if ($this->settings->get('cdr', 'http_enabled') == "false") {
openlog('FusionPBX', LOG_NDELAY, LOG_AUTH);
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR'].'] XML CDR import default setting http_enabled is not enabled. Line: '.__line__);
closelog();
@ -1655,7 +1707,7 @@ if (!class_exists('xml_cdr')) {
//check for the correct username and password
if (!defined('STDIN')) {
if ($this->setting->get('cdr', 'http_enabled', true)) {
if ($this->settings->get('cdr', 'http_enabled', true)) {
if ($auth_array[0] == $_SERVER["PHP_AUTH_USER"] && $auth_array[1] == $_SERVER["PHP_AUTH_PW"]) {
//echo "access granted\n";
$this->username = $auth_array[0];
@ -1703,8 +1755,8 @@ if (!class_exists('xml_cdr')) {
public function user_summary() {
//set the time zone
if (!empty($this->setting->get('domain', 'time_zone'))) {
$time_zone = $this->setting->get('domain', 'time_zone');
if (!empty($this->settings->get('domain', 'time_zone'))) {
$time_zone = $this->settings->get('domain', 'time_zone');
}
else {
$time_zone = date_default_timezone_get();
@ -2158,6 +2210,46 @@ if (!class_exists('xml_cdr')) {
unset($records);
} //method
/**
* define singular function to convert a word in english to singular
*/
public function singular($word) {
//"-es" is used for words that end in "-x", "-s", "-z", "-sh", "-ch" in which case you add
if (substr($word, -2) == "es") {
if (substr($word, -4) == "sses") { // eg. 'addresses' to 'address'
return substr($word,0,-2);
}
elseif (substr($word, -3) == "ses") { // eg. 'databases' to 'database' (necessary!)
return substr($word,0,-1);
}
elseif (substr($word, -3) == "ies") { // eg. 'countries' to 'country'
return substr($word,0,-3)."y";
}
elseif (substr($word, -3, 1) == "x") {
return substr($word,0,-2);
}
elseif (substr($word, -3, 1) == "s") {
return substr($word,0,-2);
}
elseif (substr($word, -3, 1) == "z") {
return substr($word,0,-2);
}
elseif (substr($word, -4, 2) == "sh") {
return substr($word,0,-2);
}
elseif (substr($word, -4, 2) == "ch") {
return substr($word,0,-2);
}
else {
return rtrim($word, "s");
}
}
else {
return rtrim($word, "s");
}
} //method
/**
* Removes old entries for in the database xml_cdr, xml_cdr_flow, xml_cdr_json, xml_cdr_logs table
* see {@link https://github.com/fusionpbx/fusionpbx-app-maintenance/} FusionPBX Maintenance App

View File

@ -149,7 +149,7 @@
echo "<span class='hud_content'>\n";
echo "<div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n";
echo " <span style=\"background-color: ".($row['dashboard_number_background_color'] ?? '#EA4C46')."; color: ".($row['dashboard_number_text_color'] ?? '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$num_rows."</span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#EA4C46')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$num_rows."</span>\n";
echo " </div>\n";
echo "</span>";
}

View File

@ -147,7 +147,7 @@
echo "<div class='hud_content'>\n";
echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n";
echo " <span style=\"background-color: ".($row['dashboard_number_background_color'] ?? '#417ed3')."; color: ".($row['dashboard_number_text_color'] ?? '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$num_rows."</span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#417ed3')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$num_rows."</span>\n";
echo " </div>\n";
echo "</div>";
}

View File

@ -263,12 +263,13 @@
$outbound_caller_id_number = urldecode($array["variables"]["outbound_caller_id_number"] ?? '');
//set the time zone
if (isset($_SESSION['domain']['time_zone']['name'])) {
date_default_timezone_set($_SESSION['domain']['time_zone']['name']);
}
date_default_timezone_set($settings->get('domain', 'time_zone', 'GMT'));
//create the destinations object
$destinations = new destinations();
//build the call flow summary array
$xml_cdr = new xml_cdr;
$xml_cdr = new xml_cdr(["database" => $database, "settings" => $settings, "destinations" => $destinations]);
$xml_cdr->domain_uuid = $_SESSION['domain_uuid'];
$xml_cdr->call_direction = $call_direction; //used to determine when the call is outbound
$xml_cdr->status = $status; //used to determine when the call is outbound
@ -499,7 +500,7 @@
echo " <table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <th>".$text['label-application']."</th>\n";
if ($call_direction == 'outbound') {
if ($call_direction == 'local' || $call_direction == 'outbound') {
echo " <th>".$text['label-source']."</th>\n";
}
echo " <th>".$text['label-destination']."</th>\n";
@ -513,15 +514,11 @@
foreach ($call_flow_summary as $row) {
echo " <tr >\n";
echo " <td valign='top' class='".$row_style[$c]."'><a href=\"".$row["application_url"]."\">".escape($row["application_label"])."</a></td>\n";
if ($call_direction == 'outbound') {
if ($call_direction == 'local' || $call_direction == 'outbound') {
echo " <td valign='top' class='".$row_style[$c]."'><a href=\"".$row["source_url"]."\">".escape($row["source_number"])."</a></td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["destination_number"])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'><a href=\"".$row["source_url"]."\">".escape($row["source_name"])."</a></td>\n";
}
else {
echo " <td valign='top' class='".$row_style[$c]."'><a href=\"".$row["destination_url"]."\">".escape($row["destination_number"])."</a></td>\n";
echo " <td valign='top' class='".$row_style[$c]."'><a href=\"".$row["destination_url"]."\">".escape($row["destination_name"])."</a></td>\n";
}
echo " <td valign='top' class='".$row_style[$c]."'><a href=\"".$row["destination_url"]."\">".escape($row["destination_label"])."</a></td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["start_stamp"])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["end_stamp"])."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row["duration_formatted"])."</td>\n";

View File

@ -281,11 +281,11 @@
echo " <th>".$text['label-hours']."</th>\n";
echo " <th>".$text['label-date']."</th>\n";
echo " <th class='no-wrap'>".$text['label-time']."</th>\n";
echo " <th>Volume</th>\n";
echo " <th title='".$text['description-volume']."'>".$text['label-volume']."</th>\n";
echo " <th>".$text['label-minutes']."</th>\n";
echo " <th>".$text['label-calls-per-minute']."</th>\n";
echo " <th title='".$text['description-calls-per-minute']."'>".$text['label-calls-per-minute']."</th>\n";
echo " <th class='center'>".$text['label-missed']."</th>\n";
echo " <th>ASR</th>\n";
echo " <th title='".$text['description-asr']."'>".$text['label-asr']."</th>\n";
echo " <th title='".$text['description-aloc']."'>".$text['label-aloc']."</th>\n";
echo "</tr>\n";

View File

@ -272,6 +272,150 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "URL for Yealink Super Search XML configuration file";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9c704e81-cbb4-4cb3-ab1c-427755008714";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t33g_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/320x240.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T33G";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "25b592b1-05f1-42dd-b248-95b8427f1c30";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t33g_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/320x240.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T33G screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ab97779a-8d32-4ab4-a88f-4ea1433d00ba";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t46s_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/480x272.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T46S";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "4b663bab-bee1-4678-afc0-9a50e2a73247";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t46s_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/480x272.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T46S screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "50f4d28d-d4a9-493f-91e3-6294acd386d5";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t46u_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/480x272.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T46U";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "53bf8793-5e73-448b-9119-b1bdcc42fcb0";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t46u_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/480x272.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T46U screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "776c002e-7fd2-4b8e-b21e-fd699e1e7eac";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t48g_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/800x480.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T48G";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "51e83cf5-36fa-408b-bdec-44f28caa5c5c";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t48g_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/800x480.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T48G screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bda0bec9-f11b-499b-80fa-08f912430a78";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t48s_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/800x480.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T48S";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "029529dc-de3c-4723-b8f9-3940212f2c9a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t48s_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/800x480.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T48S screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c11b2f46-1aef-45be-833e-3680dff9828a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t48u_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/800x480.jpg";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T48U";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c6a601ba-506d-4611-b6a9-8c55ec42d74d";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t48u_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/800x480.jpg.png";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T48U screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "129857df-07b9-4067-a464-6d6434ad5ac9";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t54w_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/480x272.png";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T54W";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "fde79b68-2e3b-432c-8813-139d79405deb";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t54w_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/480x272.png";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T54W screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ffe40f6e-fd01-4d0d-b616-cff92d1fac84";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t57w_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/800x480.png";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T57W";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "d19b69c8-272b-482e-a3d6-ed52dfc83b7a";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t57w_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/800x480.png";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T57W screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "31c524a8-f7a0-4d68-93df-e589975e4840";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t58w_wallpaper";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/1024x600.png";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Background Wallpaper for the T58W";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a73904a4-f126-411b-a357-9daf7a5b6dc2";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_t58w_wallpaper_filename";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "/app/yealink/resources/images/1024x600.png";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Wallpaper to load on to T58W screen";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "3f903069-c0fc-4bf1-9c33-907bf238475e";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_firmware_url";
@ -512,6 +656,14 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T58A firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8368b1ea-6ce8-4004-9ebe-c1a61f2800b5";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_firmware_t58w";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "t58w-150.80.0.25.rom";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Filename of the T58W firmware ROM";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2cdd8b87-db72-4ad1-b18b-745fc1f7e906";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_firmware_t58v";
@ -1268,7 +1420,7 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "provision";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "yealink_voice_vad";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set 1 = On, 0 = Off (default)";
$y++;
@ -1577,7 +1729,7 @@
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Saving Enabled. Options: 0-Disabled, 1-Enabled";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Power Saving Enabled. Options: 0-Disabled, 1-Enabled";
$y++;
?>

View File

@ -1793,6 +1793,31 @@ $text['message-uploaded']['zh-cn'] = "文件已上传";
$text['message-uploaded']['ja-jp'] = "ファイルがアップロードされました";
$text['message-uploaded']['ko-kr'] = "업로드된 파일";
$text['message-speed_dial_exists']['en-us'] = "Speed Dial Number Already Exists";
$text['message-speed_dial_exists']['en-gb'] = "Speed Dial Number Already Exists";
$text['message-speed_dial_exists']['ar-eg'] = "رقم الاتصال السريع موجود بالفعل";
$text['message-speed_dial_exists']['de-at'] = "Kurzwahlnummer existiert bereits";
$text['message-speed_dial_exists']['de-ch'] = "Kurzwahlnummer existiert bereits";
$text['message-speed_dial_exists']['de-de'] = "Kurzwahlnummer existiert bereits";
$text['message-speed_dial_exists']['es-cl'] = "El número de marcación rápida ya existe";
$text['message-speed_dial_exists']['es-mx'] = "El número de marcación rápida ya existe";
$text['message-speed_dial_exists']['fr-ca'] = "Le numéro abrégé existe déjà";
$text['message-speed_dial_exists']['fr-fr'] = "Le numéro de numérotation rapide existe déjà";
$text['message-speed_dial_exists']['he-il'] = "מספר חיוג מהיר כבר קיים";
$text['message-speed_dial_exists']['it-it'] = "Il numero di selezione rapida esiste già";
$text['message-speed_dial_exists']['ka-ge'] = "სწრაფი აკრეფის ნომერი უკვე არსებობს";
$text['message-speed_dial_exists']['nl-nl'] = "Snelkiesnummer bestaat al";
$text['message-speed_dial_exists']['pl-pl'] = "Numer szybkiego wybierania już istnieje";
$text['message-speed_dial_exists']['pt-br'] = "Número de discagem rápida já existe";
$text['message-speed_dial_exists']['pt-pt'] = "O número de marcação rápida já existe";
$text['message-speed_dial_exists']['ro-ro'] = "Numărul de apelare rapidă există deja";
$text['message-speed_dial_exists']['ru-ru'] = "Номер быстрого набора уже существует";
$text['message-speed_dial_exists']['sv-se'] = "Snabbuppringningsnummer finns redan";
$text['message-speed_dial_exists']['uk-ua'] = "Номер швидкого набору вже існує";
$text['message-speed_dial_exists']['zh-cn'] = "快速拨号号码已存在";
$text['message-speed_dial_exists']['ja-jp'] = "短縮ダイヤル番号は既に存在します";
$text['message-speed_dial_exists']['ko-kr'] = "단축번호가 이미 존재합니다";
$text['label-voice']['en-us'] = "Voice";
$text['label-voice']['en-gb'] = "Voice";
$text['label-voice']['ar-eg'] = "صوت";

View File

@ -367,7 +367,33 @@
if (!empty($contact_phones)) {
foreach ($contact_phones as $row) {
if (!empty($row['phone_number'])) {
//add the speed dial
//if speed dial number already exists, empty before save
if (!empty($row["phone_speed_dial"])) {
$phone_speed_dial_exists = false;
if (is_numeric($row["phone_speed_dial"])) {
$sql = "select count(contact_phone_uuid) ";
$sql .= "from v_contact_phones ";
$sql .= "where phone_speed_dial = :phone_speed_dial ";
$sql .= "and domain_uuid = :domain_uuid ";
if ($action == "update" && is_uuid($row["contact_phone_uuid"])) {
$sql .= "and contact_phone_uuid <> :contact_phone_uuid ";
$parameters['contact_phone_uuid'] = $row["contact_phone_uuid"];
}
$parameters['phone_speed_dial'] = $row["phone_speed_dial"];
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$database = new database;
if (!empty($database->execute($sql, $parameters, 'column'))) {
$phone_speed_dial_exists = true;
}
unset($sql, $parameters);
}
if (!is_numeric($row["phone_speed_dial"]) || $phone_speed_dial_exists) {
message::add($text['message-speed_dial_exists'],'negative');
unset($row["phone_speed_dial"]);
}
}
$array['contacts'][0]['contact_phones'][$y]['domain_uuid'] = $_SESSION['domain_uuid'];
$array['contacts'][0]['contact_phones'][$y]['contact_uuid'] = $contact_uuid;
$array['contacts'][0]['contact_phones'][$y]['contact_phone_uuid'] = $row["contact_phone_uuid"];

View File

@ -155,6 +155,32 @@
unset($sql, $parameters);
}
//if speed dial number already exists, empty before save
if (!empty($phone_speed_dial)) {
$phone_speed_dial_exists = false;
if (is_numeric($phone_speed_dial)) {
$sql = "select count(contact_phone_uuid) ";
$sql .= "from v_contact_phones ";
$sql .= "where phone_speed_dial = :phone_speed_dial ";
$sql .= "and domain_uuid = :domain_uuid ";
if ($action == "update" && is_uuid($contact_phone_uuid)) {
$sql .= "and contact_phone_uuid <> :contact_phone_uuid ";
$parameters['contact_phone_uuid'] = $contact_phone_uuid;
}
$parameters['phone_speed_dial'] = $phone_speed_dial;
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
if (!empty($database->execute($sql, $parameters, 'column'))) {
$phone_speed_dial_exists = true;
}
unset($sql, $parameters);
}
if (!is_numeric($phone_speed_dial) || $phone_speed_dial_exists) {
message::add($text['message-speed_dial_exists'],'negative');
unset($phone_speed_dial);
}
}
//add the phone
if ($action == "add" && permission_exists('contact_phone_add')) {
$contact_phone_uuid = uuid();

View File

@ -51,6 +51,29 @@
//show if exists
if (!empty($contact_phones)) {
//detect speed dial prefix from dialplan
$sql = "select dialplan_detail_data from v_dialplan_details ";
$sql .= "where domain_uuid = :domain_uuid ";
$sql .= "and dialplan_uuid = ( ";
$sql .= " select dialplan_uuid from v_dialplan_details ";
$sql .= " where domain_uuid = :domain_uuid ";
$sql .= " and dialplan_detail_data like 'app.lua speed_dial%' ";
$sql .= " and (dialplan_detail_enabled = true or dialplan_detail_enabled is null) ";
$sql .= " limit 1 ";
$sql .= ") ";
$sql .= "and dialplan_detail_tag = 'condition' ";
$sql .= "and dialplan_detail_type = 'destination_number' ";
$sql .= "and dialplan_detail_data like '^\\\\%' ";
$sql .= "and (dialplan_detail_enabled = true or dialplan_detail_enabled is null) ";
$sql .= "limit 1";
$parameters['domain_uuid'] = $domain_uuid;
$database = new database;
$speed_dial_condition = $database->select($sql, $parameters, 'column');
if (!empty($speed_dial_condition)) {
$speed_dial_prefix = str_replace('(.*)', '', trim($speed_dial_condition,'^\$')); // default: ^\*0(.*)$
}
unset($sql, $speed_dial_condition);
//javascript function: send_cmd
echo "<script type='text/javascript'>\n";
echo "function send_cmd(url) {\n";
@ -81,9 +104,12 @@
if ($row['phone_type_video']) { $phone_types[] = "<i class='fas fa-video fa-fw' style='margin-right: 3px;' title=\"".$text['label-video']."\"></i>"; }
if ($row['phone_type_text']) { $phone_types[] = "<i class='fas fa-sms fa-fw' style='margin-right: 3px;' title=\"".$text['label-text']."\"></i>"; }
if (!empty($phone_types)) {
echo " ".implode(" ", $phone_types)."\n";
echo " ".implode(" ", $phone_types);
}
unset($phone_types);
if (!empty($row['phone_speed_dial'])) {
echo "<nobr><i class='fas fa-bolt fa-fw' title=\"".$text['label-phone_speed_dial']."\"></i>".$speed_dial_prefix."<strong>".$row['phone_speed_dial']."</strong></nobr>";
}
echo "</div>\n";
$x++;
}

View File

@ -187,7 +187,7 @@
//determine initial state all button to display
$expanded_all = true;
if (is_array($dashboard) && @sizeof($dashboard) != 0) {
if (!empty($dashboard)) {
foreach ($dashboard as $row) {
if ($row['dashboard_details_state'] == 'contracted' || $row['dashboard_details_state'] == 'hidden' || $row['dashboard_details_state'] == 'disabled') { $expanded_all = false; }
}
@ -531,8 +531,9 @@ function toggle_grid_row_end_all() {
$dashboard_content_text_align = $row['dashboard_content_text_align'] ?? '';
$dashboard_content_details = $row['dashboard_content_details'] ?? '';
$dashboard_chart_type = $row['dashboard_chart_type'] ?? "doughnut";
$dashboard_label_text_color = $row['dashboard_label_text_color'] ?? $settings->get('theme', 'dashboard_label_text_color');
$dashboard_number_text_color = $row['dashboard_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color');
$dashboard_label_text_color = $row['dashboard_label_text_color'] ?? $settings->get('theme', 'dashboard_label_text_color', '');
$dashboard_number_text_color = $row['dashboard_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color', '');
$dashboard_number_background_color = $row['dashboard_number_background_color'] ?? $settings->get('theme', 'dashboard_number_background_color', '');
$dashboard_details_state = $row['dashboard_details_state'] ?? "expanded";
$dashboard_row_span = $row['dashboard_row_span'] ?? 2;
@ -558,6 +559,7 @@ function toggle_grid_row_end_all() {
$dashboard_chart_type = preg_replace($text_pattern, '', $dashboard_chart_type);
$dashboard_label_text_color = preg_replace($text_pattern, '', $dashboard_label_text_color);
$dashboard_number_text_color = preg_replace($text_pattern, '', $dashboard_number_text_color);
$dashboard_number_background_color = preg_replace($text_pattern, '', $dashboard_number_background_color);
$dashboard_details_state = preg_replace($text_pattern, '', $dashboard_details_state);
$dashboard_row_span = preg_replace($number_pattern, '', $dashboard_row_span);
$dashboard_path = preg_replace($text_pattern, '', strtolower($row['dashboard_path']));

View File

@ -12,10 +12,7 @@
$text = $language->get($_SESSION['domain']['language']['code'], dirname($dashboard_url));
//get the dashboard label
$dashboard_label = $text['title-'.$dashboard_key];
if (empty($dashboard_label)) {
$dashboard_label = $dashboard_name;
}
$dashboard_label = $text['title-'.$dashboard_key] ?? $dashboard_name;
//prepare variables
$dashboard_target = ($dashboard_target == 'new') ? '_blank' : '_self';

View File

@ -44,8 +44,6 @@
//update the domain session variables
$domain_uuid = $_GET["domain_uuid"];
$_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid'];
$_SESSION['domain_uuid'] = $domain_uuid;
//get the domain details
$sql = "select * from v_domains ";
@ -56,9 +54,16 @@
$_SESSION['domains'][$row['domain_uuid']] = $row;
}
}
unset($sql, $result);
unset($sql, $domains);
//validate the domain change
if (empty($_SESSION['domains'][$domain_uuid])) {
die("invalid domain");
}
//update the domain session variables
$_SESSION["previous_domain_uuid"] = $_SESSION['domain_uuid'];
$_SESSION['domain_uuid'] = $domain_uuid;
$_SESSION["domain_name"] = $_SESSION['domains'][$domain_uuid]['domain_name'];
$_SESSION['domain']['template']['name'] = $_SESSION['domains'][$domain_uuid]['template_name'] ?? null;
$_SESSION["context"] = $_SESSION["domain_name"];

View File

@ -37,7 +37,7 @@
echo " <span class='hud_title' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\">".escape($dashboard_label)."</span>";
echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\"><i class=\"fas ".$dashboard_icon."\"></i></span>\n";
echo " <span style=\"background-color: ".($row['dashboard_number_background_color'] ?? '#0292FF')."; color: ".($row['dashboard_number_text_color'] ?? '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$domain_count."</span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#0292FF')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$domain_count."</span>\n";
echo " </div>\n";
echo " </div>\n";
if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") {

View File

@ -12,7 +12,7 @@ if (!class_exists('software')) {
* version
*/
public static function version() {
return '5.4.0';
return '5.4.1';
}
/**

View File

@ -594,6 +594,33 @@ $text['label-upgrade_permissions']['zh-cn'] = "权限默认值";
$text['label-upgrade_permissions']['ja-jp'] = "許可のデフォルト";
$text['label-upgrade_permissions']['ko-kr'] = "권한 기본값";
$text['label-update_filesystem_permissions']['en-us'] = "Filesystem Permissions";
$text['label-update_filesystem_permissions']['en-gb'] = "Filesystem Permissions";
$text['label-update_filesystem_permissions']['ar-eg'] = "";
$text['label-update_filesystem_permissions']['de-at'] = "";
$text['label-update_filesystem_permissions']['de-ch'] = "";
$text['label-update_filesystem_permissions']['de-de'] = "";
$text['label-update_filesystem_permissions']['el-gr'] = "";
$text['label-update_filesystem_permissions']['es-cl'] = "";
$text['label-update_filesystem_permissions']['es-mx'] = "";
$text['label-update_filesystem_permissions']['fr-ca'] = "";
$text['label-update_filesystem_permissions']['fr-fr'] = "";
$text['label-update_filesystem_permissions']['he-il'] = "";
$text['label-update_filesystem_permissions']['it-it'] = "";
$text['label-update_filesystem_permissions']['ka-ge'] = "";
$text['label-update_filesystem_permissions']['nl-nl'] = "";
$text['label-update_filesystem_permissions']['pl-pl'] = "";
$text['label-update_filesystem_permissions']['pt-br'] = "";
$text['label-update_filesystem_permissions']['pt-pt'] = "";
$text['label-update_filesystem_permissions']['ro-ro'] = "";
$text['label-update_filesystem_permissions']['ru-ru'] = "";
$text['label-update_filesystem_permissions']['sv-se'] = "";
$text['label-update_filesystem_permissions']['uk-ua'] = "";
$text['label-update_filesystem_permissions']['tr-tr'] = "";
$text['label-update_filesystem_permissions']['zh-cn'] = "";
$text['label-update_filesystem_permissions']['ja-jp'] = "";
$text['label-update_filesystem_permissions']['ko-kr'] = "";
$text['label-upgrade_menu']['en-us'] = "Menu Defaults";
$text['label-upgrade_menu']['en-gb'] = "Menu Defaults";
$text['label-upgrade_menu']['ar-eg'] = "افتراضيات القائمة";
@ -1242,6 +1269,87 @@ $text['description-upgrade_permissions']['zh-cn'] = "还原默认组权限。";
$text['description-upgrade_permissions']['ja-jp'] = "デフォルトのグループ許可を復元します。";
$text['description-upgrade_permissions']['ko-kr'] = "기본 그룹 권한을 복원합니다.";
$text['description-update_filesystem_permissions']['en-us'] = 'Update the filesystem permissions to use user www-data';
$text['description-update_filesystem_permissions']['en-gb'] = 'Update the filesystem permissions to use user www-data';
$text['description-update_filesystem_permissions']['ar-eg'] = 'تحديث أذونات نظام الملفات لاستخدام بيانات المستخدم www-data';
$text['description-update_filesystem_permissions']['de-at'] = 'Aktualisieren Sie die Dateisystemberechtigungen, um den Benutzer www-data zu verwenden';
$text['description-update_filesystem_permissions']['de-ch'] = 'Aktualisieren Sie die Dateisystemberechtigungen, um den Benutzer www-data zu verwenden';
$text['description-update_filesystem_permissions']['de-de'] = 'Aktualisieren Sie die Dateisystemberechtigungen, um den Benutzer www-data zu verwenden';
$text['description-update_filesystem_permissions']['el-gr'] = 'Ενημερώστε τα δικαιώματα του συστήματος αρχείων για να χρησιμοποιήσετε τα www-data χρήστη';
$text['description-update_filesystem_permissions']['es-cl'] = 'Actualice los permisos del sistema de archivos para utilizar el usuario www-data';
$text['description-update_filesystem_permissions']['es-mx'] = 'Actualice los permisos del sistema de archivos para utilizar el usuario www-data';
$text['description-update_filesystem_permissions']['fr-ca'] = 'Mettre à jour les autorisations du système de fichiers pour utiliser l&#39;utilisateur www-data';
$text['description-update_filesystem_permissions']['fr-fr'] = 'Mettre à jour les autorisations du système de fichiers pour utiliser l&#39;utilisateur www-data';
$text['description-update_filesystem_permissions']['he-il'] = 'עדכן את הרשאות מערכת הקבצים כדי להשתמש ב-www-data של המשתמש';
$text['description-update_filesystem_permissions']['it-it'] = 'Aggiornare i permessi del file system per utilizzare l&#39;utente www-data';
$text['description-update_filesystem_permissions']['ka-ge'] = 'განაახლეთ ფაილური სისტემის ნებართვები მომხმარებლის www-data-ის გამოსაყენებლად';
$text['description-update_filesystem_permissions']['nl-nl'] = 'Werk de bestandssysteemmachtigingen bij om de gebruiker www-data te gebruiken';
$text['description-update_filesystem_permissions']['pl-pl'] = 'Zaktualizuj uprawnienia systemu plików, aby użyć użytkownika www-data';
$text['description-update_filesystem_permissions']['pt-br'] = 'Atualize as permissões do sistema de arquivos para usar o usuário www-data';
$text['description-update_filesystem_permissions']['pt-pt'] = 'Atualize as permissões do sistema de arquivos para usar o usuário www-data';
$text['description-update_filesystem_permissions']['ro-ro'] = 'Actualizați permisiunile sistemului de fișiere pentru a utiliza www-data utilizatorului';
$text['description-update_filesystem_permissions']['ru-ru'] = 'Обновите разрешения файловой системы для использования пользователя www-data';
$text['description-update_filesystem_permissions']['sv-se'] = 'Uppdatera filsystemets behörigheter för att använda användarens www-data';
$text['description-update_filesystem_permissions']['uk-ua'] = 'Оновіть дозволи файлової системи, щоб використовувати дані користувача www';
$text['description-update_filesystem_permissions']['tr-tr'] = 'Dosya sistemi izinlerini www-data kullanıcısını kullanacak şekilde güncelleyin';
$text['description-update_filesystem_permissions']['zh-cn'] = '更新文件系统权限以使用用户 www-data';
$text['description-update_filesystem_permissions']['ja-jp'] = 'ユーザーwww-dataを使用するためにファイルシステムの権限を更新します';
$text['description-update_filesystem_permissions']['ko-kr'] = '사용자 www-data를 사용하기 위해 파일 시스템 권한을 업데이트합니다.';
$text['label-header1']['en-us'] = 'Root account or sudo account must be used for this option';
$text['label-header1']['en-gb'] = 'Root account or sudo account must be used for this option';
$text['label-header1']['ar-eg'] = 'يجب استخدام حساب الجذر أو حساب sudo لهذا الخيار';
$text['label-header1']['de-at'] = 'Für diese Option muss ein Root-Konto oder ein Sudo-Konto verwendet werden.';
$text['label-header1']['de-ch'] = 'Für diese Option muss ein Root-Konto oder ein Sudo-Konto verwendet werden.';
$text['label-header1']['de-de'] = 'Für diese Option muss ein Root-Konto oder ein Sudo-Konto verwendet werden.';
$text['label-header1']['el-gr'] = 'Για αυτήν την επιλογή πρέπει να χρησιμοποιηθεί λογαριασμός ρίζας ή λογαριασμός sudo';
$text['label-header1']['es-cl'] = 'Se debe utilizar una cuenta raíz o una cuenta sudo para esta opción';
$text['label-header1']['es-mx'] = 'Se debe utilizar una cuenta raíz o una cuenta sudo para esta opción';
$text['label-header1']['fr-ca'] = 'Un compte root ou un compte sudo doit être utilisé pour cette option';
$text['label-header1']['fr-fr'] = 'Un compte root ou un compte sudo doit être utilisé pour cette option';
$text['label-header1']['he-il'] = 'יש להשתמש בחשבון שורש או חשבון sudo עבור אפשרות זו';
$text['label-header1']['it-it'] = 'Per questa opzione è necessario utilizzare un account root o un account sudo';
$text['label-header1']['ka-ge'] = 'Root ან sudo ანგარიში უნდა იყოს გამოყენებული ამ ვარიანტისთვის';
$text['label-header1']['nl-nl'] = 'Voor deze optie moet een root-account of sudo-account worden gebruikt';
$text['label-header1']['pl-pl'] = 'Do tej opcji należy użyć konta root lub sudo';
$text['label-header1']['pt-br'] = 'A conta root ou sudo deve ser usada para esta opção';
$text['label-header1']['pt-pt'] = 'A conta root ou sudo deve ser usada para esta opção';
$text['label-header1']['ro-ro'] = 'Contul root sau contul sudo trebuie utilizat pentru această opțiune';
$text['label-header1']['ru-ru'] = 'Для этой опции необходимо использовать учетную запись root или sudo.';
$text['label-header1']['sv-se'] = 'Root-konto eller sudo-konto måste användas för detta alternativ';
$text['label-header1']['uk-ua'] = 'Для цієї опції необхідно використовувати обліковий запис root або sudo';
$text['label-header1']['tr-tr'] = 'Bu seçenek için kök hesap veya sudo hesabı kullanılmalıdır';
$text['label-header1']['zh-cn'] = '此选项必须使用 root 帐户或 sudo 帐户';
$text['label-header1']['ja-jp'] = 'このオプションにはルートアカウントまたはsudoアカウントを使用する必要があります';
$text['label-header1']['ko-kr'] = '이 옵션에는 루트 계정 또는 sudo 계정을 사용해야 합니다.';
$text['label-header2']['en-us'] = 'This option is used for resetting the permissions on the file system after executing commands using the root user account';
$text['label-header2']['en-gb'] = 'This option is used for resetting the permissions on the file system after executing commands using the root user account';
$text['label-header2']['ar-eg'] = 'يستخدم هذا الخيار لإعادة تعيين الأذونات على نظام الملفات بعد تنفيذ الأوامر باستخدام حساب المستخدم الجذر';
$text['label-header2']['de-at'] = 'Diese Option wird zum Zurücksetzen der Berechtigungen für das Dateisystem verwendet, nachdem Befehle mit dem Root-Benutzerkonto ausgeführt wurden.';
$text['label-header2']['de-ch'] = 'Diese Option wird zum Zurücksetzen der Berechtigungen für das Dateisystem verwendet, nachdem Befehle mit dem Root-Benutzerkonto ausgeführt wurden.';
$text['label-header2']['de-de'] = 'Diese Option wird zum Zurücksetzen der Berechtigungen für das Dateisystem verwendet, nachdem Befehle mit dem Root-Benutzerkonto ausgeführt wurden.';
$text['label-header2']['el-gr'] = 'Αυτή η επιλογή χρησιμοποιείται για την επαναφορά των δικαιωμάτων στο σύστημα αρχείων μετά την εκτέλεση εντολών χρησιμοποιώντας τον λογαριασμό χρήστη root';
$text['label-header2']['es-cl'] = 'Esta opción se utiliza para restablecer los permisos en el sistema de archivos después de ejecutar comandos utilizando la cuenta de usuario root';
$text['label-header2']['es-mx'] = 'Esta opción se utiliza para restablecer los permisos en el sistema de archivos después de ejecutar comandos utilizando la cuenta de usuario root';
$text['label-header2']['fr-ca'] = 'Cette option est utilisée pour réinitialiser les autorisations sur le système de fichiers après l&#39;exécution de commandes à l&#39;aide du compte utilisateur root';
$text['label-header2']['fr-fr'] = 'Cette option est utilisée pour réinitialiser les autorisations sur le système de fichiers après l&#39;exécution de commandes à l&#39;aide du compte utilisateur root';
$text['label-header2']['he-il'] = 'אפשרות זו משמשת לאיפוס ההרשאות במערכת הקבצים לאחר ביצוע פקודות באמצעות חשבון המשתמש השורש';
$text['label-header2']['it-it'] = 'Questa opzione viene utilizzata per reimpostare i permessi sul file system dopo l&#39;esecuzione di comandi utilizzando l&#39;account utente root';
$text['label-header2']['ka-ge'] = 'ეს პარამეტრი გამოიყენება ფაილურ სისტემაზე ნებართვების გადატვირთვისთვის ბრძანებების შესრულების შემდეგ root მომხმარებლის ანგარიშის გამოყენებით';
$text['label-header2']['nl-nl'] = 'Deze optie wordt gebruikt om de machtigingen op het bestandssysteem opnieuw in te stellen na het uitvoeren van opdrachten met behulp van het root-gebruikersaccount';
$text['label-header2']['pl-pl'] = 'Ta opcja służy do resetowania uprawnień w systemie plików po wykonaniu poleceń przy użyciu konta użytkownika root';
$text['label-header2']['pt-br'] = 'Esta opção é usada para redefinir as permissões no sistema de arquivos após executar comandos usando a conta de usuário root';
$text['label-header2']['pt-pt'] = 'Esta opção é usada para redefinir as permissões no sistema de arquivos após executar comandos usando a conta de usuário root';
$text['label-header2']['ro-ro'] = 'Această opțiune este utilizată pentru resetarea permisiunilor pe sistemul de fișiere după executarea comenzilor folosind contul de utilizator root';
$text['label-header2']['ru-ru'] = 'Эта опция используется для сброса прав доступа к файловой системе после выполнения команд с использованием учетной записи пользователя root.';
$text['label-header2']['sv-se'] = 'Det här alternativet används för att återställa behörigheterna på filsystemet efter att ha kört kommandon med root-användarkontot';
$text['label-header2']['uk-ua'] = 'Цей параметр використовується для скидання дозволів на файлову систему після виконання команд за допомогою облікового запису користувача root';
$text['label-header2']['tr-tr'] = 'Bu seçenek, kök kullanıcı hesabını kullanarak komutları yürüttükten sonra dosya sistemindeki izinleri sıfırlamak için kullanılır';
$text['label-header2']['zh-cn'] = '此选项用于在使用 root 用户帐户执行命令后重置文件系统的权限';
$text['label-header2']['ja-jp'] = 'このオプションは、ルートユーザーアカウントを使用してコマンドを実行した後にファイルシステムの権限をリセットするために使用されます。';
$text['label-header2']['ko-kr'] = '이 옵션은 root 사용자 계정을 사용하여 명령을 실행한 후 파일 시스템의 권한을 재설정하는 데 사용됩니다.';
$text['description-upgrade_menu']['en-us'] = "Restores the default items in the menu.";
$text['description-upgrade_menu']['en-gb'] = "Restores the default items in the menu.";
$text['description-upgrade_menu']['ar-eg'] = "";
@ -1431,32 +1539,59 @@ $text['label-all_of_the_above']['zh-cn'] = "上述所有的";
$text['label-all_of_the_above']['ja-jp'] = "上記のすべて";
$text['label-all_of_the_above']['ko-kr'] = "무엇보다도";
$text['description-all_of_the_above']['en-us'] = "Performs an upgrade using options 1a, 2, 2b, 3, 4, and 5 in succession.";
$text['description-all_of_the_above']['en-gb'] = "Performs an upgrade using options 1a, 2, 2b, 3, 4, and 5 in succession.";
$text['description-all_of_the_above']['ar-eg'] = "إجراء ترقية باستخدام الخيارات 1أ، و2، و2ب، و3، و4، و5 على التوالي.";
$text['description-all_of_the_above']['de-at'] = "Führt ein Upgrade mit den Optionen 1a, 2, 2b, 3, 4 und 5 nacheinander durch.";
$text['description-all_of_the_above']['de-ch'] = "Führt ein Upgrade mit den Optionen 1a, 2, 2b, 3, 4 und 5 nacheinander durch.";
$text['description-all_of_the_above']['de-de'] = "Führt ein Upgrade mit den Optionen 1a, 2, 2b, 3, 4 und 5 nacheinander durch.";
$text['description-all_of_the_above']['el-gr'] = "Εκτελεί μια αναβάθμιση χρησιμοποιώντας τις επιλογές 1a, 2, 2b, 3, 4 και 5 διαδοχικά.";
$text['description-all_of_the_above']['es-cl'] = "Realiza una actualización utilizando las opciones 1a, 2, 2b, 3, 4 y 5 en sucesión.";
$text['description-all_of_the_above']['es-mx'] = "Realiza una actualización utilizando las opciones 1a, 2, 2b, 3, 4 y 5 en sucesión.";
$text['description-all_of_the_above']['fr-ca'] = "Effectue une mise à niveau en utilisant successivement les options 1a, 2, 2b, 3, 4 et 5.";
$text['description-all_of_the_above']['fr-fr'] = "Effectue une mise à niveau en utilisant successivement les options 1a, 2, 2b, 3, 4 et 5.";
$text['description-all_of_the_above']['he-il'] = "מבצע שדרוג באמצעות אפשרויות 1a, 2, 2b, 3, 4 ו-5 ברצף.";
$text['description-all_of_the_above']['it-it'] = "Esegue un aggiornamento utilizzando le opzioni 1a, 2, 2b, 3, 4 e 5 in successione.";
$text['description-all_of_the_above']['ka-ge'] = "შეასრულებს განახლებას არჩევნებით 1ა, 2, 2ბ, 3, 4 და 5 ამ მიმდევრობით.";
$text['description-all_of_the_above']['nl-nl'] = "Voert een upgrade uit met achtereenvolgens de opties 1a, 2, 2b, 3, 4 en 5.";
$text['description-all_of_the_above']['pl-pl'] = "Wykonuje aktualizację, korzystając kolejno z opcji 1a, 2, 2b, 3, 4 i 5.";
$text['description-all_of_the_above']['pt-br'] = "Executa uma atualização usando as opções 1a, 2, 2b, 3, 4 e 5 em sucessão.";
$text['description-all_of_the_above']['pt-pt'] = "Executa uma atualização usando as opções 1a, 2, 2b, 3, 4 e 5 em sucessão.";
$text['description-all_of_the_above']['ro-ro'] = "Efectuează o actualizare folosind opțiunile 1a, 2, 2b, 3, 4 și 5 succesiv.";
$text['description-all_of_the_above']['ru-ru'] = "Выполняет обновление, последовательно используя параметры 1a, 2, 2b, 3, 4 и 5.";
$text['description-all_of_the_above']['sv-se'] = "Utför en uppgradering med alternativ 1a, 2, 2b, 3, 4 och 5 i följd.";
$text['description-all_of_the_above']['uk-ua'] = "Виконує оновлення, використовуючи послідовно параметри 1a, 2, 2b, 3, 4 і 5.";
$text['description-all_of_the_above']['tr-tr'] = "Art arda 1a, 2, 2b, 3, 4 ve 5 seçeneklerini kullanarak yükseltme gerçekleştirir.";
$text['description-all_of_the_above']['zh-cn'] = "连续使用选项 1a、2、2b、3、4 和 5 执行升级。";
$text['description-all_of_the_above']['ja-jp'] = "オプション 1a、2、2b、3、4、および 5 を連続して使用してアップグレードを実行します。";
$text['description-all_of_the_above']['ko-kr'] = "옵션 1a, 2, 2b, 3, 4, 5를 차례로 사용하여 업그레이드를 수행합니다.";
$text['label-not_running_as_root']['en-us'] = 'Not root user - operation skipped';
$text['label-not_running_as_root']['en-gb'] = 'Not root user - operation skipped';
$text['label-not_running_as_root']['ar-eg'] = 'ليس مستخدمًا جذريًا - تم تخطي العملية';
$text['label-not_running_as_root']['de-at'] = 'Kein Root-Benutzer Vorgang übersprungen';
$text['label-not_running_as_root']['de-ch'] = 'Kein Root-Benutzer Vorgang übersprungen';
$text['label-not_running_as_root']['de-de'] = 'Kein Root-Benutzer Vorgang übersprungen';
$text['label-not_running_as_root']['el-gr'] = 'Δεν είναι χρήστης root - η λειτουργία παραβλέφθηκε';
$text['label-not_running_as_root']['es-cl'] = 'No es usuario root: se omitió la operación';
$text['label-not_running_as_root']['es-mx'] = 'No es usuario root: se omitió la operación';
$text['label-not_running_as_root']['fr-ca'] = 'Pas d&#39;utilisateur root - opération ignorée';
$text['label-not_running_as_root']['fr-fr'] = 'Pas d&#39;utilisateur root - opération ignorée';
$text['label-not_running_as_root']['he-il'] = 'לא משתמש שורש - הפעולה דילגה';
$text['label-not_running_as_root']['it-it'] = 'Utente non root: operazione saltata';
$text['label-not_running_as_root']['ka-ge'] = 'არ არის root მომხმარებელი - ოპერაცია გამოტოვებულია';
$text['label-not_running_as_root']['nl-nl'] = 'Geen rootgebruiker - bewerking overgeslagen';
$text['label-not_running_as_root']['pl-pl'] = 'Nie użytkownik root - operacja pominięta';
$text['label-not_running_as_root']['pt-br'] = 'Usuário não root - operação ignorada';
$text['label-not_running_as_root']['pt-pt'] = 'Usuário não root - operação ignorada';
$text['label-not_running_as_root']['ro-ro'] = 'Nu utilizatorul root - operația a fost omisă';
$text['label-not_running_as_root']['ru-ru'] = 'Не пользователь root — операция пропущена';
$text['label-not_running_as_root']['sv-se'] = 'Inte root-användare - åtgärden hoppades över';
$text['label-not_running_as_root']['uk-ua'] = 'Не root користувач - операцію пропущено';
$text['label-not_running_as_root']['tr-tr'] = 'Kök kullanıcı değil - işlem atlandı';
$text['label-not_running_as_root']['zh-cn'] = '非 root 用户 操作已跳过';
$text['label-not_running_as_root']['ja-jp'] = 'ルートユーザーではありません - 操作はスキップされました';
$text['label-not_running_as_root']['ko-kr'] = '루트 사용자가 아닙니다. 작업이 건너뛰어졌습니다.';
$text['description-all_of_the_above']['en-us'] = 'Performs an upgrade using options 1a, 2, 2b, 3, 4, 5, and 6 in succession.';
$text['description-all_of_the_above']['en-gb'] = 'Performs an upgrade using options 1a, 2, 2b, 3, 4, 5, and 6 in succession.';
$text['description-all_of_the_above']['ar-eg'] = 'يقوم بإجراء ترقية باستخدام الخيارات 1أ، 2، 2ب، 3، 4، 5، و6 على التوالي.';
$text['description-all_of_the_above']['de-at'] = 'Führt ein Upgrade nacheinander mit den Optionen 1a, 2, 2b, 3, 4, 5 und 6 durch.';
$text['description-all_of_the_above']['de-ch'] = 'Führt ein Upgrade nacheinander mit den Optionen 1a, 2, 2b, 3, 4, 5 und 6 durch.';
$text['description-all_of_the_above']['de-de'] = 'Führt ein Upgrade nacheinander mit den Optionen 1a, 2, 2b, 3, 4, 5 und 6 durch.';
$text['description-all_of_the_above']['el-gr'] = 'Εκτελεί μια αναβάθμιση χρησιμοποιώντας τις επιλογές 1a, 2, 2b, 3, 4, 5 και 6 διαδοχικά.';
$text['description-all_of_the_above']['es-cl'] = 'Realiza una actualización utilizando las opciones 1a, 2, 2b, 3, 4, 5 y 6 en sucesión.';
$text['description-all_of_the_above']['es-mx'] = 'Realiza una actualización utilizando las opciones 1a, 2, 2b, 3, 4, 5 y 6 en sucesión.';
$text['description-all_of_the_above']['fr-ca'] = 'Effectue une mise à niveau en utilisant successivement les options 1a, 2, 2b, 3, 4, 5 et 6.';
$text['description-all_of_the_above']['fr-fr'] = 'Effectue une mise à niveau en utilisant successivement les options 1a, 2, 2b, 3, 4, 5 et 6.';
$text['description-all_of_the_above']['he-il'] = 'מבצע שדרוג באמצעות אפשרויות 1a, 2, 2b, 3, 4, 5 ו-6 ברצף.';
$text['description-all_of_the_above']['it-it'] = 'Esegue un aggiornamento utilizzando le opzioni 1a, 2, 2b, 3, 4, 5 e 6 in successione.';
$text['description-all_of_the_above']['ka-ge'] = 'განაახლებს ზედიზედ 1a, 2, 2b, 3, 4, 5 და 6 ვარიანტების გამოყენებით.';
$text['description-all_of_the_above']['nl-nl'] = 'Voert een upgrade uit met behulp van opties 1a, 2, 2b, 3, 4, 5 en 6 achtereenvolgens.';
$text['description-all_of_the_above']['pl-pl'] = 'Wykonuje aktualizację, korzystając kolejno z opcji 1a, 2, 2b, 3, 4, 5 i 6.';
$text['description-all_of_the_above']['pt-br'] = 'Executa uma atualização usando as opções 1a, 2, 2b, 3, 4, 5 e 6 em sucessão.';
$text['description-all_of_the_above']['pt-pt'] = 'Executa uma atualização usando as opções 1a, 2, 2b, 3, 4, 5 e 6 em sucessão.';
$text['description-all_of_the_above']['ro-ro'] = 'Efectuează o actualizare folosind opțiunile 1a, 2, 2b, 3, 4, 5 și 6 succesiv.';
$text['description-all_of_the_above']['ru-ru'] = 'Выполняет обновление, последовательно используя опции 1a, 2, 2b, 3, 4, 5 и 6.';
$text['description-all_of_the_above']['sv-se'] = 'Utför en uppgradering med alternativ 1a, 2, 2b, 3, 4, 5 och 6 i följd.';
$text['description-all_of_the_above']['uk-ua'] = 'Виконує оновлення, використовуючи послідовно параметри 1a, 2, 2b, 3, 4, 5 і 6.';
$text['description-all_of_the_above']['tr-tr'] = '1a, 2, 2b, 3, 4, 5 ve 6 seçeneklerini sırayla kullanarak yükseltme gerçekleştirir.';
$text['description-all_of_the_above']['zh-cn'] = '连续使用选项 1a、2、2b、3、4、5 和 6 执行升级。';
$text['description-all_of_the_above']['ja-jp'] = 'オプション 1a、2、2b、3、4、5、6 を順番に使用してアップグレードを実行します。';
$text['description-all_of_the_above']['ko-kr'] = '옵션 1a, 2, 2b, 3, 4, 5, 6을 연속으로 사용하여 업그레이드를 수행합니다.';
$text['label-update_external_repositories']['en-us'] = "Update External Repositories";
$text['label-update_external_repositories']['en-gb'] = "Update External Repositories";
@ -1566,4 +1701,110 @@ $text['button-preview']['zh-cn'] = "预览";
$text['button-preview']['ja-jp'] = "プレビュー";
$text['button-preview']['ko-kr'] = "시사";
?>
$text['label-update_auto_loader']['en-us'] = 'Update Auto Loader Cache';
$text['label-update_auto_loader']['en-gb'] = 'Update Auto Loader Cache';
$text['label-update_auto_loader']['ar-eg'] = 'تحديث ذاكرة التخزين المؤقتة للتحميل التلقائي';
$text['label-update_auto_loader']['de-at'] = 'AutoLoader-Cache aktualisieren';
$text['label-update_auto_loader']['de-ch'] = 'AutoLoader-Cache aktualisieren';
$text['label-update_auto_loader']['de-de'] = 'AutoLoader-Cache aktualisieren';
$text['label-update_auto_loader']['el-gr'] = 'Ενημερώστε την προσωρινή μνήμη Auto Loader';
$text['label-update_auto_loader']['es-cl'] = 'Actualizar la caché del cargador automático';
$text['label-update_auto_loader']['es-mx'] = 'Actualizar la caché del cargador automático';
$text['label-update_auto_loader']['fr-ca'] = 'Mettre à jour le cache du chargeur automatique';
$text['label-update_auto_loader']['fr-fr'] = 'Mettre à jour le cache du chargeur automatique';
$text['label-update_auto_loader']['he-il'] = 'עדכן את מטמון הטעינה האוטומטית';
$text['label-update_auto_loader']['it-it'] = 'Aggiorna la cache del caricatore automatico';
$text['label-update_auto_loader']['ka-ge'] = 'Auto Loader Cache-ის განახლება';
$text['label-update_auto_loader']['nl-nl'] = 'Auto Loader-cache bijwerken';
$text['label-update_auto_loader']['pl-pl'] = 'Aktualizuj pamięć podręczną Auto Loader';
$text['label-update_auto_loader']['pt-br'] = 'Atualizar cache do carregador automático';
$text['label-update_auto_loader']['pt-pt'] = 'Atualizar cache do carregador automático';
$text['label-update_auto_loader']['ro-ro'] = 'Actualizați memoria cache a încărcării automate';
$text['label-update_auto_loader']['ru-ru'] = 'Обновить кэш автозагрузчика';
$text['label-update_auto_loader']['sv-se'] = 'Uppdatera Auto Loader Cache';
$text['label-update_auto_loader']['uk-ua'] = 'Оновити кеш автозавантажувача';
$text['label-update_auto_loader']['tr-tr'] = 'Otomatik Yükleyici Önbelleğini Güncelle';
$text['label-update_auto_loader']['zh-cn'] = '更新自动加载器缓存';
$text['label-update_auto_loader']['ja-jp'] = 'オートローダーキャッシュの更新';
$text['label-update_auto_loader']['ko-kr'] = '자동 로더 캐시 업데이트';
$text['description-update_auto_loader']['en-us'] = 'Updates the auto_loader cache file to include any new classes added to the project';
$text['description-update_auto_loader']['en-gb'] = 'Updates the auto_loader cache file to include any new classes added to the project';
$text['description-update_auto_loader']['ar-eg'] = 'يقوم بتحديث ملف ذاكرة التخزين المؤقت لـ auto_loader ليشمل أي فئات جديدة تمت إضافتها إلى المشروع';
$text['description-update_auto_loader']['de-at'] = 'Aktualisiert die Auto_Loader-Cachedatei, um alle neuen Klassen einzuschließen, die dem Projekt hinzugefügt werden';
$text['description-update_auto_loader']['de-ch'] = 'Aktualisiert die Auto_Loader-Cachedatei, um alle neuen Klassen einzuschließen, die dem Projekt hinzugefügt werden';
$text['description-update_auto_loader']['de-de'] = 'Aktualisiert die Auto_Loader-Cachedatei, um alle neuen Klassen einzuschließen, die dem Projekt hinzugefügt werden';
$text['description-update_auto_loader']['el-gr'] = 'Ενημερώνει το αρχείο προσωρινής μνήμης auto_loader για να συμπεριλάβει τυχόν νέες κλάσεις που προστέθηκαν στο έργο';
$text['description-update_auto_loader']['es-cl'] = 'Actualiza el archivo de caché auto_loader para incluir cualquier clase nueva agregada al proyecto';
$text['description-update_auto_loader']['es-mx'] = 'Actualiza el archivo de caché auto_loader para incluir cualquier clase nueva agregada al proyecto';
$text['description-update_auto_loader']['fr-ca'] = 'Met à jour le fichier cache du chargeur automatique pour inclure toutes les nouvelles classes ajoutées au projet';
$text['description-update_auto_loader']['fr-fr'] = 'Met à jour le fichier cache du chargeur automatique pour inclure toutes les nouvelles classes ajoutées au projet';
$text['description-update_auto_loader']['he-il'] = 'מעדכן את קובץ המטמון auto_loader כך שיכלול כל מחלקות חדשות שנוספו לפרויקט';
$text['description-update_auto_loader']['it-it'] = 'Aggiorna il file di cache auto_loader per includere tutte le nuove classi aggiunte al progetto';
$text['description-update_auto_loader']['ka-ge'] = 'აახლებს auto_loader ქეში ფაილს, რათა შეიცავდეს პროექტში დამატებულ ნებისმიერ ახალ კლასს';
$text['description-update_auto_loader']['nl-nl'] = 'Werkt het auto_loader-cachebestand bij om alle nieuwe klassen op te nemen die aan het project zijn toegevoegd';
$text['description-update_auto_loader']['pl-pl'] = 'Aktualizuje plik pamięci podręcznej auto_loader, aby uwzględnić wszystkie nowe klasy dodane do projektu';
$text['description-update_auto_loader']['pt-br'] = 'Atualiza o arquivo de cache do auto_loader para incluir quaisquer novas classes adicionadas ao projeto';
$text['description-update_auto_loader']['pt-pt'] = 'Atualiza o arquivo de cache do auto_loader para incluir quaisquer novas classes adicionadas ao projeto';
$text['description-update_auto_loader']['ro-ro'] = 'Actualizează fișierul cache auto_loader pentru a include orice clase noi adăugate la proiect';
$text['description-update_auto_loader']['ru-ru'] = 'Обновляет файл кэша auto_loader, включая в него все новые классы, добавленные в проект.';
$text['description-update_auto_loader']['sv-se'] = 'Uppdaterar cachefilen för auto_loader för att inkludera alla nya klasser som lagts till i projektet';
$text['description-update_auto_loader']['uk-ua'] = 'Оновлює файл кешу auto_loader, щоб включити всі нові класи, додані до проекту';
$text['description-update_auto_loader']['tr-tr'] = 'Projeye eklenen tüm yeni sınıfları içerecek şekilde auto_loader önbellek dosyasını günceller';
$text['description-update_auto_loader']['zh-cn'] = '更新 auto_loader 缓存文件以包含添加到项目中的任何新类';
$text['description-update_auto_loader']['ja-jp'] = 'プロジェクトに追加された新しいクラスを含めるために auto_loader キャッシュ ファイルを更新します。';
$text['description-update_auto_loader']['ko-kr'] = '프로젝트에 추가된 모든 새 클래스를 포함하도록 auto_loader 캐시 파일을 업데이트합니다.';
$text['label-reloaded_classes']['en-us'] = 'Reloaded classes';
$text['label-reloaded_classes']['en-gb'] = 'Reloaded classes';
$text['label-reloaded_classes']['ar-eg'] = 'الفصول المعاد تحميلها';
$text['label-reloaded_classes']['de-at'] = 'Neu geladene Klassen';
$text['label-reloaded_classes']['de-ch'] = 'Neu geladene Klassen';
$text['label-reloaded_classes']['de-de'] = 'Neu geladene Klassen';
$text['label-reloaded_classes']['el-gr'] = 'Επαναφόρτωση τάξεων';
$text['label-reloaded_classes']['es-cl'] = 'Clases recargadas';
$text['label-reloaded_classes']['es-mx'] = 'Clases recargadas';
$text['label-reloaded_classes']['fr-ca'] = 'Classes rechargées';
$text['label-reloaded_classes']['fr-fr'] = 'Classes rechargées';
$text['label-reloaded_classes']['he-il'] = 'שיעורים שנטענו מחדש';
$text['label-reloaded_classes']['it-it'] = 'Classi ricaricate';
$text['label-reloaded_classes']['ka-ge'] = 'გადატვირთული კლასები';
$text['label-reloaded_classes']['nl-nl'] = 'Herladen klassen';
$text['label-reloaded_classes']['pl-pl'] = 'Klasy przeładowane';
$text['label-reloaded_classes']['pt-br'] = 'Classes recarregadas';
$text['label-reloaded_classes']['pt-pt'] = 'Classes recarregadas';
$text['label-reloaded_classes']['ro-ro'] = 'Cursuri reîncărcate';
$text['label-reloaded_classes']['ru-ru'] = 'Перезагруженные классы';
$text['label-reloaded_classes']['sv-se'] = 'Omladdade klasser';
$text['label-reloaded_classes']['uk-ua'] = 'Перезавантажені класи';
$text['label-reloaded_classes']['tr-tr'] = 'Yeniden yüklenen sınıflar';
$text['label-reloaded_classes']['zh-cn'] = '重新加载的类';
$text['label-reloaded_classes']['ja-jp'] = 'リロードされたクラス';
$text['label-reloaded_classes']['ko-kr'] = '다시 로드된 클래스';
$text['label-updated_cache']['en-us'] = 'Updated cache';
$text['label-updated_cache']['en-gb'] = 'Updated cache';
$text['label-updated_cache']['ar-eg'] = 'تم تحديث ذاكرة التخزين المؤقت';
$text['label-updated_cache']['de-at'] = 'Cache aktualisiert';
$text['label-updated_cache']['de-ch'] = 'Cache aktualisiert';
$text['label-updated_cache']['de-de'] = 'Cache aktualisiert';
$text['label-updated_cache']['el-gr'] = 'Ενημερώθηκε η προσωρινή μνήμη';
$text['label-updated_cache']['es-cl'] = 'Caché actualizado';
$text['label-updated_cache']['es-mx'] = 'Caché actualizado';
$text['label-updated_cache']['fr-ca'] = 'Cache mis à jour';
$text['label-updated_cache']['fr-fr'] = 'Cache mis à jour';
$text['label-updated_cache']['he-il'] = 'מטמון מעודכן';
$text['label-updated_cache']['it-it'] = 'Cache aggiornata';
$text['label-updated_cache']['ka-ge'] = 'განახლებულია ქეში';
$text['label-updated_cache']['nl-nl'] = 'Bijgewerkte cache';
$text['label-updated_cache']['pl-pl'] = 'Zaktualizowano pamięć podręczną';
$text['label-updated_cache']['pt-br'] = 'Cache atualizado';
$text['label-updated_cache']['pt-pt'] = 'Cache atualizado';
$text['label-updated_cache']['ro-ro'] = 'Cache actualizat';
$text['label-updated_cache']['ru-ru'] = 'Обновлен кэш';
$text['label-updated_cache']['sv-se'] = 'Uppdaterad cache';
$text['label-updated_cache']['uk-ua'] = 'Оновлений кеш';
$text['label-updated_cache']['tr-tr'] = 'Güncellenen önbellek';
$text['label-updated_cache']['zh-cn'] = '更新缓存';
$text['label-updated_cache']['ja-jp'] = 'キャッシュを更新しました';
$text['label-updated_cache']['ko-kr'] = '캐시 업데이트됨';

View File

@ -43,13 +43,13 @@
exit;
}
//connect to the database
$database = new database;
//add multi-lingual support
$language = new text;
$text = $language->get();
//connect to the database
$database = database::new();
//set a default message_timeout
$message_timeout = 4*1000;
@ -76,7 +76,7 @@
//process the http post
if (!empty($_POST) && @sizeof($_POST) > 0) {
//get the action options: source, schema, app_defaults, menu_defaults, permisisons
//get the action options: source, schema, app_defaults, menu_defaults, permissions
$action = $_POST['action'] ?? null;
//run source update
@ -92,6 +92,12 @@
else {
message::add($text['message-upgrade_source_failed'], 'negative', $message_timeout);
}
global $autoload;
if ($autoload !== null && $autoload instanceof auto_loader) {
$autoload->reload_classes();
$autoload->update_cache();
}
}
//run optional app source updates
@ -116,6 +122,13 @@
if ($apps_updated != 0) { message::add($text['message-optional_apps_upgrade_source'], null, $message_timeout); }
if ($apps_failed != 0) { message::add($text['message-optional_apps_upgrade_source_failed'], 'negative', $message_timeout); }
//update the auto_loader cache just-in-case the source files have updated
global $autoload;
if ($autoload !== null && $autoload instanceof auto_loader) {
$autoload->reload_classes();
$autoload->update_cache();
}
}
//load an array of the database schema and compare it with the active database
@ -131,7 +144,13 @@
//process the apps defaults
if (!empty($action["app_defaults"]) && permission_exists("upgrade_apps")) {
require_once "resources/classes/domains.php";
//update the auto_loader cache just-in-case the source files have updated
global $autoload;
if ($autoload !== null && $autoload instanceof auto_loader) {
$autoload->reload_classes();
$autoload->update_cache();
}
$domain = new domains;
$domain->upgrade();
message::add($text['message-upgrade_apps'], null, $message_timeout);
@ -139,6 +158,11 @@
//restore defaults of the selected menu
if (!empty($action["menu_defaults"]) && permission_exists("menu_restore")) {
global $autoload;
if ($autoload !== null && $autoload instanceof auto_loader) {
$autoload->reload_classes();
$autoload->update_cache();
}
$sel_menu = explode('|', check_str($_POST["sel_menu"]));
$menu_uuid = $sel_menu[0];
$menu_language = $sel_menu[1];
@ -151,6 +175,11 @@
//restore default permissions
if (!empty($action["permission_defaults"]) && permission_exists("group_edit")) {
global $autoload;
if ($autoload !== null && $autoload instanceof auto_loader) {
$autoload->reload_classes();
$autoload->update_cache();
}
$included = true;
require_once("core/groups/permissions_default.php");
$text = $language->get(null, '/core/upgrade');

View File

@ -177,6 +177,11 @@
exit();
}
//always update the auto_loader cache just-in-case the source files have updated
$auto_loader = new auto_loader();
$auto_loader->reload_classes();
$auto_loader->update_cache();
//get the version of the software
if ($upgrade_type == 'version') {
echo software::version()."\n";

View File

@ -33,7 +33,8 @@ defined('STDIN') or die('Unauthorized');
require_once dirname(__DIR__, 2) . "/resources/require.php";
//create a database connection using default config
$database = new database();
$config = config::load();
$database = database::new(['config' => $config]);
//load global defaults
$settings = new settings(['database' => $database]);
@ -57,8 +58,13 @@ $display_type = 'text';
//run
show_upgrade_menu();
/**
* Show upgrade menu
* @global type $text
* @global type $software_name
*/
function show_upgrade_menu() {
global $text, $software_name;
global $text, $software_name, $settings;
//error_reporting(E_ALL);
$line = str_repeat('-', strlen($text['title-cli_upgrade']) + 2);
while (true) {
@ -76,7 +82,8 @@ function show_upgrade_menu() {
echo "3) {$text['label-upgrade_apps']} - {$text['description-upgrade_apps']}\n";
echo "4) {$text['label-upgrade_menu']} - {$text['description-upgrade_menu']}\n";
echo "5) {$text['label-upgrade_permissions']} - {$text['description-upgrade_permissions']}\n";
echo "6) {$text['label-all_of_the_above']} - {$text['description-all_of_the_above']}\n";
echo "6) {$text['label-update_filesystem_permissions']} - {$text['description-update_filesystem_permissions']}\n";
echo "7) {$text['label-all_of_the_above']} - {$text['description-all_of_the_above']}\n";
echo "0) Exit\n";
echo "\n";
echo "Choice: ";
@ -85,12 +92,15 @@ function show_upgrade_menu() {
case 1:
do_upgrade_code();
do_upgrade_code_submodules();
do_upgrade_auto_loader();
break;
case '1a':
do_upgrade_code();
do_upgrade_auto_loader();
break;
case '1b':
do_upgrade_code_submodules();
do_upgrade_auto_loader();
break;
case 2:
do_upgrade_schema();
@ -99,34 +109,124 @@ function show_upgrade_menu() {
do_upgrade_schema(true);
break;
case 3:
do_upgrade_auto_loader();
do_upgrade_domains();
break;
case 4:
do_upgrade_auto_loader();
do_upgrade_menu();
break;
case 5:
do_upgrade_auto_loader();
do_upgrade_permissions();
break;
case 6:
do_upgrade_auto_loader();
do_filesystem_permissions($text, $settings);
break;
case 7:
do_upgrade_code();
do_upgrade_auto_loader();
do_upgrade_schema();
do_upgrade_domains();
do_upgrade_menu();
do_upgrade_permissions();
do_filesystem_permissions($text, $settings);
break;
case 8:
case 9:
break;
case 0:
case 'q':
exit();
}
}
}
/**
* Rebuild the cache file
* @global type $text
*/
function do_upgrade_auto_loader() {
global $text;
//remove temp file
unlink(sys_get_temp_dir() . '/' . auto_loader::FILE);
//create a new instance of the autoloader
$loader = new auto_loader();
//reload the classes
$loader->reload_classes();
echo "{$text['label-reloaded_classes']}\n";
//re-create cache file
if ($loader->update_cache()) {
echo "{$text['label-updated_cache']}\n";
}
}
/**
* Update file system permissions
*/
function do_filesystem_permissions($text, settings $settings) {
echo ($text['label-header1'] ?? "Root account or sudo account must be used for this option") . "\n";
echo ($text['label-header2'] ?? "This option is used for resetting the permissions on the filesystem after executing commands using the root user account") . "\n";
if (is_root_user()) {
$directories = [];
//get the fusionpbx folder
$project_root = dirname(__DIR__, 2);
//adjust the project root
$directories[] = $project_root;
//adjust the /etc/freeswitch
$directories[] = $settings->get('switch', 'conf', null);
$directories[] = $settings->get('switch', 'call_center', null); //normally in conf but can be different
$directories[] = $settings->get('switch', 'dialplan', null); //normally in conf but can be different
$directories[] = $settings->get('switch', 'directory', null); //normally in conf but can be different
$directories[] = $settings->get('switch', 'languages', null); //normally in conf but can be different
$directories[] = $settings->get('switch', 'sip_profiles', null); //normally in conf but can be different
//adjust the /usr/share/freeswitch/{scripts,sounds}
$directories[] = $settings->get('switch', 'scripts', null);
$directories[] = $settings->get('switch', 'sounds', null);
//adjust the /var/lib/freeswitch/{db,recordings,storage,voicemail}
$directories[] = $settings->get('switch', 'db', null);
$directories[] = $settings->get('switch', 'recordings', null);
$directories[] = $settings->get('switch', 'storage', null);
$directories[] = $settings->get('switch', 'voicemail', null); //normally included in storage but can be different
//only set the xml_cdr directory permissions
$log_directory = $settings->get('switch', 'log', null);
if ($log_directory !== null) {
$directories[] = $log_directory . '/xml_cdr';
}
//update the auto_loader cache permissions file
$directories[] = sys_get_temp_dir() . '/' . auto_loader::FILE;
//execute chown command for each directory
foreach ($directories as $dir) {
if ($dir !== null) {
//notify user
echo "chown -R www-data:www-data $dir\n";
//execute
exec("chown -R www-data:www-data $dir");
}
}
} else {
echo ($text['label-not_running_as_root'] ?? "Not root user - operation skipped")."\n";
}
}
function is_root_user(): bool {
return posix_getuid() === 0;
}
function current_user(): ?string {
return posix_getpwuid(posix_getuid())['name'] ?? null;
}
//show the upgrade type
function show_software_version() {
echo software::version() . "\n";
}
/**
* Upgrade the source folder
* @return type
*/
function do_upgrade_code() {
//assume failed
$result = ['result' => false, 'message' => 'Failed'];
@ -141,6 +241,10 @@ function do_upgrade_code() {
return;
}
/**
* Upgrade any of the git submodules
* @global type $text
*/
function do_upgrade_code_submodules() {
global $text;
$updateable_repos = git_find_repos(dirname(__DIR__, 2)."/app");
@ -165,7 +269,9 @@ function do_upgrade_code_submodules() {
}
}
//run all app_defaults.php files
/**
* Execute all app_defaults.php files
*/
function do_upgrade_domains() {
require_once dirname(__DIR__, 2) . "/resources/classes/config.php";
require_once dirname(__DIR__, 2) . "/resources/classes/domains.php";
@ -174,7 +280,9 @@ function do_upgrade_domains() {
$domain->upgrade();
}
//upgrade schema and/or data_types
/**
* Upgrade schema and/or data_types
*/
function do_upgrade_schema(bool $data_types = false) {
//get the database schema put it into an array then compare and update the database as needed.
require_once dirname(__DIR__, 2) . "/resources/classes/schema.php";
@ -183,7 +291,9 @@ function do_upgrade_schema(bool $data_types = false) {
echo $obj->schema('text');
}
//restore the default menu
/**
* Restore the default menu
*/
function do_upgrade_menu() {
global $included, $sel_menu, $menu_uuid, $menu_language;
//get the menu uuid and language
@ -215,7 +325,9 @@ function do_upgrade_menu() {
}
}
//restore the default permissions
/**
* Restore the default permissions
*/
function do_upgrade_permissions() {
global $included;
//default the permissions
@ -227,7 +339,9 @@ function do_upgrade_permissions() {
echo $text['message-upgrade_permissions'] . "\n";
}
//default upgrade schema and app defaults
/**
* Default upgrade schema and app defaults
*/
function do_upgrade_defaults() {
//add multi-lingual support
$language = new text;
@ -251,6 +365,10 @@ function do_upgrade_defaults() {
echo "\n";
}
/**
* Load the old config.php file
* @return type
*/
function load_config_php() {
//if the config file doesn't exist and the config.php does exist use it to write a new config file
//include the config.php
@ -334,8 +452,8 @@ function load_config_php() {
$conf .= "xml_handler.reg_as_number_alias = false\n";
$conf .= "xml_handler.number_as_presence_id = true\n";
$conf .= "\n";
$conf .= "#error reporting hide show all errors except notices and warnings\n";
$conf .= "error.reporting = 'E_ALL ^ E_NOTICE ^ E_WARNING'\n";
$conf .= "#error reporting hide all errors\n";
$conf .= "error.reporting = user\n";
//write the config file
$file_handle = fopen($config_file, "w");

View File

@ -23,11 +23,13 @@
Contributor(s):
Mark J. Crane <markjcrane@fusionpbx.com>
*/
//includes files
require_once __DIR__ . "/resources/require.php";
//additional includes
require_once "resources/check_auth.php";
//redirect to the dashboard
header("Location: ".PROJECT_PATH."/core/dashboard/");
?>

View File

@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2023
Portions created by the Initial Developer are Copyright (C) 2008-2025
the Initial Developer. All Rights Reserved.
Contributor(s):
@ -128,7 +128,6 @@
//if not authorized
if (empty($_SESSION['authorized']) || !$_SESSION['authorized']) {
//log the failed auth attempt to the system to the syslog server
openlog('FusionPBX', LOG_NDELAY, LOG_AUTH);
syslog(LOG_WARNING, '['.$_SERVER['REMOTE_ADDR']."] authentication failed for ".$result["username"]);
@ -143,21 +142,33 @@
//if logged in, redirect to login destination
if (!isset($_REQUEST["key"])) {
//create database object
$database = database::new();
//connect to the settings object
$settings = new settings(['database' => $database, 'domain_uuid' => $domain_uuid, 'user_uuid' => $user_uuid]);
//redirect the user
if (isset($_SESSION['redirect_path'])) {
$redirect_path = $_SESSION['redirect_path'];
unset($_SESSION['redirect_path']);
// prevent open redirect attacks. redirect url shouldn't contain a hostname
$parsed_url = parse_url($redirect_path);
if ($parsed_url['host']) {
die("Was someone trying to hack you?");
}
header("Location: ".$redirect_path);
exit;
}
elseif (isset($_SESSION['login']['destination']['text'])) {
header("Location: ".$_SESSION['login']['destination']['text']);
elseif (!empty($settings->get('login', 'destination', ''))) {
header("Location: ".$settings->get('login', 'destination', ''));
exit;
}
elseif (file_exists($_SERVER["PROJECT_ROOT"]."/core/dashboard/app_config.php")) {
header("Location: ".PROJECT_PATH."/core/dashboard/");
exit;
}
else {
require_once "resources/header.php";

View File

@ -26,27 +26,89 @@
class auto_loader {
public function __construct() {
const FILE = 'autoloader_cache.php';
private $classes;
public function __construct($project_path = '') {
//classes must be loaded before this object is registered
if (!$this->load_cache()) {
//cache miss so load them
$this->reload_classes($project_path);
//update the cache after loading classes array
$this->update_cache();
}
//register this object to load any unknown classes
spl_autoload_register(array($this, 'loader'));
}
public static function autoload_search($array) : string {
if (!is_array($array) && count($path) != 0) {
return '';
public function update_cache(string $file = ''): bool {
//ensure we have somewhere to put the file
if (empty($file)) {
$file = sys_get_temp_dir() . '/' . self::FILE;
}
foreach($array as $path) {
if (is_array($path) && count($path) != 0) {
foreach($path as $sub_path) {
if (!empty($sub_path) && file_exists($sub_path)) {
return $sub_path;
//guard against writing an empty file
if (!empty($this->classes)) {
//export the classes array using PHP engine
$data = var_export($this->classes, true);
//put the array in a form that it can be loaded directly to an array
$result = file_put_contents($file, "<?php\n return " . $data . ";\n");
if ($result !== false) {
return true;
}
$error_array = error_get_last();
//send to syslog when debugging
if (!empty($_REQUEST['debug']) && $_REQUEST['debug'] == 'true') {
openlog("PHP", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "[php][auto_loader] " . $error_array['message']);
closelog();
}
}
return false;
}
elseif (!empty($path) && file_exists($path)) {
return $path;
public function load_cache(string $file = ''): bool {
$this->classes = [];
//use a standard file
if (empty($file)) {
$file = sys_get_temp_dir() . '/'. self::FILE;
}
//use PHP engine to parse it
if (file_exists($file)) {
$this->classes = include $file;
}
return '';
//assign to an array
if (!empty($this->classes)) {
return true;
}
return false;
}
public function reload_classes($project_path = '') {
//set project path using magic dir constant
if (empty($project_path)) {
$project_path = dirname(__DIR__, 2);
}
//build the array of all classes
$search_path = [];
$search_path = array_merge($search_path, glob($project_path . '/resources/classes/*.php'));
$search_path = array_merge($search_path, glob($project_path . '/resources/interfaces/*.php'));
$search_path = array_merge($search_path, glob($project_path . '/resources/traits/*.php'));
$search_path = array_merge($search_path, glob($project_path . '/*/*/resources/classes/*.php'));
$search_path = array_merge($search_path, glob($project_path . '/*/*/resources/interfaces/*.php'));
$search_path = array_merge($search_path, glob($project_path . '/*/*/resources/traits/*.php'));
//reset the current array
$this->classes = [];
//store the class name (key) and the path (value)
foreach ($search_path as $path) {
$this->classes[basename($path, '.php')] = $path;
}
}
private function loader($class_name) : bool {
@ -54,40 +116,23 @@ class auto_loader {
//sanitize the class name
$class_name = preg_replace('[^a-zA-Z0-9_]', '', $class_name);
//use glob for a more extensive search for the classes (note: GLOB_BRACE doesn't work on some systems)
if (!class_exists($class_name)) {
//set project path using magic dir constant
$project_path = dirname(__DIR__, 2);
//build the search path array
$search_path[] = glob($project_path . "/resources/classes/".$class_name.".php");
$search_path[] = glob($project_path . "/resources/interfaces/".$class_name.".php");
$search_path[] = glob($project_path . "/resources/traits/".$class_name.".php");
$search_path[] = glob($project_path . "/*/*/resources/classes/".$class_name.".php");
$search_path[] = glob($project_path . "/*/*/resources/interfaces/".$class_name.".php");
$search_path[] = glob($project_path . "/*/*/resources/traits/".$class_name.".php");
//find the path
$path = self::autoload_search($search_path);
if (!empty($path)) {
//send to syslog
if (!empty($_REQUEST['debug']) && $_REQUEST['debug'] == 'true') {
openlog("PHP", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "[php][autoloader] name: ".$class_name.", path: ".$path.", line: ".__line__);
closelog();
}
//find the path using the class_name as the key in the classes array
if (isset($this->classes[$class_name])) {
//include the class or interface
include $path;
include_once $this->classes[$class_name];
//return boolean
return true;
}
//send to syslog when debugging
if (!empty($_REQUEST['debug']) && $_REQUEST['debug'] == 'true') {
openlog("PHP", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "[php][auto_loader] class not found name: ".$class_name);
closelog();
}
//return boolean
return false;
}
}
?>

View File

@ -297,7 +297,6 @@
//driver and type point to the same value
$this->driver = $config->get('database.0.type', 'pgsql');
$this->driver = $config->get('database.0.type', 'pgsql');
$this->type = $config->get('database.0.type', 'pgsql');
$this->host = $config->get('database.0.host', '127.0.0.1');
$this->port = $config->get('database.0.port', '5432');
@ -545,7 +544,10 @@
$this->db->sqliteCreateFunction('strright', 'php_right', 2);
}
else {
echo "not found";
$error_message = "file not found";
$message['message'] = $error_message;
$this->message = $message;
return false;
}
}
@ -572,9 +574,15 @@
}
}
}
catch (PDOException $error) {
print "error: " . $error->getMessage() . "<br/>";
die();
catch (PDOException $e) {
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
}
@ -594,9 +602,15 @@
$this->db = new PDO("pgsql:dbname=$this->db_name user=$this->username password=$this->password");
}
}
catch (PDOException $error) {
print "error: " . $error->getMessage() . "<br/>";
die();
catch (PDOException $e) {
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
}
@ -606,9 +620,19 @@
$this->db = new PDO("odbc:".$this->db_name, $this->username, $this->password);
}
catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
}
//connected to the database
return true;
}
/**
@ -730,13 +754,14 @@
//if unable to connect to the database
if (!$this->db) {
$backtrace = debug_backtrace();
echo "Connection Failed<br />\n";
echo "line number ".__line__."<br />\n";
echo "<pre>";
print_r($backtrace);
echo "</pre>";
exit;
$message['message'] = 'Unable to connect to database';
$message['code'] = '500';
$message['line'] = __LINE__;
$message['file'] = __FILE__;
$message['trace'] = '';
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
//query table store to see if the table exists
@ -761,6 +786,89 @@
}
}
/**
* Checks if the column exists in the database.
* <p><b>Note:</b><br>
* Tables and Column names must be sanitized. Otherwise, a warning will be
* emitted and false will be returned.</p>
* @param type $table_name Sanitized name of the table to search for.
* @param type $column_name Sanitized name of the column to search for.
* @return boolean Returns <i>true</i> if the column exists and <i>false</i> if it does not.
* @depends connect()
*/
public function column_exists ($table_name, $column_name) {
//sanitize the table name
if (self::sanitize($table_name) != $table_name) {
trigger_error('Table Name must be sanitized', E_USER_WARNING);
return false;
}
//sanitize the column name
if (self::sanitize($column_name) != $column_name) {
trigger_error('Column Name must be sanitized', E_USER_WARNING);
return false;
}
//connect to the database if needed
if (!$this->db) {
$this->connect();
}
//if unable to connect to the database
if (!$this->db) {
$backtrace = debug_backtrace();
echo "Connection Failed<br />\n";
echo "line number ".__line__."<br />\n";
echo "<pre>";
print_r($backtrace);
echo "</pre>";
return false;
}
//check the sqlite database to see if the column exists
//if ($this->db_type == "sqlite") {
// $table_info = $this->table_info($table_name);
// if ($this->sqlite_column_exists($table_info, $column_name)) {
// return true;
// }
// else {
// return false;
// }
//}
//check the postgresql database to see if the column exists
if ($this->type == "pgsql") {
$sql = "SELECT attname FROM pg_attribute WHERE attrelid = (SELECT oid FROM pg_class WHERE relname = '$table_name' limit 1) AND attname = '$column_name'; ";
}
//check the mysql database to see if the column exists
if ($this->type == "mysql") {
//$sql .= "SELECT * FROM information_schema.COLUMNS where TABLE_SCHEMA = '$db_name' and TABLE_NAME = '$table_name' and COLUMN_NAME = '$column_name' ";
$sql = "show columns from $table_name where field = '$column_name' ";
}
//return the results from the sql query
if (empty($sql)) {
return false;
}
else {
$prep_statement = $this->db->prepare($sql);
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
if (!$result) {
return false;
}
if (count($result) > 0) {
return true;
}
else {
return false;
}
unset ($prep_statement);
}
}
/**
* Queries {@link database::table_info()} to return the fields.
* @access public
@ -973,13 +1081,12 @@
}
}
catch(PDOException $e) {
$message["type"] = 'error';
$message["code"] = $e->getCode();
$message["message"] = $e->getMessage();
$message["sql"] = $sql;
if (!empty($parameters)) {
$message["parameters"] = $parameters;
}
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
@ -1055,20 +1162,18 @@
//prepare the sql and parameters and then run the query
try {
//$this->sql = $sql;
//$this->db->exec($sql);
$prep_statement = $this->db->prepare($sql);
$prep_statement->execute($params);
}
catch(PDOException $e) {
echo "<b>Error:</b><br />\n";
echo "<table>\n";
echo "<tr>\n";
echo "<td>\n";
echo $e->getMessage();
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
}
unset($sql, $prep_statement, $this->fields);
}
@ -1369,8 +1474,7 @@
$this->message = $message;
$m++;
unset($sql);
unset($statement);
unset($sql, $statement);
}
catch(PDOException $e) {
$retval = false;
@ -1570,9 +1674,11 @@
//unable to connect to the database
if (!$this->db) {
echo "Connection Failed<br />\n";
echo "line number ".__line__."<br />\n";
exit;
$error_message = "Connection Failed<br />\n";
$error_message .= "line number ".__line__."<br />\n";
$message['message'] = $error_message;
$this->message = $message;
return false;
}
//set the error mode
@ -1615,14 +1721,12 @@
}
}
catch(PDOException $e) {
$message["message"] = "Bad Request";
$message["code"] = "400";
$message["error"]["message"] = $e->getMessage();
$message["sql"] = $sql;
if (is_array($parameters)) {
$message["parameters"] = $parameters;
}
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
@ -2197,10 +2301,12 @@
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
}
catch(PDOException $e) {
echo $sql."<br />\n";
echo 'Caught exception: '. $e->getMessage()."<br /><br />\n";
echo $sql. "<br /><br />\n";
exit;
$message["type"] = 'error';
$message["code"] = $e->getCode();
$message["message"] = $e->getMessage();
$message["sql"] = $sql;
$this->message = $message;
return false;
}
//set the action
@ -2523,10 +2629,14 @@
unset($prep_statement);
}
catch(PDOException $e) {
echo $sql."<br />\n";
echo 'Caught exception: '. $e->getMessage()."<br /><br />\n";
echo $sql. "<br /><br />\n";
exit;
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
}
@ -2907,13 +3017,48 @@
unset($sql);
}
catch(PDOException $e) {
echo $e->getMessage();
exit;
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
}
return $this->message;
} //save method
/**
* Ensure the database is still connected and active.
* <p>NOTE:<br>
* There is no method in PDO that can reliably detect if the connection is active. Therefor, a lightweight
* query is executed using the statement <code>select 1</code>.</p>
* @return bool True if the database is connected. False otherwise.
*/
public function is_connected(): bool {
try {
$stmt = false;
if ($this->db !== null) $stmt = $this->db->query('SELECT 1');
return $stmt !== false;
} catch (PDOException $ex) {
//database is not connected
return false;
} catch (Exception $e) {
//some other error has occurred so record it
$message['message'] = $e->getMessage();
$message['code'] = $e->getCode();
$message['line'] = $e->getLine();
$message['file'] = $e->getFile();
$message['trace'] = $e->getTraceAsString();
$message['debug'] = debug_backtrace();
$this->message = $message;
return false;
}
return true;
}
/**
* Converts a plural English word to singular.
* @param string $word English word
@ -3137,8 +3282,10 @@
public static function new(array $params = []) {
if (self::$database === null) {
self::$database = new database($params);
if (!self::$database->is_connected()) {
self::$database->connect();
}
}
return self::$database;
}

View File

@ -445,6 +445,7 @@ if (!class_exists('menu')) {
//item exists in the database
if ($menu_item_exists) {
$parent_menu_item_protected = 'false';
//get parent_menu_item_protected
foreach ($menu_items as $item) {
if ($item['uuid'] == $menu['parent_uuid']) {
@ -1048,7 +1049,7 @@ if (!class_exists('menu')) {
$menu_sub_icon = null;
}
}
$html .= " <li class='nav-item'><a class='nav-link' href='".$mod_a_2."' ".$mod_a_3.">".($this->settings->get('theme', 'menu_sub_icons', true) != false ? "<span class='fa-solid fa-minus d-inline-block d-sm-none float-left' style='margin: 4px 10px 0 25px;'></span>" : '').escape($menu_sub['menu_language_title']).$menu_sub_icon."</a></li>\n";
$html .= " <li class='nav-item'><a class='nav-link' href='".$mod_a_2."' ".$mod_a_3." onclick='event.stopPropagation();'>".($this->settings->get('theme', 'menu_sub_icons', true) != false ? "<span class='fa-solid fa-minus d-inline-block d-sm-none float-left' style='margin: 4px 10px 0 25px;'></span>" : '').escape($menu_sub['menu_language_title']).$menu_sub_icon."</a></li>\n";
if ($columns > 1 && $column_current == 1 && ($index_sub+1) > (ceil(@sizeof($menu_parent['menu_items'])/2)-1)) {
$html .= " </ul>\n";
$html .= " </div>\n";
@ -1237,6 +1238,7 @@ if (!class_exists('menu')) {
$html .= " <div style='height: 100px;'></div>\n";
}
$html .= "</div>\n";
$content_container_onclick = "";
if ($menu_side_state != 'expanded') {
$content_container_onclick = "onclick=\"clearTimeout(menu_side_contract_timer); if ($(window).width() >= 576) { menu_side_contract(); }\"";
}

View File

@ -1,4 +1,5 @@
<?php
/*
FusionPBX
Version: MPL 1.1
@ -26,6 +27,7 @@
//define the schema class
if (!class_exists('schema')) {
class schema {
//define variables
@ -50,8 +52,7 @@ if (!class_exists('schema')) {
foreach ($config_list as $config_path) {
try {
include($config_path);
}
catch (Exception $e) {
} catch (Exception $e) {
//echo 'Caught exception: ', $e->getMessage(), "\n";
}
$x++;
@ -73,19 +74,18 @@ if (!class_exists('schema')) {
foreach ($row['fields'] as $field) {
if (!empty($field['deprecated']) and ($field['deprecated'] == "true")) {
//skip this field
} else {
if ($field_count > 0) {
$sql .= ",\n";
}
else {
if ($field_count > 0 ) { $sql .= ",\n"; }
if (is_array($field['name'])) {
$sql .= $field['name']['text'] . " ";
}
else {
} else {
$sql .= $field['name'] . " ";
}
if (is_array($field['type'])) {
$sql .= $field['type'][$this->db_type];
}
else {
} else {
$sql .= $field['type'];
}
if (isset($field['key']) && isset($field['key']['type']) && ($field['key']['type'] == "primary")) {
@ -107,8 +107,7 @@ if (!class_exists('schema')) {
}
if ($this->db_type == "mysql") {
$sql .= ") ENGINE=INNODB;";
}
else {
} else {
$sql .= ");";
}
$this->result['sql'][] = $sql;
@ -126,8 +125,7 @@ if (!class_exists('schema')) {
//execute the sql query
try {
$this->database->query($sql);
}
catch (PDOException $error) {
} catch (PDOException $error) {
echo "error: " . $error->getMessage() . " sql: $sql<br/>";
}
//complete the transaction
@ -152,8 +150,7 @@ if (!class_exists('schema')) {
$table_info = $this->table_info($db_name, $table_name);
if ($this->sqlite_column_exists($table_info, $column_name)) {
return true;
}
else {
} else {
return false;
}
}
@ -174,8 +171,7 @@ if (!class_exists('schema')) {
}
if (count($result) > 0) {
return true;
}
else {
} else {
return false;
}
unset($prep_statement);
@ -184,7 +180,9 @@ if (!class_exists('schema')) {
//get the table information
public function table_info($db_name, $table_name) {
if (empty($table_name)) { return false; }
if (empty($table_name)) {
return false;
}
if ($this->db_type == "sqlite") {
$sql = "PRAGMA table_info(" . $table_name . ");";
}
@ -215,8 +213,7 @@ if (!class_exists('schema')) {
$result = $this->database->query($sql);
if ($result > 0) {
return true; //table exists
}
else {
} else {
return false; //table doesn't exist
}
}
@ -238,15 +235,16 @@ if (!class_exists('schema')) {
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
if (count($result) > 0) {
return true; //table exists
}
else {
} else {
return false; //table doesn't exist
}
}
//database table information
private function db_table_info($db_name, $db_type, $table_name) {
if (empty($table_name)) { return false; }
if (empty($table_name)) {
return false;
}
if ($db_type == "sqlite") {
$sql = "PRAGMA table_info(" . $table_name . ");";
}
@ -313,8 +311,7 @@ if (!class_exists('schema')) {
$table_info = $this->db_table_info($db_name, $db_type, $table_name);
if ($this->db_sqlite_column_exists($table_info, $column_name)) {
return true;
}
else {
} else {
return false;
}
}
@ -331,8 +328,7 @@ if (!class_exists('schema')) {
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
if (!empty($result)) {
return true;
}
else {
} else {
return false;
}
unset($prep_statement);
@ -347,34 +343,37 @@ if (!class_exists('schema')) {
//database create table
public function db_create_table($apps, $db_type, $table) {
if (empty($apps)) { return false; }
if (is_array($apps)) foreach ($apps as $x => $app) {
if (!empty($app['db']) && is_array($app['db'])) foreach ($app['db'] as $y => $row) {
if (empty($apps)) {
return false;
}
if (is_array($apps)) {
foreach ($apps as $x => $app) {
if (!empty($app['db']) && is_array($app['db'])) {
foreach ($app['db'] as $y => $row) {
if (!empty($row['table']['name']) && is_array($row['table']['name'])) {
$table_name = $row['table']['name']['text'];
}
else {
} else {
$table_name = $row['table']['name'];
}
if ($table_name == $table) {
$sql = "CREATE TABLE " . $table_name . " (\n";
(int) $field_count = 0;
if (!empty($row['fields']) && is_array($row['fields'])) foreach ($row['fields'] as $field) {
if (!empty($row['fields']) && is_array($row['fields'])) {
foreach ($row['fields'] as $field) {
if (!empty($field['deprecated']) && $field['deprecated'] == "true") {
//skip this row
} else {
if ($field_count > 0) {
$sql .= ",\n";
}
else {
if ($field_count > 0 ) { $sql .= ",\n"; }
if (!empty($field['name']) && is_array($field['name'])) {
$sql .= $field['name']['text'] . " ";
}
else {
} else {
$sql .= $field['name'] . " ";
}
if (!empty($field['type']) && is_array($field['type'])) {
$sql .= $field['type'][$db_type];
}
else {
} else {
$sql .= $field['type'];
}
if (!empty($field['key']['type']) && $field['key']['type'] == "primary") {
@ -383,12 +382,15 @@ if (!class_exists('schema')) {
$field_count++;
}
}
}
$sql .= ");\n";
return $sql;
}
}
}
}
}
}
//database insert
private function db_insert_into($apps, $db_type, $table) {
@ -401,13 +403,13 @@ if (!class_exists('schema')) {
foreach ($row['fields'] as $field) {
if (!empty($field['deprecated']) && $field['deprecated'] == "true") {
//skip this field
} else {
if ($field_count > 0) {
$sql .= ",";
}
else {
if ($field_count > 0 ) { $sql .= ","; }
if (is_array($field['name'])) {
$sql .= $field['name']['text'];
}
else {
} else {
$sql .= $field['name'];
}
$field_count++;
@ -419,9 +421,10 @@ if (!class_exists('schema')) {
foreach ($row['fields'] as $field) {
if (!empty($field['deprecated']) && $field['deprecated'] == "true") {
//skip this field
} else {
if ($field_count > 0) {
$sql .= ",";
}
else {
if ($field_count > 0 ) { $sql .= ","; }
if (is_array($field['name'])) {
if ($field['exists'] == "false") {
if (is_array($field['name']['deprecated'])) {
@ -433,22 +436,20 @@ if (!class_exists('schema')) {
break;
}
}
if (!$found) { $sql .= "''"; }
if (!$found) {
$sql .= "''";
}
else {
} else {
if ($this->db_column_exists($db_type, $db_name, 'tmp_' . $table, $field['name']['deprecated'])) {
$sql .= $field['name']['deprecated'];
}
else {
} else {
$sql .= "''";
}
}
}
else {
} else {
$sql .= $field['name']['text'];
}
}
else {
} else {
$sql .= $field['name'];
}
$field_count++;
@ -467,7 +468,9 @@ if (!class_exists('schema')) {
//set the global variable
global $text, $output_format;
if ($format == '') $format = $output_format;
if ($format == '') {
$format = $output_format;
}
//get the db variables
//require_once "resources/classes/config.php";
@ -482,7 +485,6 @@ if (!class_exists('schema')) {
//$db_host = $config->db_host;
//$db_path = $config->db_path;
//$db_port = $config->db_port;
//includes files
require dirname(__DIR__, 2) . "/resources/require.php";
@ -499,7 +501,6 @@ if (!class_exists('schema')) {
// SELECT * FROM sqlite_master WHERE type='table' AND name='v_cdr' AND sql LIKE '%caller_id_name TEXT,%'
//aditional information
// http://www.sqlite.org/faq.html#q9
//postgresql
//list all tables in the database
// SELECT table_name FROM pg_tables WHERE schemaname='public';
@ -517,25 +518,22 @@ if (!class_exists('schema')) {
//oracle
//check if table exists
// SELECT TABLE_NAME FROM ALL_TABLES
//update the app db array add exists true or false
$sql = '';
foreach ($this->apps as $x => $app) {
if (isset($app['db'])) foreach ($app['db'] as $y => $row) {
if (isset($app['db'])) {
foreach ($app['db'] as $y => $row) {
if (isset($row['table']['name'])) {
if (is_array($row['table']['name'])) {
$table_name = $row['table']['name']['text'];
}
else {
} else {
$table_name = $row['table']['name'];
}
}
else {
} else {
//old array syntax
if (is_array($row['table'])) {
$table_name = $row['table']['text'];
}
else {
} else {
$table_name = $row['table'];
}
}
@ -544,28 +542,24 @@ if (!class_exists('schema')) {
//check if the table exists
if ($this->db_table_exists($db_type, $db_name, $table_name)) {
$this->apps[$x]['db'][$y]['exists'] = 'true';
}
else {
} else {
$this->apps[$x]['db'][$y]['exists'] = 'false';
}
//check if the column exists
foreach ($row['fields'] as $z => $field) {
if (!empty($field['deprecated']) && $field['deprecated'] == "true") {
//skip this field
}
else {
} else {
if (is_array($field['name'])) {
$field_name = $field['name']['text'];
}
else {
} else {
$field_name = $field['name'];
}
if (!empty($field_name)) {
if ($this->db_column_exists($db_type, $db_name, $table_name, $field_name)) {
//found
$this->apps[$x]['db'][$y]['fields'][$z]['exists'] = 'true';
}
else {
} else {
//not found
$this->apps[$x]['db'][$y]['fields'][$z]['exists'] = 'false';
}
@ -577,13 +571,15 @@ if (!class_exists('schema')) {
}
}
}
}
//prepare the variables
$sql_update = '';
//add missing tables and fields
foreach ($this->apps as $x => $app) {
if (isset($app['db'])) foreach ($app['db'] as $y => $row) {
if (isset($app['db'])) {
foreach ($app['db'] as $y => $row) {
if (is_array($row['table']['name'])) {
$table_name = $row['table']['name']['text'];
if ($this->db_table_exists($db_type, $db_name, $row['table']['name']['deprecated'])) {
@ -597,22 +593,18 @@ if (!class_exists('schema')) {
if ($db_type == "sqlite") {
$sql_update .= "ALTER TABLE " . $row['table']['name']['deprecated'] . " RENAME TO " . $row['table']['name']['text'] . ";\n";
}
}
else {
} else {
if ($this->db_table_exists($db_type, $db_name, $row['table']['name']['text'])) {
$row['exists'] = "true";
}
else {
} else {
$row['exists'] = "false";
$sql_update .= $this->db_create_table($this->apps, $db_type, $row['table']['name']['text']);
}
}
}
else {
} else {
if ($this->db_table_exists($db_type, $db_name, $row['table']['name'])) {
$row['exists'] = "true";
}
else {
} else {
$row['exists'] = "false";
}
$table_name = $row['table']['name'];
@ -624,20 +616,17 @@ if (!class_exists('schema')) {
foreach ($row['fields'] as $z => $field) {
if (!empty($field['deprecated']) && $field['deprecated'] == "true") {
//skip this field
}
else {
} else {
//get the data type
if (is_array($field['type'])) {
$field_type = $field['type'][$db_type];
}
else {
} else {
$field_type = $field['type'];
}
//get the field name
if (is_array($field['name'])) {
$field_name = $field['name']['text'];
}
else {
} else {
$field_name = $field['name'];
}
@ -648,7 +637,6 @@ if (!class_exists('schema')) {
// else {
// $field['exists'] = "false";
// }
//add or rename fields
if (isset($field['name']['deprecated']) && $this->db_column_exists($db_type, $db_name, $table_name, $field['name']['deprecated'])) {
if ($db_type == "pgsql") {
@ -662,8 +650,7 @@ if (!class_exists('schema')) {
//a change has been made to the field name
$this->apps[$x]['db'][$y]['rebuild'] = 'true';
}
}
else {
} else {
//find missing fields and add them
if ($field['exists'] == "false") {
$sql_update .= "ALTER TABLE " . $table_name . " ADD " . $field_name . " " . $field_type . ";\n";
@ -682,23 +669,33 @@ if (!class_exists('schema')) {
$sql_update .= "ALTER TABLE " . $table_name . " ALTER COLUMN " . $field_name . " TYPE uuid USING\n";
$sql_update .= "CAST(regexp_replace(" . $field_name . ", '([A-Z0-9]{4})([A-Z0-9]{12})', E'\\1-\\2')\n";
$sql_update .= "AS uuid);\n";
}
else {
} else {
//field type has not changed
if ($db_field_type == "integer" && strtolower($field_type) == "serial") { }
else if ($db_field_type == "timestamp without time zone" && strtolower($field_type) == "timestamp") { }
else if ($db_field_type == "timestamp without time zone" && strtolower($field_type) == "datetime") { }
else if ($db_field_type == "timestamp with time zone" && strtolower($field_type) == "timestamptz") { }
else if ($db_field_type == "integer" && strtolower($field_type) == "numeric") { }
else if ($db_field_type == "character" && strtolower($field_type) == "char") { }
if ($db_field_type == "integer" && strtolower($field_type) == "serial") {
} else if ($db_field_type == "timestamp without time zone" && strtolower($field_type) == "timestamp") {
} else if ($db_field_type == "timestamp without time zone" && strtolower($field_type) == "datetime") {
} else if ($db_field_type == "timestamp with time zone" && strtolower($field_type) == "timestamptz") {
} else if ($db_field_type == "integer" && strtolower($field_type) == "numeric") {
} else if ($db_field_type == "character" && strtolower($field_type) == "char") {
}
//field type has changed
else {
switch ($field_type) {
case 'numeric': $using = $field_name."::numeric"; break;
case 'numeric': $using = $field_name . "::numeric";
break;
case 'timestamp':
case 'datetime': $using = $field_name."::timestamp without time zone"; break;
case 'timestamptz': $using = $field_name."::timestamp with time zone"; break;
case 'boolean': $using = $field_name."::boolean"; break;
case 'datetime': $using = $field_name . "::timestamp without time zone";
break;
case 'timestamptz': $using = $field_name . "::timestamp with time zone";
break;
case 'boolean': $using = $field_name . "::boolean";
break;
default: unset($using);
}
$sql_update .= "ALTER TABLE " . $table_name . " ALTER COLUMN " . $field_name . " TYPE " . $field_type . " " . ($using ? "USING " . $using : null) . ";\n";
@ -709,11 +706,9 @@ if (!class_exists('schema')) {
$type = explode("(", $db_field_type);
if ($type[0] == $field_type) {
//do nothing
}
else if ($field_type == "numeric" && $type[0] == "decimal") {
} else if ($field_type == "numeric" && $type[0] == "decimal") {
//do nothing
}
else {
} else {
$sql_update .= "ALTER TABLE " . $table_name . " modify " . $field_name . " " . $field_type . ";\n";
}
unset($type);
@ -727,20 +722,20 @@ if (!class_exists('schema')) {
}
}
}
}
elseif (!is_array($row['table']['name'])) {
} elseif (!is_array($row['table']['name'])) {
//create table
$sql_update .= $this->db_create_table($this->apps, $db_type, $row['table']['name']);
}
}
}
}
//rebuild and populate the table
foreach ($this->apps as $x => $app) {
if (isset($app['db'])) foreach ($app['db'] as $y => $row) {
if (isset($app['db'])) {
foreach ($app['db'] as $y => $row) {
if (is_array($row['table']['name'])) {
$table_name = $row['table']['name']['text'];
}
else {
} else {
$table_name = $row['table']['name'];
}
if (!empty($field['rebuild']) && $row['rebuild'] == "true") {
@ -761,6 +756,7 @@ if (!class_exists('schema')) {
}
}
}
}
// initialize response variable
$response = '';
@ -793,11 +789,11 @@ if (!class_exists('schema')) {
//build the html while looping through the app db array
$sql = '';
foreach ($this->apps as $app) {
if (isset($app['db'])) foreach ($app['db'] as $row) {
if (isset($app['db'])) {
foreach ($app['db'] as $row) {
if (is_array($row['table']['name'])) {
$table_name = $row['table']['name']['text'];
}
else {
} else {
$table_name = $row['table']['name'];
}
$response .= "<tr>\n";
@ -819,18 +815,15 @@ if (!class_exists('schema')) {
foreach ($row['fields'] as $field) {
if (!empty($field['deprecated']) && $field['deprecated'] == "true") {
//skip this field
}
else {
} else {
if (is_array($field['name'])) {
$field_name = $field['name']['text'];
}
else {
} else {
$field_name = $field['name'];
}
if (is_array($field['type'])) {
$field_type = $field['type'][$db_type];
}
else {
} else {
$field_type = $field['type'];
}
$response .= "<tr>\n";
@ -839,8 +832,7 @@ if (!class_exists('schema')) {
if ($field['exists'] == "true") {
$response .= "<td class='row_style0' style=''>" . $text['option-true'] . "</td>\n";
$response .= "<td>&nbsp;</td>\n";
}
else {
} else {
$response .= "<td class='row_style1' style='background-color:#444444;color:#CCCCCC;'>" . $text['option-false'] . "</td>\n";
$response .= "<td>&nbsp;</td>\n";
}
@ -850,8 +842,7 @@ if (!class_exists('schema')) {
$response .= " </table>\n";
$response .= "</td>\n";
}
}
else {
} else {
$response .= "<td valign='top' class='row_style1'>$table_name</td>\n";
$response .= "<td valign='top' class='row_style1' style='background-color:#444444;color:#CCCCCC;'><strong>" . $text['label-exists'] . "</strong><br />" . $text['option-false'] . "</td>\n";
$response .= "<td valign='top' class='row_style1'>&nbsp;</td>\n";
@ -859,18 +850,17 @@ if (!class_exists('schema')) {
$response .= "</tr>\n";
}
}
}
//end the list of tables
$response .= "</table>\n";
$response .= "<br />\n";
}
//loop line by line through all the lines of sql code
$x = 0;
if (empty($sql_update) && $format == "text") {
$response .= " " . $text['label-schema'] . ": " . $text['label-no_change'] . "\n";
}
else {
} else {
if ($format == "text") {
$response .= " " . $text['label-schema'] . "\n";
}
@ -883,8 +873,7 @@ if (!class_exists('schema')) {
if ($format == "text") {
$response .= " $sql;\n";
}
}
catch (PDOException $error) {
} catch (PDOException $error) {
$response .= " error: " . $error->getMessage() . " sql: $sql\n";
}
}
@ -918,6 +907,7 @@ if (!class_exists('schema')) {
//}
} //end function
}
}
//example use
@ -927,5 +917,4 @@ if (!class_exists('schema')) {
//$obj->schema();
//$result_array = $schema->obj['sql'];
//print_r($result_array);
?>

View File

@ -27,6 +27,12 @@
//includes files
require_once __DIR__ . "/require.php";
//database and settings
$domain_uuid = $_SESSION['domain_uuid'] ?? '';
$user_uuid = $_SESSION['user_uuid'] ?? '';
$database = database::new();
$settings = new settings(['database' => $database, 'domain_uuid' => $domain_uuid, 'user_uuid' => $user_uuid]);
//set variables if not set
//if (!isset($_SESSION["template_content"])) { $_SESSION["template_content"] = null; }
if (!isset($document)) { $document = null; }
@ -154,7 +160,7 @@
$settings_array['theme']['footer'] = isset($settings_array['theme']['footer']) ? $settings_array['theme']['footer'] : '&copy; '.$text['theme-label-copyright'].' 2008 - '.date('Y')." <a href='http://www.fusionpbx.com' class='footer' target='_blank'>fusionpbx.com</a> ".$text['theme-label-all_rights_reserved'];
$settings_array['theme']['menu_side_item_main_sub_icon_contract'] = !empty($settings_array['theme']['menu_side_item_main_sub_icon_contract']) ? explode(' ', $settings_array['theme']['menu_side_item_main_sub_icon_contract'])[1] : null;
$settings_array['theme']['menu_side_item_main_sub_icon_expand'] = !empty($settings_array['theme']['menu_side_item_main_sub_icon_expand']) ? explode(' ', $settings_array['theme']['menu_side_item_main_sub_icon_expand'])[1] : null;
$settings_array['theme']['menu_brand_type'] = $settings->get('theme', 'menu_brand_type', '');
//assign the setings
$view->assign('settings', $settings_array);
}

View File

@ -28,8 +28,13 @@
require_once __DIR__ . "/require.php";
//start the session
if (!isset($_SESSION)) {
ini_set("session.cookie_httponly", true);
if (!isset($_SESSION)) { session_start(); }
session_start();
}
//connect to the database if not initialized
$database = database::new();
//set the domains session
if (!isset($_SESSION['domains'])) {
@ -79,11 +84,6 @@
$content = '';
}
//connect to the database if not initialized
if (!($database instanceof database)) {
$database = new database();
}
//get the parent id
$sql = "select menu_item_parent_uuid from v_menu_items ";
$sql .= "where menu_uuid = :menu_uuid ";

View File

@ -62,7 +62,7 @@
//set the email address
$email = $_REQUEST['email'];
//see if email existsesources/login.php?action=request
//see if email exists
$sql = "select ";
$sql .= "user_uuid, ";
$sql .= "username, ";
@ -412,7 +412,7 @@
echo " <h5>".$text['label-password_reset']."</h5>\n";
echo " <form name='reset' id='frm' method='post'>\n";
echo " <input type='hidden' name='action' value='reset'>\n";
echo " <input type='password' style='display: none;' id='password' name='password_auto' value='password'>\n";
//echo " <input type='password' style='display: none;' id='password' name='password_auto' value='password'>\n";
//echo " <input type='text' class='txt login' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 8px;' name='username' id='username' placeholder=\"".$text['label-username']."\"><br />\n";
echo " <input type='password' class='txt login' style='text-align: center; min-width: 200px; width: 200px; margin-bottom: 4px;' name='password_new' id='password' autocomplete='off' placeholder=\"".$text['label-new_password']."\" onkeypress='show_strength_meter();' onfocus='compare_passwords();' onkeyup='compare_passwords();' onblur='compare_passwords();'><br />\n";
echo " <div id='pwstrength_progress' class='pwstrength_progress pwstrength_progress_password_reset'></div>";
@ -424,7 +424,7 @@
echo " </div>\n";
echo " <script>\n";
echo " $('#password').trigger('focus');\n";
//echo " $('#password').trigger('focus');\n";
// convert password fields to text
echo " function submit_form() {\n";
echo " hide_password_fields();\n";

View File

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<AddressBook>
<pbgroup>
<id>1</id>
<name>Users</name>
<ringtones>default ringtone</ringtones>
</pbgroup>
<pbgroup>
<id>2</id>
<name>Groups</name>
<ringtones>default ringtone</ringtones>
</pbgroup>
<pbgroup>
<id>3</id>
<name>Extensions</name>
<ringtones>system</ringtones>
</pbgroup>
{$start_id=0}
{foreach $contacts as $row}
{if $row.category == "users"}
<Contact>
<id>{$start_id++}</id>
{if $row.contact_name_given != ""}
{if $row.contact_organization != ""}
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
<Company>{$row.contact_organization}</Company>
{else}
<FirstName>{$row.contact_name_given}</FirstName>
<LastName>{$row.contact_name_family}</LastName>
{/if}
{else}
<FirstName>{$row.effective_caller_id_name}</FirstName>
{/if}
<JobTitle></JobTitle>
<Frequent>0</Frequent>
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
{if $number.phone_label == "work"}
<Phone type="Work">
<phonenumber>{$number.phone_number}</phonenumber>
<accountindex>0</accountindex>
</Phone>
{/if}
{if $number.phone_label == "home"}
<Phone type="Home">
<phonenumber>{$number.phone_number}</phonenumber>
<accountindex>0</accountindex>
</Phone>
{/if}
{if $number.phone_label == "mobile"}
<Phone type="Cell">
<phonenumber>{$number.phone_number}</phonenumber>
<accountindex>0</accountindex>
</Phone>
{/if}
{/if}
{/foreach}
<Group>1</Group>
<Primary>0</Primary>
<Department></Department>
<Job></Job>
<Company></Company>
</Contact>
{elseif $row.category == "groups"}
<Contact>
<id>{$start_id++}</id>
{if $row.contact_name_given != ""}
{if $row.contact_organization != ""}
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
<Company>{$row.contact_organization}</Company>
{else}
<FirstName>{$row.contact_name_given}</FirstName>
<LastName>{$row.contact_name_family}</LastName>
{/if}
{else}
<FirstName>{$row.effective_caller_id_name}</FirstName>
{/if}
<JobTitle></JobTitle>
<Frequent>0</Frequent>
{foreach $row.numbers as $number}
{if $number.phone_number != ""}
{if $number.phone_label == "work"}
<Phone type="Work">
<phonenumber>{$number.phone_number}</phonenumber>
<accountindex>0</accountindex>
</Phone>
{/if}
{if $number.phone_label == "home"}
<Phone type="Home">
<phonenumber>{$number.phone_number}</phonenumber>
<accountindex>0</accountindex>
</Phone>
{/if}
{if $number.phone_label == "mobile"}
<Phone type="Cell">
<phonenumber>{$number.phone_number}</phonenumber>
<accountindex>0</accountindex>
</Phone>
{/if}
{/if}
{/foreach}
<Group>2</Group>
<Primary>0</Primary>
<Department></Department>
<Job></Job>
<Company></Company>
</Contact>
{elseif $row.category == "extensions"}
<Contact>
<id>{$start_id++}</id>
{if $row.contact_name_given != ""}
{if $row.contact_organization != ""}
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
<FirstName>{$row.contact_name_given} {$row.contact_name_family}</FirstName>
<Company>{$row.contact_organization}</Company>
{else}
<FirstName>{$row.contact_name_given}</FirstName>
<LastName>{$row.contact_name_family}</LastName>
{/if}
{else}
<FirstName>{$row.effective_caller_id_name}</FirstName>
{/if}
<JobTitle></JobTitle>
<Frequent>0</Frequent>
{if $row.phone_number != ""}
<Phone type="Work">
<phonenumber>{$row.phone_number}</phonenumber>
<accountindex>0</accountindex>
</Phone>
{else}
<Phone type="Work">
<phonenumber>{$row.phone_extension}</phonenumber>
<accountindex>0</accountindex>
</Phone>
{/if}
<Group>3</Group>
<Primary>0</Primary>
<Department></Department>
<Job></Job>
<Company></Company>
</Contact>
{/if}
{/foreach}
</AddressBook>

File diff suppressed because it is too large Load Diff

View File

@ -26,9 +26,13 @@ account.{$row.line_number}.user_name = {$account.{$row.line_number}.user_id}
{/if}
{if isset($row.server.1.address)}
account.{$row.line_number}.sip_server.1.address = {$row.server.1.address}
account.{$row.line_number}.sip_server.1.address = {$row.server_address}
{else}
account.{$row.line_number}.sip_server_host = {$account.{$row.line_number}.server_address}
#firmware .160 and newer
account.{$row.line_number}.sip_server.1.address = {$row.server_address}
#firmware .125 and older
account.{$row.line_number}.sip_server_host = {$row.server_address}
{/if}
account.{$row.line_number}.sip_server_port = {$account.{$row.line_number}.sip_port}
@ -587,3 +591,5 @@ expansion_module.6.key.{$row.device_key_id}.extension = {$row.device_key_extensi
expansion_module.6.key.{$row.device_key_id}.label = {$row.device_key_label}
expansion_module.6.key.{$row.device_key_id}.xml_phonebook =
{/foreach}

View File

@ -556,8 +556,13 @@ dialplan.block_out.line_id.1 =
###dialplan.dialnow.rule.X =
###dialplan.dialnow.line_id.X =
phone_setting.dialnow_delay = {$yealink_dialplan_dialnow_delay}
dialplan.dialnow.rule.1 = {$yealink_dialplan_dialnow_rule_1}
dialplan.dialnow.line_id.1 =
dialplan.dialnow.rule.2 = {$yealink_dialplan_dialnow_rule_2}
dialplan.dialnow.rule.3 = {$yealink_dialplan_dialnow_rule_3}
dialplan.dialnow.rule.4 = {$yealink_dialplan_dialnow_rule_4}
dialplan.dialnow.rule.5 = {$yealink_dialplan_dialnow_rule_5}
###X ranges from 1 to 100
###dialplan.replace.prefix.X =
@ -573,6 +578,14 @@ phone_setting.dialnow_delay =
dialplan_replace_rule.url =
dialplan.block_out.line_id.1=
dialplan.block_out.number.1=
dialplan.area_code.line_id =
dialplan.area_code.max_len =
dialplan.area_code.min_len=
dialplan.area_code.code=
#######################################################################################
## Remote Phonebook(Except T20P Model) ##
#######################################################################################
@ -789,8 +802,7 @@ features.keep_dnd.enable=
#######################################################################################
## Features Bluetooth ##
#######################################################################################
features.bluetooth_enable = features.bluetooth_enable
static.bluetooth.function.enable =
features.bluetooth_enable= {$yealink_bluetooth_enable}
features.bluetooth_adapter_name= {$yealink_bluetooth_name}
voice.bluetooth_headset_send=
@ -1007,12 +1019,12 @@ phone_setting.active_backlight_level =
##It configures the backlight time (in seconds).0, 1, 15, 30, 60, 120, 300, 600 or 1800.
phone_setting.backlight_time = {$yealink_backlight_time}
{if isset($yealink_t54w_wallpaper_filename)}
phone_setting.backgrounds = Config:{$yealink_t54w_wallpaper_filename}
{if isset($yealink_t58w_wallpaper_filename)}
phone_setting.backgrounds = Config:{$yealink_t58w_wallpaper_filename}
{else}
phone_setting.backgrounds = Config:yealink_t54w_wallpaper.png
phone_setting.backgrounds = Config:yealink_t58w_wallpaper.png
{/if}
wallpaper_upload.url = {$yealink_t54w_wallpaper}
wallpaper_upload.url = {$yealink_t58w_wallpaper}
expansion_module.backgrounds = {$yealink_wallpaper_expansion}
#######################################################################################
@ -1534,7 +1546,7 @@ custom_softkey_talking.url =
#######################################################################################
###It configures the access URL of the firmware file.
###The default value is blank.It takes effect after a reboot.
static.firmware.url = {$yealink_firmware_url}/{$yealink_firmware_t54w}
static.firmware.url = {$yealink_firmware_url}/{$yealink_firmware_t58w}
#######################################################################################
## RTCP ##
@ -2614,4 +2626,3 @@ xmlbrowser_icon_upload.url=
## T58W add ##
#######################################################################################
features.lower_your_voice_alarm.enable=

View File

@ -1832,6 +1832,22 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the background color (and opacity) of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "fa1de334-854d-47ce-bf49-168eb0fd1525";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_border_size";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border size of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7c8a92fd-c8d1-42e5-8d2c-2df77bfba0f7";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_border_style";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "solid";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border style of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "2f46e479-c724-469d-bb73-865c07d635d3";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_border_color";
@ -1840,14 +1856,6 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border color (and opacity) of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e745997c-a093-4550-88ee-8be777f07236";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_border_color_hover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#c0c0c0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border hover color (and opacity) of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "c612a32c-4308-42a0-a8eb-ec810ac8d1d3";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_border_color_focus";
@ -1856,13 +1864,21 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border focus color (and opacity) of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "fa1de334-854d-47ce-bf49-168eb0fd1525";
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e745997c-a093-4550-88ee-8be777f07236";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_border_size";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_border_color_hover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1px";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#c0c0c0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border size of text inputs.";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border hover color (and opacity) of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "a351407c-d45a-47ff-8689-e57a3d039ea8";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_border_color_hover_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#c0c0c0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border hover color (and opacity) of focused text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "7d45f668-28d4-4af5-87a7-31cc9c405a54";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
@ -1872,6 +1888,86 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border radius of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "387e0044-757c-454b-9947-49cea0cbba52";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_size";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline size of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8f8280d1-ea96-48b8-a273-25f9ef76251d";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_size_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline size on focus of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "868df9e8-64ce-4d43-8d97-bf94ade20755";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_size_hover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline size on hover of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6a5c1487-4e7b-4f3d-8d26-0176203a8730";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_size_hover_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline size on hover of focused text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1aaead90-f557-4c7f-9784-7919b1ff05e2";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_style";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "solid";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline style of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "ebcf01e6-f95a-4cae-a5e5-655c973aadfa";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_color";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#3daee9";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline color (and opacity) of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e8837d73-b912-4b1a-ad33-90660a467fd2";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_color_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#3daee9";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline focus color (and opacity) of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "e131b8fe-c5bc-4161-9792-ef4027dd2ecb";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_color_hover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#3daee9";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline hover color (and opacity) of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "33544ba5-8ce9-4e44-b8b1-c5bdfad6523b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_color_hover_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#3daee9";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline hover color (and opacity) of focused text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1818aab3-5171-4ca0-a9c1-3793c4dd7e8d";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_outline_radius";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline radius of text inputs.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "6dd82af4-090d-4e1f-87f6-1a74f7428c32";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "input_shadow_inner_color";
@ -1984,6 +2080,22 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the background color (and opacity) of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "21897088-7cc2-4ce8-abdf-9b14f9b12320";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_border_size";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border size of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "73d48a52-fa97-4d75-a4f1-4b1490e365b7";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_border_style";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "solid";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border style of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "f04fd86a-c223-4f79-ad7a-7c7d2bf4da72";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_border_color";
@ -1992,14 +2104,6 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border color (and opacity) of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1862ce18-ab7d-427e-9c88-8092e36ec66d";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_border_color_hover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#c0c0c0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border hover color (and opacity) of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "41c4bf75-4fd8-472b-a427-4f197e03791d";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_border_color_focus";
@ -2008,13 +2112,21 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border focus color (and opacity) of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "21897088-7cc2-4ce8-abdf-9b14f9b12320";
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1862ce18-ab7d-427e-9c88-8092e36ec66d";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_border_size";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_border_color_hover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "1px";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#c0c0c0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border size of text inputs on the login box.";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border hover color (and opacity) of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8641e9e1-63fc-44d0-89b0-a36bbac975c0";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_border_color_hover_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#c0c0c0";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border hover color (and opacity) of focused text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "bd186d94-3746-40aa-b477-2de2b14aea85";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
@ -2024,6 +2136,86 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the border radius of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "05d00640-dea3-459a-baad-74cc3619c48d";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_size";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline size of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "11cece92-a946-428a-9542-e93aa89cf15c";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_size_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline size on focus of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "9824eb32-0743-4170-a58b-209732eb2092";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_size_hover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline size on hover of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "aa1123d6-84d6-4d36-af2d-f53dc0c3dfbc";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_size_hover_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline size on hover of focused text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "02ae9203-8597-4b73-8252-a7bc303b7453";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_style";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "solid";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline style of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "36f33929-bb6e-4167-b88b-87d448681167";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_color";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#3daee9";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline color (and opacity) of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "fd829016-4f12-4e66-976b-dc8bcac7e12e";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_color_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#3daee9";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline focus color (and opacity) of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1aca5c89-f25e-43da-87ab-4e3f70179e9e";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_color_hover";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#3daee9";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline hover color (and opacity) of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "27fb9a8b-6780-4211-a12e-ca31c1561a7c";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_color_hover_focus";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#3daee9";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline hover color (and opacity) of focused text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "5b3c6a66-5959-4b2a-a58c-5533bd84854b";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_outline_radius";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "3px";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the outline radius of text inputs on the login box.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "0bf57ba9-b12f-4c50-8129-316ff5f136d4";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "login_input_shadow_inner_color";

View File

@ -107,6 +107,47 @@ $heading_count_text_color = $_SESSION['theme']['heading_count_text_color']['text
$heading_count_text_weight = $_SESSION['theme']['heading_count_text_weight']['text'] ?? '700';
$heading_count_border_radius = $_SESSION['theme']['heading_count_border_radius']['text'] ?? '10px';
$heading_count_background_color = $_SESSION['theme']['heading_count_background_color']['text'] ?? '#28a745';
$body_color = $_SESSION['theme']['body_color']['text'] ?? '#ffffff';
$body_border_radius = $_SESSION['theme']['body_border_radius']['text'] ?? null;
$body_shadow_color = isset($_SESSION['theme']['body_shadow_color']['text']) ? '0 1px 4px '.$_SESSION['theme']['body_shadow_color']['text'] : 'none';
$body_text_color = $_SESSION['theme']['body_text_color']['text'] ?? '#5f5f5f';
$body_text_size = $_SESSION['theme']['body_text_size']['text'] ?? '12px';
$body_text_font = $_SESSION['theme']['body_text_font']['text'] ?? 'arial';
$body_width = $_SESSION['theme']['body_width']['text'] ?? '90%';
$heading_text_color = $_SESSION['theme']['heading_text_color']['text'] ?? '#952424';
$heading_text_size = $_SESSION['theme']['heading_text_size']['text'] ?? '15px';
$heading_text_font = $_SESSION['theme']['heading_text_font']['text'] ?? 'arial';
$input_text_font = $_SESSION['theme']['input_text_font']['text'] ?? 'Arial';
$input_text_size = $_SESSION['theme']['input_text_size']['text'] ?? '12px';
$input_text_color = $_SESSION['theme']['input_text_color']['text'] ?? '#000';
$input_text_placeholder_color = $_SESSION['theme']['input_text_placeholder_color']['text'] ?? '#999999; opacity: 1.0;';
$input_border_size = $_SESSION['theme']['input_border_size']['text'] ?? '1px';
$input_border_style = $_SESSION['theme']['input_border_style']['text'] ?? 'solid';
$input_border_color = $_SESSION['theme']['input_border_color']['text'] ?? '#c0c0c0';
$input_border_color_focus = $_SESSION['theme']['input_border_color_focus']['text'] ?? '#c0c0c0';
$input_border_color_hover = $_SESSION['theme']['input_border_color_hover']['text'] ?? '#c0c0c0';
$input_border_color_hover_focus = $_SESSION['theme']['input_border_color_hover_focus']['text'] ?? '#c0c0c0';
$input_border_radius = $_SESSION['theme']['input_border_radius']['text'] ?? null;
$input_outline_size = $_SESSION['theme']['input_outline_size']['text'] ?? '3px';
$input_outline_size_focus = $_SESSION['theme']['input_outline_size_focus']['text'] ?? $input_outline_size;
$input_outline_size_hover = $_SESSION['theme']['input_outline_size_hover']['text'] ?? $input_outline_size;
$input_outline_size_hover_focus = $_SESSION['theme']['input_outline_size_hover_focus']['text'] ?? $input_outline_size;
$input_outline_style = $_SESSION['theme']['input_outline_style']['text'] ?? null;
$input_outline_color = $_SESSION['theme']['input_outline_color']['text'] ?? 'transparent';
$input_outline_color_focus = $_SESSION['theme']['input_outline_color_focus']['text'] ?? $input_outline_color;
$input_outline_color_hover = $_SESSION['theme']['input_outline_color_hover']['text'] ?? $input_outline_color;
$input_outline_color_hover_focus = $_SESSION['theme']['input_outline_color_hover_focus']['text'] ?? $input_outline_color;
$input_outline_radius = $_SESSION['theme']['input_outline_radius']['text'] ?? $input_border_radius ?? null;
$input_background_color = $_SESSION['theme']['input_background_color']['text'] ?? '#fff';
$input_shadow_inner_color = isset($_SESSION['theme']['input_shadow_inner_color']['text']) ? '0 0 3px '.$_SESSION['theme']['input_shadow_inner_color']['text'].' inset' : null;
$input_shadow_inner_color_focus = isset($_SESSION['theme']['input_shadow_inner_color_focus']['text']) ? '0 0 3px '.$_SESSION['theme']['input_shadow_inner_color_focus']['text'].' inset' : null;
$input_shadow_outer_color = isset($_SESSION['theme']['input_shadow_outer_color']['text']) ? '0 0 5px '.$_SESSION['theme']['input_shadow_outer_color']['text'] : null;
$input_shadow_outer_color_focus = isset($_SESSION['theme']['input_shadow_outer_color_focus']['text']) ? '0 0 5px '.$_SESSION['theme']['input_shadow_outer_color_focus']['text'] : null;
$input_toggle_style = $_SESSION['theme']['input_toggle_style']['text'] ?? 'switch_round';
$input_toggle_switch_background_color_true = $_SESSION['theme']['input_toggle_switch_background_color_true']['text'] ?? '#2e82d0';
$input_toggle_switch_background_color_false = $_SESSION['theme']['input_toggle_switch_background_color_false']['text'] ?? $input_border_color;
$input_toggle_switch_handle_symbol = $_SESSION['theme']['input_toggle_switch_handle_symbol']['boolean'] ?? 'false';
$input_toggle_switch_handle_color = $_SESSION['theme']['input_toggle_switch_handle_color']['text'] ?? '#ffffff';
$login_body_top = $_SESSION['theme']['login_body_top']['text'] ?? '50%';
$login_body_left = $_SESSION['theme']['login_body_left']['text'] ?? '50%';
$login_body_padding = $_SESSION['theme']['login_body_padding']['text'] ?? '30px';
@ -121,39 +162,30 @@ $login_link_text_color = $_SESSION['theme']['login_link_text_color']['text'] ??
$login_link_text_size = $_SESSION['theme']['login_link_text_size']['text'] ?? '11px';
$login_link_text_font = $_SESSION['theme']['login_link_text_font']['text'] ?? 'Arial';
$login_link_text_color_hover = $_SESSION['theme']['login_link_text_color_hover']['text'] ?? '#5082ca';
$body_color = $_SESSION['theme']['body_color']['text'] ?? '#ffffff';
$body_border_radius = $_SESSION['theme']['body_border_radius']['text'] ?? null;
$body_shadow_color = isset($_SESSION['theme']['body_shadow_color']['text']) ? '0 1px 4px '.$_SESSION['theme']['body_shadow_color']['text'] : 'none';
$body_text_color = $_SESSION['theme']['body_text_color']['text'] ?? '#5f5f5f';
$body_text_size = $_SESSION['theme']['body_text_size']['text'] ?? '12px';
$body_text_font = $_SESSION['theme']['body_text_font']['text'] ?? 'arial';
$body_width = $_SESSION['theme']['body_width']['text'] ?? '90%';
$heading_text_color = $_SESSION['theme']['heading_text_color']['text'] ?? '#952424';
$heading_text_size = $_SESSION['theme']['heading_text_size']['text'] ?? '15px';
$heading_text_font = $_SESSION['theme']['heading_text_font']['text'] ?? 'arial';
$input_text_placeholder_color = $_SESSION['theme']['input_text_placeholder_color']['text'] ?? '#999999; opacity: 1.0;';
$input_text_font = $_SESSION['theme']['input_text_font']['text'] ?? 'Arial';
$input_text_size = $_SESSION['theme']['input_text_size']['text'] ?? '12px';
$input_text_color = $_SESSION['theme']['input_text_color']['text'] ?? '#000';
$input_border_size = $_SESSION['theme']['input_border_size']['text'] ?? '1px';
$input_border_color = $_SESSION['theme']['input_border_color']['text'] ?? '#c0c0c0';
$input_border_color_hover_focus = $_SESSION['theme']['input_border_color_hover_focus']['text'] ?? '#c0c0c0';
$input_background_color = $_SESSION['theme']['input_background_color']['text'] ?? '#fff';
$input_shadow_inner_color = isset($_SESSION['theme']['input_shadow_inner_color']['text']) ? '0 0 3px '.$_SESSION['theme']['input_shadow_inner_color']['text'].' inset' : null;
$input_shadow_inner_color_focus = isset($_SESSION['theme']['input_shadow_inner_color_focus']['text']) ? '0 0 3px '.$_SESSION['theme']['input_shadow_inner_color_focus']['text'].' inset' : null;
$input_shadow_outer_color = isset($_SESSION['theme']['input_shadow_outer_color']['text']) ? '0 0 5px '.$_SESSION['theme']['input_shadow_outer_color']['text'] : null;
$input_shadow_outer_color_focus = isset($_SESSION['theme']['input_shadow_outer_color_focus']['text']) ? '0 0 5px '.$_SESSION['theme']['input_shadow_outer_color_focus']['text'] : null;
$input_border_radius = $_SESSION['theme']['input_border_radius']['text'] ?? null;
$input_border_color_hover = $_SESSION['theme']['input_border_color_hover']['text'] ?? '#c0c0c0';
$input_border_color_focus = $_SESSION['theme']['input_border_color_focus']['text'] ?? '#c0c0c0';
$login_text_color = $_SESSION['theme']['login_text_color']['text'] ?? '#282828';
$login_text_size = $_SESSION['theme']['login_text_size']['text'] ?? '12px';
$login_text_font = $_SESSION['theme']['login_text_font']['text'] ?? 'Arial';
$login_input_text_font = $_SESSION['theme']['login_input_text_font']['text'] ?? $input_text_font;
$login_input_text_size = $_SESSION['theme']['login_input_text_size']['text'] ?? $input_text_size;
$login_input_text_color = $_SESSION['theme']['login_input_text_color']['text'] ?? $input_text_color;
$login_input_text_placeholder_color = $_SESSION['theme']['login_input_text_placeholder_color']['text'] ?? $input_text_placeholder_color;
$login_input_border_size = $_SESSION['theme']['login_input_border_size']['text'] ?? $input_border_size;
$login_input_border_style = $_SESSION['theme']['login_input_border_style']['text'] ?? $input_border_style;
$login_input_border_color = $_SESSION['theme']['login_input_border_color']['text'] ?? $input_border_color;
$login_input_border_color_focus = $_SESSION['theme']['login_input_border_color_focus']['text'] ?? $input_border_color_focus;
$login_input_border_color_hover = $_SESSION['theme']['login_input_border_color_hover']['text'] ?? $input_border_color_hover;
$login_input_border_color_hover_focus = $_SESSION['theme']['login_input_border_color_hover_focus']['text'] ?? $input_border_color_hover_focus;
$login_input_border_radius = $_SESSION['theme']['login_input_border_radius']['text'] ?? $input_border_radius;
$login_input_outline_size = $_SESSION['theme']['login_input_outline_size']['text'] ?? $input_outline_size;
$login_input_outline_size_focus = $_SESSION['theme']['login_input_outline_size_focus']['text'] ?? $login_input_outline_size;
$login_input_outline_size_hover = $_SESSION['theme']['login_input_outline_size_hover']['text'] ?? $login_input_outline_size;
$login_input_outline_size_hover_focus = $_SESSION['theme']['login_input_outline_size_hover_focus']['text'] ?? $login_input_outline_size;
$login_input_outline_style = $_SESSION['theme']['login_input_outline_style']['text'] ?? $input_outline_style;
$login_input_outline_color = $_SESSION['theme']['login_input_outline_color']['text'] ?? $input_outline_color;
$login_input_outline_color_focus = $_SESSION['theme']['login_input_outline_color_focus']['text'] ?? $input_outline_color_focus;
$login_input_outline_color_hover = $_SESSION['theme']['login_input_outline_color_hover']['text'] ?? $input_outline_color_hover;
$login_input_outline_color_hover_focus = $_SESSION['theme']['login_input_outline_color_hover_focus']['text'] ?? $input_outline_color_hover_focus;
$login_input_outline_radius = $_SESSION['theme']['login_input_outline_radius']['text'] ?? $login_input_border_radius ?? null;
$login_input_background_color = $_SESSION['theme']['login_input_background_color']['text'] ?? $input_background_color;
$login_input_shadow_inner_color = $_SESSION['theme']['login_input_shadow_inner_color']['text'] ?? $input_shadow_inner_color;
$login_input_shadow_inner_color = $login_input_shadow_inner_color != 'none' ? '0 0 3px '.$login_input_shadow_inner_color.' inset' : 'none';
@ -163,16 +195,7 @@ $login_input_shadow_inner_color_focus = $_SESSION['theme']['login_input_shadow_i
$login_input_shadow_inner_color_focus = $login_input_shadow_inner_color_focus != 'none' ? '0 0 3px '.$login_input_shadow_inner_color_focus.' inset' : 'none';
$login_input_shadow_outer_color_focus = $_SESSION['theme']['login_input_shadow_outer_color_focus']['text'] ?? $input_shadow_outer_color_focus;
$login_input_shadow_outer_color_focus = $login_input_shadow_outer_color_focus != 'none' ? '0 0 5px '.$login_input_shadow_outer_color_focus : 'none';
$login_input_border_radius = $_SESSION['theme']['login_input_border_radius']['text'] ?? $input_border_radius;
$login_input_border_color_hover = $_SESSION['theme']['login_input_border_color_hover']['text'] ?? $input_border_color_hover;
$login_input_border_color_hover_focus = $_SESSION['theme']['login_input_border_color_hover_focus']['text'] ?? $input_border_color_hover_focus;
$login_input_text_placeholder_color = $_SESSION['theme']['login_input_text_placeholder_color']['text'] ?? $input_text_placeholder_color;
$pwstrength_background_color = $_SESSION['theme']['input_background_color']['text'] ?? 'rgb(245, 245, 245)';
$input_toggle_style = $_SESSION['theme']['input_toggle_style']['text'] ?? 'switch_round';
$input_toggle_switch_background_color_true = $_SESSION['theme']['input_toggle_switch_background_color_true']['text'] ?? '#2e82d0';
$input_toggle_switch_background_color_false = $_SESSION['theme']['input_toggle_switch_background_color_false']['text'] ?? $input_border_color;
$input_toggle_switch_handle_symbol = $_SESSION['theme']['input_toggle_switch_handle_symbol']['boolean'] ?? 'false';
$input_toggle_switch_handle_color = $_SESSION['theme']['input_toggle_switch_handle_color']['boolean'] ?? '#ffffff';
$table_heading_text_color = $_SESSION['theme']['table_heading_text_color']['text'] ?? '#3164ad';
$table_heading_text_size = $_SESSION['theme']['table_heading_text_size']['text'] ?? '12px';
$table_heading_text_font = $_SESSION['theme']['table_heading_text_font']['text'] ?? 'arial';
@ -1793,8 +1816,15 @@ else { //default: white
padding: 4px 6px;
margin: 1px;
border-width: <?=$input_border_size?>;
border-style: solid;
border-style: <?=$input_border_style?>;
border-color: <?=$input_border_color?>;
outline-width: <?=$input_outline_size?>;
<?php if (!empty($input_outline_style)) { ?>
outline-style: <?=$input_outline_style?>;
<?php } ?>
<?php if (!empty($input_outline_color)) { ?>
outline-color: <?=$input_outline_color?>;
<?php } ?>
background: <?=$input_background_color?>;
<?php
if (!empty($input_shadow_inner_color)) { $shadows[] = $input_shadow_inner_color; }
@ -1814,23 +1844,28 @@ else { //default: white
-khtml-border-radius: <?php echo $br['tl']['n'].$br['tl']['u']; ?> <?php echo $br['tr']['n'].$br['tr']['u']; ?> <?php echo $br['br']['n'].$br['br']['u']; ?> <?php echo $br['bl']['n'].$br['bl']['u']; ?>;
border-radius: <?php echo $br['tl']['n'].$br['tl']['u']; ?> <?php echo $br['tr']['n'].$br['tr']['u']; ?> <?php echo $br['br']['n'].$br['br']['u']; ?> <?php echo $br['bl']['n'].$br['bl']['u']; ?>;
<?php unset($br); ?>
<?php if (!empty($input_outline_radius)) { ?>
outline-radius: <?=$input_outline_radius?>
<?php } ?>
vertical-align: middle;
}
select.txt,
textarea.txt,
input[type=text].txt,
input[type=number].txt,
input[type=password].txt,
input[type=email].txt,
select.formfld,
textarea.formfld,
input[type=text].formfld,
input[type=number].formfld,
input[type=url].formfld,
input[type=password].formfld,
input[type=email].formfld {
transition: width 0.25s;
-moz-transition: width 0.25s;
-webkit-transition: width 0.25s;
transition: all 0.25s ease;
-moz-transition: all 0.25s ease;
-webkit-transition: all 0.25s ease;
}
select.txt,
@ -1846,12 +1881,14 @@ else { //default: white
}
}
select.txt:hover,
textarea.txt:hover,
input[type=text].txt:hover,
input[type=number].txt:hover,
input[type=password].txt:hover,
input[type=email].txt:hover,
label.txt:hover,
select.formfld:hover,
textarea.formfld:hover,
input[type=text].formfld:hover,
input[type=number].formfld:hover,
@ -1859,15 +1896,29 @@ else { //default: white
input[type=password].formfld:hover,
input[type=email].formfld:hover,
label.formfld:hover {
border-color: <?=$input_border_color_hover?>;
border: none !important;
border-width: <?=$input_border_size?> !important;
border-style: <?=$input_border_style?> !important;
border-color: <?=$input_border_color_hover?> !important;
<?php if (!empty($input_outline_size_hover)) { ?>
outline-width: <?=$input_outline_size_hover?> !important;
<?php } ?>
<?php if (!empty($input_outline_style)) { ?>
outline-style: <?=$input_outline_style?>;
<?php } ?>
<?php if (!empty($input_outline_color_hover)) { ?>
outline-color: <?=$input_outline_color_hover?> !important;
<?php } ?>
}
select.txt:focus,
textarea.txt:focus,
input[type=text].txt:focus,
input[type=number].txt:focus,
input[type=password].txt:focus,
input[type=email].txt:focus,
label.txt:focus,
select.formfld:focus,
textarea.formfld:focus,
input[type=text].formfld:focus,
input[type=number].formfld:focus,
@ -1875,7 +1926,10 @@ else { //default: white
input[type=password].formfld:focus,
input[type=email].formfld:focus,
label.formfld:focus {
border-color: <?=$input_border_color_focus?>;
border: none !important;
border-width: <?=$input_border_size?> !important;
border-style: <?=$input_border_style?> !important;
border-color: <?=$input_border_color_focus?> !important;
/* first clear */
-webkit-box-shadow: none;
-moz-box-shadow: none;
@ -1895,17 +1949,98 @@ else { //default: white
?>
}
select.txt:focus-visible,
textarea.txt:focus-visible,
input[type=text].txt:focus-visible,
input[type=number].txt:focus-visible,
input[type=password].txt:focus-visible,
input[type=email].txt:focus-visible,
label.txt:focus-visible,
select.formfld:focus-visible,
textarea.formfld:focus-visible,
input[type=text].formfld:focus-visible,
input[type=number].formfld:focus-visible,
input[type=url].formfld:focus-visible,
input[type=password].formfld:focus-visible,
input[type=email].formfld:focus-visible,
label.formfld:focus-visible {
<?php if (!empty($input_outline_size_focus)) { ?>
outline-width: <?=$input_outline_size_focus?> !important;
<?php } ?>
<?php if (!empty($input_outline_style)) { ?>
outline-style: <?=$input_outline_style?> !important;
<?php } ?>
<?php if (!empty($input_outline_color_focus)) { ?>
outline-color: <?=$input_outline_color_focus?> !important;
<?php } ?>
}
select.txt:hover:focus,
textarea.txt:hover:focus,
input[type=text].txt:hover:focus,
input[type=number].txt:hover:focus,
input[type=password].txt:hover:focus,
input[type=email].txt:hover:focus,
label.txt:hover:focus,
select.formfld:hover:focus,
textarea.formfld:hover:focus,
input[type=text].formfld:hover:focus,
input[type=number].formfld:hover:focus,
input[type=url].formfld:hover:focus,
input[type=password].formfld:hover:focus,
input[type=email].formfld:hover:focus,
label.formfld:hover:focus {
border: none !important;
border-width: <?=$input_border_size?> !important;
border-style: <?=$input_border_style?> !important;
border-color: <?=$input_border_color_hover_focus?> !important;
}
select.txt:hover:focus-visible,
textarea.txt:hover:focus-visible,
input[type=text].txt:hover:focus-visible,
input[type=number].txt:hover:focus-visible,
input[type=password].txt:hover:focus-visible,
input[type=email].txt:hover:focus-visible,
label.txt:hover:focus-visible,
select.formfld:hover:focus-visible,
textarea.formfld:hover:focus-visible,
input[type=text].formfld:hover:focus-visible,
input[type=number].formfld:hover:focus-visible,
input[type=url].formfld:hover:focus-visible,
input[type=password].formfld:hover:focus-visible,
input[type=email].formfld:hover:focus-visible,
label.formfld:hover:focus-visible {
<?php if (!empty($input_outline_size_hover_focus)) { ?>
outline-width: <?=$input_outline_size_hover_focus?> !important;
<?php } ?>
<?php if (!empty($input_outline_style)) { ?>
outline-style: <?=$input_outline_style?> !important;
<?php } ?>
<?php if (!empty($input_outline_color_hover_focus)) { ?>
outline-color: <?=$input_outline_color_hover_focus?> !important;
<?php } ?>
}
textarea.txt,
textarea.formfld {
resize: both;
}
input.login {
input.txt.login {
font-family: <?=$login_input_text_font?>;
font-size: <?=$login_input_text_size?>;
color: <?=$login_input_text_color?>;
border-width: <?=$login_input_border_size?>;
border-style: <?=$login_input_border_style?>;
border-color: <?=$login_input_border_color?>;
outline-width: <?=$login_input_outline_size?>;
<?php if (!empty($login_input_outline_style)) { ?>
outline-style: <?=$login_input_outline_style?>;
<?php } ?>
<?php if (!empty($login_input_outline_color)) { ?>
outline-color: <?=$login_input_outline_color?>;
<?php } ?>
background: <?=$login_input_background_color?>;
/* first clear */
-webkit-box-shadow: none;
@ -1930,14 +2065,32 @@ else { //default: white
-khtml-border-radius: <?php echo $br['tl']['n'].$br['tl']['u']; ?> <?php echo $br['tr']['n'].$br['tr']['u']; ?> <?php echo $br['br']['n'].$br['br']['u']; ?> <?php echo $br['bl']['n'].$br['bl']['u']; ?>;
border-radius: <?php echo $br['tl']['n'].$br['tl']['u']; ?> <?php echo $br['tr']['n'].$br['tr']['u']; ?> <?php echo $br['br']['n'].$br['br']['u']; ?> <?php echo $br['bl']['n'].$br['bl']['u']; ?>;
<?php unset($br); ?>
<?php if (!empty($login_input_outline_radius)) { ?>
outline-radius: <?=$login_input_outline_radius?>
<?php } ?>
}
input.login:hover {
border-color: <?=$login_input_border_color_hover?>;
input.txt.login:hover {
border: none !important;
border-width: <?=$login_input_border_size?> !important;
border-style: <?=$login_input_border_style?> !important;
border-color: <?=$login_input_border_color_hover?> !important;
<?php if (!empty($login_input_outline_size_hover)) { ?>
outline-width: <?=$login_input_outline_size_hover?> !important;
<?php } ?>
<?php if (!empty($login_input_outline_style)) { ?>
outline-style: <?=$login_input_outline_style?> !important;
<?php } ?>
<?php if (!empty($login_input_outline_color_hover)) { ?>
outline-color: <?=$login_input_outline_color_hover?> !important;
<?php } ?>
}
input.login:focus {
border-color: <?=$login_input_border_color_hover_focus?>;
input.txt.login:focus {
border: none !important;
border-width: <?=$login_input_border_size?> !important;
border-style: <?=$login_input_border_style?> !important;
border-color: <?=$login_input_border_color_focus?> !important;
/* first clear */
-webkit-box-shadow: none;
-moz-box-shadow: none;
@ -1957,12 +2110,45 @@ else { //default: white
?>
}
input.txt.login:focus-visible {
outline: none !important;
<?php if (!empty($login_input_outline_size_focus)) { ?>
outline-width: <?=$login_input_outline_size_focus?> !important;
<?php } ?>
<?php if (!empty($login_input_outline_style)) { ?>
outline-style: <?=$login_input_outline_style?> !important;
<?php } ?>
<?php if (!empty($login_input_outline_color_focus)) { ?>
outline-color: <?=$login_input_outline_color_focus?> !important;
<?php } ?>
}
input.txt.login:hover:focus {
border: none !important;
border-width: <?=$login_input_border_size?> !important;
border-style: <?=$login_input_border_style?> !important;
border-color: <?=$login_input_border_color_hover_focus?> !important;
}
input.txt.login:hover:focus-visible {
outline: none !important;
<?php if (!empty($login_input_outline_size_hover_focus)) { ?>
outline-width: <?=$login_input_outline_size_hover_focus?> !important;
<?php } ?>
<?php if (!empty($login_input_outline_style)) { ?>
outline-style: <?=$login_input_outline_style?> !important;
<?php } ?>
<?php if (!empty($login_input_outline_color_hover_focus)) { ?>
outline-color: <?=$login_input_outline_color_hover_focus?> !important;
<?php } ?>
}
/* style placeholder text (for browsers that support the attribute) - note: can't stack, each must be seperate */
input.login::-webkit-input-placeholder { color: <?=$login_input_text_placeholder_color?>; } /* chrome/opera/safari */
input.login::-moz-placeholder { color: <?=$login_input_text_placeholder_color?>; } /* ff 19+ */
input.login:-moz-placeholder { color: <?=$login_input_text_placeholder_color?>; } /* ff 18- */
input.login:-ms-input-placeholder { color: <?=$login_input_text_placeholder_color?>; } /* ie 10+ */
input.login::placeholder { color: <?=$login_input_text_placeholder_color?>; } /* official standard */
input.txt.login::-webkit-input-placeholder { color: <?=$login_input_text_placeholder_color?>; } /* chrome/opera/safari */
input.txt.login::-moz-placeholder { color: <?=$login_input_text_placeholder_color?>; } /* ff 19+ */
input.txt.login:-moz-placeholder { color: <?=$login_input_text_placeholder_color?>; } /* ff 18- */
input.txt.login:-ms-input-placeholder { color: <?=$login_input_text_placeholder_color?>; } /* ie 10+ */
input.txt.login::placeholder { color: <?=$login_input_text_placeholder_color?>; } /* official standard */
input[type=password].formfld_highlight_bad,
input[type=password].formfld_highlight_bad:hover,
@ -1999,9 +2185,9 @@ else { //default: white
width: 70px;
min-width: 70px;
margin-left: 15px;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
transition: all .5s ease;
-webkit-transition: all 0.25s ease;
-moz-transition: all 0.25s ease;
transition: all 0.25s ease;
}
input[type=text].list-search:focus {
@ -2141,8 +2327,9 @@ else { //default: white
<?php if ($input_toggle_style == 'switch_round') { ?>
border-radius: 22px;
<?php } ?>
-webkit-transition: .2s;
transition: .2s;
-webkit-transition: all 0.25s ease;
-moz-transition: all 0.25s ease;
transition: all 0.25s ease;
}
.slider:before { /* when disabled */
@ -2182,8 +2369,9 @@ else { //default: white
<?php if ($input_toggle_style == 'switch_round') { ?>
border-radius: 50%;
<?php } ?>
-webkit-transition: .2s;
transition: .2s;
-webkit-transition: all 0.25s ease;
-moz-transition: all 0.25s ease;
transition: all 0.25s ease;
}
input:checked + .slider { /* when enabled */
@ -3061,10 +3249,41 @@ else { //default: white
}
div.grid > div.box.contact-details {
padding: 15px;
border: 1px solid <?=$table_row_border_color?>;
border-radius: 5px;
background: <?=$table_row_background_color_dark?>;
<?php
if (isset($card_border_size) || !empty($card_border_color) || !empty($card_background_color) || !empty($card_shadow_color)) {
if (isset($card_border_size) && !empty($card_border_color)) {
echo "border: ".$card_border_size." solid ".$card_border_color.";\n";
}
else {
echo "border: none !important;\n";
}
if (isset($card_border_radius) || (isset($card_border_size) || !empty($card_border_color))) {
echo "-webkit-border-radius: ".$card_border_radius." !important;\n";
echo "-moz-border-radius: ".$card_border_radius." !important;\n";
echo "border-radius: ".$card_border_radius." !important;\n";
}
echo "padding: ".$card_padding.";\n";
if (!empty($card_background_color)) {
echo "background-color: " .$card_background_color.";\n";
}
if (!empty($card_shadow_color)) {
echo "-webkit-box-shadow: 0 2px ".($card_shadow_size ?? '7px')." ".$card_shadow_color.";\n";
echo "-moz-box-shadow: 0 2px ".($card_shadow_size ?? '7px')." ".$card_shadow_color.";\n";
echo "box-shadow: 0 2px ".($card_shadow_size ?? '7px')." ".$card_shadow_color.";\n";
}
}
else {
echo "border: 0;\n";
echo "-webkit-border-radius: 0 !important;\n";
echo "-moz-border-radius: 0 !important;\n";
echo "border-radius: 0 !important;\n";
echo "padding: 0;\n";
echo "background-color: none;\n";
echo "-webkit-box-shadow: none;\n";
echo "-moz-box-shadow: none;\n";
echo "box-shadow: none;\n";
}
?>
}
div.grid.contact-details {
@ -3207,9 +3426,9 @@ else { //default: white
break;
}
?>
-webkit-transition: all .2s ease;
-moz-transition: all .2s ease;
transition: all .2s ease;
-webkit-transition: all 0.25s ease;
-moz-transition: all 0.25s ease;
transition: all 0.25s ease;
}
<?php