/** * Show stats on Admin home page */ public function admin_theme_main_stats($h, $vars) { require_once LIBS . 'UserInfo.php'; $ui = new UserInfo(); echo "<li> </li>"; foreach ($vars as $key => $value) { echo "<li class='title'>" . $key . "</li>"; foreach ($value as $stat_type) { $users = $ui->stats($h, $stat_type); if (!$users) { $users = 0; } $lang_name = 'users_admin_stats_' . $stat_type; echo "<li>" . $h->lang[$lang_name] . ": " . $users . "</li>"; } } }