mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Emails: Initial build of failed email log. Still under construction.
This commit is contained in:
89
app/emails/app_config.php
Normal file
89
app/emails/app_config.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
//application details
|
||||
$apps[$x]['name'] = "Emails";
|
||||
$apps[$x]['uuid'] = "bd64f590-9a24-468d-951f-6639ac728694";
|
||||
$apps[$x]['category'] = "Switch";
|
||||
$apps[$x]['subcategory'] = "";
|
||||
$apps[$x]['version'] = "";
|
||||
$apps[$x]['license'] = "Mozilla Public License 1.1";
|
||||
$apps[$x]['url'] = "http://www.fusionpbx.com";
|
||||
$apps[$x]['description']['en-us'] = "Manage failed email messages.";
|
||||
$apps[$x]['description']['es-cl'] = "Gestionar los mensajes fallidos.";
|
||||
$apps[$x]['description']['es-mx'] = "";
|
||||
$apps[$x]['description']['de-de'] = "";
|
||||
$apps[$x]['description']['de-ch'] = "";
|
||||
$apps[$x]['description']['de-at'] = "";
|
||||
$apps[$x]['description']['fr-fr'] = "Gérer les messages électroniques échoué.";
|
||||
$apps[$x]['description']['fr-ca'] = "";
|
||||
$apps[$x]['description']['fr-ch'] = "";
|
||||
$apps[$x]['description']['pt-pt'] = "Gerenciar mensagens de e-mail falhou.";
|
||||
$apps[$x]['description']['pt-br'] = "";
|
||||
|
||||
//permission details
|
||||
$y = 0;
|
||||
$apps[$x]['permissions'][$y]['name'] = "email_view";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "email_delete";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "email_download";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "email_resend";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 1; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_emails";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "email_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "call_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_xml_cdr";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "sent_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "timestamp";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "timestamp";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "type";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "status";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "email";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
?>
|
||||
88
app/emails/app_languages.php
Normal file
88
app/emails/app_languages.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
$text['title-emails']['en-us'] = "Emails";
|
||||
$text['title-emails']['es-cl'] = "Los Correos Electrónicos";
|
||||
$text['title-emails']['pt-pt'] = "Emails";
|
||||
$text['title-emails']['fr-fr'] = "Emails";
|
||||
|
||||
$text['header-emails']['en-us'] = "Emails";
|
||||
$text['header-emails']['es-cl'] = "Los Correos Electrónicos";
|
||||
$text['header-emails']['pt-pt'] = "Emails";
|
||||
$text['header-emails']['fr-fr'] = "Emails";
|
||||
|
||||
$text['description-emails']['en-us'] = "Manage failed email messages.";
|
||||
$text['description-emails']['es-cl'] = "Gestionar los mensajes fallidos.";
|
||||
$text['description-emails']['pt-pt'] = "Gerenciar mensagens de e-mail falhou.";
|
||||
$text['description-emails']['fr-fr'] = "Gérer les messages électroniques échoué.";
|
||||
|
||||
$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";
|
||||
|
||||
$text['confirm-delete']['en-us'] = "Are you sure you want to delete this?";
|
||||
$text['confirm-delete']['es-cl'] = "¿Realmente desea eliminar esto?";
|
||||
$text['confirm-delete']['pt-pt'] = "Tem a certeza que deseja remover?";
|
||||
$text['confirm-delete']['fr-fr'] = "Voulez-vous vraiment supprimer cela?";
|
||||
|
||||
$text['message-delete']['en-us'] = "Delete Complete";
|
||||
$text['message-delete']['es-cl'] = "Eliminación Completada";
|
||||
$text['message-delete']['pt-pt'] = "Remoção Efectuada";
|
||||
$text['message-delete']['fr-fr'] = "Supprimé";
|
||||
|
||||
$text['label-type']['en-us'] = "Type";
|
||||
$text['label-type']['es-cl'] = "Tipo";
|
||||
$text['label-type']['pt-pt'] = "Tipo";
|
||||
$text['label-type']['fr-fr'] = "Type";
|
||||
|
||||
$text['label-type_voicemail']['en-us'] = "Voicemail";
|
||||
$text['label-type_voicemail']['es-cl'] = "Correo de Voz";
|
||||
$text['label-type_voicemail']['pt-pt'] = "Correio de Voz";
|
||||
$text['label-type_voicemail']['fr-fr'] = "Messagerie Vocale";
|
||||
|
||||
$text['label-reference']['en-us'] = "Reference";
|
||||
$text['label-reference']['es-cl'] = "Referencia";
|
||||
$text['label-reference']['pt-pt'] = "Referência";
|
||||
$text['label-reference']['fr-fr'] = "Référence";
|
||||
|
||||
$text['label-reference_cdr']['en-us'] = "CDR";
|
||||
$text['label-reference_cdr']['es-cl'] = "RDL";
|
||||
$text['label-reference_cdr']['pt-pt'] = "RC";
|
||||
$text['label-reference_cdr']['fr-fr'] = "HDA";
|
||||
|
||||
$text['label-sent']['en-us'] = "Sent";
|
||||
$text['label-sent']['es-cl'] = "Enviado";
|
||||
$text['label-sent']['pt-pt'] = "Enviados";
|
||||
$text['label-sent']['fr-fr'] = "Expédié";
|
||||
|
||||
$text['label-status']['en-us'] = "Status";
|
||||
$text['label-status']['es-cl'] = "Estado";
|
||||
$text['label-status']['pt-pt'] = "Estado";
|
||||
$text['label-status']['fr-fr'] = "Statut";
|
||||
|
||||
$text['label-status_failed']['en-us'] = "Failed";
|
||||
$text['label-status_failed']['es-cl'] = "Fracasado";
|
||||
$text['label-status_failed']['pt-pt'] = "Fracassado";
|
||||
$text['label-status_failed']['fr-fr'] = "Manqué";
|
||||
|
||||
$text['label-message']['en-us'] = "Message";
|
||||
$text['label-message']['es-cl'] = "Mensaje";
|
||||
$text['label-message']['pt-pt'] = "Mensagem";
|
||||
$text['label-message']['fr-fr'] = "Message";
|
||||
|
||||
$text['label-message_view']['en-us'] = "View";
|
||||
$text['label-message_view']['es-cl'] = "Ver";
|
||||
$text['label-message_view']['pt-pt'] = "Vista";
|
||||
$text['label-message_view']['fr-fr'] = "Vue";
|
||||
|
||||
$text['label-attachment']['en-us'] = "Attachment";
|
||||
$text['label-attachment']['es-cl'] = "Accesorio";
|
||||
$text['label-attachment']['pt-pt'] = "Acessório";
|
||||
$text['label-attachment']['fr-fr'] = "Attachement";
|
||||
|
||||
$text['label-attachment_download']['en-us'] = "Download";
|
||||
$text['label-attachment_download']['es-cl'] = "Descargar";
|
||||
$text['label-attachment_download']['pt-pt'] = "Descarregar";
|
||||
$text['label-attachment_download']['fr-fr'] = "Télécharger";
|
||||
|
||||
?>
|
||||
21
app/emails/app_menu.php
Normal file
21
app/emails/app_menu.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
$apps[$x]['menu'][0]['title']['en-us'] = "Emails";
|
||||
$apps[$x]['menu'][0]['title']['es-cl'] = "Los Correos Electrónicos";
|
||||
$apps[$x]['menu'][0]['title']['es-mx'] = "";
|
||||
$apps[$x]['menu'][0]['title']['de-de'] = "";
|
||||
$apps[$x]['menu'][0]['title']['de-ch'] = "";
|
||||
$apps[$x]['menu'][0]['title']['de-at'] = "";
|
||||
$apps[$x]['menu'][0]['title']['fr-fr'] = "Emails";
|
||||
$apps[$x]['menu'][0]['title']['fr-ca'] = "";
|
||||
$apps[$x]['menu'][0]['title']['fr-ch'] = "";
|
||||
$apps[$x]['menu'][0]['title']['pt-pt'] = "Emails";
|
||||
$apps[$x]['menu'][0]['title']['pt-br'] = "";
|
||||
$apps[$x]['menu'][0]['uuid'] = "1c2b9569-975f-4b82-9378-f3c5b63991e2";
|
||||
$apps[$x]['menu'][0]['parent_uuid'] = "0438b504-8613-7887-c420-c837ffb20cb1";
|
||||
$apps[$x]['menu'][0]['category'] = "internal";
|
||||
$apps[$x]['menu'][0]['path'] = "/app/emails/emails.php";
|
||||
$apps[$x]['menu'][0]['groups'][] = "admin";
|
||||
$apps[$x]['menu'][0]['groups'][] = "superadmin";
|
||||
|
||||
?>
|
||||
59
app/emails/email_delete.php
Normal file
59
app/emails/email_delete.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?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>
|
||||
Copyright (C) 2008-2012
|
||||
All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
include "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('email_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get posted values, if any
|
||||
$email_uuid = $_REQUEST["id"];
|
||||
|
||||
if ($email_uuid != '') {
|
||||
$sql = "delete from v_emails ";
|
||||
$sql .= "where email_uuid = '".$email_uuid."' ";
|
||||
$sql .= "and domain_uuid = '".$domain_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql, $prep_statement);
|
||||
|
||||
//set message
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
}
|
||||
|
||||
//redirect user
|
||||
header("Location: emails.php");
|
||||
|
||||
?>
|
||||
153
app/emails/emails.php
Normal file
153
app/emails/emails.php
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('email_view')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = ($_GET["order_by"] != '') ? $_GET["order_by"] : 'sent_date';
|
||||
$order = ($_GET["order"] != '') ? $_GET["order"] : 'desc';
|
||||
|
||||
//get the fax_uuid
|
||||
if (count($_GET) > 0) {
|
||||
$email_uuid = check_str($_GET["id"]);
|
||||
}
|
||||
|
||||
//additional includes
|
||||
$document['title'] = $text['title-emails'];
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/paging.php";
|
||||
|
||||
//show the content
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='50%' align='left' valign='top' nowrap='nowrap'>";
|
||||
echo " <b>".$text['header-emails']."</b>";
|
||||
echo " <br /><br />";
|
||||
echo " ".$text['description-emails'];
|
||||
echo " </td>\n";
|
||||
echo " <td width='50%' align='right' valign='top'>\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 />\n";
|
||||
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) as num_rows from v_emails ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$prep_statement = $db->prepare($sql);
|
||||
if ($prep_statement) {
|
||||
$prep_statement->execute();
|
||||
$row = $prep_statement->fetch(PDO::FETCH_ASSOC);
|
||||
$num_rows = ($row['num_rows'] > 0) ? $row['num_rows'] : 0;
|
||||
}
|
||||
|
||||
//prepare to page the results
|
||||
$rows_per_page = 50;
|
||||
$param = "";
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = "select * from v_emails ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by ".$order_by." ".$order." "; }
|
||||
$sql .= "limit ".$rows_per_page." offset ".$offset." ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
$result_count = count($result);
|
||||
unset ($prep_statement, $sql);
|
||||
|
||||
$c = 0;
|
||||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo th_order_by('sent_date', $text['label-sent'], $order_by, $order);
|
||||
echo th_order_by('type', $text['label-type'], $order_by, $order);
|
||||
echo th_order_by('status', $text['label-status'], $order_by, $order);
|
||||
echo "<th>".$text['label-message']."</th>\n";
|
||||
echo "<th>".$text['label-attachment']."</th>\n";
|
||||
echo "<th>".$text['label-reference']."</th>\n";
|
||||
echo "<td class='list_control_icons'> </td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
|
||||
//get call details
|
||||
$sql = "select caller_id_name, caller_id_number, destination_number from v_xml_cdr ";
|
||||
$sql .= "where domain_uuid = '".$domain_uuid."' ";
|
||||
$sql .= "and uuid = '".$row['call_uuid']."' ";
|
||||
//echo "<tr><td colspan='40'>".$sql."</td></tr>";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result2 = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
foreach($result2 as $row2) {
|
||||
$caller_id_name = ($row2['caller_id_name'] != '') ? $row2['caller_id_name'] : null;
|
||||
$caller_id_number = ($row2['caller_id_number'] != '') ? $row2['caller_id_number'] : null;
|
||||
$destination_number = ($row2['destination_number'] != '') ? $row2['destination_number'] : null;
|
||||
}
|
||||
unset($prep_statement, $sql);
|
||||
|
||||
$tr_link = "href='email_view.php?id=".$row['email_uuid']."'";
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
$sent_date = explode('.', $row['sent_date']);
|
||||
echo $sent_date[0];
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-type_'.$row['type']]."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$text['label-status_'.$row['status']]."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'><a href=''>".$text['label-message_view']."</a></td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." tr_link_void'><a href=''>".$text['label-attachment_download']."</a></td>\n";
|
||||
echo " <td valign='top' class='row_stylebg tr_link_void' style='white-space: nowrap; vertical-align: top;'>";
|
||||
echo " <a href='".PROJECT_PATH."/app/xml_cdr/xml_cdr_details.php?uuid=".$row['call_uuid']."'>".$text['label-reference_cdr']."</a>";
|
||||
echo " ".($caller_id_name != '') ? " ".$caller_id_name." (".format_phone($caller_id_number).")" : $caller_id_number;
|
||||
echo " <span style='font-size: 150%; line-height: 10px;'>⤑</span> ".$destination_number;
|
||||
echo " </td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
echo "<a href='email_view.php?id=".$row['email_uuid']."' alt='".$text['label-message_view']."'>$v_link_label_view</a>";
|
||||
if (permission_exists('email_delete')) {
|
||||
echo "<a href='email_delete.php?id=".$row['email_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo "</tr>\n";
|
||||
if ($c==0) { $c=1; } else { $c=0; }
|
||||
} //end foreach
|
||||
unset($sql, $result, $row_count);
|
||||
} //end if results
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td colspan='21' align='left'>\n";
|
||||
echo " <table width='100%' cellpadding='0' cellspacing='0'>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " <td width='33.3%' align='center' nowrap='nowrap'>$paging_controls</td>\n";
|
||||
echo " <td width='33.3%' nowrap='nowrap'> </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "</table>";
|
||||
echo "<br /><br />";
|
||||
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
?>
|
||||
50
app/emails/root.php
Normal file
50
app/emails/root.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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>
|
||||
*/
|
||||
|
||||
// make sure the PATH_SEPARATOR is defined
|
||||
if (!defined("PATH_SEPARATOR")) {
|
||||
if ( strpos( $_ENV[ "OS" ], "Win" ) !== false ) { define("PATH_SEPARATOR", ";"); } else { define("PATH_SEPARATOR", ":"); }
|
||||
}
|
||||
|
||||
// make sure the document_root is set
|
||||
$_SERVER["SCRIPT_FILENAME"] = str_replace("\\", "/", $_SERVER["SCRIPT_FILENAME"]);
|
||||
$_SERVER["DOCUMENT_ROOT"] = str_replace($_SERVER["PHP_SELF"], "", $_SERVER["SCRIPT_FILENAME"]);
|
||||
$_SERVER["DOCUMENT_ROOT"] = realpath($_SERVER["DOCUMENT_ROOT"]);
|
||||
//echo "DOCUMENT_ROOT: ".$_SERVER["DOCUMENT_ROOT"]."<br />\n";
|
||||
//echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<br />\n";
|
||||
//echo "SCRIPT_FILENAME: ".$_SERVER["SCRIPT_FILENAME"]."<br />\n";
|
||||
|
||||
// if the project directory exists then add it to the include path otherwise add the document root to the include path
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].'/fusionpbx')){
|
||||
if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', '/fusionpbx'); }
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER["DOCUMENT_ROOT"].'/fusionpbx' );
|
||||
}
|
||||
else {
|
||||
if(!defined('PROJECT_PATH')) { define('PROJECT_PATH', ''); }
|
||||
set_include_path( get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'] );
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -107,7 +107,7 @@ else {
|
||||
echo "<td class='list_control_icons'>";
|
||||
echo " \n";
|
||||
echo "</td>\n";
|
||||
echo "<tr>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($result_count > 0) {
|
||||
foreach($result as $row) {
|
||||
|
||||
@@ -66,53 +66,6 @@
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
//schema details
|
||||
$y = 1; //table array index
|
||||
$z = 0; //field array index
|
||||
$apps[$x]['db'][$y]['table'] = "v_emails";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "email_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "primary";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "call_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_xml_cdr";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "sent_date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "timestamp";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "date";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "timestamp";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "type";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "status";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
$z++;
|
||||
$apps[$x]['db'][$y]['fields'][$z]['name'] = "email";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
|
||||
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
|
||||
|
||||
/*
|
||||
$y = 0; //table array index
|
||||
$z = 0; //field array index
|
||||
|
||||
Reference in New Issue
Block a user