function do_statsu($string) { global $db, $current_user; require_once(mnminclude.'user.php'); $array = preg_split('/\s+/', $string); if (count($array) >= 2) { $user_login = $db->escape($array[1]); $user_id = $db->get_var("select user_id from users where user_login='******'"); } if (!$user_id > 0) { $user_id = $current_user->user_id; $user_login = $current_user->user_login; } $user = new User(); $user->id = $user_id; $user->read(); $user->all_stats(); $comment = '<strong>'._('Estadísticas de'). ' ' . $user_login. '</strong>. '; $comment .= _('karma') . ': ' . $user->karma . ', '; if ($user->total_links > 1) { $comment .= _('entropía') . ': ' . intval(($user->blogs() - 1) / ($user->total_links - 1) * 100) . '%, '; } $comment .= _('votos') . ': ' . $user->total_votes . ', '; $comment .= _('artículos') . ': ' . $user->total_links . ', '; $comment .= _('publicados') . ': ' . $user->published_links . ', '; $comment .= _('pendientes') . ': ' . $db->get_var('select count(*) from links where link_status="queued" and link_author='.$user_id) . ', '; $comment .= _('descartados') . ': ' . $db->get_var('select count(*) from links where link_status="discard" and link_author='.$user_id) . ', '; $comment .= _('comentarios') . ': ' . $user->total_comments; return $comment; }