diff --git a/app/emails/app_config.php b/app/emails/app_config.php index 1fdc5c780a..273a67f124 100644 --- a/app/emails/app_config.php +++ b/app/emails/app_config.php @@ -14,7 +14,7 @@ $apps[$x]['description']['de-de'] = ""; $apps[$x]['description']['de-ch'] = ""; $apps[$x]['description']['de-at'] = ""; - $apps[$x]['description']['fr-fr'] = "Gérer les messages électroniques échoué."; + $apps[$x]['description']['fr-fr'] = "GÈrer les messages Èlectroniques ÈchouÈ."; $apps[$x]['description']['fr-ca'] = ""; $apps[$x]['description']['fr-ch'] = ""; $apps[$x]['description']['pt-pt'] = "Gerenciar mensagens de e-mail falhou."; @@ -38,6 +38,10 @@ $apps[$x]['permissions'][$y]['groups'][] = "admin"; $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; $y++; + $apps[$x]['permissions'][$y]['name'] = "emails_all"; + $apps[$x]['permissions'][$y]['groups'][] = "superadmin"; + $y++; + //schema details $y = 1; //table array index @@ -86,4 +90,4 @@ $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; -?> \ No newline at end of file +?> diff --git a/app/emails/emails.php b/app/emails/emails.php index 87268fb43f..0576798f06 100644 --- a/app/emails/emails.php +++ b/app/emails/emails.php @@ -63,7 +63,9 @@ else { if ($email_uuid != '') { $sql = "select email from v_emails "; $sql .= "where email_uuid = '".$email_uuid."' "; - $sql .= "and domain_uuid = '".$domain_uuid."' "; + if (!permission_exists('emails_all') || $_REQUEST['showall'] != 'true') { + $sql .= "and domain_uuid = '".$domain_uuid."' "; + } $prep_statement = $db->prepare(check_sql($sql)); $prep_statement->execute(); $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); @@ -89,7 +91,11 @@ else { $_SESSION["message_mood"] = 'negative'; $_SESSION["message_delay"] = '4'; //sec $_SESSION["message"] = $text['message-resend_failed'].": ".$mailer_error; - header("Location: emails.php"); + if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { + header("Location: emails.php?showall=true"); + } else { + header("Location: emails.php"); + } } } @@ -110,6 +116,11 @@ else { echo " ".$text['description-emails']; echo " \n"; echo " \n"; + if (permission_exists('emails_all')) { + if ($_REQUEST['showall'] != 'true') { + echo " \n"; + } + } echo " \n"; echo " \n"; echo " \n"; @@ -118,7 +129,11 @@ else { //prepare to page the results $sql = "select count(*) as num_rows from v_emails "; - $sql .= "where domain_uuid = '".$domain_uuid."' "; + if (permission_exists('emails_all')) { + if ($_REQUEST['showall'] != 'true') { + $sql .= "where domain_uuid = '".$domain_uuid."' "; + } + } $prep_statement = $db->prepare($sql); if ($prep_statement) { $prep_statement->execute(); @@ -128,7 +143,11 @@ else { //prepare to page the results $rows_per_page = 50; - $param = ""; + if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { + $param .= "&showall=true"; + } else { + $param = ""; + } $page = $_GET['page']; if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); @@ -136,7 +155,11 @@ else { //get the list $sql = "select * from v_emails "; - $sql .= "where domain_uuid = '".$domain_uuid."' "; + if (permission_exists('emails_all') && $_REQUEST['showall'] == 'true') { + $sql .= " join v_domains on v_emails.domain_uuid = v_domains.domain_uuid "; + } else { + $sql .= "where domain_uuid = '".$domain_uuid."' "; + } if (strlen($order_by)> 0) { $sql .= "order by ".$order_by." ".$order." "; } $sql .= "limit ".$rows_per_page." offset ".$offset." "; $prep_statement = $db->prepare(check_sql($sql)); @@ -152,9 +175,12 @@ else { echo "\n"; echo "\n"; - echo th_order_by('sent_date', $text['label-sent'], $order_by, $order); - echo th_order_by('type', $text['label-type'], $order_by, $order); - echo th_order_by('status', $text['label-status'], $order_by, $order); + if ($_REQUEST['showall'] == true && permission_exists('emails_all')) { + echo th_order_by('domain_name', $text['label-domain-name'], $order_by, $order, null, null, $param); + } + echo th_order_by('sent_date', $text['label-sent'], $order_by, $order, null, null, $param); + echo th_order_by('type', $text['label-type'], $order_by, $order, null, null, $param); + echo th_order_by('status', $text['label-status'], $order_by, $order, null, null, $param); echo "\n"; echo "\n"; echo "\n"; @@ -180,6 +206,10 @@ else { $tr_link = "href='email_view.php?id=".$row['email_uuid']."'"; echo "\n"; + if ($_REQUEST['showall'] == true && permission_exists('emails_all')) { + echo " \n"; + } + echo " \n"; echo " "; diff --git a/resources/templates/provision/yealink/t22p/y000000000005.cfg b/resources/templates/provision/yealink/t22p/y000000000005.cfg index b47609c381..96a4a75ec9 100644 --- a/resources/templates/provision/yealink/t22p/y000000000005.cfg +++ b/resources/templates/provision/yealink/t22p/y000000000005.cfg @@ -590,7 +590,7 @@ programablekey.1.history_type = programablekey.1.label = ########################################################################################## -## Expansion Key £¨For T38G only£© ## +## Expansion Key £¨For T38G only£© ## ########################################################################################## #X ranges from 1 to 6, Y ranges from 1 to 39. #expansion_module.x.key.y.type = 37 (Switch by default) @@ -1075,7 +1075,7 @@ phone_setting.lock = phone_setting.phone_lock.unlock_pin = phone_setting.phone_lock.lock_time_out = -#Configure the ring tone for the phone. System ring tones are: Ring1.wav (default), Ring2.wav¡­¡­Ring8.wav. +#Configure the ring tone for the phone. System ring tones are: Ring1.wav (default), Ring2.wav¡­¡­Ring8.wav. #You can configure the custom ring tone (Busy.wav) for the phone, the value is: phone_setting.ring_type = Busy.wav phone_setting.ring_type = @@ -1133,6 +1133,12 @@ phone_setting.mute_power_led_flash_enable = #Enable or disable the phone to flash the power LED when placing a calll on hold; 0-Disabled (default), 1-Enabled; phone_setting.hold_power_led_flash_enable = +####################################################################################### +## Directory Setting ## +####################################################################################### +#Configure the access URL of the directory setting file. +directory_setting.url = {$yealink_directory_setting_url} + ####################################################################################### ## Configure the access URL of firmware ## ####################################################################################### diff --git a/resources/templates/provision/yealink/t29g/y000000000046.cfg b/resources/templates/provision/yealink/t29g/y000000000046.cfg index 7e540ed1fe..9d7ea59c52 100644 --- a/resources/templates/provision/yealink/t29g/y000000000046.cfg +++ b/resources/templates/provision/yealink/t29g/y000000000046.cfg @@ -1525,7 +1525,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = +directory_setting.url = {$yealink_directory_setting_url} ####################################################################################### ## Configure the access URL of firmware ## diff --git a/resources/templates/provision/yealink/t42g/y000000000029.cfg b/resources/templates/provision/yealink/t42g/y000000000029.cfg index f255bf51cd..81150da5f7 100644 --- a/resources/templates/provision/yealink/t42g/y000000000029.cfg +++ b/resources/templates/provision/yealink/t42g/y000000000029.cfg @@ -1565,7 +1565,7 @@ super_search.url = ## Directory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = +directory_setting.url = {$yealink_directory_settingurl} ####################################################################################### ## Configure the access URL of firmware ## diff --git a/resources/templates/provision/yealink/t48g/y000000000035.cfg b/resources/templates/provision/yealink/t48g/y000000000035.cfg index 268aacde40..db5057e912 100644 --- a/resources/templates/provision/yealink/t48g/y000000000035.cfg +++ b/resources/templates/provision/yealink/t48g/y000000000035.cfg @@ -1565,7 +1565,7 @@ super_search.url = ## Sirectory Setting ## ####################################################################################### #Configure the access URL of the directory setting file. -directory_setting.url = +directory_setting.url = {$yealink_directory_setting_url} ####################################################################################### ## Configure the access URL of firmware ##
".$text['label-message']."".$text['label-reference']." 
".$row['domain_name'].""; $sent_date = explode('.', $row['sent_date']); echo $sent_date[0]; @@ -192,7 +222,11 @@ else { echo " ".$text['label-download']."  "; } if (permission_exists('email_resend')) { - echo " ".$text['label-resend'].""; + echo " " . $text['label-resend'].""; } echo "