public function get_ranking() { $result = User::ranking(); return Response::json($result); }
$user->id = $id; if (!$user->read()) { die; } if ($user->avatar) { echo '<div style="float: left;"><img class="avatar" style="margin-right: 5px" src="' . get_avatar_url($user->id, $user->avatar, 80) . '" width="80" height="80" alt="' . $user->username . '"/></div>'; } echo '<strong>' . _('usuario') . ':</strong> ' . $user->username; $user->print_medals(); if ($current_user->user_id > 0 && $current_user->user_id != $user->id) { echo ' ' . User::friend_teaser($current_user->user_id, $user->id); } echo '<br/>'; if ($user->names) { echo '<strong>' . _('nombre') . ':</strong> ' . $user->names . '<br/>'; } if ($user->url) { echo '<strong>' . _('web') . ':</strong> ' . $user->url . '<br/>'; } echo '<strong>' . _('karma') . ':</strong> ' . $user->karma . '<br/>'; echo '<strong>' . _('ranking') . ':</strong> #' . $user->ranking() . '<br/>'; echo '<strong>' . _('desde') . ':</strong> ' . get_date($user->date) . '<br/>'; if ($current_user->user_id > 0 && $current_user->user_id != $user->id && ($her_latlng = geo_latlng('user', $user->id)) && ($my_latlng = geo_latlng('user', $current_user->user_id))) { $distance = (int) geo_distance($my_latlng, $her_latlng); echo '<strong>' . _('distancia') . ':</strong> ' . $distance . ' kms<br/>'; } $post = new Post(); if ($post->read_last($user->id)) { echo '<br clear="left"><strong>' . _('Ășltima nota') . '</strong>: '; $post->print_text(); }