public function actionIndex($page = 1) { // Проверяем авторизирован ли пользователь и получаем его данные. Если нет, он будет переадресован $userId = self::checkAdmin(); $users = User::getAllUser($count = Gallery::SHOW_BY_DEFAULT, $page); $total = User::getTotalUsers(); // Создаем объект Pagination - постраничная навигация $pagination = new Pagination($total, $page, Gallery::SHOW_BY_DEFAULT, 'page-'); $this->render('admin/admin_user/index', ['title' => 'Управление пользователями', 'users' => $users, 'pagination' => $pagination, 'user' => $userId['username']]); return true; }
<h1> Dashboard </h1> <section class="statistics"> <div class="row"> <div class="item"> <span>' . Forum::getTotalTopics() . '</span> ' . ACPDashboardT::get('topics') . ' </div> <div class="item"> <span>' . Forum::getTotalPosts() . '</span> ' . ACPDashboardT::get('posts') . ' </div> <div class="item"> <span>' . User::getTotalUsers() . '</span> ' . ACPDashboardT::get('members') . ' </div> </div> <div class="row"> <div class="item"> <span><a href="../user.php?id=' . User::getLatestUser()->getID() . '">' . User::getLatestUser()->getUsername() . '</a></span> ' . ACPDashboardT::get('latest_member') . ' </div> </div> </section> '; include 'template/footer.php';
$do_breadcrumb = new Breadcrumb(); $do_breadcrumb->getBreadcrumbs(); ?> <div class="grayline1"></div> <div class="spacerblock_20"></div> <div class="contentfull"> <div class="mainheader"> <div class="pad20"> <span class="headline14">User Management</span> </div> </div> <table id="report_user_usage"> <tbody> <?php $do_user = new User(); $total_users = $do_user->getTotalUsers(); ?> <tr class="total_users"><td colspan="9">Total Users: <?php echo $total_users; ?> </td></tr> <tr class="report_heading"> <td>Id User</td> <td>Name</td> <td>Email</td> <td>Status</td> <td>Plan</td> <td align="center">Action</td> </tr> <?php $count = 1;
<?php require "core/init.php"; // Objects $topic = new Topic(); $template = new Template("templates/topics.php"); $user = new User(); //Variables $template->totalTopics = $topic->getTotalTopics(); $template->totalCategories = $topic->getTotalCategories(); $template->totalUsers = $user->getTotalUsers(); $category = isset($_GET["category"]) ? $_GET["category"] : null; $user_id = isset($_GET["user"]) ? $_GET["user"] : null; //Check for Category Filter if (isset($category)) { $template->topics = $topic->getByCategory($category); $template->title = 'Posts in "' . $topic->getCategory($category)->name . '"'; } //Check for User Filter if (isset($user_id)) { $template->topics = $topic->getByUser($user_id); //$template->title = 'Posts by "'.$topic->getUser($user_id)->username.'"'; } if (!isset($category) && !isset($user_id)) { $template->topics = $topic->getAllTopics(); } echo $template;
<?php $ADMIN_SECTION = 'dashboard'; require_once dirname(__FILE__) . '/header.php'; $total_users = User::getTotalUsers(); $active_users = User::getActiveUsers(); $data = ''; $legend = ''; $legend_colors = ''; $labels = ''; $regs = User::getRecentRegistrationsByModule(); $totalregs = 0; foreach (UserConfig::$authentication_modules as $module) { $module_id = $module->getID(); if (array_key_exists($module_id, $regs)) { $totalregs += $regs[$module_id]; } } $firstmodule = true; foreach (UserConfig::$authentication_modules as $module) { $module_id = $module->getID(); if (!array_key_exists($module_id, $regs) || $regs[$module_id] == 0) { continue; } if (array_key_exists($module->getID(), $regs)) { $data .= (!$firstmodule ? ',' : '') . sprintf('%.1f', $regs[$module->getID()] * 100 / $totalregs); $legend .= (!$firstmodule ? '|' : '') . $module->getTitle() . ' (' . sprintf('%.1f', $regs[$module->getID()] * 100 / $totalregs) . '%)'; $legend_colors .= (!$firstmodule ? '|' : '') . $module->getLegendColor(); $labels .= (!$firstmodule ? '|' : '') . $module->getTitle(); } else { echo 0;
$do_breadcrumb = new Breadcrumb(); $do_breadcrumb->getBreadcrumbs(); ?> <div class="grayline1"></div> <div class="spacerblock_20"></div> <div class="contentfull"> <div class="mainheader"> <div class="pad20"> <span class="headline14">User Metrics</span> </div> </div> <div class="spacerblock_20"></div> <?php $do_user = new User(); $user_count = $do_user->getTotalUsers(); ?> 1. Total Users: <?php echo $user_count; ?> <br /><br /> <?php $user_count = $do_user->getUsersRegisteredThisPastWeek(); ?> 2. New Registrations In The Past Week: <?php echo $user_count; ?> <br /> <span class="adm_report_explanation">** Excluding today</span> <br /><br />