forked from projectsend/projectsend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
72 lines (55 loc) · 2.09 KB
/
dashboard.php
File metadata and controls
72 lines (55 loc) · 2.09 KB
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
70
71
72
<?php
/**
* Home page for logged in system users.
*/
require_once 'bootstrap.php';
// Dashboard is accessible to all logged-in non-client users
redirect_if_not_logged_in();
// Clients should use their own dashboard
if (current_role_in(['Client'])) {
ps_redirect(BASE_URI . 'my_files/');
}
$page_title = __('Dashboard', 'cftp_admin');
$active_nav = 'dashboard';
$body_class = array('dashboard', 'home', 'hide_title');
$page_id = 'dashboard';
include_once ADMIN_VIEWS_DIR . DS . 'header.php';
define('CAN_INCLUDE_FILES', true);
if (current_user_can('view_dashboard_counters')) {
include_once WIDGETS_FOLDER . 'counters.php';
}
?>
<div class="dashboard-widgets-container" id="dashboard-widgets">
<?php if (current_user_can('view_statistics')) { ?>
<div class="widget-container" data-widget="statistics">
<?php include_once WIDGETS_FOLDER . 'statistics.php'; ?>
</div>
<?php } ?>
<?php if (current_user_can('view_news')) { ?>
<div class="widget-container" data-widget="news">
<?php include_once WIDGETS_FOLDER . 'news.php'; ?>
</div>
<?php } ?>
<?php if (current_user_can('view_system_info')) { ?>
<div class="widget-container" data-widget="system-info">
<?php include_once WIDGETS_FOLDER . 'system-information.php'; ?>
</div>
<?php } ?>
<?php if (current_user_can('view_actions_log')) { ?>
<div class="widget-container" data-widget="actions-log">
<?php include_once WIDGETS_FOLDER . 'actions-log.php'; ?>
</div>
<?php } ?>
<?php if (current_user_can('view_storage_analytics')) { ?>
<div class="widget-container" data-widget="storage-analytics">
<?php include_once WIDGETS_FOLDER . 'storage-analytics.php'; ?>
</div>
<?php } ?>
<?php if (current_user_can('view_download_analytics')) { ?>
<div class="widget-container" data-widget="download-analytics">
<?php include_once WIDGETS_FOLDER . 'download-analytics.php'; ?>
</div>
<?php } ?>
</div>
<?php
include_once ADMIN_VIEWS_DIR . DS . 'footer.php';