Update fax_files_remote.php
This commit is contained in:
@@ -24,18 +24,22 @@
|
|||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
James Rose <james.o.rose@gmail.com>
|
James Rose <james.o.rose@gmail.com>
|
||||||
*/
|
*/
|
||||||
include "root.php";
|
|
||||||
require_once "resources/require.php";
|
//includes
|
||||||
require_once "resources/check_auth.php";
|
include "root.php";
|
||||||
require_once "resources/functions/object_to_array.php";
|
require_once "resources/require.php";
|
||||||
require_once "resources/functions/parse_message.php";
|
require_once "resources/check_auth.php";
|
||||||
if (permission_exists('fax_inbox_view')) {
|
require_once "resources/functions/object_to_array.php";
|
||||||
//access granted
|
require_once "resources/functions/parse_message.php";
|
||||||
}
|
|
||||||
else {
|
//check permissions
|
||||||
echo "access denied";
|
if (permission_exists('fax_inbox_view')) {
|
||||||
exit;
|
//access granted
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
echo "access denied";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
@@ -175,6 +179,7 @@ else {
|
|||||||
//show the header
|
//show the header
|
||||||
require_once "resources/header.php";
|
require_once "resources/header.php";
|
||||||
|
|
||||||
|
//set the row styles
|
||||||
$row_style["0"] = "row_style0";
|
$row_style["0"] = "row_style0";
|
||||||
$row_style["1"] = "row_style1";
|
$row_style["1"] = "row_style1";
|
||||||
|
|
||||||
@@ -206,9 +211,7 @@ else {
|
|||||||
echo " </tr>";
|
echo " </tr>";
|
||||||
|
|
||||||
if ($emails) {
|
if ($emails) {
|
||||||
|
|
||||||
rsort($emails); // most recent on top
|
rsort($emails); // most recent on top
|
||||||
|
|
||||||
foreach ($emails as $email_id) {
|
foreach ($emails as $email_id) {
|
||||||
$metadata = object_to_array(imap_fetch_overview($connection, $email_id, FT_UID));
|
$metadata = object_to_array(imap_fetch_overview($connection, $email_id, FT_UID));
|
||||||
$message = parse_message($connection, $email_id, FT_UID);
|
$message = parse_message($connection, $email_id, FT_UID);
|
||||||
@@ -240,10 +243,10 @@ else {
|
|||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "<br><br>";
|
echo "<br><br>";
|
||||||
|
|
||||||
/* close the connection */
|
//close the connection
|
||||||
imap_close($connection);
|
imap_close($connection);
|
||||||
|
|
||||||
|
|
||||||
//show the footer
|
//show the footer
|
||||||
require_once "resources/footer.php";
|
require_once "resources/footer.php";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user