0) { $html = $this->AdminIcons(); } else { $html = $this->RenderDashboard(); } echo $html; } private function RenderDashboard() { global $members, $forum, $download, $news, $articles, $weblinks, $photos, $global_comments, $global_ratings, $global_submissions, $global_infusions, $link_type, $submit_data, $comments_type, $infusions_count; $locale = fusion_get_locale(); $aidlink = fusion_get_aidlink(); $settings = fusion_get_settings(); $html = ''; $html .= fusion_get_function('opentable', $locale['250']); $grid = ['mobile' => 12, 'tablet' => 6, 'laptop' => 3, 'desktop' => 3]; $panels = [ 'registered' => ['link' => '', 'title' => $locale['251']], 'cancelled' => ['link' => 'status=5', 'title' => $locale['263']], 'unactivated' => ['link' => 'status=2', 'title' => $locale['252']], 'security_ban' => ['link' => 'status=4', 'title' => $locale['253']] ]; $html .= '
'; $html .= '
'; foreach ($panels as $panel => $block) { $block['link'] = empty($block['link']) ? $block['link'] : '&'.$block['link']; $html .= '
'; $html .= fusion_get_function('openside', '', $panel); $html .= ''.$locale['M'].''; $html .= '

'.number_format($members[$panel]).'

'; $html .= ''.$block['title'].''; $content = '
'; $content .= ''.$locale['255'].' '; $content .= '
'; $html .= fusion_get_function('closeside', checkrights('M') ? $content : ''); $html .= '
'; } $html .= '
'; $html .= '
'; $grid = ['mobile' => 12, 'tablet' => 6, 'laptop' => 6, 'desktop' => 4]; $html .= '
'; $modules = []; if (defined('FORUM_EXIST')) { $modules['forum'] = [ 'title' => $locale['265'], 'image' => get_image('ac_F'), 'stats' => [ ['title' => $locale['265'], 'count' => $forum['count']], ['title' => $locale['256'], 'count' => $forum['thread']], ['title' => $locale['259'], 'count' => $forum['post']], ['title' => $locale['260'], 'count' => $forum['users']] ] ]; } if (defined('DOWNLOADS_EXIST')) { $modules['downloads'] = [ 'title' => $locale['268'], 'image' => get_image('ac_D'), 'stats' => [ ['title' => $locale['268'], 'count' => $download['download']], ['title' => $locale['257'], 'count' => $download['comment']], ['title' => $locale['254'], 'count' => $download['submit']] ] ]; } if (defined('NEWS_EXIST')) { $modules['news'] = [ 'title' => $locale['269'], 'image' => get_image('ac_N'), 'stats' => [ ['title' => $locale['269'], 'count' => $news['news']], ['title' => $locale['257'], 'count' => $news['comment']], ['title' => $locale['254'], 'count' => $news['submit']] ] ]; } if (defined('ARTICLES_EXIST')) { $modules['articles'] = [ 'title' => $locale['270'], 'image' => get_image('ac_A'), 'stats' => [ ['title' => $locale['270'], 'count' => $articles['article']], ['title' => $locale['257'], 'count' => $articles['comment']], ['title' => $locale['254'], 'count' => $articles['submit']] ] ]; } if (defined('WEBLINKS_EXIST')) { $modules['weblinks'] = [ 'title' => $locale['271'], 'image' => get_image('ac_W'), 'stats' => [ ['title' => $locale['271'], 'count' => $weblinks['weblink']], ['title' => $locale['254'], 'count' => $weblinks['submit']] ] ]; } if (defined('GALLERY_EXIST')) { $modules['gallery'] = [ 'title' => $locale['272'], 'image' => get_image('ac_PH'), 'stats' => [ ['title' => $locale['261'], 'count' => $photos['photo']], ['title' => $locale['257'], 'count' => $photos['comment']], ['title' => $locale['254'], 'count' => $photos['submit']] ] ]; } if (!empty($modules)) { foreach ($modules as $name => $module) { $html .= '
'; $html .= fusion_get_function('openside', ''); $html .= ''.$module['title'].' '.$locale['258'].''; $html .= '
'; $html .= ''.$module['title'].''; if (!empty($module['stats'])) { foreach ($module['stats'] as $stat) { $html .= '
'; $html .= ''.$stat['title'].'
'; $html .= '

'.number_format($stat['count']).'

'; $html .= '
'; } } $html .= '
'; $html .= fusion_get_function('closeside', ''); $html .= '
'; } } $html .= '
'; $html .= '
'; $html .= '
'; if ($settings['comments_enabled'] == 1) { $html .= '
'; $html .= fusion_get_function('openside', ''.$locale['277'].''.number_format($global_comments['rows']).''); if (count($global_comments['data']) > 0) { foreach ($global_comments['data'] as $i => $comment_data) { if (isset($comments_type[$comment_data['comment_type']]) && isset($link_type[$comment_data['comment_type']])) { $html .= '
0 ? ' style="border-top: 1px solid #ddd;"' : '').'>'; $html .= '
'; $html .= ''; $html .= ''; $html .= ''; $html .= '
'; $html .= '
'.display_avatar($comment_data, '25px', '', FALSE, 'img-rounded m-r-5').'
'; $html .= ''.(!empty($comment_data['user_id']) ? profile_link($comment_data['user_id'], $comment_data['user_name'], $comment_data['user_status']) : $comment_data['comment_name']).' '; $html .= $locale['273'].' '.$comments_type[$comment_data['comment_type']].' '; $html .= timer($comment_data['comment_datestamp']).'
'; $comment = trimlink(strip_tags(parse_textarea($comment_data['comment_message'], FALSE, TRUE)), 130); $html .= ''.parse_textarea($comment, TRUE, FALSE).''; $html .= '
'; } } if (isset($global_comments['comments_nav'])) { $html .= '
'.$global_comments['comments_nav'].'
'; } } else { $html .= '
'.$global_comments['nodata'].'
'; } $html .= fusion_get_function('closeside', ''); $html .= '
'; // #comments } if ($settings['ratings_enabled'] == 1) { $html .= '
'; $html .= fusion_get_function('openside', ''.$locale['278'].''.number_format($global_ratings['rows']).''); if (count($global_ratings['data']) > 0) { foreach ($global_ratings['data'] as $i => $ratings_data) { if (isset($link_type[$ratings_data['rating_type']]) && isset($comments_type[$ratings_data['rating_type']])) { $html .= '
0 ? ' style="border-top: 1px solid #ddd;"' : '').'>'; $html .= '
'.display_avatar($ratings_data, '25px', '', FALSE, 'img-rounded m-r-5').'
'; $html .= ''.profile_link($ratings_data['user_id'], $ratings_data['user_name'], $ratings_data['user_status']).' '; $html .= $locale['273a'].' '.$comments_type[$ratings_data['rating_type']].' '; $html .= timer($ratings_data['rating_datestamp']); $html .= ''.str_repeat('', $ratings_data['rating_vote']).''; $html .= '
'; } } if (isset($global_ratings['ratings_nav'])) { $html .= '
'.$global_ratings['ratings_nav'].'
'; } } else { $html .= '
'.$global_ratings['nodata'].'
'; } $html .= fusion_get_function('closeside', ''); $html .= '
'; // #ratings } $html .= '
'; $html .= fusion_get_function('openside', ''.$locale['279'].''.number_format($global_submissions['rows']).''); if (count($global_submissions['data']) > 0) { foreach ($global_submissions['data'] as $i => $submit_date) { if (isset($submit_data[$submit_date['submit_type']])) { $review_link = sprintf($submit_data[$submit_date['submit_type']]['admin_link'], $submit_date['submit_id']); $html .= '
0 ? ' style="border-top: 1px solid #ddd;"' : '').'>'; $html .= '
'.display_avatar($submit_date, '25px', '', FALSE, 'img-rounded m-r-5').'
'; $html .= ''.profile_link($submit_date['user_id'], $submit_date['user_name'], $submit_date['user_status']).' '; $html .= $locale['273b'].' '.$submit_data[$submit_date['submit_type']]['submit_locale'].' '; $html .= timer($submit_date['submit_datestamp']); if (!empty($review_link)) { $html .= ''.$locale['286'].''; } $html .= '
'; } } if (isset($global_submissions['submissions_nav'])) { $html .= '
'.$global_submissions['submissions_nav'].'
'; } } else { $html .= '
'.$global_submissions['nodata'].'
'; } $html .= fusion_get_function('closeside', ''); $html .= '
'; // #submissions $html .= '
'; $html .= '
'; $html .= '
'; $html .= fusion_get_function('openside', ''.$locale['283'].''.number_format((int)$infusions_count).''); $content = ''; if ($infusions_count > 0) { if (!empty($global_infusions)) { foreach ($global_infusions as $inf_data) { $html .= ''.$inf_data['inf_title'].''; } } $content = checkrights('I') ? '' : ''; } else { $html .= '
'.$locale['284'].'
'; } $html .= fusion_get_function('closeside', $content); $html .= '
'; // #infusins $html .= '
'; $html .= '
'; // .row $html .= fusion_get_function('closetable'); return $html; } private function AdminIcons() { global $admin_icons; $locale = fusion_get_locale(); $aidlink = fusion_get_aidlink(); $html = fusion_get_function('opentable', $locale['200a']); $html .= '
'; if (count($admin_icons['data']) > 0) { foreach ($admin_icons['data'] as $data) { $html .= '
'; $html .= ''; $html .= ''.$data['admin_title'].''; $html .= ''.$data['admin_title'].''; $html .= ''; $html .= '
'; } } $html .= '
'; $html .= fusion_get_function('closetable'); return $html; } }