forked from zedzedtop/mailzu
-
Notifications
You must be signed in to change notification settings - Fork 7
/
messagesSummary.php
69 lines (55 loc) · 1.56 KB
/
messagesSummary.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* This file is the messages index in quarantine for the entire site.
* It provides a listing of all messages corresponding to:
* - attachment ('B')
* - spam ('S')
* - viruses ('V')
* - bad headers ('H')
*
* @author Gergely Nagy <[email protected]>
* @version 2021-11-08
* @package mailzu-ng
*
* Copyright (C) 2021 mailzu-ng
* License: GPL, see LICENSE
*/
/**
* Include autoloader
*/
include_once('lib/autoload.php');
/**
* Include common output functions
*/
include_once('templates/common.template.php');
/**
* Include quarantine-specific output functions
*/
include_once('templates/summary.template.php');
if (!Auth::is_logged_in()) {
(new Auth())->print_login_msg(); // Check if user is logged in
}
$_SESSION['sessionNav'] = "Site Quarantine Summary";
$t = new Template(translate('Site Quarantine Summary'));
$db = new DBEngine();
$t->printHTMLHeader();
$t->printWelcome();
$t->startMain();
// Break table into 2 columns, put quick links on left side and all other tables on the right
startQuickLinksCol();
showQuickLinks(); // Print out My Quick Links
startDataDisplayCol();
if (!Auth::isMailAdmin() || !$conf['app']['siteSummary']) {
CmnFns::do_error_box(translate('Access Denied'));
} else {
// Print a loading message until database returns...
printMessage(translate('Loading Summary...'));
$count_array = $db->get_site_summary();
showSummary($count_array);
// Hide the message after the table loads.
hideMessage(translate('Loading Summary...'));
}
endDataDisplayCol();
$t->endMain();
$t->printHTMLFooter();
?>