PluginProbe
wpForo Forum / 1.1.2
wpForo Forum v1.1.2
3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.2 All 137 releases
wpforo / wpf-admin / dashboard.php

dashboard.php in wpForo Forum 1.1.2, at wpf-admin/dashboard.php

235 lines 18.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( !defined( 'ABSPATH' ) ) exit;
4
5 global $wpforo;
6 ?>
7
8 <div id="wpf-admin-wrap" class="wrap">
9 <h1 style="padding:30px 0px 10px 0px;"><?php _e('wpForo Dashboard', 'wpforo'); ?></h1>
10 <?php $wpforo->notice->show(FALSE) ?>
11
12
13 <div id="dashboard-widgets-wrap" style="padding-top:10px;">
14 <div class="metabox-holder" id="dashboard-widgets">
15
16
17 <div class="postbox-container" id="postbox-container-0" style="width:100%;">
18 <div class="meta-box-sortables ui-sortable" id="normal-sortables" style="min-height:60px;">
19
20 <div class="postbox" id="wpforo_dashboard_widget_0">
21 <button aria-expanded="true" class="handlediv button-link" type="button">
22 <span class="screen-reader-text">&nbsp;</span>
23 <span class="toggle-indicator"></span>
24 </button>
25 <h2 class="hndle ui-sortable-handle"><span><?php _e('Welcome Message', 'wpforo'); ?></span></h2>
26 <div class="inside">
27 <div class="main" style="padding:5px 15px 15px 15px;">
28 <div style="float:left; vertical-align:top; width:calc(100% - 300px);;">
29 <p style="font-size:30px; margin:0px 0px 10px 0px; font-family:Constantia, 'Lucida Bright', 'DejaVu Serif', Georgia, serif">Welcome to wpForo <?php echo esc_html(WPFORO_VERSION) ?></p>
30 <p style="margin:0px; font-size:14px;font-family:'Lucida Bright', 'DejaVu Serif', Georgia, serif"">
31 <?php _e('Thank you for using wpForo! wpForo is a professional bulletin board for WorPress, and the only forum software which comes with Multi-layout template system.
32 The "Extended", "Simplified" and "Question &amp Answer" layouts fit almost all type of discussions needs. You can use wpForo for small and extremely large communities.
33 <br />If you found some issue or bug please open a support topic in plugin page or in our support forum at gVectors.com. If you liked wpForo please leave some good review for this plugin. We really need your good reviews.
34 If you didn\'t like wpForo please leave a list of issues and requirements you\'d like us to fix and add in near future. We\'re here to help you and improve wpForo as much as possible.', 'wpforo'); ?></p>
35 </div>
36 <div style="float:right; vertical-align:top; padding-right:20px; width:280px; text-align:right; padding-top:20px;">
37 <img class="wpforo-dashboard-logo" src="<?php echo WPFORO_URL ?>/wpf-assets/images/wpforo-logo.png"/>
38 <p style="font-size:11px; color:#B1B1B1; font-style:italic; text-align:right; line-height:14px; padding-top:15px; margin:0px;">
39 Thank you!<br> Sincerely yours,<br>
40 gVectors Team&nbsp;
41 </p>
42 </div>
43 <div style="clear:both;"></div>
44 </div>
45 </div>
46 </div><!-- widget / postbox -->
47
48 </div>
49 </div>
50
51 <?php if(current_user_can('administrator') || current_user_can('editor') || current_user_can('author') ): ?>
52 <div class="postbox-container" id="postbox-container-1">
53 <div class="meta-box-sortables ui-sortable" id="normal-sortables">
54
55 <div class="postbox" id="wpforo_dashboard_widget_1">
56 <button aria-expanded="true" class="handlediv button-link" type="button">
57 <span class="screen-reader-text">Toggle panel: General Information</span>
58 <span class="toggle-indicator"></span>
59 </button>
60 <h2 class="hndle ui-sortable-handle"><span><?php _e('General Information', 'wpforo'); ?></span></h2>
61 <div class="inside">
62 <div class="main">
63 <ul>
64 <li class="post-count"><strong><?php _e('You are currently running', 'wpforo'); ?> wpForo <?php echo esc_html(WPFORO_VERSION) ?></strong></li>
65 <li class="page-count"><?php _e('Active Theme', 'wpforo'); ?>: Classic</li>
66 <li class="page-count"><?php _e('wpForo Website', 'wpforo'); ?>: <a href="http://wpforo.com">wpForo.com</a></li>
67 <li class="page-count"><?php _e('Support Forum', 'wpforo'); ?>: <a href="https://wordpress.org/support/plugin/<?php echo WPFORO_FOLDER; ?>/">WordPress.org Forum</a></li>
68 </ul>
69 </div>
70 </div>
71 </div><!-- widget / postbox -->
72
73 <div class="postbox" id="wpforo_dashboard_widget_server">
74 <button aria-expanded="true" class="handlediv button-link" type="button">
75 <span class="screen-reader-text">Toggle panel: Server Information</span>
76 <span class="toggle-indicator"></span>
77 </button>
78 <h2 class="hndle ui-sortable-handle"><span><?php _e('Server Information', 'wpforo'); ?></span></h2>
79 <div class="inside">
80 <div class="main">
81 <table style="width:98%; margin:0px auto; text-align:left;">
82 <tr class="wpf-dw-tr">
83 <td class="wpf-dw-td">USER AGENT</td>
84 <td class="wpf-dw-td-value"><?php echo $_SERVER['HTTP_USER_AGENT'] ?></td>
85 </tr>
86 <tr class="wpf-dw-tr">
87 <td class="wpf-dw-td">Web Server</td>
88 <td class="wpf-dw-td-value"><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
89 </tr>
90 <tr class="wpf-dw-tr">
91 <td class="wpf-dw-td">PHP Version</td>
92 <td class="wpf-dw-td-value"><?php echo phpversion(); ?></td>
93 </tr>
94 <tr class="wpf-dw-tr">
95 <td class="wpf-dw-td">MySQL Version</td>
96 <td class="wpf-dw-td-value"><?php echo $wpforo->db->db_version(); ?></td>
97 </tr>
98 <tr class="wpf-dw-tr">
99 <td class="wpf-dw-td">PHP Max Post Size</td>
100 <td class="wpf-dw-td-value"><?php echo ini_get('post_max_size'); ?></td>
101 </tr>
102 <tr class="wpf-dw-tr">
103 <td class="wpf-dw-td">PHP Max Upload Size</td>
104 <td class="wpf-dw-td-value"><?php echo ini_get('upload_max_filesize'); ?></td>
105 </tr>
106 <tr class="wpf-dw-tr">
107 <td class="wpf-dw-td">PHP Memory Limit</td>
108 <td class="wpf-dw-td-value"><?php echo ini_get('memory_limit'); ?></td>
109 </tr>
110 <tr class="wpf-dw-tr">
111 <td class="wpf-dw-td">PHP DateTime Class</td>
112 <td class="wpf-dw-td-value"><?php echo (class_exists('DateTime') && class_exists('DateTimeZone')) ? '<span class="wpf-green">' . __('Available', 'wpforo') . '</span>' : '<span class="wpf-red">' . __('Not available', 'wpforo') . '</span> | <a href="http://php.net/manual/en/datetime.installation.php" target="_blank">more info&raquo;</a>'; ?> </td>
113 </tr>
114 </table>
115 </div>
116 </div>
117 </div><!-- widget / postbox -->
118
119 <?php do_action( 'wpforo_dashboard_widgets_col1', $wpforo ); ?>
120
121 </div><!-- normal-sortables -->
122 </div><!-- wpforo_postbox_container -->
123
124 <div class="postbox-container" id="postbox-container-2">
125 <div class="meta-box-sortables ui-sortable" id="normal-sortables">
126
127 <div class="postbox" id="wpforo_dashboard_widget_statistic">
128 <button aria-expanded="true" class="handlediv button-link" type="button">
129 <span class="screen-reader-text">Toggle panel: Board Statistic</span>
130 <span class="toggle-indicator"></span>
131 </button>
132 <h2 class="hndle ui-sortable-handle"><span><?php _e('Board Statistic', 'wpforo'); ?></span></h2>
133 <div class="inside">
134 <div class="main">
135 <table style="width:98%; margin:0px auto; text-align:left;">
136 <?php $statistic = $wpforo->get_statistic(); ?>
137 <tr class="wpf-dw-tr">
138 <td class="wpf-dw-td"><?php _e('Forums', 'wpforo'); ?></td>
139 <td class="wpf-dw-td-value"><?php echo intval($statistic['forums']) ?></td>
140 </tr>
141 <tr class="wpf-dw-tr">
142 <td class="wpf-dw-td"><?php _e('Topics', 'wpforo'); ?></td>
143 <td class="wpf-dw-td-value"><?php echo intval($statistic['topics']) ?></td>
144 </tr>
145 <tr class="wpf-dw-tr">
146 <td class="wpf-dw-td"><?php _e('Posts', 'wpforo'); ?></td>
147 <td class="wpf-dw-td-value"><?php echo intval($statistic['posts']) ?></td>
148 </tr>
149 <tr class="wpf-dw-tr">
150 <td class="wpf-dw-td"><?php _e('Members', 'wpforo'); ?></td>
151 <td class="wpf-dw-td-value"><?php echo intval($statistic['members']) ?></td>
152 </tr>
153 <tr class="wpf-dw-tr">
154 <td class="wpf-dw-td"><?php _e('Members Online', 'wpforo'); ?></td>
155 <td class="wpf-dw-td-value"><?php echo intval($statistic['online_members_count']) ?></td>
156 </tr>
157 <?php
158 $size_da = 0; $size_aa = 0;
159 $upload_dir = wp_upload_dir();
160 if( is_dir( $upload_dir['basedir'] . '/wpforo/avatars/') ) $size_avatar = wpforo_dir_size( $upload_dir['basedir'] . '/wpforo/avatars' );
161 if( is_dir( $upload_dir['basedir'] . '/wpforo/default_attachments/') ) $size_da = wpforo_dir_size( $upload_dir['basedir'] . '/wpforo/default_attachments' );
162 ?>
163 <tr class="wpf-dw-tr">
164 <td class="wpf-dw-td"><?php _e('Avatars Size', 'wpforo'); ?></td>
165 <td class="wpf-dw-td-value"><?php echo wpforo_human_filesize( $size_avatar ); ?></td>
166 </tr>
167 <tr class="wpf-dw-tr">
168 <td class="wpf-dw-td"><?php _e('Default Attachments Size', 'wpforo'); ?></td>
169 <td class="wpf-dw-td-value"><?php echo wpforo_human_filesize( $size_da ); ?></td>
170 </tr>
171 <?php if( isset($statistic['attachments']) && $statistic['attachment_sizes'] ) : ?>
172 <?php $size_aa = 0; $upload_dir = wp_upload_dir(); if( is_dir( $upload_dir['basedir'] . '/wpforo/attachments/') ) $size_aa = wpforo_dir_size( $upload_dir['basedir'] . '/wpforo/attachments' ); ?>
173 <tr class="wpf-dw-tr">
174 <td class="wpf-dw-td"><?php _e('Advanced Attachments', 'wpforo'); ?></td>
175 <td class="wpf-dw-td-value"><?php echo esc_html($statistic['attachments']) ?> <?php _e('file(s)', 'wpforo'); ?></td>
176 </tr>
177 <tr class="wpf-dw-tr">
178 <td class="wpf-dw-td"><?php _e('Advanced Attachments Size', 'wpforo'); ?></td>
179 <td class="wpf-dw-td-value"><?php echo wpforo_human_filesize( $size_aa ); ?></td>
180 </tr>
181 <?php endif ?>
182 <tr class="wpf-dw-tr">
183 <td class="wpf-dw-td"><?php _e('Total Size', 'wpforo'); ?></td>
184 <td class="wpf-dw-td-value">
185 <strong style="font-size:14px;"><?php $total = (int)$size_avatar + (int)$size_da + ((isset($size_aa))?(int)$size_aa:0); echo wpforo_human_filesize( $total ); ?></strong>
186 </td>
187 </tr>
188 <tr>
189 <td colspan="2">
190 <p class="hndle" style="padding:25px 0px 5px 0px; margin:0px; font-size:14px; font-weight:bold;">
191 <?php _e('Forum Maintenance', 'wpforo'); ?>
192 </p>
193 <p class="wpf-info" style="padding:5px 0px;"><?php _e("This process may take a few seconds or dozens of minutes, please be patient and don't close this page. If you got 500 Server Error please don't worry, the data updating process is still working in MySQL server.", 'wpforo'); ?></p>
194 <div style="width:100%; padding:7px 0px;">
195 <?php
196 $reset_forums_stat_url = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_fstat' ), 'wpforo_reset_forums_stat' );
197 $reset_users_stat_url = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_ustat' ), 'wpforo_reset_users_stat' );
198 $reset_phrase_cache = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_phrase_cache' ), 'wpforo_reset_phrase_cache' );
199 $reset_user_cache = wp_nonce_url( admin_url( 'admin.php?page=wpforo-community&action=reset_user_cache' ), 'wpforo_reset_user_cache' );
200 ?>
201 <a href="<?php echo esc_url($reset_forums_stat_url); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Update Forums Statistic', 'wpforo'); ?></a>&nbsp;
202 <a href="<?php echo esc_url($reset_users_stat_url); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Update Users Statistic', 'wpforo'); ?></a>&nbsp;
203 <a href="<?php echo esc_url($reset_phrase_cache); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Delete Phrase Cache', 'wpforo'); ?></a>&nbsp;
204 <a href="<?php echo esc_url($reset_user_cache); ?>" style="min-width:160px; margin-bottom:10px; text-align:center;" class="button button-secondary"><?php _e('Delete User Cache', 'wpforo'); ?></a>
205 </div>
206 </td>
207 </tr>
208
209 </table>
210 </div>
211 </div>
212 </div><!-- widget / postbox -->
213
214 <?php do_action( 'wpforo_dashboard_widgets_col2', $wpforo ); ?>
215
216 </div><!-- normal-sortables -->
217 </div><!-- wpforo_postbox_container -->
218 <?php endif; ?>
219
220 <div class="postbox-container" id="postbox-container-3">
221 <div class="meta-box-sortables ui-sortable" id="normal-sortables">
222
223 <?php do_action( 'wpforo_dashboard_widgets_col3', $wpforo ); ?>
224
225 </div><!-- normal-sortables -->
226 </div><!-- wpforo_postbox_container -->
227
228
229
230 </div><!-- dashboard-widgets -->
231 </div><!-- dashboard-widgets-wrap -->
232
233 </div><!-- wpwrap -->
234
235