Verfasst: 20.03.2008 17:00
Hallo Dr. Death,
genau das meinte ich. Sorry das ich mich nicht richtig ausgedrückt habe.
Grüßle
Wollez
genau das meinte ich. Sorry das ich mich nicht richtig ausgedrückt habe.
Grüßle
Wollez
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
// Dump vars into template
Code: Alles auswählen
//
// F1 WebTipp
//
include_once($phpbb_root_path . 'includes/functions_formel.'.$phpEx);
$formel_config = get_formel_config();
$user->setup('mods/formel');
if ( $formel_config['show_in_profile'] )
{
// Check if this user has one of the formular 1 admin permission. If this user has one or more of these permissions, he gets also moderator permissions.
$is_admin = $auth->acl_gets('a_formel_settings', 'a_formel_drivers', 'a_formel_teams', 'a_formel_races');
if ( $formel_config['restrict_to'] == 0 || get_formel_auth() || $is_admin == 1 || $user->data['user_id'] == $formel_config['mod_id'] )
{
$tippers_rank = $user->lang['formel_profile_norank'];
$tippers_points = 0;
$race_done = 0;
// Get tipp data for this user
$sql = 'SELECT *, sum(tipp_points) as total_points, count(tipp_points) as tipps_made
FROM ' . FORMEL_TIPPS_TABLE . '
GROUP BY tipp_user
ORDER BY total_points DESC';
$result = $db->sql_query($sql);
$rank_count = $real_rank = 1;
$previous_points = false;
while ($row_f1 = $db->sql_fetchrow($result))
{
if($row_f1['total_points'] != $previous_points)
{
$rank_count = $real_rank;
$previous_points = $row_f1['total_points'];
}
if ( $row_f1['tipp_user'] == $poster_id )
{
$tippers_points = $row_f1['total_points'];
$race_done = $row_f1['tipps_made'];
$tippers_rank = sprintf($user->lang['formel_profile_rank'], $rank_count);
break;
}
$real_rank++;
}
$db->sql_freeresult($result);
// Count total races with existing results
$sql = 'SELECT *
FROM ' . FORMEL_RACES_TABLE . '
WHERE race_result <> 0';
$result = $db->sql_query($sql);
$race_total = $db->sql_affectedrows($result);
$db->sql_freeresult($result);
$formel1 = array(
'L_PROFILE_WEBTIPP' => $user->lang['formel_profile_title'],
'TIPPER_POINTS' => $tippers_points,
'TIPPER_RANK' => $tippers_rank,
'RACE_DONE' => sprintf($user->lang['formel_profile_tipps'], $race_done, $race_total),
'U_FORMEL_STATS' => append_sid("formel.$phpEx?mode=stats"),
);
$postrow = array_merge($postrow, $formel1);
//echo "<pre>";print_r($postrow);echo "</pre>";die();
}
}
//
// END of F1 WebTipp
//
Code: Alles auswählen
<!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->
Code: Alles auswählen
<!-- IF postrow.TIPPER_POINTS --><dd><strong>{postrow.L_PROFILE_WEBTIPP} : {postrow.TIPPER_POINTS}<br /><a href="{postrow.U_FORMEL_STATS}" class="genmed">{postrow.TIPPER_RANK}</a></strong><br />({postrow.RACE_DONE})</dd><!-- ENDIF -->