Fax Server: Added interface to access (via IMAP or POP3) the inbound fax target email account. Required: PHP IMAP extension (obviously).

This commit is contained in:
Nate Jones
2014-11-27 13:37:08 +00:00
parent ecfea148d7
commit f3e726eeea
10 changed files with 839 additions and 633 deletions

View File

@@ -191,7 +191,7 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = "fax_destination_number"; $apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_destination_number";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++; $z++;
@@ -205,6 +205,38 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_connection_type";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "IMAP or POP3 connection.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_connection_host";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Server to connect to.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_connection_port";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Port to connect to.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_connection_security";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Enable SSL or TLS encryption.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_connection_validate";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Validate certificate or not.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_connection_username";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Username for authentication.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_connection_password";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Password for authentication.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_connection_mailbox";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Mailbox folder to read.";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_pin_number"; $apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_pin_number";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";

View File

@@ -140,6 +140,11 @@
$text['button-clear']['pt-pt'] = "Apagar"; $text['button-clear']['pt-pt'] = "Apagar";
$text['button-clear']['fr-fr'] = "Nettoyer"; $text['button-clear']['fr-fr'] = "Nettoyer";
$text['button-refresh']['en-us'] = "Refresh";
$text['button-refresh']['es-cl'] = "Actualizar";
$text['button-refresh']['pt-pt'] = "Actualizar";
$text['button-refresh']['fr-fr'] = "rafraîchir";
//fax_copy //fax_copy
$text['confirm-copy']['en-us'] = "Copy Complete"; $text['confirm-copy']['en-us'] = "Copy Complete";
$text['confirm-copy']['es-cl'] = "Copia Completada"; $text['confirm-copy']['es-cl'] = "Copia Completada";
@@ -193,10 +198,10 @@
$text['description-extension']['pt-pt'] = "Introduza aqui a extensão do fax"; $text['description-extension']['pt-pt'] = "Introduza aqui a extensão do fax";
$text['description-extension']['fr-fr'] = "Choisir un numéro d'extension."; $text['description-extension']['fr-fr'] = "Choisir un numéro d'extension.";
$text['description-destination-number']['en-us'] = "Enter the fax destination number"; $text['description-destination-number']['en-us'] = "Enter the fax destination number.";
$text['description-destination-number']['es-cl'] = "Ingrese el número de fax de destino"; $text['description-destination-number']['es-cl'] = "Ingrese el número de fax de destino.";
$text['description-destination-number']['pt-pt'] = "Introduza o número de fax para onde pretende enviar"; $text['description-destination-number']['pt-pt'] = "Introduza o número de fax para onde pretende enviar.";
$text['description-destination-number']['fr-fr'] = ""; $text['description-destination-number']['fr-fr'] = "Entrez le numéro de télécopie de destination.";
$text['description-email']['en-us'] = "Enter the email address to send the FAX to."; $text['description-email']['en-us'] = "Enter the email address to send the FAX to.";
$text['description-email']['es-cl'] = "Ingrese la dirección de email para enviar el fax."; $text['description-email']['es-cl'] = "Ingrese la dirección de email para enviar el fax.";
@@ -206,7 +211,97 @@
$text['description-info']['en-us'] = "Enter the description here."; $text['description-info']['en-us'] = "Enter the description here.";
$text['description-info']['es-cl'] = "Ingrese una descripción aquí."; $text['description-info']['es-cl'] = "Ingrese una descripción aquí.";
$text['description-info']['pt-pt'] = "Introduza aqui a descrição"; $text['description-info']['pt-pt'] = "Introduza aqui a descrição";
$text['description-info']['fr-fr'] = ""; $text['description-info']['fr-fr'] = "Entrez la description ici.";
$text['label-email_connection_type']['en-us'] = "Type";
$text['label-email_connection_type']['es-cl'] = "Tipo";
$text['label-email_connection_type']['pt-pt'] = "Tipo";
$text['label-email_connection_type']['fr-fr'] = "Type";
$text['description-email_connection_type']['en-us'] = "Select the type of connection.";
$text['description-email_connection_type']['es-cl'] = "Seleccione el tipo de conexión.";
$text['description-email_connection_type']['pt-pt'] = "Selecione o tipo de conexão.";
$text['description-email_connection_type']['fr-fr'] = "Sélectionnez le type de connexion.";
$text['label-email_connection_server']['en-us'] = "Server";
$text['label-email_connection_server']['es-cl'] = "Servidor";
$text['label-email_connection_server']['pt-pt'] = "Servidor";
$text['label-email_connection_server']['fr-fr'] = "Serveur";
$text['description-email_connection_server']['en-us'] = "Enter the host address and port.";
$text['description-email_connection_server']['es-cl'] = "Introduzca la dirección de host y el puerto.";
$text['description-email_connection_server']['pt-pt'] = "Digite o endereço de host e porta.";
$text['description-email_connection_server']['fr-fr'] = "Entrez l'adresse hôte et le port.";
$text['label-email_connection_security']['en-us'] = "Security";
$text['label-email_connection_security']['es-cl'] = "seguridad";
$text['label-email_connection_security']['pt-pt'] = "Segurança";
$text['label-email_connection_security']['fr-fr'] = "Sécurité";
$text['description-email_connection_security']['en-us'] = "Select the required security.";
$text['description-email_connection_security']['es-cl'] = "Seleccione la seguridad requerida.";
$text['description-email_connection_security']['pt-pt'] = "Selecione a segurança necessária.";
$text['description-email_connection_security']['fr-fr'] = "Sélectionnez la sécurité requise.";
$text['label-email_connection_validate']['en-us'] = "Validate Certificate";
$text['label-email_connection_validate']['es-cl'] = "Validar Certificado";
$text['label-email_connection_validate']['pt-pt'] = "Validar Certificado";
$text['label-email_connection_validate']['fr-fr'] = "Valider le Certificat";
$text['description-email_connection_validate']['en-us'] = "Enable server certificate validation (select 'False' for self-signed certificates).";
$text['description-email_connection_validate']['es-cl'] = "Activar la validación del certificado del servidor (seleccione 'Falso' para certificados con firma).";
$text['description-email_connection_validate']['pt-pt'] = "Habilitar a validação do certificado do servidor (selecione 'Não' para os certificados auto-assinados).";
$text['description-email_connection_validate']['fr-fr'] = "Activer la validation du certificat du serveur (sélectionner 'Non' pour les certificats auto-signés).";
$text['label-email_connection_username']['en-us'] = "Username";
$text['label-email_connection_username']['es-cl'] = "Nombre de usuario";
$text['label-email_connection_username']['pt-pt'] = "Nome de Usuário";
$text['label-email_connection_username']['fr-fr'] = "Nom d'utilisateur";
$text['description-email_connection_username']['en-us'] = "Enter the authentication username.";
$text['description-email_connection_username']['es-cl'] = "Introduzca el nombre de usuario de autenticación.";
$text['description-email_connection_username']['pt-pt'] = "Digite o nome de usuário de autenticação.";
$text['description-email_connection_username']['fr-fr'] = "Entrez le nom d'utilisateur d'authentification.";
$text['label-email_connection_password']['en-us'] = "Password";
$text['label-email_connection_password']['es-cl'] = "Contraseña";
$text['label-email_connection_password']['pt-pt'] = "Senha";
$text['label-email_connection_password']['fr-fr'] = "Mot de Passe";
$text['description-email_connection_password']['en-us'] = "Enter the authentication password.";
$text['description-email_connection_password']['es-cl'] = "Introduzca la contraseña de autenticación.";
$text['description-email_connection_password']['pt-pt'] = "Digite a senha de autenticação.";
$text['description-email_connection_password']['fr-fr'] = "Entrez le mot de passe d'authentification.";
$text['label-email_connection_mailbox']['en-us'] = "Mailbox Folder";
$text['label-email_connection_mailbox']['es-cl'] = "Carpeta Buzón";
$text['label-email_connection_mailbox']['pt-pt'] = "Pasta Caixa";
$text['label-email_connection_mailbox']['fr-fr'] = "Dossier Boîte aux Lettres";
$text['description-email_connection_mailbox']['en-us'] = "Enter the remote folder name to view.";
$text['description-email_connection_mailbox']['es-cl'] = "Escriba el nombre de la carpeta a distancia para ver.";
$text['description-email_connection_mailbox']['pt-pt'] = "Digite o nome da pasta remota para ver.";
$text['description-email_connection_mailbox']['fr-fr'] = "Entrez le nom du dossier à distance pour voir.";
$text['option-true']['en-us'] = "True";
$text['option-true']['es-cl'] = "Verdadero";
$text['option-true']['pt-pt'] = "Sim";
$text['option-true']['fr-fr'] = "Oui";
$text['option-false']['en-us'] = "False";
$text['option-false']['es-cl'] = "Falso";
$text['option-false']['pt-pt'] = "Não";
$text['option-false']['fr-fr'] = "Non";
$text['button-advanced']['en-us'] = "Advanced";
$text['button-advanced']['es-cl'] = "Avanzado";
$text['button-advanced']['pt-pt'] = "Avançadas";
$text['button-advanced']['fr-fr'] = "Afficher les paramètres avancés";
$text['message-cannot_connect']['en-us'] = "Connection Failed";
$text['message-cannot_connect']['es-cl'] = "Error de Conexión";
$text['message-cannot_connect']['pt-pt'] = "Falha na Conexão";
$text['message-cannot_connect']['fr-fr'] = "Échec de la Connexion";
$text['label-pin']['en-us'] = "PIN Number"; $text['label-pin']['en-us'] = "PIN Number";
$text['label-pin']['es-cl'] = "Número PIN"; $text['label-pin']['es-cl'] = "Número PIN";
@@ -316,7 +411,7 @@
$text['description-fax-number']['en-us'] = "Enter the recipient's fax number."; $text['description-fax-number']['en-us'] = "Enter the recipient's fax number.";
$text['description-fax-number']['es-cl'] = "Ingrese el número aquí."; $text['description-fax-number']['es-cl'] = "Ingrese el número aquí.";
$text['description-fax-number']['pt-pt'] = "Introduza aqui o número."; $text['description-fax-number']['pt-pt'] = "Introduza aqui o número.";
$text['description-fax-number']['fr-fr'] = ""; $text['description-fax-number']['fr-fr'] = "Entrez le numéro de fax du destinataire.";
$text['label-fax-subject']['en-us'] = "Subject"; $text['label-fax-subject']['en-us'] = "Subject";
$text['label-fax-subject']['es-cl'] = "Asunto"; $text['label-fax-subject']['es-cl'] = "Asunto";
@@ -438,137 +533,250 @@
$text['message-invalid-fax']['pt-pt'] = "Fax inválida - Por favor, digite uma mensagem ou selecionar um arquivo a ser enviado."; $text['message-invalid-fax']['pt-pt'] = "Fax inválida - Por favor, digite uma mensagem ou selecionar um arquivo a ser enviado.";
$text['message-invalid-fax']['fr-fr'] = "Fax Invalide - Merci d'entrer un message ou sélectionner un fichier à envoyer."; $text['message-invalid-fax']['fr-fr'] = "Fax Invalide - Merci d'entrer un message ou sélectionner un fichier à envoyer.";
$text['label-email_received']['en-us'] = "Received";
$text['label-email_received']['es-cl'] = "Recibido";
$text['label-email_received']['pt-pt'] = "Recebido";
$text['label-email_received']['fr-fr'] = "Reçu";
$text['label-email_size']['en-us'] = "Size";
$text['label-email_size']['es-cl'] = "Tamaño";
$text['label-email_size']['pt-pt'] = "Tamanho";
$text['label-email_size']['fr-fr'] = "Taille";
$text['label-email-fax']['en-us'] = "Fax";
$text['label-email-fax']['es-cl'] = "Facsímil";
$text['label-email-fax']['pt-pt'] = "Fax";
$text['label-email-fax']['fr-fr'] = "Télécopie";
//fax logs //fax logs
$text['title-fax_logs']['en-us'] = 'FAX Logs'; $text['title-fax_logs']['en-us'] = "Fax Logs";
$text['title-fax_logs']['pt-pt'] = ''; $text['title-fax_logs']['es-cl'] = "Registros de fax";
$text['title-fax_logs']['pt-pt'] = "Logs de fax";
$text['title-fax_logs']['fr-fr'] = "Journaux Fax";
$text['title-fax_log']['en-us'] = 'Fax Log'; $text['title-fax_log']['en-us'] = "Fax Log";
$text['title-fax_log']['pt-pt'] = ''; $text['title-fax_log']['es-cl'] = "Registro de fax";
$text['title-fax_log']['pt-pt'] = "Fax Log";
$text['title-fax_log']['fr-fr'] = "Fax Connexion";
$text['description-fax_log']['en-us'] = 'The details for sending and receiving a fax included are whether fax was successful, ECM (Error Correction Mode), number of retries, destination number, date, etc. '; $text['description-fax_log']['en-us'] = "The details for sending and receiving a fax included are whether fax was successful, ECM (Error Correction Mode), number of retries, destination number, date, etc.";
$text['description-fax_log']['pt-pt'] = ''; $text['description-fax_log']['es-cl'] = "Los detalles para el envío y recepción de faxes se incluyen si fax se ha realizado correctamente, ECM (Modo de Corrección de Errores), número de reintentos, número de destino, fecha, etc.";
$text['description-fax_log']['pt-pt'] = "Os detalhes para o envio e recebimento de um fax estão incluídos se fax foi bem-sucedida, ECM (Modo de correção de erros), número de repetições, número de destino, data, etc.";
$text['description-fax_log']['fr-fr'] = "Les détails pour envoyer et recevoir un fax sont inclus si fax a réussi, ECM (Mode de correction d'erreur), nombre de tentatives, le numéro de destination, la date, etc.";
$text['label-fax_success']['en-us'] = 'Success'; $text['label-fax_success']['en-us'] = "Success";
$text['label-fax_success']['pt-pt'] = ''; $text['label-fax_success']['es-cl'] = "éxito";
$text['label-fax_success']['pt-pt'] = "sucesso";
$text['label-fax_success']['fr-fr'] = "succès";
$text['description-fax_success']['en-us'] = ''; $text['description-fax_success']['en-us'] = "";
$text['description-fax_success']['pt-pt'] = ''; $text['description-fax_success']['es-cl'] = "";
$text['description-fax_success']['pt-pt'] = "";
$text['description-fax_success']['fr-fr'] = "";
$text['label-fax_result_code']['en-us'] = 'Code'; $text['label-fax_result_code']['en-us'] = "Code";
$text['label-fax_result_code']['pt-pt'] = ''; $text['label-fax_result_code']['es-cl'] = "Código";
$text['label-fax_result_code']['pt-pt'] = "Código";
$text['label-fax_result_code']['fr-fr'] = "Code";
$text['description-fax_result_code']['en-us'] = ''; $text['description-fax_result_code']['en-us'] = "";
$text['description-fax_result_code']['pt-pt'] = ''; $text['description-fax_result_code']['es-cl'] = "";
$text['description-fax_result_code']['pt-pt'] = "";
$text['description-fax_result_code']['fr-fr'] = "";
$text['label-fax_result_text']['en-us'] = 'Result'; $text['label-fax_result_text']['en-us'] = "Result";
$text['label-fax_result_text']['pt-pt'] = ''; $text['label-fax_result_text']['es-cl'] = "Resultado";
$text['label-fax_result_text']['pt-pt'] = "Resultado";
$text['label-fax_result_text']['fr-fr'] = "Résultat";
$text['description-fax_result_text']['en-us'] = ''; $text['description-fax_result_text']['en-us'] = "";
$text['description-fax_result_text']['pt-pt'] = ''; $text['description-fax_result_text']['es-cl'] = "";
$text['description-fax_result_text']['pt-pt'] = "";
$text['description-fax_result_text']['fr-fr'] = "";
$text['label-fax_file']['en-us'] = 'File'; $text['label-fax_file']['en-us'] = "File";
$text['label-fax_file']['pt-pt'] = ''; $text['label-fax_file']['es-cl'] = "Expediente";
$text['label-fax_file']['pt-pt'] = "Arquivo";
$text['label-fax_file']['fr-fr'] = "Fichier";
$text['description-fax_file']['en-us'] = ''; $text['description-fax_file']['en-us'] = "";
$text['description-fax_file']['pt-pt'] = ''; $text['description-fax_file']['es-cl'] = "";
$text['description-fax_file']['pt-pt'] = "";
$text['description-fax_file']['fr-fr'] = "";
$text['label-fax_ecm_used']['en-us'] = 'ECM'; $text['label-fax_ecm_used']['en-us'] = "ECM";
$text['label-fax_ecm_used']['pt-pt'] = ''; $text['label-fax_ecm_used']['es-cl'] = "ECM";
$text['label-fax_ecm_used']['pt-pt'] = "ECM";
$text['label-fax_ecm_used']['fr-fr'] = "ECM";
$text['description-fax_ecm_used']['en-us'] = ''; $text['description-fax_ecm_used']['en-us'] = "";
$text['description-fax_ecm_used']['pt-pt'] = ''; $text['description-fax_ecm_used']['es-cl'] = "";
$text['description-fax_ecm_used']['pt-pt'] = "";
$text['description-fax_ecm_used']['fr-fr'] = "";
$text['label-fax_local_station_id']['en-us'] = 'Local Station ID'; $text['label-fax_local_station_id']['en-us'] = "Local Station ID";
$text['label-fax_local_station_id']['pt-pt'] = ''; $text['label-fax_local_station_id']['es-cl'] = "Local ID de la estación";
$text['label-fax_local_station_id']['pt-pt'] = "Local Station ID";
$text['label-fax_local_station_id']['fr-fr'] = "Local ID station";
$text['description-fax_local_station_id']['en-us'] = ''; $text['description-fax_local_station_id']['en-us'] = "";
$text['description-fax_local_station_id']['pt-pt'] = ''; $text['description-fax_local_station_id']['es-cl'] = "";
$text['description-fax_local_station_id']['pt-pt'] = "";
$text['description-fax_local_station_id']['fr-fr'] = "";
$text['label-fax_document_transferred_pages']['en-us'] = 'Document Transferred Pages'; $text['label-fax_document_transferred_pages']['en-us'] = "Document Transferred Pages";
$text['label-fax_document_transferred_pages']['pt-pt'] = ''; $text['label-fax_document_transferred_pages']['es-cl'] = "Páginas de documentos Transferido";
$text['label-fax_document_transferred_pages']['pt-pt'] = "Documento Transferido Pages";
$text['label-fax_document_transferred_pages']['fr-fr'] = "Pages de document transféré";
$text['description-fax_document_transferred_pages']['en-us'] = ''; $text['description-fax_document_transferred_pages']['en-us'] = "";
$text['description-fax_document_transferred_pages']['pt-pt'] = ''; $text['description-fax_document_transferred_pages']['es-cl'] = "";
$text['description-fax_document_transferred_pages']['pt-pt'] = "";
$text['description-fax_document_transferred_pages']['fr-fr'] = "";
$text['label-fax_document_total_pages']['en-us'] = 'Document Total Pages'; $text['label-fax_document_total_pages']['en-us'] = "Document Total Pages";
$text['label-fax_document_total_pages']['pt-pt'] = ''; $text['label-fax_document_total_pages']['es-cl'] = "Documento Total de páginas";
$text['label-fax_document_total_pages']['pt-pt'] = "Documento Total de Páginas";
$text['label-fax_document_total_pages']['fr-fr'] = "Document de nombre total de pages";
$text['description-fax_document_total_pages']['en-us'] = ''; $text['description-fax_document_total_pages']['en-us'] = "";
$text['description-fax_document_total_pages']['pt-pt'] = ''; $text['description-fax_document_total_pages']['es-cl'] = "";
$text['description-fax_document_total_pages']['pt-pt'] = "";
$text['description-fax_document_total_pages']['fr-fr'] = "";
$text['label-fax_image_resolution']['en-us'] = 'Image Resolution'; $text['label-fax_image_resolution']['en-us'] = "Image Resolution";
$text['label-fax_image_resolution']['pt-pt'] = ''; $text['label-fax_image_resolution']['es-cl'] = "Resolución de la imagen";
$text['label-fax_image_resolution']['pt-pt'] = "Resolução da imagem";
$text['label-fax_image_resolution']['fr-fr'] = "Résolution de l'image";
$text['description-fax_image_resolution']['en-us'] = ''; $text['description-fax_image_resolution']['en-us'] = "";
$text['description-fax_image_resolution']['pt-pt'] = ''; $text['description-fax_image_resolution']['es-cl'] = "";
$text['description-fax_image_resolution']['pt-pt'] = "";
$text['description-fax_image_resolution']['fr-fr'] = "";
$text['label-fax_image_size']['en-us'] = 'Image Size'; $text['label-fax_image_size']['en-us'] = "Image Size";
$text['label-fax_image_size']['pt-pt'] = ''; $text['label-fax_image_size']['es-cl'] = "Tamaño de la Imagen";
$text['label-fax_image_size']['pt-pt'] = "Tamanho da Imagem";
$text['label-fax_image_size']['fr-fr'] = "Taille de l'image";
$text['description-fax_image_size']['en-us'] = ''; $text['description-fax_image_size']['en-us'] = "";
$text['description-fax_image_size']['pt-pt'] = ''; $text['description-fax_image_size']['es-cl'] = "";
$text['description-fax_image_size']['pt-pt'] = "";
$text['description-fax_image_size']['fr-fr'] = "";
$text['label-fax_bad_rows']['en-us'] = 'Bad Rows'; $text['label-fax_bad_rows']['en-us'] = "Bad Rows";
$text['label-fax_bad_rows']['pt-pt'] = ''; $text['label-fax_bad_rows']['es-cl'] = "Bad Filas";
$text['label-fax_bad_rows']['pt-pt'] = "Bad Fileiras";
$text['label-fax_bad_rows']['fr-fr'] = "Bad Lignes";
$text['description-fax_bad_rows']['en-us'] = ''; $text['description-fax_bad_rows']['en-us'] = "";
$text['description-fax_bad_rows']['pt-pt'] = ''; $text['description-fax_bad_rows']['es-cl'] = "";
$text['description-fax_bad_rows']['pt-pt'] = "";
$text['description-fax_bad_rows']['fr-fr'] = "";
$text['label-fax_transfer_rate']['en-us'] = 'Transfer Rate'; $text['label-fax_transfer_rate']['en-us'] = "Transfer Rate";
$text['label-fax_transfer_rate']['pt-pt'] = ''; $text['label-fax_transfer_rate']['es-cl'] = "Velocidad de Transferencia";
$text['label-fax_transfer_rate']['pt-pt'] = "Taxa de Transferência";
$text['label-fax_transfer_rate']['fr-fr'] = "Taux de Transfert";
$text['description-fax_transfer_rate']['en-us'] = ''; $text['description-fax_transfer_rate']['en-us'] = "";
$text['description-fax_transfer_rate']['pt-pt'] = ''; $text['description-fax_transfer_rate']['es-cl'] = "";
$text['description-fax_transfer_rate']['pt-pt'] = "";
$text['description-fax_transfer_rate']['fr-fr'] = "";
$text['label-fax_retry_attempts']['en-us'] = 'Retry'; $text['label-fax_retry_attempts']['en-us'] = "Retry";
$text['label-fax_retry_attempts']['pt-pt'] = ''; $text['label-fax_retry_attempts']['es-cl'] = "Vuelva a Intentarlo";
$text['label-fax_retry_attempts']['pt-pt'] = "Tentar Novamente";
$text['label-fax_retry_attempts']['fr-fr'] = "Refaire";
$text['description-fax_retry_attempts']['en-us'] = ''; $text['description-fax_retry_attempts']['en-us'] = "";
$text['description-fax_retry_attempts']['pt-pt'] = ''; $text['description-fax_retry_attempts']['es-cl'] = "";
$text['description-fax_retry_attempts']['pt-pt'] = "";
$text['description-fax_retry_attempts']['fr-fr'] = "";
$text['label-fax_retry_limit']['en-us'] = 'Retry Limit'; $text['label-fax_retry_limit']['en-us'] = "Retry Limit";
$text['label-fax_retry_limit']['pt-pt'] = ''; $text['label-fax_retry_limit']['es-cl'] = "Límite de Reintentos";
$text['label-fax_retry_limit']['pt-pt'] = "Limite de Repetições";
$text['label-fax_retry_limit']['fr-fr'] = "Retry Limit";
$text['description-fax_retry_limit']['en-us'] = ''; $text['description-fax_retry_limit']['en-us'] = "";
$text['description-fax_retry_limit']['pt-pt'] = ''; $text['description-fax_retry_limit']['es-cl'] = "";
$text['description-fax_retry_limit']['pt-pt'] = "";
$text['description-fax_retry_limit']['fr-fr'] = "";
$text['label-fax_retry_sleep']['en-us'] = 'Retry Sleep'; $text['label-fax_retry_sleep']['en-us'] = "Retry Sleep";
$text['label-fax_retry_sleep']['pt-pt'] = ''; $text['label-fax_retry_sleep']['es-cl'] = "Vuelva a Intentar el Sueño";
$text['label-fax_retry_sleep']['pt-pt'] = "Repetir o Sono";
$text['label-fax_retry_sleep']['fr-fr'] = "Réessayez Sommeil";
$text['description-fax_retry_sleep']['en-us'] = ''; $text['description-fax_retry_sleep']['en-us'] = "";
$text['description-fax_retry_sleep']['pt-pt'] = ''; $text['description-fax_retry_sleep']['es-cl'] = "";
$text['description-fax_retry_sleep']['pt-pt'] = "";
$text['description-fax_retry_sleep']['fr-fr'] = "";
$text['label-fax_destination']['en-us'] = 'Destination'; $text['label-fax_destination']['en-us'] = "Destination";
$text['label-fax_destination']['pt-pt'] = ''; $text['label-fax_destination']['es-cl'] = "Destino";
$text['label-fax_destination']['pt-pt'] = "Destino";
$text['label-fax_destination']['fr-fr'] = "Destination";
$text['label-fax_uri']['en-us'] = 'URI'; $text['label-fax_uri']['en-us'] = "URI";
$text['label-fax_uri']['pt-pt'] = ''; $text['label-fax_uri']['es-cl'] = "URI";
$text['label-fax_uri']['pt-pt'] = "URI";
$text['label-fax_uri']['fr-fr'] = "URI";
$text['description-fax_uri']['en-us'] = ''; $text['description-fax_uri']['en-us'] = "";
$text['description-fax_uri']['pt-pt'] = ''; $text['description-fax_uri']['es-cl'] = "";
$text['description-fax_uri']['pt-pt'] = "";
$text['description-fax_uri']['fr-fr'] = "";
$text['label-fax_date']['en-us'] = 'Date'; $text['label-fax_date']['en-us'] = "Date";
$text['label-fax_date']['pt-pt'] = ''; $text['label-fax_date']['es-cl'] = "Fecha";
$text['label-fax_date']['pt-pt'] = "Data";
$text['label-fax_date']['fr-fr'] = "Date";
$text['description-fax_date']['en-us'] = ''; $text['description-fax_date']['en-us'] = "";
$text['description-fax_date']['pt-pt'] = ''; $text['description-fax_date']['es-cl'] = "";
$text['description-fax_date']['pt-pt'] = "";
$text['description-fax_date']['fr-fr'] = "";
$text['label-fax_epoch']['en-us'] = 'Epoch'; $text['label-fax_epoch']['en-us'] = "Epoch";
$text['label-fax_epoch']['pt-pt'] = ''; $text['label-fax_epoch']['es-cl'] = "época";
$text['label-fax_epoch']['pt-pt'] = "época";
$text['label-fax_epoch']['fr-fr'] = "époque";
$text['description-fax_epoch']['en-us'] = ''; $text['description-fax_epoch']['en-us'] = "";
$text['description-fax_epoch']['pt-pt'] = ''; $text['description-fax_epoch']['es-cl'] = "";
$text['description-fax_epoch']['pt-pt'] = "";
$text['description-fax_epoch']['fr-fr'] = "";
$text['message-add']['en-us'] = 'Add Completed'; $text['message-add']['en-us'] = "Add Completed";
$text['message-add']['pt-pt'] = ''; $text['message-add']['es-cl'] = "Añadir Completado";
$text['message-add']['pt-pt'] = "Adicionar Concluído";
$text['message-add']['fr-fr'] = "Ajouter Terminé";
$text['message-update']['en-us'] = 'Update Completed'; $text['message-update']['en-us'] = "Update Completed";
$text['message-update']['pt-pt'] = ''; $text['message-update']['es-cl'] = "Actualización Finalizada";
$text['message-update']['pt-pt'] = "Atualização Concluída";
$text['message-update']['fr-fr'] = "Mise à Jour Terminée";
$text['message-delete']['en-us'] = 'Delete Completed'; $text['message-delete']['en-us'] = "Delete Completed";
$text['message-delete']['pt-pt'] = ''; $text['message-delete']['es-cl'] = "Eliminación Completada";
$text['message-delete']['pt-pt'] = "Remoção Efectuada";
$text['message-delete']['fr-fr'] = "Supprimé";
$text['message-required']['en-us'] = 'Please provide: '; $text['message-required']['en-us'] = "Please provide: ";
$text['message-required']['pt-pt'] = ''; $text['message-required']['es-cl'] = "Sírvanse proporcionar: ";
$text['message-required']['pt-pt'] = "Por favor, forneça: ";
$text['message-required']['fr-fr'] = "Se il vous plaît fournir: ";
$text['message-delete_failed']['en-us'] = "Delete Failed";
$text['message-delete_failed']['es-cl'] = "Eliminar Error";
$text['message-delete_failed']['pt-pt'] = "Falha na exclusão";
$text['message-delete_failed']['fr-fr'] = "Echec de la suppression";
$text['message-no_faxes_found']['en-us'] = "No Faxes Found";
$text['message-no_faxes_found']['es-cl'] = "No Hay Faxes Encontrados";
$text['message-no_faxes_found']['pt-pt'] = "Não Faxes Encontrado";
$text['message-no_faxes_found']['fr-fr'] = "Aucun Télécopieurs Trouvés";
?> ?>

