mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Voicemail Greetings: List view updates.
This commit is contained in:
@@ -21,145 +21,85 @@ $text['title']['ru-ru'] = "";
|
||||
$text['title']['sv-se'] = "Röstbrevlåda Hälsningar";
|
||||
$text['title']['uk-ua'] = "Привітання";
|
||||
|
||||
$text['table-size']['en-us'] = "Size";
|
||||
$text['table-size']['ar-eg'] = "";
|
||||
$text['table-size']['de-at'] = "Größe"; //copied from de-de
|
||||
$text['table-size']['de-ch'] = "Größe"; //copied from de-de
|
||||
$text['table-size']['de-de'] = "Größe";
|
||||
$text['table-size']['es-cl'] = "Tamaño";
|
||||
$text['table-size']['es-mx'] = "Tamaño"; //copied from es-cl
|
||||
$text['table-size']['fr-ca'] = "Taille"; //copied from fr-fr
|
||||
$text['table-size']['fr-fr'] = "Taille";
|
||||
$text['table-size']['he-il'] = "גודל";
|
||||
$text['table-size']['it-it'] = "Dimensione";
|
||||
$text['table-size']['nl-nl'] = "Omvang";
|
||||
$text['table-size']['pl-pl'] = "Rozmiar";
|
||||
$text['table-size']['pt-br'] = "Tamanho"; //copied from pt-pt
|
||||
$text['table-size']['pt-pt'] = "Tamanho";
|
||||
$text['table-size']['ro-ro'] = "";
|
||||
$text['table-size']['ru-ru'] = "";
|
||||
$text['table-size']['sv-se'] = "Storlek";
|
||||
$text['table-size']['uk-ua'] = "Розмір";
|
||||
$text['label-size']['en-us'] = "Size";
|
||||
$text['label-size']['ar-eg'] = "";
|
||||
$text['label-size']['de-at'] = "Größe"; //copied from de-de
|
||||
$text['label-size']['de-ch'] = "Größe"; //copied from de-de
|
||||
$text['label-size']['de-de'] = "Größe";
|
||||
$text['label-size']['es-cl'] = "Tamaño";
|
||||
$text['label-size']['es-mx'] = "Tamaño"; //copied from es-cl
|
||||
$text['label-size']['fr-ca'] = "Taille"; //copied from fr-fr
|
||||
$text['label-size']['fr-fr'] = "Taille";
|
||||
$text['label-size']['he-il'] = "גודל";
|
||||
$text['label-size']['it-it'] = "Dimensione";
|
||||
$text['label-size']['nl-nl'] = "Omvang";
|
||||
$text['label-size']['pl-pl'] = "Rozmiar";
|
||||
$text['label-size']['pt-br'] = "Tamanho"; //copied from pt-pt
|
||||
$text['label-size']['pt-pt'] = "Tamanho";
|
||||
$text['label-size']['ro-ro'] = "";
|
||||
$text['label-size']['ru-ru'] = "";
|
||||
$text['label-size']['sv-se'] = "Storlek";
|
||||
$text['label-size']['uk-ua'] = "Розмір";
|
||||
|
||||
$text['table-number']['en-us'] = "#";
|
||||
$text['table-number']['ar-eg'] = "";
|
||||
$text['table-number']['de-at'] = "#"; //copied from de-de
|
||||
$text['table-number']['de-ch'] = "#"; //copied from de-de
|
||||
$text['table-number']['de-de'] = "#";
|
||||
$text['table-number']['es-cl'] = "Número";
|
||||
$text['table-number']['es-mx'] = "Número"; //copied from es-cl
|
||||
$text['table-number']['fr-ca'] = "Nombre"; //copied from fr-fr
|
||||
$text['table-number']['fr-fr'] = "Nombre";
|
||||
$text['table-number']['he-il'] = "#";
|
||||
$text['table-number']['it-it'] = "#";
|
||||
$text['table-number']['nl-nl'] = "Nummer";
|
||||
$text['table-number']['pl-pl'] = "liczba";
|
||||
$text['table-number']['pt-br'] = "Número"; //copied from pt-pt
|
||||
$text['table-number']['pt-pt'] = "Número";
|
||||
$text['table-number']['ro-ro'] = "";
|
||||
$text['table-number']['ru-ru'] = "";
|
||||
$text['table-number']['sv-se'] = "#";
|
||||
$text['table-number']['uk-ua'] = "кількість";
|
||||
$text['label-number']['en-us'] = "#";
|
||||
$text['label-number']['ar-eg'] = "#";
|
||||
$text['label-number']['de-at'] = "#"; //copied from de-de
|
||||
$text['label-number']['de-ch'] = "#"; //copied from de-de
|
||||
$text['label-number']['de-de'] = "#";
|
||||
$text['label-number']['es-cl'] = "Número";
|
||||
$text['label-number']['es-mx'] = "Número"; //copied from es-cl
|
||||
$text['label-number']['fr-ca'] = "Nombre"; //copied from fr-fr
|
||||
$text['label-number']['fr-fr'] = "Nombre";
|
||||
$text['label-number']['he-il'] = "#";
|
||||
$text['label-number']['it-it'] = "#";
|
||||
$text['label-number']['nl-nl'] = "Nummer";
|
||||
$text['label-number']['pl-pl'] = "liczba";
|
||||
$text['label-number']['pt-br'] = "Número"; //copied from pt-pt
|
||||
$text['label-number']['pt-pt'] = "Número";
|
||||
$text['label-number']['ro-ro'] = "#";
|
||||
$text['label-number']['ru-ru'] = "#";
|
||||
$text['label-number']['sv-se'] = "#";
|
||||
$text['label-number']['uk-ua'] = "кількість";
|
||||
|
||||
$text['table-name']['en-us'] = "Name";
|
||||
$text['table-name']['ar-eg'] = "";
|
||||
$text['table-name']['de-at'] = "Name"; //copied from de-de
|
||||
$text['table-name']['de-ch'] = "Name"; //copied from de-de
|
||||
$text['table-name']['de-de'] = "Name";
|
||||
$text['table-name']['es-cl'] = "Nombre";
|
||||
$text['table-name']['es-mx'] = "Nombre"; //copied from es-cl
|
||||
$text['table-name']['fr-ca'] = "Nom"; //copied from fr-fr
|
||||
$text['table-name']['fr-fr'] = "Nom";
|
||||
$text['table-name']['he-il'] = "שם";
|
||||
$text['table-name']['it-it'] = "Nome";
|
||||
$text['table-name']['nl-nl'] = "Naam";
|
||||
$text['table-name']['pl-pl'] = "Nazwa";
|
||||
$text['table-name']['pt-br'] = "Nome"; //copied from pt-pt
|
||||
$text['table-name']['pt-pt'] = "Nome";
|
||||
$text['table-name']['ro-ro'] = "";
|
||||
$text['table-name']['ru-ru'] = "";
|
||||
$text['table-name']['sv-se'] = "Namn";
|
||||
$text['table-name']['uk-ua'] = "Назва";
|
||||
$text['label-name']['en-us'] = "Name";
|
||||
$text['label-name']['ar-eg'] = "";
|
||||
$text['label-name']['de-at'] = "Name"; //copied from de-de
|
||||
$text['label-name']['de-ch'] = "Name"; //copied from de-de
|
||||
$text['label-name']['de-de'] = "Name";
|
||||
$text['label-name']['es-cl'] = "Nombre";
|
||||
$text['label-name']['es-mx'] = "Nombre"; //copied from es-cl
|
||||
$text['label-name']['fr-ca'] = "Nom"; //copied from fr-fr
|
||||
$text['label-name']['fr-fr'] = "Nom";
|
||||
$text['label-name']['he-il'] = "שם";
|
||||
$text['label-name']['it-it'] = "Nome";
|
||||
$text['label-name']['nl-nl'] = "Naam";
|
||||
$text['label-name']['pl-pl'] = "Nazwa";
|
||||
$text['label-name']['pt-br'] = "Nome"; //copied from pt-pt
|
||||
$text['label-name']['pt-pt'] = "Nome";
|
||||
$text['label-name']['ro-ro'] = "";
|
||||
$text['label-name']['ru-ru'] = "";
|
||||
$text['label-name']['sv-se'] = "Namn";
|
||||
$text['label-name']['uk-ua'] = "Назва";
|
||||
|
||||
$text['table-filename']['en-us'] = "File Name";
|
||||
$text['table-filename']['ar-eg'] = "";
|
||||
$text['table-filename']['de-at'] = "Dateiname"; //copied from de-de
|
||||
$text['table-filename']['de-ch'] = "Dateiname"; //copied from de-de
|
||||
$text['table-filename']['de-de'] = "Dateiname";
|
||||
$text['table-filename']['es-cl'] = "Nombre Del Archivo";
|
||||
$text['table-filename']['es-mx'] = "Nombre Del Archivo"; //copied from es-cl
|
||||
$text['table-filename']['fr-ca'] = "Nom de fichier"; //copied from fr-fr
|
||||
$text['table-filename']['fr-fr'] = "Nom de fichier";
|
||||
$text['table-filename']['he-il'] = "שם קובץ";
|
||||
$text['table-filename']['it-it'] = "Nome File";
|
||||
$text['table-filename']['nl-nl'] = "Bestandsnaam";
|
||||
$text['table-filename']['pl-pl'] = "Nazwa Pliku";
|
||||
$text['table-filename']['pt-br'] = "Nome Do Arquivo"; //copied from pt-pt
|
||||
$text['table-filename']['pt-pt'] = "Nome Do Arquivo";
|
||||
$text['table-filename']['ro-ro'] = "";
|
||||
$text['table-filename']['ru-ru'] = "";
|
||||
$text['table-filename']['sv-se'] = "Filnamn";
|
||||
$text['table-filename']['uk-ua'] = "ім'я Файлу";
|
||||
|
||||
$text['table-download']['en-us'] = "Download";
|
||||
$text['table-download']['ar-eg'] = "";
|
||||
$text['table-download']['de-at'] = "Download"; //copied from de-de
|
||||
$text['table-download']['de-ch'] = "Download"; //copied from de-de
|
||||
$text['table-download']['de-de'] = "Download";
|
||||
$text['table-download']['es-cl'] = "Descargar";
|
||||
$text['table-download']['es-mx'] = "Descargar"; //copied from es-cl
|
||||
$text['table-download']['fr-ca'] = "Télécharger"; //copied from fr-fr
|
||||
$text['table-download']['fr-fr'] = "Télécharger";
|
||||
$text['table-download']['he-il'] = "הורדה";
|
||||
$text['table-download']['it-it'] = "Scaricare";
|
||||
$text['table-download']['nl-nl'] = "Ophalen";
|
||||
$text['table-download']['pl-pl'] = "Numer";
|
||||
$text['table-download']['pt-br'] = "Número";
|
||||
$text['table-download']['pt-pt'] = "Descarregar";
|
||||
$text['table-download']['ro-ro'] = "";
|
||||
$text['table-download']['ru-ru'] = "";
|
||||
$text['table-download']['sv-se'] = "Ladda Ned";
|
||||
$text['table-download']['uk-ua'] = "Скачати";
|
||||
|
||||
$text['table-description']['en-us'] = "Description";
|
||||
$text['table-description']['ar-eg'] = "";
|
||||
$text['table-description']['de-at'] = "Beschreibung"; //copied from de-de
|
||||
$text['table-description']['de-ch'] = "Beschreibung"; //copied from de-de
|
||||
$text['table-description']['de-de'] = "Beschreibung";
|
||||
$text['table-description']['es-cl'] = "Descripción";
|
||||
$text['table-description']['es-mx'] = "Descripción"; //copied from es-cl
|
||||
$text['table-description']['fr-ca'] = "Description"; //copied from fr-fr
|
||||
$text['table-description']['fr-fr'] = "Description";
|
||||
$text['table-description']['he-il'] = "תיאור";
|
||||
$text['table-description']['it-it'] = "Descrizione";
|
||||
$text['table-description']['nl-nl'] = "Omschrijving";
|
||||
$text['table-description']['pl-pl'] = "Opis";
|
||||
$text['table-description']['pt-br'] = "Descrição"; //copied from pt-pt
|
||||
$text['table-description']['pt-pt'] = "Descrição";
|
||||
$text['table-description']['ro-ro'] = "";
|
||||
$text['table-description']['ru-ru'] = "";
|
||||
$text['table-description']['sv-se'] = "Beskrivning";
|
||||
$text['table-description']['uk-ua'] = "Опис";
|
||||
|
||||
$text['table-choose']['en-us'] = "Choose";
|
||||
$text['table-choose']['ar-eg'] = "";
|
||||
$text['table-choose']['de-at'] = "Wähle"; //copied from de-de
|
||||
$text['table-choose']['de-ch'] = "Wähle"; //copied from de-de
|
||||
$text['table-choose']['de-de'] = "Wähle";
|
||||
$text['table-choose']['es-cl'] = "Escoger";
|
||||
$text['table-choose']['es-mx'] = "Escoger"; //copied from es-cl
|
||||
$text['table-choose']['fr-ca'] = "Choisir"; //copied from fr-fr
|
||||
$text['table-choose']['fr-fr'] = "Choisir";
|
||||
$text['table-choose']['he-il'] = "בחר";
|
||||
$text['table-choose']['it-it'] = "Scegliere";
|
||||
$text['table-choose']['nl-nl'] = "Kiezen";
|
||||
$text['table-choose']['pl-pl'] = "Wybierz";
|
||||
$text['table-choose']['pt-br'] = "Escolher"; //copied from pt-pt
|
||||
$text['table-choose']['pt-pt'] = "Escolher";
|
||||
$text['table-choose']['ro-ro'] = "";
|
||||
$text['table-choose']['ru-ru'] = "";
|
||||
$text['table-choose']['sv-se'] = "Välj";
|
||||
$text['table-choose']['uk-ua'] = "Вибрати";
|
||||
$text['label-description']['en-us'] = "Description";
|
||||
$text['label-description']['ar-eg'] = "";
|
||||
$text['label-description']['de-at'] = "Beschreibung"; //copied from de-de
|
||||
$text['label-description']['de-ch'] = "Beschreibung"; //copied from de-de
|
||||
$text['label-description']['de-de'] = "Beschreibung";
|
||||
$text['label-description']['es-cl'] = "Descripción";
|
||||
$text['label-description']['es-mx'] = "Descripción"; //copied from es-cl
|
||||
$text['label-description']['fr-ca'] = "Description"; //copied from fr-fr
|
||||
$text['label-description']['fr-fr'] = "Description";
|
||||
$text['label-description']['he-il'] = "תיאור";
|
||||
$text['label-description']['it-it'] = "Descrizione";
|
||||
$text['label-description']['nl-nl'] = "Omschrijving";
|
||||
$text['label-description']['pl-pl'] = "Opis";
|
||||
$text['label-description']['pt-br'] = "Descrição"; //copied from pt-pt
|
||||
$text['label-description']['pt-pt'] = "Descrição";
|
||||
$text['label-description']['ro-ro'] = "";
|
||||
$text['label-description']['ru-ru'] = "";
|
||||
$text['label-description']['sv-se'] = "Beskrivning";
|
||||
$text['label-description']['uk-ua'] = "Опис";
|
||||
|
||||
$text['message-uploaded']['en-us'] = "Upload Complete";
|
||||
$text['message-uploaded']['ar-eg'] = "";
|
||||
@@ -181,26 +121,6 @@ $text['message-uploaded']['ru-ru'] = "";
|
||||
$text['message-uploaded']['sv-se'] = "Uppladdning Klar";
|
||||
$text['message-uploaded']['uk-ua'] = "Завантажено";
|
||||
|
||||
$text['message-unsupported_file_type']['en-us'] = "Unsupported File Type";
|
||||
$text['message-unsupported_file_type']['ar-eg'] = "";
|
||||
$text['message-unsupported_file_type']['de-at'] = "Nicht unterstütztes Dateiformat"; //copied from de-de
|
||||
$text['message-unsupported_file_type']['de-ch'] = "Nicht unterstütztes Dateiformat"; //copied from de-de
|
||||
$text['message-unsupported_file_type']['de-de'] = "Nicht unterstütztes Dateiformat";
|
||||
$text['message-unsupported_file_type']['es-cl'] = "Tipo de archivo no compatible";
|
||||
$text['message-unsupported_file_type']['es-mx'] = "Tipo de archivo no compatible"; //copied from es-cl
|
||||
$text['message-unsupported_file_type']['fr-ca'] = "Type de fichier non pris en charge"; //copied from fr-fr
|
||||
$text['message-unsupported_file_type']['fr-fr'] = "Type de fichier non pris en charge";
|
||||
$text['message-unsupported_file_type']['he-il'] = "סוג הקובץ לא נתמך";
|
||||
$text['message-unsupported_file_type']['it-it'] = "Tipo File Non Supportato";
|
||||
$text['message-unsupported_file_type']['nl-nl'] = "Niet ondersteund bestands type";
|
||||
$text['message-unsupported_file_type']['pl-pl'] = "Nieobsługiwany typ pliku";
|
||||
$text['message-unsupported_file_type']['pt-br'] = "Não suportado Tipo de Arquivo"; //copied from pt-pt
|
||||
$text['message-unsupported_file_type']['pt-pt'] = "Não suportado Tipo de Arquivo";
|
||||
$text['message-unsupported_file_type']['ro-ro'] = "";
|
||||
$text['message-unsupported_file_type']['ru-ru'] = "";
|
||||
$text['message-unsupported_file_type']['sv-se'] = "Filtypen Supporteras Inte";
|
||||
$text['message-unsupported_file_type']['uk-ua'] = "Тип файлу не підтримується";
|
||||
|
||||
$text['message-greeting_selected']['en-us'] = "Greeting Selected";
|
||||
$text['message-greeting_selected']['ar-eg'] = "";
|
||||
$text['message-greeting_selected']['de-at'] = "Begrüßung ausgewählt"; //copied from de-de
|
||||
@@ -401,6 +321,26 @@ $text['label-add']['ru-ru'] = "";
|
||||
$text['label-add']['sv-se'] = "Lägg Till Hälsning";
|
||||
$text['label-add']['uk-ua'] = "Додати привітання";
|
||||
|
||||
$text['label-selected']['en-us'] = "Selected";
|
||||
$text['label-selected']['ar-eg'] = "";
|
||||
$text['label-selected']['de-at'] = "Ausgewählt"; //copied from de-de
|
||||
$text['label-selected']['de-ch'] = "Ausgewählt"; //copied from de-de
|
||||
$text['label-selected']['de-de'] = "Ausgewählt";
|
||||
$text['label-selected']['es-cl'] = "Seleccionado";
|
||||
$text['label-selected']['es-mx'] = "Seleccionado"; //copied from es-cl
|
||||
$text['label-selected']['fr-ca'] = "Sélectionné"; //copied from fr-fr
|
||||
$text['label-selected']['fr-fr'] = "Sélectionné";
|
||||
$text['label-selected']['he-il'] = "";
|
||||
$text['label-selected']['it-it'] = "Selezionato";
|
||||
$text['label-selected']['nl-nl'] = "";
|
||||
$text['label-selected']['pl-pl'] = "Wybrane";
|
||||
$text['label-selected']['pt-br'] = "Selecionado"; //copied from pt-pt
|
||||
$text['label-selected']['pt-pt'] = "Selecionado";
|
||||
$text['label-selected']['ro-ro'] = "";
|
||||
$text['label-selected']['ru-ru'] = "Выбор";
|
||||
$text['label-selected']['sv-se'] = "Valt";
|
||||
$text['label-selected']['uk-ua'] = "";
|
||||
|
||||
$text['description-name']['en-us'] = "A name for the greeting (not parsed).";
|
||||
$text['description-name']['ar-eg'] = "";
|
||||
$text['description-name']['de-at'] = "Ein Namen für die Begrüßung."; //copied from de-de
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
<?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-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
|
||||
//define the voicemail greetings class
|
||||
if (!class_exists('voicemail_greetings')) {
|
||||
class voicemail_greetings {
|
||||
|
||||
/**
|
||||
* declare private variables
|
||||
*/
|
||||
private $app_name;
|
||||
private $app_uuid;
|
||||
private $permission_prefix;
|
||||
private $list_page;
|
||||
private $table;
|
||||
private $uuid_prefix;
|
||||
|
||||
/**
|
||||
* declare public variables
|
||||
*/
|
||||
public $voicemail_id;
|
||||
|
||||
/**
|
||||
* called when the object is created
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
//assign private variables
|
||||
$this->app_name = 'voicemail_greetings';
|
||||
$this->app_uuid = 'e4b4fbee-9e4d-8e46-3810-91ba663db0c2';
|
||||
$this->permission_prefix = 'voicemail_greeting_';
|
||||
if (is_numeric($this->voicemail_id)) {
|
||||
$this->list_page = 'voicemail_greetings.php?id='.urlencode($this->voicemail_id).'&back='.urlencode(PROJECT_PATH.'/app/voicemail/voicemails.php');
|
||||
}
|
||||
else {
|
||||
$this->list_page = PROJECT_PATH.'/app/voicemails/voicemails.php';
|
||||
}
|
||||
$this->table = 'voicemail_greetings';
|
||||
$this->uuid_prefix = 'voicemail_greeting_';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* called when there are no references to a particular object
|
||||
* unset the variables used in the class
|
||||
*/
|
||||
public function __destruct() {
|
||||
foreach ($this as $key => $value) {
|
||||
unset($this->$key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* delete records
|
||||
*/
|
||||
public function delete($records) {
|
||||
if (permission_exists($this->permission_prefix.'delete')) {
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
|
||||
//check voicemail id
|
||||
if (!is_numeric($this->voicemail_id)) {
|
||||
header('Location: '.$this->list_page);
|
||||
exit;
|
||||
}
|
||||
|
||||
//delete multiple records
|
||||
if (is_array($records) && @sizeof($records) != 0) {
|
||||
|
||||
//filter out unchecked records
|
||||
foreach ($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
||||
//get necessary greeting details
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, greeting_filename from v_".$this->table." ";
|
||||
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
foreach ($rows as $row) {
|
||||
$greeting_filenames[$row['uuid']] = $row['greeting_filename'];
|
||||
}
|
||||
}
|
||||
unset($sql, $parameters, $rows, $row);
|
||||
}
|
||||
|
||||
//set the greeting directory
|
||||
$greeting_directory = $_SESSION['switch']['storage']['dir'].'/voicemail/default/'.$_SESSION['domains'][$_SESSION['domain_uuid']]['domain_name'].'/'.$this->voicemail_id;
|
||||
|
||||
//loop through greetings
|
||||
if (is_array($greeting_filenames) && @sizeof($greeting_filenames) != 0) {
|
||||
$x = 0;
|
||||
foreach ($greeting_filenames as $voicemail_greeting_uuid => $greeting_filename) {
|
||||
|
||||
//delete the recording file
|
||||
@unlink($greeting_directory.'/'.$greeting_filename);
|
||||
|
||||
|
||||
//build the delete array
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $voicemail_greeting_uuid;
|
||||
$array[$this->table][$x]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$x++;
|
||||
}
|
||||
}
|
||||
|
||||
//delete the checked rows
|
||||
if (is_array($array) && @sizeof($array) != 0) {
|
||||
|
||||
//execute delete
|
||||
$database = new database;
|
||||
$database->app_name = $this->app_name;
|
||||
$database->app_uuid = $this->app_uuid;
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
}
|
||||
unset($records);
|
||||
}
|
||||
}
|
||||
} //method
|
||||
|
||||
} //class
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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-2018
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -81,7 +81,6 @@
|
||||
|
||||
//download the greeting
|
||||
if ($_GET['a'] == "download" && (permission_exists('voicemail_greeting_play') || permission_exists('voicemail_greeting_download'))) {
|
||||
session_cache_limiter('public');
|
||||
if ($_GET['type'] == "rec") {
|
||||
$voicemail_greeting_uuid = $_GET['uuid'];
|
||||
//get voicemail greeting details from db
|
||||
@@ -138,70 +137,81 @@
|
||||
}
|
||||
|
||||
//upload the greeting
|
||||
if (permission_exists('voicemail_greeting_upload')) {
|
||||
if ($_POST['submit'] == $text['button-upload'] && $_POST['type'] == 'rec' && is_uploaded_file($_FILES['file']['tmp_name'])) {
|
||||
if (
|
||||
$_POST['a'] == "upload"
|
||||
&& permission_exists('voicemail_greeting_upload')
|
||||
&& $_POST['type'] == 'rec'
|
||||
&& is_uploaded_file($_FILES['file']['tmp_name'])
|
||||
) {
|
||||
|
||||
//get the file extension
|
||||
$file_ext = substr($_FILES['file']['name'], -4);
|
||||
|
||||
//check file extension
|
||||
if ($file_ext == '.wav' || $file_ext != '.mp3') {
|
||||
|
||||
//find the next available
|
||||
for ($i = 1; $i < 10; $i++) {
|
||||
|
||||
//set the file name
|
||||
$file_name = 'greeting_'.$i.$file_ext;
|
||||
|
||||
//check the database
|
||||
if (is_uuid($domain_uuid) && is_numeric($voicemail_id) ) {
|
||||
$sql = "select count(*) from v_voicemail_greetings ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and voicemail_id = :voicemail_id ";
|
||||
$sql .= "and greeting_filename = :greeting_filename ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['voicemail_id'] = $voicemail_id;
|
||||
$parameters['greeting_filename'] = $file_name;
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
if ($num_rows == 0 && !file_exists($v_greeting_dir.'/'.$file_name)) {
|
||||
//move the uploaded greeting
|
||||
event_socket_mkdir($v_greeting_dir);
|
||||
if ($file_ext == '.wav' || $file_ext == '.mp3') {
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], $v_greeting_dir.'/'.$file_name);
|
||||
}
|
||||
//set newly uploaded greeting as active greeting for voicemail box
|
||||
$sql = "update v_voicemails ";
|
||||
$sql .= "set greeting_id = :greeting_id ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and voicemail_id = :voicemail_id ";
|
||||
$parameters['greeting_id'] = $i;
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['voicemail_id'] = $voicemail_id;
|
||||
$database = new database;
|
||||
$database->execute($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
//set message
|
||||
message::add($text['message-uploaded'].": ".$_FILES['file']['name']);
|
||||
//found available id, exit;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
continue;
|
||||
}
|
||||
unset($num_rows);
|
||||
}
|
||||
|
||||
}
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
message::add($text['message-invalid_token'],'negative');
|
||||
header('Location: voicemail_greetings.php?id='.urlencode($voicemail_id));
|
||||
exit;
|
||||
}
|
||||
|
||||
//set the file name to be inserted as the greeting description
|
||||
$greeting_description = base64_encode($_FILES['file']['name']);
|
||||
header("Location: voicemail_greetings.php?id=".$voicemail_id."&order_by=".$order_by."&order=".$order."&gd=".$greeting_description);
|
||||
exit;
|
||||
//get the file extension
|
||||
$file_ext = substr($_FILES['file']['name'], -4);
|
||||
|
||||
//check file extension
|
||||
if ($file_ext == '.wav' || $file_ext != '.mp3') {
|
||||
|
||||
//find the next available
|
||||
for ($i = 1; $i < 10; $i++) {
|
||||
|
||||
//set the file name
|
||||
$file_name = 'greeting_'.$i.$file_ext;
|
||||
|
||||
//check the database
|
||||
if (is_uuid($domain_uuid) && is_numeric($voicemail_id) ) {
|
||||
$sql = "select count(*) from v_voicemail_greetings ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and voicemail_id = :voicemail_id ";
|
||||
$sql .= "and greeting_filename = :greeting_filename ";
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['voicemail_id'] = $voicemail_id;
|
||||
$parameters['greeting_filename'] = $file_name;
|
||||
$database = new database;
|
||||
$num_rows = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
|
||||
if ($num_rows == 0 && !file_exists($v_greeting_dir.'/'.$file_name)) {
|
||||
//move the uploaded greeting
|
||||
event_socket_mkdir($v_greeting_dir);
|
||||
if ($file_ext == '.wav' || $file_ext == '.mp3') {
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], $v_greeting_dir.'/'.$file_name);
|
||||
}
|
||||
//set newly uploaded greeting as active greeting for voicemail box
|
||||
$sql = "update v_voicemails ";
|
||||
$sql .= "set greeting_id = :greeting_id ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
$sql .= "and voicemail_id = :voicemail_id ";
|
||||
$parameters['greeting_id'] = $i;
|
||||
$parameters['domain_uuid'] = $domain_uuid;
|
||||
$parameters['voicemail_id'] = $voicemail_id;
|
||||
$database = new database;
|
||||
$database->execute($sql, $parameters);
|
||||
unset($sql, $parameters);
|
||||
//set message
|
||||
message::add($text['message-uploaded'].": ".$_FILES['file']['name']);
|
||||
//found available id, exit;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
continue;
|
||||
}
|
||||
unset($num_rows);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//set the file name to be inserted as the greeting description
|
||||
$greeting_description = base64_encode($_FILES['file']['name']);
|
||||
header("Location: voicemail_greetings.php?id=".urlencode($voicemail_id)."&order_by=".urlencode($order_by)."&order=".urlencode($order)."&gd=".$greeting_description);
|
||||
exit;
|
||||
}
|
||||
|
||||
//check the permission
|
||||
@@ -347,6 +357,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
//get the http post data
|
||||
if (is_array($_POST['voicemail_greetings'])) {
|
||||
$action = $_POST['action'];
|
||||
$voicemail_id = $_POST['voicemail_id'];
|
||||
$voicemail_greetings = $_POST['voicemail_greetings'];
|
||||
}
|
||||
|
||||
//process the http post data by action
|
||||
if ($action != '' && is_array($voicemail_greetings) && @sizeof($voicemail_greetings) != 0) {
|
||||
switch ($action) {
|
||||
case 'delete':
|
||||
if (permission_exists('voicemail_greeting_delete')) {
|
||||
$obj = new voicemail_greetings;
|
||||
$obj->voicemail_id = $voicemail_id;
|
||||
$obj->delete($voicemail_greetings);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
header('Location: voicemail_greetings.php?id='.urlencode($voicemail_id).'&back='.urlencode(PROJECT_PATH.'/app/voicemails/voicemails.php'));
|
||||
exit;
|
||||
}
|
||||
|
||||
//get the greetings list
|
||||
$sql = "select * from v_voicemail_greetings ";
|
||||
$sql .= "where domain_uuid = :domain_uuid ";
|
||||
@@ -356,98 +389,132 @@
|
||||
$parameters['voicemail_id'] = $voicemail_id;
|
||||
$database = new database;
|
||||
$greetings = $database->select($sql, $parameters, 'all');
|
||||
$num_rows = is_array($greetings) ? @sizeof($greetings) : 0;
|
||||
unset($sql, $parameters);
|
||||
|
||||
//set the row styles
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create($_SERVER['PHP_SELF']);
|
||||
|
||||
//include the header
|
||||
$document['title'] = $text['title'];
|
||||
require_once "resources/header.php";
|
||||
|
||||
//begin the content
|
||||
//file type check script
|
||||
echo "<script language='JavaScript' type='text/javascript'>\n";
|
||||
|
||||
echo " function check_filetype(file_input) {\n";
|
||||
echo " function check_file_type(file_input) {\n";
|
||||
echo " file_ext = file_input.value.substr((~-file_input.value.lastIndexOf('.') >>> 0) + 2);\n";
|
||||
echo " if (file_ext != 'mp3' && file_ext != 'wav' && file_ext != 'ogg' && file_ext != '') {\n";
|
||||
echo " display_message(\"".$text['message-unsupported_file_type']."\", 'negative', '2750');\n";
|
||||
echo " document.getElementById('form_upload').reset();\n";
|
||||
echo " }\n";
|
||||
echo " var selected_file_path = file_input.value;\n";
|
||||
echo " selected_file_path = selected_file_path.replace(\"C:\\\\fakepath\\\\\",'');\n";
|
||||
echo " document.getElementById('file_label').innerHTML = selected_file_path;\n";
|
||||
echo " document.getElementById('button_reset').style.display='inline';\n";
|
||||
echo " }\n";
|
||||
|
||||
echo "</script>";
|
||||
echo "<script language='JavaScript' type='text/javascript' src='".PROJECT_PATH."/resources/javascript/reset_file_input.js'></script>\n";
|
||||
|
||||
echo "<div style='float: right; white-space: nowrap;'>\n";
|
||||
//show the content
|
||||
echo "<div class='action_bar' id='action_bar'>\n";
|
||||
echo " <div class='heading'><b>".$text['title']." (".$num_rows.")</b></div>\n";
|
||||
echo " <div class='actions'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'style'=>'margin-right: 15px;','link'=>$_SESSION['back'][$_SERVER['PHP_SELF']]]);
|
||||
if (permission_exists('voicemail_greeting_upload')) {
|
||||
echo " <form name='frm' method='POST' enctype='multipart/form-data' action=''>\n";
|
||||
echo " <input type='hidden' name='id' value='".escape($voicemail_id)."'>\n";
|
||||
echo " <input type='hidden' name='type' value='rec'>\n";
|
||||
echo "<form id='form_upload' class='inline' method='post' enctype='multipart/form-data'>\n";
|
||||
echo "<input name='a' type='hidden' value='upload'>\n";
|
||||
echo "<input type='hidden' name='id' value='".escape($voicemail_id)."'>\n";
|
||||
echo "<input type='hidden' name='type' value='rec'>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$_SESSION['theme']['button_icon_add'],'id'=>'btn_add','onclick'=>"$(this).fadeOut(250, function(){ $('span#form_upload').fadeIn(250); document.getElementById('ulfile').click(); });"]);
|
||||
echo "<span id='form_upload' style='display: none;'>";
|
||||
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_upload_reset','onclick'=>"$('span#form_upload').fadeOut(250, function(){ document.getElementById('form_upload').reset(); $('#btn_add').fadeIn(250) });"]);
|
||||
echo "<input type='text' class='txt' style='width: 100px; cursor: pointer;' id='filename' placeholder='Select...' onclick=\"document.getElementById('ulfile').click(); this.blur();\" onfocus='this.blur();'>";
|
||||
echo "<input type='file' id='ulfile' name='file' style='display: none;' accept='.wav,.mp3,.ogg' onchange=\"document.getElementById('filename').value = this.files.item(0).name; check_file_type(this);\">";
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-upload'],'icon'=>$_SESSION['theme']['button_icon_upload']]);
|
||||
echo "</span>\n";
|
||||
echo "</form>";
|
||||
}
|
||||
echo " <input type='button' class='btn' alt='back' onclick=\"window.location='".$_SESSION['back'][$_SERVER['PHP_SELF']]."';\" value='".$text['button-back']."'> \n";
|
||||
if (permission_exists('voicemail_greeting_upload')) {
|
||||
echo " <input name='file' id='file' type='file' style='display: none;' onchange='check_filetype(this);'>";
|
||||
echo " <label id='file_label' for='file' class='txt' style='width: 200px; overflow: hidden; white-space: nowrap;'>".$text['label-select_a_file']."</label>\n";
|
||||
echo " <input id='button_reset' type='reset' class='btn' style='display: none;' value='".$text['button-reset']."' onclick=\"reset_file_input('file'); document.getElementById('file_label').innerHTML = '".$text['label-select_a_file']."'; this.style.display='none'; return true;\">\n";
|
||||
echo " <input name='submit' type='submit' class='btn' id='upload' value=\"".$text['button-upload']."\">\n";
|
||||
echo " </form>";
|
||||
if (permission_exists('voicemail_greeting_delete') && $greetings) {
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'onclick'=>"if (confirm('".$text['confirm-delete']."')) { list_action_set('delete'); list_form_submit('form_list'); } else { this.blur(); return false; }"]);
|
||||
}
|
||||
echo "</div>";
|
||||
echo "<span class='title'>".$text['title']."</span>\n";
|
||||
echo "<br><br>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div style='clear: both;'></div>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
echo $text['description']." <strong>".escape($voicemail_id)."</strong>\n";
|
||||
echo "<br /><br />\n";
|
||||
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<th width='2'> </th>\n";
|
||||
echo th_order_by('greeting_id', $text['table-number'], $order_by, $order, '', "width='20'", "id=".escape($voicemail_id));
|
||||
echo th_order_by('greeting_name', $text['table-name'], $order_by, $order, '', '', "id=".escape($voicemail_id));
|
||||
echo "<form id='form_list' method='post'>\n";
|
||||
echo "<input type='hidden' id='action' name='action' value=''>\n";
|
||||
echo "<input type='hidden' id='voicemail_id' name='voicemail_id' value='".escape($voicemail_id)."'>\n";
|
||||
|
||||
echo "<table class='list'>\n";
|
||||
echo "<tr class='list-header'>\n";
|
||||
$col_count = 0;
|
||||
if (permission_exists('voicemail_greeting_delete')) {
|
||||
echo " <th class='checkbox'>\n";
|
||||
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($greetings ?: "style='visibility: hidden;'").">\n";
|
||||
echo " </th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
echo "<th class='shrink center'>".$text['label-selected']."</th>\n";
|
||||
$col_count++;
|
||||
echo th_order_by('greeting_id', $text['label-number'], $order_by, $order, null, "class='center shrink'", "id=".urlencode($voicemail_id));
|
||||
$col_count++;
|
||||
echo th_order_by('greeting_name', $text['label-name'], $order_by, $order, null, null, "id=".urlencode($voicemail_id));
|
||||
$col_count++;
|
||||
if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
||||
echo th_order_by('greeting_filename', $text['table-filename'], $order_by, $order, '', '', "id=".escape($voicemail_id));
|
||||
echo "<th class='listhdr' style='text-align: right;' nowrap='nowrap'>".$text['table-size']."</th>\n";
|
||||
echo th_order_by('greeting_filename', $text['label-filename'], $order_by, $order, null, "class='hide-sm-dn'", "id=".urlencode($voicemail_id));
|
||||
$col_count++;
|
||||
}
|
||||
if (permission_exists('voicemail_greeting_play') || permission_exists('voicemail_greeting_download')) {
|
||||
echo "<th>".$text['label-tools']."</th>\n";
|
||||
echo "<th class='center'>".$text['label-tools']."</th>\n";
|
||||
$col_count++;
|
||||
}
|
||||
if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
||||
echo "<th class='center no-wrap hide-xs'>".$text['label-size']."</th>\n";
|
||||
echo "<th class='center no-wrap hide-xs'>".$text['label-uploaded']."</th>\n";
|
||||
$col_count += 2;
|
||||
}
|
||||
echo th_order_by('greeting_description', $text['label-description'], $order_by, $order, null, "class='hide-sm-dn pct-25'", "id=".urlencode($voicemail_id));
|
||||
if (permission_exists('voicemail_greeting_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'> </td>\n";
|
||||
}
|
||||
echo th_order_by('greeting_description', $text['table-description'], $order_by, $order, '', '', "id=".escape($voicemail_id));
|
||||
echo "<td align='right' width='21'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
//calculate colspan for progress bar
|
||||
$colspan = 7; //max
|
||||
if ($_SESSION['voicemail']['storage_type']['text'] == 'base64') { $colspan = $colspan - 2; }
|
||||
if (!(permission_exists('voicemail_greeting_edit') || permission_exists('voicemail_greeting_delete'))) { $colspan = $colspan - 1; }
|
||||
|
||||
if (is_array($greetings) && @sizeof($greetings) != 0) {
|
||||
foreach($greetings as $row) {
|
||||
$x = 0;
|
||||
foreach ($greetings as $row) {
|
||||
//playback progress bar
|
||||
if (permission_exists('voicemail_greeting_play')) {
|
||||
echo "<tr id='recording_progress_bar_".escape($row['voicemail_greeting_uuid'])."' style='display: none;'><td colspan='".$colspan."' class='".$row_style[$c]." playback_progress_bar_background'><span class='playback_progress_bar' id='recording_progress_".escape($row['voicemail_greeting_uuid'])."'></span></td></tr>\n";
|
||||
if (permission_exists('voicemail_greeting_play')) {
|
||||
echo "<tr class='list-row' id='recording_progress_bar_".escape($row['voicemail_greeting_uuid'])."' style='display: none;'><td class='playback_progress_bar_background' style='padding: 0; border: none;' colspan='".$col_count."'><span class='playback_progress_bar' id='recording_progress_".escape($row['voicemail_greeting_uuid'])."'></span></td><td class='description hide-sm-dn' style='border-bottom: none !important;'></td></tr>\n";
|
||||
echo "<tr class='list-row' style='display: none;'><td></td></tr>\n"; // dummy row to maintain alternating background color
|
||||
}
|
||||
if (permission_exists('voicemail_greeting_edit')) {
|
||||
$list_row_url = "voicemail_greeting_edit.php?id=".urlencode($row['voicemail_greeting_uuid'])."&voicemail_id=".urlencode($voicemail_id);
|
||||
}
|
||||
$tr_link = (permission_exists('voicemail_greeting_edit')) ? "href='voicemail_greeting_edit.php?id=".escape($row['voicemail_greeting_uuid'])."&voicemail_id=".escape($voicemail_id)."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td class='".$row_style[$c]." row_style_slim tr_link_void' width='30px;' valign='top'>";
|
||||
echo "<tr class='list-row' href='".$list_row_url."'>\n";
|
||||
if (permission_exists('voicemail_greeting_delete')) {
|
||||
echo " <td class='checkbox'>\n";
|
||||
echo " <input type='checkbox' name='voicemail_greetings[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
|
||||
echo " <input type='hidden' name='voicemail_greetings[$x][uuid]' value='".escape($row['voicemail_greeting_uuid'])."' />\n";
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td class='center no-link'>";
|
||||
$selected = ($row['greeting_id'] == $selected_greeting_id) ? true : false;
|
||||
echo "<input type='radio' onclick=\"window.location='".PROJECT_PATH."/app/voicemail_greetings/voicemail_greetings.php?id=".escape($voicemail_id)."&greeting_id=".escape($row['greeting_id'])."&action=set&order_by=".$order_by."&order=".$order."';\" name='greeting_id' value='".escape($row['greeting_id'])."' ".(($selected) ? "checked='checked'" : null)." style='margin-top: 7px;'>\n";
|
||||
echo "<input type='radio' onclick=\"window.location='".PROJECT_PATH."/app/voicemail_greetings/voicemail_greetings.php?id=".escape($voicemail_id)."&greeting_id=".escape($row['greeting_id'])."&action=set&order_by=".$order_by."&order=".$order."';\" name='greeting_id' value='".escape($row['greeting_id'])."' ".(($selected) ? "checked='checked'" : null)." style='display: block; width: 20px; height: auto; margin: auto calc(50% - 10px);'>\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='center'>".escape($row['greeting_id'])."</td>\n";
|
||||
echo " <td class='no-wrap'>";
|
||||
if (permission_exists('voicemail_greeting_edit')) {
|
||||
echo "<a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['greeting_name'])."</a>";
|
||||
}
|
||||
else {
|
||||
echo escape($row['greeting_name']);
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['greeting_id'])."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['greeting_name'])."</td>\n";
|
||||
if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".escape($row['greeting_filename'])."</td>\n";
|
||||
$tmp_filesize = filesize($v_greeting_dir.'/'.$row['greeting_filename']);
|
||||
$tmp_filesize = byte_convert($tmp_filesize);
|
||||
echo " <td class='".$row_style[$c]."' style='text-align: right;' nowrap>".$tmp_filesize."</td>\n";
|
||||
echo " <td class='hide-sm-dn'>".escape($row['greeting_filename'])."</td>\n";
|
||||
}
|
||||
if (permission_exists('voicemail_greeting_play') || permission_exists('voicemail_greeting_download')) {
|
||||
echo " <td valign='top' class='".$row_style[$c]." row_style_slim tr_link_void'>";
|
||||
echo " <td class='middle button center no-link no-wrap'>";
|
||||
if (permission_exists('voicemail_greeting_play')) {
|
||||
$greeting_file_path = $row['greeting_filename'];
|
||||
$greeting_file_name = strtolower(pathinfo($greeting_file_path, PATHINFO_BASENAME));
|
||||
@@ -458,32 +525,41 @@
|
||||
case "ogg" : $greeting_type = "audio/ogg"; break;
|
||||
}
|
||||
echo "<audio id='recording_audio_".escape($row['voicemail_greeting_uuid'])."' style='display: none;' preload='none' ontimeupdate=\"update_progress('".escape($row['voicemail_greeting_uuid'])."')\" onended=\"recording_reset('".escape($row['voicemail_greeting_uuid'])."');\" src=\"voicemail_greetings.php?id=".escape($voicemail_id)."&a=download&type=rec&uuid=".escape($row['voicemail_greeting_uuid'])."\" type='".$greeting_type."'></audio>";
|
||||
echo "<span id='recording_button_".escape($row['voicemail_greeting_uuid'])."' onclick=\"recording_play('".escape($row['voicemail_greeting_uuid'])."')\" title='".$text['label-play']." / ".$text['label-pause']."'>".$v_link_label_play."</span>";
|
||||
echo button::create(['type'=>'button','title'=>$text['label-play'].' / '.$text['label-pause'],'icon'=>$_SESSION['theme']['button_icon_play'],'id'=>'recording_button_'.escape($row['voicemail_greeting_uuid']),'onclick'=>"recording_play('".escape($row['voicemail_greeting_uuid'])."')"]);
|
||||
}
|
||||
if (permission_exists('voicemail_greeting_download')) {
|
||||
echo "<a href=\"voicemail_greetings.php?a=download&type=rec&t=bin&id=".escape($voicemail_id)."&uuid=".escape($row['voicemail_greeting_uuid'])."\" title='".$text['label-download']."'>".$v_link_label_download."</a>";
|
||||
echo button::create(['type'=>'button','title'=>$text['label-download'],'icon'=>$_SESSION['theme']['button_icon_download'],'link'=>"voicemail_greetings.php?a=download&type=rec&t=bin&id=".urlencode($voicemail_id)."&uuid=".escape($row['voicemail_greeting_uuid'])]);
|
||||
}
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " <td width='30%' valign='top' class='row_stylebg'>".escape($row['greeting_description'])." </td>\n";
|
||||
echo " <td class='list_control_icons'>\n";
|
||||
if (permission_exists('voicemail_greeting_edit')) {
|
||||
echo "<a href='voicemail_greeting_edit.php?id=".escape($row['voicemail_greeting_uuid'])."&voicemail_id=".escape($voicemail_id)."' alt='edit'>$v_link_label_edit</a>";
|
||||
if ($_SESSION['voicemail']['storage_type']['text'] != 'base64') {
|
||||
$file_size = byte_convert(filesize($v_greeting_dir.'/'.$row['greeting_filename']));
|
||||
$file_date = date("M d, Y H:i:s", filemtime($v_greeting_dir.'/'.$row['greeting_filename']));
|
||||
echo " <td class='center no-wrap hide-xs'>".$file_size."</td>\n";
|
||||
echo " <td class='center no-wrap hide-xs'>".$file_date."</td>\n";
|
||||
}
|
||||
if (permission_exists('voicemail_greeting_delete')) {
|
||||
echo "<a href='voicemail_greeting_delete.php?id=".escape($row['voicemail_greeting_uuid'])."&voicemail_id=".escape($voicemail_id)."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>";
|
||||
echo " <td class='description overflow hide-sm-dn'>".escape($row['greeting_description'])." </td>\n";
|
||||
if (permission_exists('voicemail_greeting_edit') && $_SESSION['theme']['list_row_edit_button']['boolean'] == 'true') {
|
||||
echo " <td class='action-button'>";
|
||||
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$_SESSION['theme']['button_icon_edit'],'link'=>$list_row_url]);
|
||||
echo " </td>\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
|
||||
$c = ($c) ? 0 : 1;
|
||||
/*
|
||||
echo "<a href='voicemail_greeting_delete.php?id=".escape($row['voicemail_greeting_uuid'])."&voicemail_id=".escape($voicemail_id)."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>";
|
||||
*/
|
||||
}
|
||||
unset($greetings);
|
||||
}
|
||||
unset($result, $row);
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br /><br /><br />\n";
|
||||
echo "<br />\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user