Statistik
Verfasst: 27.05.2005 15:57
Hi ...
Wie schaffe ich es, dass ich unten die Statistik vom Mini Foren Statistik Mod alles in eine Reihe bekomme ???
LINK: http://www.forum-page.de.tc
Hier ist meine actualstats.php:
Wie schaffe ich es, dass ich unten die Statistik vom Mini Foren Statistik Mod alles in eine Reihe bekomme ???
LINK: http://www.forum-page.de.tc
Hier ist meine actualstats.php:
Code: Alles auswählen
<?php
/***************************************************************************
* actualstats.php
* -------------------
* begin : Mai 28, 2003
* copyright : AWSW @ www.awsw.de
* email : awsw@awsw.de
*
* $Id: actualstats.php,v 1.99.2.1 2002/05/28 18:00:00 psotfx Exp $
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt ! - Diese Datei kann nicht direkt aufgerufen werden !");
}
//
// Load the appropriate Rules file
//
if( isset($HTTP_GET_VARS['mode']) )
{
switch( $HTTP_GET_VARS['mode'] )
{
case 'bbcode':
$lang_file = 'lang_bbcode';
$l_title = $lang['BBCode_guide'];
break;
default:
$lang_file = 'lang_actualstats';
$l_title = $lang['actualstats'];
break;
}
}
else
{
$lang_file = 'lang_actualstats';
$l_title = $lang['actualstats'];
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
//
// AKTUELLE FORENSTATISTIK START
//
###### start most posts_#####
$sql = "SELECT user_id, username, user_posts
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY user_posts DESC
LIMIT 5";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online forums information', '', __LINE__, __FILE__, $sql);
}
while ($row = $db->sql_fetchrow($result))
{
$user_id=$row['user_id'];
$template->assign_block_vars("most_posts", array(
'USERNAME' => $row['username'],
'POSTS' => $row['user_posts'],
'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))
);
}
##### end most posts_#######
//##################### WEBMASTER #####################
$sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_level !='0' ORDER BY user_level";
if ( !($results = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Datenbank-Connect-Problem', '', __LINE__, __FILE__, $sql);
}
while($m = $db->sql_fetchrow($results))
{
if ( $m['user_level'] == ADMIN ) {
$level = '<b style="color:#' . $theme['fontcolor4'] . '">Administrator</b>';
}
else if ( $m['user_level'] == 3 ) {
$level = '<b style="color:#' . $theme['fontcolor1'] . '">Supermoderator</b>';
}
else if ( $m['user_level'] == 9 )
{
$level = '<b style="color:#' . $theme['fontcolor1'] . '">Junior Admin</b>';
}
else if ( $m['user_level'] == MOD )
{
$level = '<b style="color:#' . $theme['fontcolor5'] . '">Moderator</b>';
}
else
{
$level = '<b style="color:#' . $theme['fontcolor5'] . '">Entwickler</b>';
}
if ( $m['user_email'] )
{
$mail = '<a href="mailto:' . $m['user_email'] . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
}
else
{
$mail = '';
}
$u_name = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$m[user_id]");
$name = $m[username];
$template->assign_block_vars('staff', array(
'NAME' => $name,
'PM' => '<a href="privmsg.'.$phpEx.'?mode=post&u='. $m['user_id'] .'"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>',
'POSTER_ONLINE' => (($m['user_session_time'] >= ( time() - 300 )) && ($m['user_allow_viewonline'])) ? '<span style="color:green;">Online</span>' : '<span style="color:red;">Offline</span>',
'U_NAME' => $u_name,
'LEVEL' => $level)
);
}
//##################### WEBMASTER #####################
//
// AKTUELLE FORENSTATISTIK ENDE
//
$template->set_filenames(array(
'actualstats_output' => '../actualstats_body.tpl')
);
//
// Generate the page
//
$template->assign_var_from_handle('ACTUALSTATS_OUTPUT', 'actualstats_output');
?>