View File

@@ -47,7 +47,7 @@ require_once "resources/paging.php";
$order = check_str($_GET["order"]); $order = check_str($_GET["order"]);
//show the content //show the content
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <td align='left'>\n"; echo " <td align='left'>\n";
echo " <span class=\"title\">".$text['title']."</span><br /><br />\n"; echo " <span class=\"title\">".$text['title']."</span><br /><br />\n";
@@ -124,7 +124,7 @@ require_once "resources/paging.php";
echo th_order_by('fax_email', $text['label-email'], $order_by, $order); echo th_order_by('fax_email', $text['label-email'], $order_by, $order);
echo "<th>".$text['label-tools']."</th>"; echo "<th>".$text['label-tools']."</th>";
echo th_order_by('fax_description', $text['label-description'], $order_by, $order); echo th_order_by('fax_description', $text['label-description'], $order_by, $order);
echo "<td align='right' width='42'>\n"; echo "<td class='list_control_icons'>\n";
if (permission_exists('fax_extension_add')) { if (permission_exists('fax_extension_add')) {
echo " <a href='fax_edit.php' alt='add'>$v_link_label_add</a>\n"; echo " <a href='fax_edit.php' alt='add'>$v_link_label_add</a>\n";
} }
@@ -153,7 +153,9 @@ require_once "resources/paging.php";
echo " <a href='fax_send.php?id=".$row['fax_uuid']."'>".$text['label-new']."</a>&nbsp;&nbsp;"; echo " <a href='fax_send.php?id=".$row['fax_uuid']."'>".$text['label-new']."</a>&nbsp;&nbsp;";
} }
if (permission_exists('fax_inbox_view')) { if (permission_exists('fax_inbox_view')) {
echo " <a href='fax_box.php?id=".$row['fax_uuid']."&box=inbox'>".$text['label-inbox']."</a>&nbsp;&nbsp;"; $remote = ($row['fax_email_connection_host'] != '' && $row['fax_email_connection_mailbox'] != '') ? "_remote" : null;
$box = ($row['fax_email_connection_host'] != '' && $row['fax_email_connection_mailbox'] != '') ? $row['fax_email_connection_mailbox'] : 'inbox';
echo " <a href='fax_box".$remote.".php?id=".$row['fax_uuid']."&box=".$box."'>".$text['label-inbox']."</a>&nbsp;&nbsp;";
} }
if (permission_exists('fax_sent_view')) { if (permission_exists('fax_sent_view')) {
echo " <a href='fax_box.php?id=".$row['fax_uuid']."&box=sent'>".$text['label-sent']."</a>&nbsp;&nbsp;"; echo " <a href='fax_box.php?id=".$row['fax_uuid']."&box=sent'>".$text['label-sent']."</a>&nbsp;&nbsp;";

View File

@@ -77,6 +77,7 @@ else {
} }
foreach ($result as &$row) { foreach ($result as &$row) {
//set database fields as variables //set database fields as variables
$fax_name = $row["fax_name"];
$fax_extension = $row["fax_extension"]; $fax_extension = $row["fax_extension"];
//limit to one row //limit to one row
break; break;
@@ -85,12 +86,7 @@ else {
} }
//set the fax directory //set the fax directory
if (count($_SESSION["domains"]) > 1) { $fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'.((count($_SESSION["domains"]) > 1) ? '/'.$_SESSION['domain_name'] : null);
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domain_name'];
}
else {
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax';
}
//delete a fax //delete a fax
if ($_GET['a'] == "del") { if ($_GET['a'] == "del") {
@@ -200,29 +196,28 @@ else {
//show the inbox //show the inbox
if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) { if ($_REQUEST['box'] == 'inbox' && permission_exists('fax_inbox_view')) {
echo " <table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n"; echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <td align='left'>\n"; echo " <td align='left' valign='top'>\n";
echo " <span class=\"vexpl\"><span class=\"title\">".$text['header-inbox']." ".$fax_extension."</span>\n"; echo " <b>".$text['header-inbox'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
echo " </td>\n"; echo " </td>\n";
echo " <td width='70%' align='right'>\n"; echo " <td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n"; echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";
echo " </table>\n"; echo "</table>\n";
echo "<br>\n"; echo "<br>\n";
$c = 0; $c = 0;
$row_style["0"] = "row_style0"; $row_style["0"] = "row_style0";
$row_style["1"] = "row_style1"; $row_style["1"] = "row_style1";
echo " <div id=\"\">\n"; echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <th width='60%'>".$text['table-file']."</td>\n"; echo " <th width='60%'>".$text['table-file']."</th>\n";
echo " <th width='10%'>".$text['table-view']."</td>\n"; echo " <th width='10%'>".$text['table-view']."</th>\n";
echo " <th width='20%'>".$text['table-modified']."</td>\n"; echo " <th width='20%'>".$text['table-modified']."</th>\n";
echo " <th width='10%' nowrap>".$text['table-size']."</td>\n"; echo " <th width='10%' nowrap>".$text['table-size']."</th>\n";
echo " </tr>"; echo " </tr>";
if ($handle = opendir($dir_fax_inbox)) { if ($handle = opendir($dir_fax_inbox)) {
@@ -330,25 +325,23 @@ else {
echo " <td class=\"list\" colspan=\"3\"></td>\n"; echo " <td class=\"list\" colspan=\"3\"></td>\n";
echo " <td class=\"list\"></td>\n"; echo " <td class=\"list\"></td>\n";
echo " </tr>\n"; echo " </tr>\n";
echo " </table>\n"; echo "</table>\n";
echo "\n"; echo "<br><br><br>\n";
echo " <br />\n";
if (if_group('superadmin')) { if (if_group('superadmin')) {
echo "<strong>".$text['label-location'].":</strong>&nbsp;&nbsp;".$dir_fax_inbox; echo "<strong>".$text['label-location'].":</strong>&nbsp;&nbsp;".$dir_fax_inbox;
} }
echo "<br /><br />\n"; echo "<br /><br />\n";
echo "\n";
} }
//show the sent box //show the sent box
if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) { if ($_REQUEST['box'] == 'sent' && permission_exists('fax_sent_view')) {
echo "<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n"; echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <td align='left'>\n"; echo " <td align='left' valign='top'>\n";
echo " <span class=\"vexpl\"><span class=\"title\">".$text['header-sent']."</span>\n"; echo " <b>".$text['header-sent'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
echo " </td>\n"; echo " </td>\n";
echo " <td width='70%' align='right'>\n"; echo " <td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n"; echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";
echo "</table>\n"; echo "</table>\n";
@@ -469,9 +462,8 @@ else {
echo " <td class=\"list\" colspan=\"3\"></td>\n"; echo " <td class=\"list\" colspan=\"3\"></td>\n";
echo " <td class=\"list\"></td>\n"; echo " <td class=\"list\"></td>\n";
echo " </tr>\n"; echo " </tr>\n";
echo " </table>\n"; echo " </table>\n";
echo "\n"; echo " <br><br><br>\n";
echo " <br />\n";
if (if_group('superadmin')) { if (if_group('superadmin')) {
echo "<strong>".$text['label-location'].":</strong>&nbsp;&nbsp;".$dir_fax_sent; echo "<strong>".$text['label-location'].":</strong>&nbsp;&nbsp;".$dir_fax_sent;
} }
@@ -480,7 +472,6 @@ else {
echo " </td>"; echo " </td>";
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";
echo "</div>";
//show the footer //show the footer
require_once "resources/footer.php"; require_once "resources/footer.php";

286
app/fax/fax_box_remote.php Normal file
View File

@@ -0,0 +1,286 @@
<?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-2012
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
James Rose <james.o.rose@gmail.com>
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('fax_inbox_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//get fax server uuid, set connection parameters
if (strlen($_GET['id']) > 0) {
$fax_uuid = check_str($_GET["id"]);
if (if_group("superadmin") || if_group("admin")) {
//show all fax extensions
$sql = "select * from v_fax ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and fax_uuid = '$fax_uuid' ";
}
else {
//show only assigned fax extensions
$sql = "select * from v_fax as f, v_fax_users as u ";
$sql .= "where f.fax_uuid = u.fax_uuid ";
$sql .= "and f.domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and f.fax_uuid = '$fax_uuid' ";
$sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
}
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
if (count($result) == 0) {
if (!if_group("superadmin") && !if_group("admin")) {
echo "access denied";
exit;
}
}
foreach ($result as &$row) {
$fax_name = $row["fax_name"];
$fax_extension = $row["fax_extension"];
$fax_email_connection_type = $row["fax_email_connection_type"];
$fax_email_connection_host = $row["fax_email_connection_host"];
$fax_email_connection_port = $row["fax_email_connection_port"];
$fax_email_connection_security = $row["fax_email_connection_security"];
$fax_email_connection_validate = $row["fax_email_connection_validate"];
$fax_email_connection_username = $row["fax_email_connection_username"];
$fax_email_connection_password = $row["fax_email_connection_password"];
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
break;
}
unset ($prep_statement);
// make connection
$fax_email_connection = "{".$fax_email_connection_host.":".$fax_email_connection_port."/".$fax_email_connection_type;
$fax_email_connection .= ($fax_email_connection_security != '') ? "/".$fax_email_connection_security : "/notls";
$fax_email_connection .= "/".(($fax_email_connection_validate == 'false') ? "no" : null)."validate-cert";
$fax_email_connection .= "}".$fax_email_connection_mailbox;
if (!$mailbox = imap_open($fax_email_connection, $fax_email_connection_username, $fax_email_connection_password)) {
$_SESSION["message_mood"] = 'negative';
$_SESSION["message"] = $text['message-cannot_connect']."(".imap_last_error().")";
header("Location: fax.php");
exit;
}
}
else {
header("Location: fax.php");
exit;
}
//message action
if ($_GET['email_id'] != '') {
$email_id = check_str($_GET['email_id']);
//download attachment
if (isset($_GET['download'])) {
$attachment = get_attachments($mailbox, $email_id, FT_UID);
$file_type = pathinfo($attachment[0]['filename'], PATHINFO_EXTENSION);
switch ($file_type) {
case "pdf" : header("Content-Type: application/pdf"); break;
case "tif" : header("Contet-Type: image/tiff"); break;
}
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // date in the past
header("Content-Length: ".strlen($attachment[0]['attachment']));
$browser = $_SERVER["HTTP_USER_AGENT"];
if (preg_match("/MSIE 5.5/", $browser) || preg_match("/MSIE 6.0/", $browser)) {
header("Content-Disposition: filename=\"".$attachment[0]['filename']."\"");
}
else {
header("Content-Disposition: attachment; filename=\"".$attachment[0]['filename']."\"");
}
header("Content-Transfer-Encoding: binary");
echo $attachment[0]['attachment'];
exit;
}
//delete email
if (isset($_GET['delete']) && permission_exists('fax_inbox_delete')) {
$attachment = get_attachments($mailbox, $email_id, FT_UID);
if (imap_delete($mailbox, $email_id, FT_UID)) {
if (imap_expunge($mailbox)) {
//clean up local inbox copy
$fax_dir = $_SESSION['switch']['storage']['dir'].'/fax'.((count($_SESSION["domains"]) > 1) ? '/'.$_SESSION['domain_name'] : null);
@unlink($fax_dir.'/'.$fax_extension.'/inbox/'.$attachment[0]['filename']);
//redirect user
$_SESSION["message"] = $text['message-delete'];
header("Location: ?id=".$fax_uuid);
exit;
}
}
else {
//redirect user
$_SESSION["message_mood"] = "negative";
$_SESSION["message"] = $text['message-delete_failed'];
header("Location: ?id=".$fax_uuid);
exit;
}
}
else {
//redirect user
$_SESSION["message_mood"] = "negative";
$_SESSION["message"] = $text['message-delete_failed'];
header("Location: ?id=".$fax_uuid);
exit;
}
}
//get emails
$emails = imap_search($mailbox, 'SUBJECT "Fax"', SE_UID);
//show the header
require_once "resources/header.php";
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
//show the inbox
$c = 0;
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td align='left' valign='top'>\n";
echo " <b>".$text['header-inbox'].": <span style='color: #000;'>".$fax_name." (".$fax_extension.")</span></b>\n";
echo " </td>\n";
echo " <td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' alt='".$text['button-back']."' onclick=\"window.location='fax.php';\" value='".$text['button-back']."'>\n";
echo " <input type='button' class='btn' alt='".$text['button-refresh']."' onclick=\"document.location.reload();\" value='".$text['button-refresh']."'>\n";
echo " </td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<br><br>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <th width='30%'>".$text['label-email_received']."</th>\n";
echo " <th width='60%'>".$text['label-email-fax']."</th>\n";
echo " <th width='10%'>".$text['label-email_size']."</th>\n";
if (permission_exists('fax_inbox_delete')) {
echo " <td class='list_control_icons'>&nbsp;</td>\n";
}
echo " </tr>";
if ($emails) {
rsort($emails); // most recent on top
foreach ($emails as $email_id) {
$metadata = object_to_array(imap_fetch_overview($mailbox, $email_id, FT_UID));
$attachment = get_attachments($mailbox, $email_id, FT_UID);
echo "<tr ".(($metadata[0]['seen'] == 0) ? "style='font-weight: bold;'" : null).">\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$metadata[0]['date']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'><a href='?id=".$fax_uuid."&email_id=".$email_id."&download'>".$attachment[0]['filename']."</a></td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".byte_convert(strlen($attachment[0]['attachment']))."</td>\n";
if (permission_exists('fax_inbox_delete')) {
echo " <td class='list_control_icons'><a href='?id=".$fax_uuid."&email_id=".$email_id."&delete' onclick=\"return confirm('".$text['message-confirm-delete']."')\">$v_link_label_delete</a></td>\n";
}
echo "</tr>\n";
//$message = imap_fetchbody($mailbox, $email_id, 2, FT_UID);
//echo $message;
}
}
else {
echo "<tr valign='top'>\n";
echo " <td colspan='4' style='text-align: center;'><br><br>".$text['message-no_faxes_found']."<br><br></td>\n";
echo "</tr>\n";
}
echo "</table>";
echo "<br><br>";
/* close the connection */
imap_close($inbox);
//show the footer
require_once "resources/footer.php";
//functions used above
function object_to_array($obj) {
if (!is_object($obj) && !is_array($obj)) { return $obj; }
if (is_object($obj)) { $obj = get_object_vars($obj); }
return array_map('object_to_array', $obj);
}
function get_attachments($connection, $message_number, $option = '') {
$attachments = array();
$structure = imap_fetchstructure($connection, $message_number, $option);
if(isset($structure->parts) && count($structure->parts)) {
for($i = 0; $i < count($structure->parts); $i++) {
if($structure->parts[$i]->ifdparameters) {
foreach($structure->parts[$i]->dparameters as $object) {
if(strtolower($object->attribute) == 'filename') {
$attachments[$i]['is_attachment'] = true;
$attachments[$i]['filename'] = $object->value;
}
}
}
if($structure->parts[$i]->ifparameters) {
foreach($structure->parts[$i]->parameters as $object) {
if(strtolower($object->attribute) == 'name') {
$attachments[$i]['is_attachment'] = true;
$attachments[$i]['name'] = $object->value;
}
}
}
if($attachments[$i]['is_attachment']) {
$attachments[$i]['attachment'] = imap_fetchbody($connection, $message_number, $i+1, $option);
if($structure->parts[$i]->encoding == 3) { // 3 = BASE64
$attachments[$i]['attachment'] = base64_decode($attachments[$i]['attachment']);
}
elseif($structure->parts[$i]->encoding == 4) { // 4 = QUOTED-PRINTABLE
$attachments[$i]['attachment'] = quoted_printable_decode($attachments[$i]['attachment']);
}
}
unset($attachments[$i]['is_attachment']);
}
}
return array_values($attachments); //reindex
}
?>

View File

@@ -61,6 +61,14 @@ else {
$fax_extension = $row["fax_extension"]; $fax_extension = $row["fax_extension"];
$fax_name = $row["fax_name"]; $fax_name = $row["fax_name"];
$fax_email = $row["fax_email"]; $fax_email = $row["fax_email"];
$fax_email_connection_type = $row["fax_email_connection_type"];
$fax_email_connection_host = $row["fax_email_connection_host"];
$fax_email_connection_port = $row["fax_email_connection_port"];
$fax_email_connection_security = $row["fax_email_connection_security"];
$fax_email_connection_validate = $row["fax_email_connection_validate"];
$fax_email_connection_username = $row["fax_email_connection_username"];
$fax_email_connection_password = $row["fax_email_connection_password"];
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
$fax_pin_number = $row["fax_pin_number"]; $fax_pin_number = $row["fax_pin_number"];
$fax_caller_id_name = $row["fax_caller_id_name"]; $fax_caller_id_name = $row["fax_caller_id_name"];
$fax_caller_id_number = $row["fax_caller_id_number"]; $fax_caller_id_number = $row["fax_caller_id_number"];
@@ -80,6 +88,14 @@ else {
$sql .= "fax_extension, "; $sql .= "fax_extension, ";
$sql .= "fax_name, "; $sql .= "fax_name, ";
$sql .= "fax_email, "; $sql .= "fax_email, ";
$sql .= "fax_email_connection_type, ";
$sql .= "fax_email_connection_host, ";
$sql .= "fax_email_connection_port, ";
$sql .= "fax_email_connection_security, ";
$sql .= "fax_email_connection_validate, ";
$sql .= "fax_email_connection_username, ";
$sql .= "fax_email_connection_password, ";
$sql .= "fax_email_connection_mailbox, ";
$sql .= "fax_pin_number, "; $sql .= "fax_pin_number, ";
$sql .= "fax_caller_id_name, "; $sql .= "fax_caller_id_name, ";
$sql .= "fax_caller_id_number, "; $sql .= "fax_caller_id_number, ";
@@ -96,6 +112,14 @@ else {
$sql .= "'$fax_extension', "; $sql .= "'$fax_extension', ";
$sql .= "'$fax_name', "; $sql .= "'$fax_name', ";
$sql .= "'$fax_email', "; $sql .= "'$fax_email', ";
$sql .= "'$fax_email_connection_type', ";
$sql .= "'$fax_email_connection_host', ";
$sql .= "'$fax_email_connection_port', ";
$sql .= "'$fax_email_connection_security', ";
$sql .= "'$fax_email_connection_validate', ";
$sql .= "'$fax_email_connection_username', ";
$sql .= "'$fax_email_connection_password', ";
$sql .= "'$fax_email_connection_mailbox', ";
$sql .= "'$fax_pin_number', "; $sql .= "'$fax_pin_number', ";
$sql .= "'$fax_caller_id_name', "; $sql .= "'$fax_caller_id_name', ";
$sql .= "'$fax_caller_id_number', "; $sql .= "'$fax_caller_id_number', ";

View File

@@ -99,6 +99,14 @@ else {
$fax_extension = check_str($_POST["fax_extension"]); $fax_extension = check_str($_POST["fax_extension"]);
$fax_destination_number = check_str($_POST["fax_destination_number"]); $fax_destination_number = check_str($_POST["fax_destination_number"]);
$fax_email = check_str($_POST["fax_email"]); $fax_email = check_str($_POST["fax_email"]);
$fax_email_connection_type = check_str($_POST["fax_email_connection_type"]);
$fax_email_connection_host = check_str($_POST["fax_email_connection_host"]);
$fax_email_connection_port = check_str($_POST["fax_email_connection_port"]);
$fax_email_connection_security = check_str($_POST["fax_email_connection_security"]);
$fax_email_connection_validate = check_str($_POST["fax_email_connection_validate"]);
$fax_email_connection_username = check_str($_POST["fax_email_connection_username"]);
$fax_email_connection_password = check_str($_POST["fax_email_connection_password"]);
$fax_email_connection_mailbox = check_str($_POST["fax_email_connection_mailbox"]);
//$fax_pin_number = check_str($_POST["fax_pin_number"]); //$fax_pin_number = check_str($_POST["fax_pin_number"]);
$fax_caller_id_name = check_str($_POST["fax_caller_id_name"]); $fax_caller_id_name = check_str($_POST["fax_caller_id_name"]);
$fax_caller_id_number = check_str($_POST["fax_caller_id_number"]); $fax_caller_id_number = check_str($_POST["fax_caller_id_number"]);
@@ -228,6 +236,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "fax_destination_number, "; $sql .= "fax_destination_number, ";
$sql .= "fax_name, "; $sql .= "fax_name, ";
$sql .= "fax_email, "; $sql .= "fax_email, ";
$sql .= "fax_email_connection_type, ";
$sql .= "fax_email_connection_host, ";
$sql .= "fax_email_connection_port, ";
$sql .= "fax_email_connection_security, ";
$sql .= "fax_email_connection_validate, ";
$sql .= "fax_email_connection_username, ";
$sql .= "fax_email_connection_password, ";
$sql .= "fax_email_connection_mailbox, ";
//$sql .= "fax_pin_number, "; //$sql .= "fax_pin_number, ";
$sql .= "fax_caller_id_name, "; $sql .= "fax_caller_id_name, ";
$sql .= "fax_caller_id_number, "; $sql .= "fax_caller_id_number, ";
@@ -245,6 +261,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'$fax_destination_number', "; $sql .= "'$fax_destination_number', ";
$sql .= "'$fax_name', "; $sql .= "'$fax_name', ";
$sql .= "'$fax_email', "; $sql .= "'$fax_email', ";
$sql .= "'$fax_email_connection_type', ";
$sql .= "'$fax_email_connection_host', ";
$sql .= "'$fax_email_connection_port', ";
$sql .= "'$fax_email_connection_security', ";
$sql .= "'$fax_email_connection_validate', ";
$sql .= "'$fax_email_connection_username', ";
$sql .= "'$fax_email_connection_password', ";
$sql .= "'$fax_email_connection_mailbox', ";
//$sql .= "'$fax_pin_number', "; //$sql .= "'$fax_pin_number', ";
$sql .= "'$fax_caller_id_name', "; $sql .= "'$fax_caller_id_name', ";
$sql .= "'$fax_caller_id_number', "; $sql .= "'$fax_caller_id_number', ";
@@ -271,6 +295,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "fax_destination_number = '$fax_destination_number', "; $sql .= "fax_destination_number = '$fax_destination_number', ";
$sql .= "fax_name = '$fax_name', "; $sql .= "fax_name = '$fax_name', ";
$sql .= "fax_email = '$fax_email', "; $sql .= "fax_email = '$fax_email', ";
$sql .= "fax_email_connection_type = '$fax_email_connection_type', ";
$sql .= "fax_email_connection_host = '$fax_email_connection_host', ";
$sql .= "fax_email_connection_port = '$fax_email_connection_port', ";
$sql .= "fax_email_connection_security = '$fax_email_connection_security', ";
$sql .= "fax_email_connection_validate = '$fax_email_connection_validate', ";
$sql .= "fax_email_connection_username = '$fax_email_connection_username', ";
$sql .= "fax_email_connection_password = '$fax_email_connection_password', ";
$sql .= "fax_email_connection_mailbox = '$fax_email_connection_mailbox', ";
//$sql .= "fax_pin_number = '$fax_pin_number', "; //$sql .= "fax_pin_number = '$fax_pin_number', ";
$sql .= "fax_caller_id_name = '$fax_caller_id_name', "; $sql .= "fax_caller_id_name = '$fax_caller_id_name', ";
$sql .= "fax_caller_id_number = '$fax_caller_id_number', "; $sql .= "fax_caller_id_number = '$fax_caller_id_number', ";
@@ -500,6 +532,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$fax_destination_number = $row["fax_destination_number"]; $fax_destination_number = $row["fax_destination_number"];
$fax_name = $row["fax_name"]; $fax_name = $row["fax_name"];
$fax_email = $row["fax_email"]; $fax_email = $row["fax_email"];
$fax_email_connection_type = $row["fax_email_connection_type"];
$fax_email_connection_host = $row["fax_email_connection_host"];
$fax_email_connection_port = $row["fax_email_connection_port"];
$fax_email_connection_security = $row["fax_email_connection_security"];
$fax_email_connection_validate = $row["fax_email_connection_validate"];
$fax_email_connection_username = $row["fax_email_connection_username"];
$fax_email_connection_password = $row["fax_email_connection_password"];
$fax_email_connection_mailbox = $row["fax_email_connection_mailbox"];
//$fax_pin_number = $row["fax_pin_number"]; //$fax_pin_number = $row["fax_pin_number"];
$fax_caller_id_name = $row["fax_caller_id_name"]; $fax_caller_id_name = $row["fax_caller_id_name"];
$fax_caller_id_number = $row["fax_caller_id_number"]; $fax_caller_id_number = $row["fax_caller_id_number"];
@@ -520,16 +560,22 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//show the header //show the header
require_once "resources/header.php"; require_once "resources/header.php";
//advanced button js
echo "<script type='text/javascript' language='JavaScript'>\n";
echo "function toggle_advanced(advanced_id) {\n";
echo " $('#'+advanced_id).slideToggle(800);\n";
echo "}\n";
echo "</script>\n";
//fax extension form //fax extension form
echo "<div align='center'>";
echo "<form method='post' name='frm' action=''>\n"; echo "<form method='post' name='frm' action=''>\n";
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <td align='left' width='30%' valign='top' nowrap><b>".$text['header-fax_server_settings']."</b><br><br></td>\n"; echo " <td align='left' width='30%' valign='top' nowrap><b>".$text['header-fax_server_settings']."</b><br><br></td>\n";
echo " <td width='70%' valign='top' align='right'>\n"; echo " <td width='70%' valign='top' align='right'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n"; echo " <input type='button' class='btn' name='' alt=\"".$text['button-back']."\" onclick=\"window.location='fax.php'\" value=\"".$text['button-back']."\">\n";
if ((if_group("admin") || if_group("superadmin")) && $action == "update") { if ((if_group("admin") || if_group("superadmin")) && $action == "update") {
echo " <input type='button' class='btn' name='' alt='copy' onclick=\"if (confirm('".$text['confirm-copy-info']."')){window.location='fax_copy.php?id=".$fax_uuid."';}\" value='".$text['button-copy']."'>\n"; echo " <input type='button' class='btn' alt=\"".$text['button-copy']."\" onclick=\"if (confirm('".$text['confirm-copy-info']."')){window.location='fax_copy.php?id=".$fax_uuid."';}\" value=\"".$text['button-copy']."\">\n";
} }
echo " <input type='submit' class='btn' name='submit' value='".$text['button-save']."'>\n"; echo " <input type='submit' class='btn' name='submit' value='".$text['button-save']."'>\n";
echo " </td>\n"; echo " </td>\n";
@@ -549,7 +595,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</tr>\n"; echo "</tr>\n";
} }
else { //admin,superadmin,etc else { //admin, superadmin, etc
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n"; echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
@@ -590,11 +636,112 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_email' maxlength='255' value=\"$fax_email\">\n"; echo " <input class='formfld' type='text' name='fax_email' maxlength='255' value=\"$fax_email\">\n";
if (function_exists("imap_open")) {
echo " <input type='button' class='btn' value='".$text['button-advanced']."' onclick=\"toggle_advanced('advanced_email_connection');\">\n";
}
echo "<br />\n"; echo "<br />\n";
echo " ".$text['description-email']."\n"; echo " ".$text['description-email']."\n";
echo "</td>\n"; echo "</td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "</table>\n";
echo "<div id='advanced_email_connection' ".(($fax_email_connection_host == '') ? "style='display: none;'" : null).">\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-email_connection_type']."\n";
echo "</td>\n";
echo "<td width='70%' class='vtable' align='left'>\n";
echo " <select class='formfld' name='fax_email_connection_type'>\n";
echo " <option value='imap'>IMAP</option>\n";
echo " <option value='pop3' ".(($fax_email_connection_type == 'pop3') ? "selected" : null).">POP3</option>\n";
echo " </select>\n";
echo "<br />\n";
echo " ".$text['description-email_connection_type']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-email_connection_server']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_email_connection_host' maxlength='255' value=\"$fax_email_connection_host\">&nbsp;:&nbsp;";
echo "<input class='formfld' style='width: 50px; min-width: 50px; max-width: 50px;' type='text' name='fax_email_connection_port' maxlength='5' value=\"$fax_email_connection_port\">\n";
echo "<br />\n";
echo " ".$text['description-email_connection_server']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-email_connection_security']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='fax_email_connection_security'>\n";
echo " <option value=''></option>\n";
echo " <option value='ssl' ".(($fax_email_connection_security == 'ssl') ? "selected" : null).">SSL</option>\n";
echo " <option value='tls' ".(($fax_email_connection_security == 'tls') ? "selected" : null).">TLS</option>\n";
echo " </select>\n";
echo "<br />\n";
echo " ".$text['description-email_connection_security']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-email_connection_validate']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='fax_email_connection_validate'>\n";
echo " <option value='true'>".$text['option-true']."</option>\n";
echo " <option value='false' ".(($fax_email_connection_validate == 'false') ? "selected" : null).">".$text['option-false']."</option>\n";
echo " </select>\n";
echo "<br />\n";
echo " ".$text['description-email_connection_validate']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-email_connection_username']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_email_connection_username' maxlength='255' value=\"$fax_email_connection_username\">\n";
echo "<br />\n";
echo " ".$text['description-email_connection_username']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-email_connection_password']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_email_connection_password' maxlength='255' value=\"$fax_email_connection_password\">\n";
echo "<br />\n";
echo " ".$text['description-email_connection_password']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-email_connection_mailbox']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_email_connection_mailbox' maxlength='255' value=\"$fax_email_connection_mailbox\">\n";
echo "<br />\n";
echo " ".$text['description-email_connection_mailbox']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
//echo "<tr>\n"; //echo "<tr>\n";
//echo "<td class='vncell' valign='top' align='left' nowrap>\n"; //echo "<td class='vncell' valign='top' align='left' nowrap>\n";
//echo " ".$text['label-pin']."\n"; //echo " ".$text['label-pin']."\n";
@@ -607,10 +754,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//echo "</tr>\n"; //echo "</tr>\n";
echo "<tr>\n"; echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n"; echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-caller-id-name']."\n"; echo " ".$text['label-caller-id-name']."\n";
echo "</td>\n"; echo "</td>\n";
echo "<td class='vtable' align='left'>\n"; echo "<td width='70%' class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_caller_id_name' maxlength='255' value=\"$fax_caller_id_name\">\n"; echo " <input class='formfld' type='text' name='fax_caller_id_name' maxlength='255' value=\"$fax_caller_id_name\">\n";
echo "<br />\n"; echo "<br />\n";
echo "".$text['description-caller-id-name']."\n"; echo "".$text['description-caller-id-name']."\n";
@@ -712,6 +859,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " <tr>\n"; echo " <tr>\n";
echo " <td colspan='2' align='right'>\n"; echo " <td colspan='2' align='right'>\n";
echo " <br>";
if ($action == "update") { if ($action == "update") {
if (if_group("user")) { if (if_group("user")) {
echo " <input type='hidden' name='fax_name' value=\"$fax_name\">\n"; echo " <input type='hidden' name='fax_name' value=\"$fax_name\">\n";
@@ -731,10 +879,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " </tr>"; echo " </tr>";
echo "</table>"; echo "</table>";
echo "</form>"; echo "</form>";
echo "</div>";
echo "<br />\n"; echo "<br />\n";
echo "<br />\n";
//show the footer //show the footer
require_once "resources/footer.php"; require_once "resources/footer.php";

View File

@@ -1,472 +0,0 @@
<?php
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('fax_log_add') || permission_exists('fax_log_edit')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
require_once "app_languages.php";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//action add or update
if (isset($_REQUEST["id"])) {
$action = "update";
$fax_log_uuid = check_str($_REQUEST["id"]);
$fax_uuid = check_str($_REQUEST["fax_uuid"]);
}
else {
$action = "add";
}
//get http post variables and set them to php variables
if (count($_POST) > 0) {
$fax_log_uuid = check_str($_POST["fax_log_uuid"]);
$fax_success = check_str($_POST["fax_success"]);
$fax_result_code = check_str($_POST["fax_result_code"]);
$fax_result_text = check_str($_POST["fax_result_text"]);
$fax_file = check_str($_POST["fax_file"]);
$fax_ecm_used = check_str($_POST["fax_ecm_used"]);
$fax_local_station_id = check_str($_POST["fax_local_station_id"]);
$fax_document_transferred_pages = check_str($_POST["fax_document_transferred_pages"]);
$fax_document_total_pages = check_str($_POST["fax_document_total_pages"]);
$fax_image_resolution = check_str($_POST["fax_image_resolution"]);
$fax_image_size = check_str($_POST["fax_image_size"]);
$fax_bad_rows = check_str($_POST["fax_bad_rows"]);
$fax_transfer_rate = check_str($_POST["fax_transfer_rate"]);
$fax_retry_attempts = check_str($_POST["fax_retry_attempts"]);
$fax_retry_limit = check_str($_POST["fax_retry_limit"]);
$fax_retry_sleep = check_str($_POST["fax_retry_sleep"]);
$fax_uri = check_str($_POST["fax_uri"]);
$fax_date = check_str($_POST["fax_date"]);
$fax_epoch = check_str($_POST["fax_epoch"]);
}
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$msg = '';
if ($action == "update") {
$fax_log_uuid = check_str($_POST["fax_log_uuid"]);
}
//check for all required data
if (strlen($fax_log_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-fax_log_uuid']."<br>\n"; }
if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
if (strlen($fax_success) == 0) { $msg .= $text['message-required']." ".$text['label-fax_success']."<br>\n"; }
if (strlen($fax_result_code) == 0) { $msg .= $text['message-required']." ".$text['label-fax_result_code']."<br>\n"; }
if (strlen($fax_result_text) == 0) { $msg .= $text['message-required']." ".$text['label-fax_result_text']."<br>\n"; }
if (strlen($fax_file) == 0) { $msg .= $text['message-required']." ".$text['label-fax_file']."<br>\n"; }
if (strlen($fax_ecm_used) == 0) { $msg .= $text['message-required']." ".$text['label-fax_ecm_used']."<br>\n"; }
if (strlen($fax_local_station_id) == 0) { $msg .= $text['message-required']." ".$text['label-fax_local_station_id']."<br>\n"; }
if (strlen($fax_document_transferred_pages) == 0) { $msg .= $text['message-required']." ".$text['label-fax_document_transferred_pages']."<br>\n"; }
if (strlen($fax_document_total_pages) == 0) { $msg .= $text['message-required']." ".$text['label-fax_document_total_pages']."<br>\n"; }
if (strlen($fax_image_resolution) == 0) { $msg .= $text['message-required']." ".$text['label-fax_image_resolution']."<br>\n"; }
if (strlen($fax_image_size) == 0) { $msg .= $text['message-required']." ".$text['label-fax_image_size']."<br>\n"; }
if (strlen($fax_bad_rows) == 0) { $msg .= $text['message-required']." ".$text['label-fax_bad_rows']."<br>\n"; }
if (strlen($fax_transfer_rate) == 0) { $msg .= $text['message-required']." ".$text['label-fax_transfer_rate']."<br>\n"; }
if (strlen($fax_retry_attempts) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_attempts']."<br>\n"; }
if (strlen($fax_retry_limit) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_limit']."<br>\n"; }
if (strlen($fax_retry_sleep) == 0) { $msg .= $text['message-required']." ".$text['label-fax_retry_sleep']."<br>\n"; }
if (strlen($fax_uri) == 0) { $msg .= $text['message-required']." ".$text['label-fax_uri']."<br>\n"; }
if (strlen($fax_date) == 0) { $msg .= $text['message-required']." ".$text['label-fax_date']."<br>\n"; }
if (strlen($fax_epoch) == 0) { $msg .= $text['message-required']." ".$text['label-fax_epoch']."<br>\n"; }
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
require_once "resources/header.php";
require_once "resources/persistformvar.php";
echo "<div align='center'>\n";
echo "<table><tr><td>\n";
echo $msg."<br />";
echo "</td></tr></table>\n";
persistformvar($_POST);
echo "</div>\n";
require_once "resources/footer.php";
return;
}
//add or update the database
if ($_POST["persistformvar"] != "true") {
/*
if ($action == "add" && permission_exists('fax_log_add')) {
$sql = "insert into v_fax_logs ";
$sql .= "(";
$sql .= "domain_uuid, ";
$sql .= "fax_log_uuid, ";
$sql .= "fax_log_uuid, ";
$sql .= "domain_uuid, ";
$sql .= "fax_success, ";
$sql .= "fax_result_code, ";
$sql .= "fax_result_text, ";
$sql .= "fax_file, ";
$sql .= "fax_ecm_used, ";
$sql .= "fax_local_station_id, ";
$sql .= "fax_document_transferred_pages, ";
$sql .= "fax_document_total_pages, ";
$sql .= "fax_image_resolution, ";
$sql .= "fax_image_size, ";
$sql .= "fax_bad_rows, ";
$sql .= "fax_transfer_rate, ";
$sql .= "fax_retry_attempts, ";
$sql .= "fax_retry_limit, ";
$sql .= "fax_retry_sleep, ";
$sql .= "fax_uri, ";
$sql .= "fax_date, ";
$sql .= "fax_epoch ";
$sql .= ")";
$sql .= "values ";
$sql .= "(";
$sql .= "'$domain_uuid', ";
$sql .= "'".uuid()."', ";
$sql .= "'$fax_log_uuid', ";
$sql .= "'$domain_uuid', ";
$sql .= "'$fax_success', ";
$sql .= "'$fax_result_code', ";
$sql .= "'$fax_result_text', ";
$sql .= "'$fax_file', ";
$sql .= "'$fax_ecm_used', ";
$sql .= "'$fax_local_station_id', ";
$sql .= "'$fax_document_transferred_pages', ";
$sql .= "'$fax_document_total_pages', ";
$sql .= "'$fax_image_resolution', ";
$sql .= "'$fax_image_size', ";
$sql .= "'$fax_bad_rows', ";
$sql .= "'$fax_transfer_rate', ";
$sql .= "'$fax_retry_attempts', ";
$sql .= "'$fax_retry_limit', ";
$sql .= "'$fax_retry_sleep', ";
$sql .= "'$fax_uri', ";
$sql .= "'$fax_date', ";
$sql .= "'$fax_epoch' ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
$_SESSION['message'] = $text['message-add'];
header('Location: fax_logs.php');
return;
} //if ($action == "add")
*/
if ($action == "update" && permission_exists('fax_log_edit')) {
$sql = "update v_fax_logs set ";
$sql .= "fax_log_uuid = '$fax_log_uuid', ";
$sql .= "domain_uuid = '$domain_uuid', ";
$sql .= "fax_success = '$fax_success', ";
$sql .= "fax_result_code = '$fax_result_code', ";
$sql .= "fax_result_text = '$fax_result_text', ";
$sql .= "fax_file = '$fax_file', ";
$sql .= "fax_ecm_used = '$fax_ecm_used', ";
$sql .= "fax_local_station_id = '$fax_local_station_id', ";
$sql .= "fax_document_transferred_pages = '$fax_document_transferred_pages', ";
$sql .= "fax_document_total_pages = '$fax_document_total_pages', ";
$sql .= "fax_image_resolution = '$fax_image_resolution', ";
$sql .= "fax_image_size = '$fax_image_size', ";
$sql .= "fax_bad_rows = '$fax_bad_rows', ";
$sql .= "fax_transfer_rate = '$fax_transfer_rate', ";
$sql .= "fax_retry_attempts = '$fax_retry_attempts', ";
$sql .= "fax_retry_limit = '$fax_retry_limit', ";
$sql .= "fax_retry_sleep = '$fax_retry_sleep', ";
$sql .= "fax_uri = '$fax_uri', ";
$sql .= "fax_date = '$fax_date', ";
$sql .= "fax_epoch = '$fax_epoch' ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and fax_log_uuid = '$fax_log_uuid'";
$db->exec(check_sql($sql));
unset($sql);
$_SESSION['message'] = $text['message-update'];
header('Location: fax_logs.php');
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
//pre-populate the form
if (count($_GET)>0 && $_POST["persistformvar"] != "true") {
$fax_log_uuid = check_str($_GET["id"]);
$sql = "select * from v_fax_logs ";
$sql .= "where domain_uuid = '$domain_uuid' ";
$sql .= "and fax_log_uuid = '$fax_log_uuid' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
foreach ($result as &$row) {
$fax_log_uuid = $row["fax_log_uuid"];
$fax_success = $row["fax_success"];
$fax_result_code = $row["fax_result_code"];
$fax_result_text = $row["fax_result_text"];
$fax_file = $row["fax_file"];
$fax_ecm_used = $row["fax_ecm_used"];
$fax_local_station_id = $row["fax_local_station_id"];
$fax_document_transferred_pages = $row["fax_document_transferred_pages"];
$fax_document_total_pages = $row["fax_document_total_pages"];
$fax_image_resolution = $row["fax_image_resolution"];
$fax_image_size = $row["fax_image_size"];
$fax_bad_rows = $row["fax_bad_rows"];
$fax_transfer_rate = $row["fax_transfer_rate"];
$fax_retry_attempts = $row["fax_retry_attempts"];
$fax_retry_limit = $row["fax_retry_limit"];
$fax_retry_sleep = $row["fax_retry_sleep"];
$fax_uri = $row["fax_uri"];
$fax_date = $row["fax_date"];
$fax_epoch = $row["fax_epoch"];
break; //limit to 1 row
}
unset ($prep_statement);
}
//show the header
require_once "resources/header.php";
//show the content
echo "<div align='center'>";
echo "<table width='100%' border='0' cellpadding='0' cellspacing=''>\n";
echo "<tr class='border'>\n";
echo " <td align=\"left\">\n";
echo " <br>";
echo "<form method='post' name='frm' action=''>\n";
echo "<div align='center'>\n";
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n";
echo "<tr>\n";
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['title-fax_log']."</b></td>\n";
echo "<td width='70%' align='right'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='fax_logs.php?id=$fax_uuid'\" value='".$text['button-back']."'>";
//echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>";
echo "</td>\n";
echo "</tr>\n";
//echo "<tr>\n";
//echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
//echo " ".$text['label-fax_log_uuid']."\n";
//echo "</td>\n";
//echo "<td class='vtable' align='left'>\n";
//echo " <input class='formfld' type='text' name='fax_log_uuid' maxlength='255' value='$fax_log_uuid'>\n";
//echo "<br />\n";
//echo $text['description-fax_log_uuid']."\n";
//echo "</td>\n";
//echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_success']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_success' maxlength='255' value='$fax_success'>\n";
echo "<br />\n";
echo $text['description-fax_success']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_result_code']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_result_code' maxlength='255' value='$fax_result_code'>\n";
echo "<br />\n";
echo $text['description-fax_result_code']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_result_text']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_result_text' maxlength='255' value=\"$fax_result_text\">\n";
echo "<br />\n";
echo $text['description-fax_result_text']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_file']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_file' maxlength='255' value=\"$fax_file\">\n";
echo "<br />\n";
echo $text['description-fax_file']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_ecm_used']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_ecm_used' maxlength='255' value=\"$fax_ecm_used\">\n";
echo "<br />\n";
echo $text['description-fax_ecm_used']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_local_station_id']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_local_station_id' maxlength='255' value=\"$fax_local_station_id\">\n";
echo "<br />\n";
echo $text['description-fax_local_station_id']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_document_transferred_pages']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_document_transferred_pages' maxlength='255' value='$fax_document_transferred_pages'>\n";
echo "<br />\n";
echo $text['description-fax_document_transferred_pages']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_document_total_pages']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_document_total_pages' maxlength='255' value='$fax_document_total_pages'>\n";
echo "<br />\n";
echo $text['description-fax_document_total_pages']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_image_resolution']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_image_resolution' maxlength='255' value=\"$fax_image_resolution\">\n";
echo "<br />\n";
echo $text['description-fax_image_resolution']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_image_size']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_image_size' maxlength='255' value=\"$fax_image_size\">\n";
echo "<br />\n";
echo $text['description-fax_image_size']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_bad_rows']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_bad_rows' maxlength='255' value='$fax_bad_rows'>\n";
echo "<br />\n";
echo $text['description-fax_bad_rows']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_transfer_rate']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_transfer_rate' maxlength='255' value='$fax_transfer_rate'>\n";
echo "<br />\n";
echo $text['description-fax_transfer_rate']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_retry_attempts']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_retry_attempts' maxlength='255' value='$fax_retry_attempts'>\n";
echo "<br />\n";
echo $text['description-fax_retry_attempts']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_retry_limit']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_retry_limit' maxlength='255' value='$fax_retry_limit'>\n";
echo "<br />\n";
echo $text['description-fax_retry_limit']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_retry_sleep']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_retry_sleep' maxlength='255' value='$fax_retry_sleep'>\n";
echo "<br />\n";
echo $text['description-fax_retry_sleep']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_uri']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_uri' maxlength='255' value=\"$fax_uri\">\n";
echo "<br />\n";
echo $text['description-fax_uri']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_date']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input name='fax_date' class='formfld' value='$fax_date' type='text' class='formfld'>\n";
echo "<br />\n";
echo $text['description-fax_date']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap='nowrap'>\n";
echo " ".$text['label-fax_epoch']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <input class='formfld' type='text' name='fax_epoch' maxlength='255' value='$fax_epoch'>\n";
echo "<br />\n";
echo $text['description-fax_epoch']."\n";
echo "</td>\n";
echo "</tr>\n";
echo " <tr>\n";
echo " <td colspan='2' align='right'>\n";
if ($action == "update") {
echo " <input type='hidden' name='fax_log_uuid' value='$fax_log_uuid'>\n";
}
echo " </td>\n";
echo " </tr>";
echo "</table>";
echo "</form>";
echo " </td>";
echo " </tr>";
echo "</table>";
echo "</div>";
//include the footer
require_once "resources/footer.php";
?>

View File

@@ -29,21 +29,16 @@ else {
require_once "resources/paging.php"; require_once "resources/paging.php";
//show the content //show the content
echo "<div align='center'>"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<table width='100%' border='0' cellpadding='0' cellspacing='2'>\n";
echo "<tr class='border'>\n";
echo " <td align=\"center\">\n";
echo " <br />";
echo "<table width='100%' border='0'>\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <td width='50%' align='left' nowrap='nowrap'><b>".$text['title-fax_logs']."</b></td>\n"; echo " <td width='50%' align='left' valign='top' nowrap='nowrap'><b>".$text['title-fax_logs']."</b></td>\n";
echo " <td width='50%' align='right'>\n"; echo " <td width='50%' align='right'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n"; echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <td align='left' colspan='2'>\n"; echo " <td align='left' valign='top' colspan='2'>\n";
echo " <br>";
echo " ".$text['description-fax_log']."<br /><br />\n"; echo " ".$text['description-fax_log']."<br /><br />\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";
@@ -70,9 +65,9 @@ else {
$rows_per_page = 100; $rows_per_page = 100;
$param = ""; $param = "";
$page = $_GET['page']; $page = $_GET['page'];
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
$offset = $rows_per_page * $page; $offset = $rows_per_page * $page;
//get the list //get the list
$sql = "select * from v_fax_logs "; $sql = "select * from v_fax_logs ";
@@ -90,7 +85,6 @@ else {
$row_style["0"] = "row_style0"; $row_style["0"] = "row_style0";
$row_style["1"] = "row_style1"; $row_style["1"] = "row_style1";
echo "<div align='center'>\n";
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n"; echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo th_order_by('fax_success', $text['label-fax_success'], $order_by, $order); echo th_order_by('fax_success', $text['label-fax_success'], $order_by, $order);
@@ -167,13 +161,6 @@ else {
echo "</tr>\n"; echo "</tr>\n";
echo "</table>"; echo "</table>";
echo "</div>";
echo "<br /><br />";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "<br /><br />"; echo "<br /><br />";
//include the footer //include the footer

View File

@@ -636,20 +636,21 @@ else {
//fax extension form //fax extension form
echo "<form action='' method='POST' enctype='multipart/form-data' name='frmUpload' onSubmit=''>\n"; echo "<form action='' method='POST' enctype='multipart/form-data' name='frmUpload' onSubmit=''>\n";
echo "<table width='100%' border='0' cellpadding='6' cellspacing='0'>\n"; echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n"; echo "<tr>\n";
echo " <td align='left' width='30%'>\n"; echo " <td align='left' valign='top' width='30%'>\n";
echo " <span class='title'>".$text['header-send']."</span>\n"; echo " <span class='title'>".$text['header-send']."</span>\n";
echo " </td>\n"; echo " </td>\n";
echo " <td width='70%' align='right'>\n"; echo " <td width='70%' align='right' valign='top'>\n";
echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n"; echo " <input type='button' class='btn' name='' alt='back' onclick=\"window.location='fax.php'\" value='".$text['button-back']."'>\n";
echo " <input type='submit' name='submit' class='btn' id='preview' value='".$text['button-preview']."'>\n"; echo " <input type='submit' name='submit' class='btn' id='preview' value='".$text['button-preview']."'>\n";
echo " <input name='submit' type='submit' class='btn' id='upload' value='".$text['button-send']."'>\n"; echo " <input name='submit' type='submit' class='btn' id='upload' value='".$text['button-send']."'>\n";
echo " </td>\n"; echo " </td>\n";
echo "</tr>\n"; echo "</tr>\n";
echo "</table>\n"; echo "</table>\n";
echo "<br>\n";
echo "<table width='100%' border='0' cellspacing='0' cellpadding='3'>\n"; echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'>\n";
echo " <tr>\n"; echo " <tr>\n";
echo " <td colspan='2' align='left'>\n"; echo " <td colspan='2' align='left'>\n";
echo " ".$text['description-2']." ".((if_group('superadmin')) ? $text['description-3'] : null)." \n"; echo " ".$text['description-2']." ".((if_group('superadmin')) ? $text['description-3'] : null)." \n";
@@ -852,6 +853,7 @@ else {
echo " <tr>\n"; echo " <tr>\n";
echo " <td colspan='2' align='right'>\n"; echo " <td colspan='2' align='right'>\n";
echo " <br>\n";
echo " <input type='hidden' name='fax_caller_id_name' value='".$fax_caller_id_name."'>\n"; echo " <input type='hidden' name='fax_caller_id_name' value='".$fax_caller_id_name."'>\n";
echo " <input type='hidden' name='fax_caller_id_number' value='".$fax_caller_id_number."'>\n"; echo " <input type='hidden' name='fax_caller_id_number' value='".$fax_caller_id_number."'>\n";
echo " <input type='hidden' name='fax_extension' value='".$fax_extension."'>\n"; echo " <input type='hidden' name='fax_extension' value='".$fax_extension."'>\n";