mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Fax Server: Send faxes to multiple recipients at once, customizable 'Subject Tag' for Remote Inbox viewing, preparations for Email-to-Fax functionality.
This commit is contained in:
@@ -235,7 +235,19 @@
|
||||
$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.";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Mailbox folder to monitor.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_inbound_subject_tag";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Subject tag to detect inbound faxes.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_outbound_subject_tag";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Subject tag to detect outbound faxes.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_email_outbound_authorized_senders";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "Authorized email-to-fax sender addresses.";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "fax_pin_number";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
|
||||
@@ -248,10 +248,10 @@
|
||||
$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['description-email_connection_validate']['en-us'] = "Enable server certificate validation.<br>(Select 'False' for self-signed certificates.)";
|
||||
$text['description-email_connection_validate']['es-cl'] = "Activar la validación del certificado del servidor.<br>(Seleccione 'Falso' para certificados con firma.)";
|
||||
$text['description-email_connection_validate']['pt-pt'] = "Habilitar a validação do certificado do servidor.<br>(Selecione 'Não' para os certificados auto-assinados.)";
|
||||
$text['description-email_connection_validate']['fr-fr'] = "Activer la validation du certificat du serveur.<br>(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";
|
||||
@@ -278,10 +278,65 @@
|
||||
$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['description-email_connection_mailbox']['en-us'] = "Enter the remote folder name to monitor.";
|
||||
$text['description-email_connection_mailbox']['es-cl'] = "Escriba el nombre de la carpeta remota para monitorear.";
|
||||
$text['description-email_connection_mailbox']['pt-pt'] = "Digite o nome da pasta remoto para monitorar.";
|
||||
$text['description-email_connection_mailbox']['fr-fr'] = "Entrez le nom du dossier à distance pour surveiller.";
|
||||
|
||||
$text['label-advanced_settings']['en-us'] = "Advanced Settings";
|
||||
$text['label-advanced_settings']['es-cl'] = "Configuración Avanzada";
|
||||
$text['label-advanced_settings']['pt-pt'] = "Configurações Avançadas";
|
||||
$text['label-advanced_settings']['fr-fr'] = "Paramètres Avancés";
|
||||
|
||||
$text['description-advanced_settings']['en-us'] = "Configure the settings below to enable Remote Inbox and Email-to-Fax functionality.";
|
||||
$text['description-advanced_settings']['es-cl'] = "Configure las opciones de abajo para permitir que la bandeja de entrada remota y funcionalidad-Email-a-Fax.";
|
||||
$text['description-advanced_settings']['pt-pt'] = "Defina as configurações abaixo para permitir Inbox remoto e funcionalidade Email-to-Fax.";
|
||||
$text['description-advanced_settings']['fr-fr'] = "Configurez les paramètres ci-dessous pour activer la boîte de réception à distance et la fonctionnalité Email-à-Fax.";
|
||||
|
||||
$text['label-email_account_connection']['en-us'] = "Account Connection";
|
||||
$text['label-email_account_connection']['es-cl'] = "Conexión Cuenta";
|
||||
$text['label-email_account_connection']['pt-pt'] = "Connection Conta";
|
||||
$text['label-email_account_connection']['fr-fr'] = "Compte Connexion";
|
||||
|
||||
$text['label-email_remote_inbox']['en-us'] = "Remote Inbox";
|
||||
$text['label-email_remote_inbox']['es-cl'] = "Bandeja de Entrada Remota";
|
||||
$text['label-email_remote_inbox']['pt-pt'] = "Inbox Remoto";
|
||||
$text['label-email_remote_inbox']['fr-fr'] = "Boîte de Réception à Distance";
|
||||
|
||||
$text['label-email_inbound_subject_tag']['en-us'] = "Subject Tag";
|
||||
$text['label-email_inbound_subject_tag']['es-cl'] = "Asunto Tag";
|
||||
$text['label-email_inbound_subject_tag']['pt-pt'] = "Assunto Tag";
|
||||
$text['label-email_inbound_subject_tag']['fr-fr'] = "Tag Sujet";
|
||||
|
||||
$text['description-email_inbound_subject_tag']['en-us'] = "Set the email subject tag for inbound faxes.";
|
||||
$text['description-email_inbound_subject_tag']['es-cl'] = "Ajuste la etiqueta de asunto del correo electrónico para los faxes entrantes.";
|
||||
$text['description-email_inbound_subject_tag']['pt-pt'] = "Defina a tag e-mail assunto para faxes recebidos.";
|
||||
$text['description-email_inbound_subject_tag']['fr-fr'] = "Réglez le tag objet du courriel pour les fax entrants.";
|
||||
|
||||
$text['label-email_email-to-fax']['en-us'] = "Email-to-Fax";
|
||||
$text['label-email_email-to-fax']['es-cl'] = "Email-a-Fax";
|
||||
$text['label-email_email-to-fax']['pt-pt'] = "Email-to-Fax";
|
||||
$text['label-email_email-to-fax']['fr-fr'] = "Email-à-Fax";
|
||||
|
||||
$text['label-email_outbound_subject_tag']['en-us'] = "Subject Tag";
|
||||
$text['label-email_outbound_subject_tag']['es-cl'] = "Asunto Tag";
|
||||
$text['label-email_outbound_subject_tag']['pt-pt'] = "Assunto Tag";
|
||||
$text['label-email_outbound_subject_tag']['fr-fr'] = "Tag Sujet";
|
||||
|
||||
$text['description-email_outbound_subject_tag']['en-us'] = "Set the email subject tag for outbound faxes.";
|
||||
$text['description-email_outbound_subject_tag']['es-cl'] = "Ajuste la etiqueta de asunto del correo electrónico para los faxes salientes.";
|
||||
$text['description-email_outbound_subject_tag']['pt-pt'] = "Defina a tag e-mail assunto para faxes de saída.";
|
||||
$text['description-email_outbound_subject_tag']['fr-fr'] = "Réglez le tag objet du courriel pour les fax sortants.";
|
||||
|
||||
$text['label-email_outbound_authorized_senders']['en-us'] = "Authorized Senders";
|
||||
$text['label-email_outbound_authorized_senders']['es-cl'] = "Los Remitentes Autorizados";
|
||||
$text['label-email_outbound_authorized_senders']['pt-pt'] = "Remetentes Autorizados";
|
||||
$text['label-email_outbound_authorized_senders']['fr-fr'] = "Expéditeurs Autorisés";
|
||||
|
||||
$text['description-email_outbound_authorized_senders']['en-us'] = "Define the email address(es) allowed to send faxes through this server.";
|
||||
$text['description-email_outbound_authorized_senders']['es-cl'] = "Definir la dirección de correo electrónico(es) pueden enviar faxes a través de este servidor.";
|
||||
$text['description-email_outbound_authorized_senders']['pt-pt'] = "Defina o endereço de e-mail(s) permissão para enviar faxes através deste servidor.";
|
||||
$text['description-email_outbound_authorized_senders']['fr-fr'] = "Définir l'adresse e-mail(s) autorisé à envoyer des télécopies via ce serveur.";
|
||||
|
||||
$text['option-true']['en-us'] = "True";
|
||||
$text['option-true']['es-cl'] = "Verdadero";
|
||||
@@ -408,10 +463,10 @@
|
||||
$text['label-fax-number']['pt-pt'] = "Número de Fax";
|
||||
$text['label-fax-number']['fr-fr'] = "Numéro de Fax";
|
||||
|
||||
$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']['pt-pt'] = "Introduza aqui o número.";
|
||||
$text['description-fax-number']['fr-fr'] = "Entrez le numéro de fax du destinataire.";
|
||||
$text['description-fax-number']['en-us'] = "Enter the recipient fax number(s).";
|
||||
$text['description-fax-number']['es-cl'] = "Introduzca el número(s) de fax del destinatario.";
|
||||
$text['description-fax-number']['pt-pt'] = "Digite o número do(s) de fax do destinatário.";
|
||||
$text['description-fax-number']['fr-fr'] = "Entrez le numéro(s) de fax du destinataire.";
|
||||
|
||||
$text['label-fax-subject']['en-us'] = "Subject";
|
||||
$text['label-fax-subject']['es-cl'] = "Asunto";
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
require_once "resources/functions/object_to_array.php";
|
||||
require_once "resources/functions/parse_attachments.php";
|
||||
if (permission_exists('fax_inbox_view')) {
|
||||
//access granted
|
||||
}
|
||||
@@ -79,6 +81,7 @@ else {
|
||||
$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_email_inbound_subject_tag = $row["fax_email_inbound_subject_tag"];
|
||||
break;
|
||||
}
|
||||
unset ($prep_statement);
|
||||
@@ -88,7 +91,7 @@ else {
|
||||
$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)) {
|
||||
if (!$connection = 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");
|
||||
@@ -107,7 +110,7 @@ else {
|
||||
|
||||
//download attachment
|
||||
if (isset($_GET['download'])) {
|
||||
$attachment = get_attachments($mailbox, $email_id, FT_UID);
|
||||
$attachment = parse_attachments($connection, $email_id, FT_UID);
|
||||
$file_type = pathinfo($attachment[0]['filename'], PATHINFO_EXTENSION);
|
||||
switch ($file_type) {
|
||||
case "pdf" : header("Content-Type: application/pdf"); break;
|
||||
@@ -130,9 +133,9 @@ else {
|
||||
|
||||
//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)) {
|
||||
$attachment = parse_attachments($connection, $email_id, FT_UID);
|
||||
if (imap_delete($connection, $email_id, FT_UID)) {
|
||||
if (imap_expunge($connection)) {
|
||||
//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']);
|
||||
@@ -161,7 +164,7 @@ else {
|
||||
}
|
||||
|
||||
//get emails
|
||||
$emails = imap_search($mailbox, 'SUBJECT "Fax"', SE_UID);
|
||||
$emails = imap_search($connection, "SUBJECT \"".$fax_email_inbound_subject_tag."\"", SE_UID);
|
||||
|
||||
//show the header
|
||||
require_once "resources/header.php";
|
||||
@@ -199,8 +202,8 @@ else {
|
||||
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);
|
||||
$metadata = object_to_array(imap_fetch_overview($connection, $email_id, FT_UID));
|
||||
$attachment = parse_attachments($connection, $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";
|
||||
@@ -210,8 +213,10 @@ else {
|
||||
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;
|
||||
// $fax_message = imap_fetchbody($connection, $email_id, '1.1', FT_UID);
|
||||
// if ($fax_message == '') {
|
||||
// $fax_message = imap_fetchbody($connection, $email_id, '1', FT_UID);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -230,57 +235,4 @@ 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
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -107,6 +107,9 @@ else {
|
||||
$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_email_inbound_subject_tag = check_str($_POST["fax_email_inbound_subject_tag"]);
|
||||
$fax_email_outbound_subject_tag = check_str($_POST["fax_email_outbound_subject_tag"]);
|
||||
$fax_email_outbound_authorized_senders = $_POST["fax_email_outbound_authorized_senders"];
|
||||
//$fax_pin_number = check_str($_POST["fax_pin_number"]);
|
||||
$fax_caller_id_name = check_str($_POST["fax_caller_id_name"]);
|
||||
$fax_caller_id_number = check_str($_POST["fax_caller_id_number"]);
|
||||
@@ -221,6 +224,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//add or update the database
|
||||
if ($_POST["persistformvar"] != "true") {
|
||||
|
||||
//prep authorized senders
|
||||
if (sizeof($fax_email_outbound_authorized_senders) > 0) {
|
||||
foreach ($fax_email_outbound_authorized_senders as $sender_num => $sender) {
|
||||
$sender = check_str($sender);
|
||||
if ($sender == '' || !valid_email($sender)) { unset($fax_email_outbound_authorized_senders[$sender_num]); }
|
||||
}
|
||||
$fax_email_outbound_authorized_senders = implode(',', $fax_email_outbound_authorized_senders);
|
||||
}
|
||||
|
||||
if ($action == "add" && permission_exists('fax_extension_add')) {
|
||||
//prepare the unique identifiers
|
||||
$fax_uuid = uuid();
|
||||
@@ -244,6 +257,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= "fax_email_connection_username, ";
|
||||
$sql .= "fax_email_connection_password, ";
|
||||
$sql .= "fax_email_connection_mailbox, ";
|
||||
$sql .= "fax_email_inbound_subject_tag, ";
|
||||
$sql .= "fax_email_outbound_subject_tag, ";
|
||||
$sql .= "fax_email_outbound_authorized_senders, ";
|
||||
//$sql .= "fax_pin_number, ";
|
||||
$sql .= "fax_caller_id_name, ";
|
||||
$sql .= "fax_caller_id_number, ";
|
||||
@@ -269,6 +285,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$sql .= "'$fax_email_connection_username', ";
|
||||
$sql .= "'$fax_email_connection_password', ";
|
||||
$sql .= "'$fax_email_connection_mailbox', ";
|
||||
$sql .= "'$fax_email_inbound_subject_tag', ";
|
||||
$sql .= "'$fax_email_outbound_subject_tag', ";
|
||||
$sql .= "'$fax_email_outbound_authorized_senders', ";
|
||||
//$sql .= "'$fax_pin_number', ";
|
||||
$sql .= "'$fax_caller_id_name', ";
|
||||
$sql .= "'$fax_caller_id_number', ";
|
||||
@@ -303,6 +322,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$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_email_inbound_subject_tag = '$fax_email_inbound_subject_tag', ";
|
||||
$sql .= "fax_email_outbound_subject_tag = '$fax_email_outbound_subject_tag', ";
|
||||
$sql .= "fax_email_outbound_authorized_senders = '$fax_email_outbound_authorized_senders', ";
|
||||
//$sql .= "fax_pin_number = '$fax_pin_number', ";
|
||||
$sql .= "fax_caller_id_name = '$fax_caller_id_name', ";
|
||||
$sql .= "fax_caller_id_number = '$fax_caller_id_number', ";
|
||||
@@ -540,6 +562,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
$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_email_inbound_subject_tag = $row["fax_email_inbound_subject_tag"];
|
||||
$fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"];
|
||||
$fax_email_outbound_authorized_senders = $row["fax_email_outbound_authorized_senders"];
|
||||
//$fax_pin_number = $row["fax_pin_number"];
|
||||
$fax_caller_id_name = $row["fax_caller_id_name"];
|
||||
$fax_caller_id_number = $row["fax_caller_id_number"];
|
||||
@@ -562,23 +587,32 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//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 " function toggle_advanced(advanced_id) {\n";
|
||||
echo " $('#'+advanced_id).toggle();\n";
|
||||
echo " if ($('#'+advanced_id).is(':visible')) {\n";
|
||||
echo " $('#page').animate({scrollTop: $('#'+advanced_id).offset().top - 80}, 'slow');\n";
|
||||
echo " }\n";
|
||||
echo " }\n";
|
||||
echo " function add_sender() {\n";
|
||||
echo " var newdiv = document.createElement('div');\n";
|
||||
echo " newdiv.innerHTML = \"<input type='text' class='formfld' style='width: 225px; min-width: 225px; max-width: 225px; margin-top: 3px;' name='fax_email_outbound_authorized_senders[]' maxlength='255'>\";";
|
||||
echo " document.getElementById('authorized_senders').appendChild(newdiv);";
|
||||
echo " }\n";
|
||||
echo "</script>\n";
|
||||
|
||||
//fax extension form
|
||||
echo "<form method='post' name='frm' action=''>\n";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\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 width='70%' valign='top' align='right'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt=\"".$text['button-back']."\" onclick=\"window.location='fax.php'\" value=\"".$text['button-back']."\">\n";
|
||||
echo " <td width='70%' valign='top' align='right'>\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") {
|
||||
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='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 " </td>\n";
|
||||
echo " <input type='submit' class='btn' name='submit' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
if (if_group("user")) {
|
||||
@@ -636,112 +670,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\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";
|
||||
if (function_exists("imap_open") && file_exists("fax_box_remote.php")) {
|
||||
echo "<input type='button' class='btn' value='".$text['button-advanced']."' onclick=\"toggle_advanced('advanced_email_connection');\">\n";
|
||||
}
|
||||
echo "<br />\n";
|
||||
echo " ".$text['description-email']."\n";
|
||||
echo "</td>\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\"> : ";
|
||||
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 "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
//echo " ".$text['label-pin']."\n";
|
||||
@@ -780,12 +716,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " ".$text['label-forward']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
if (is_numeric($fax_forward_number)) {
|
||||
echo " <input class='formfld' type='text' name='fax_forward_number' maxlength='255' value=\"".format_phone($fax_forward_number)."\">\n";
|
||||
}
|
||||
else {
|
||||
echo " <input class='formfld' type='text' name='fax_forward_number' maxlength='255' value=\"".$fax_forward_number."\">\n";
|
||||
}
|
||||
echo " <input class='formfld' type='text' name='fax_forward_number' maxlength='255' value=\"".((is_numeric($fax_forward_number)) ? format_phone($fax_forward_number) : $fax_forward_number)."\">\n";
|
||||
echo "<br />\n";
|
||||
echo "".$text['description-forward-number']."\n";
|
||||
echo "</td>\n";
|
||||
@@ -878,10 +809,207 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo " </td>\n";
|
||||
echo " </tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
echo "<br />\n";
|
||||
|
||||
if (function_exists("imap_open") && file_exists("fax_box_remote.php")) {
|
||||
|
||||
echo "<div id='advanced_email_connection' ".(($fax_email_connection_host == '') ? "style='display: none;'" : null).">\n";
|
||||
|
||||
echo "<b>".$text['label-advanced_settings']."</b><br><br>";
|
||||
echo $text['description-advanced_settings']."<br><br>";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>";
|
||||
echo " <td width='50%' valign='top'>";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td colspan='2'>";
|
||||
echo " <span style='font-weight: bold; color: #000;'>".$text['label-email_account_connection']."</span><br><br>";
|
||||
echo "</td>";
|
||||
echo "</tr>\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' style='white-space: nowrap;' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='fax_email_connection_host' maxlength='255' value=\"$fax_email_connection_host\"> : ";
|
||||
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 " </td>";
|
||||
echo " <td style='white-space: nowrap;'> </td>";
|
||||
echo " <td width='50%' valign='top'>";
|
||||
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td colspan='2'>";
|
||||
echo " <span style='font-weight: bold; color: #000;'>".$text['label-email_remote_inbox']."</span><br><br>";
|
||||
echo "</td>";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-email_inbound_subject_tag']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <span style='font-size: 18px;'>[ <input class='formfld' type='text' name='fax_email_inbound_subject_tag' maxlength='255' value=\"$fax_email_inbound_subject_tag\"> ]</span>\n";
|
||||
echo "<br />\n";
|
||||
echo " ".$text['description-email_inbound_subject_tag']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (file_exists("fax_emails.php")) {
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td colspan='2'>";
|
||||
echo " <br><br>";
|
||||
echo " <span style='font-weight: bold; color: #000;'>".$text['label-email_email-to-fax']."</span><br><br>";
|
||||
echo "</td>";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td width='30%' class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-email_outbound_subject_tag']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td width='70%' class='vtable' align='left'>\n";
|
||||
echo " <span style='font-size: 18px;'>[ <input class='formfld' type='text' name='fax_email_outbound_subject_tag' maxlength='255' value=\"$fax_email_outbound_subject_tag\"> ]</span>\n";
|
||||
echo "<br />\n";
|
||||
echo " ".$text['description-email_outbound_subject_tag']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
|
||||
echo " ".$text['label-email_outbound_authorized_senders']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left' valign='top'>\n";
|
||||
echo " <table cellpadding='0' cellspacing='0' border='0'>";
|
||||
echo " <tr>";
|
||||
echo " <td id='authorized_senders'>";
|
||||
if (substr_count($fax_email_outbound_authorized_senders, ',') > 0) {
|
||||
$senders = explode(',', $fax_email_outbound_authorized_senders);
|
||||
}
|
||||
else {
|
||||
$senders[] = $fax_email_outbound_authorized_senders;
|
||||
}
|
||||
$senders[] = ''; // empty one
|
||||
foreach ($senders as $sender_num => $sender) {
|
||||
echo " <input class='formfld' style='width: 225px; min-width: 225px; max-width: 225px; ".(($sender_num > 0) ? "margin-top: 3px;" : null)."' type='text' name='fax_email_outbound_authorized_senders[]' maxlength='255' value=\"$sender\">".((sizeof($senders) > 0 && $sender_num < (sizeof($senders) - 1) ) ? "<br>" : null);
|
||||
}
|
||||
echo " </td>";
|
||||
echo " <td style='vertical-align: bottom;'>";
|
||||
echo " <a href='javascript:void(0);' onclick='add_sender();'>$v_link_label_add</a>";
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " </table>";
|
||||
echo " ".$text['description-email_outbound_authorized_senders']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
echo " <tr>";
|
||||
echo " <td colspan='3' style='text-align: right;'>";
|
||||
echo " <br><input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>";
|
||||
echo " <tr>";
|
||||
echo "</table>";
|
||||
echo "<br>";
|
||||
echo "</div>\n";
|
||||
|
||||
}
|
||||
|
||||
echo "</form>";
|
||||
|
||||
//show the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
9
app/fax/resources/functions/object_to_array.php
Normal file
9
app/fax/resources/functions/object_to_array.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
?>
|
||||
48
app/fax/resources/functions/parse_attachments.php
Normal file
48
app/fax/resources/functions/parse_attachments.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
function parse_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']);
|
||||
$attachments[$i]['size'] = strlen($attachments[$i]['attachment']);
|
||||
}
|
||||
elseif($structure->parts[$i]->encoding == 4) { // 4 = QUOTED-PRINTABLE
|
||||
$attachments[$i]['attachment'] = quoted_printable_decode($attachments[$i]['attachment']);
|
||||
$attachments[$i]['size'] = strlen($attachments[$i]['attachment']);
|
||||
}
|
||||
}
|
||||
|
||||
unset($attachments[$i]['is_attachment']);
|
||||
}
|
||||
|
||||
}
|
||||
return array_values($attachments); //reindex
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user