C:\$Recycle.Bin\S-1-5-21-3967099092-2644009230-141905953-500\$RTL8YJG\rank.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php /* $Id: rank.php,v 1.1.1.1 2002/10/28 19:13:47 pbaecher Exp $ */
/*
          ThWboard - PHP/MySQL Bulletin Board System
        ==============================================
            (c) 2000-2002 by
               Paul Baecher         <paul@thewall.de>
               Felix Gonschorek   <funner@thewall.de>

          download the latest version:
            http://www.thwboard.de

          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.

        ==============================================

*/
require('./inc/header.inc.php');

$Trank = new Template('./templates/'.$style['styletemplate'].'/rank.html');
$Trankrow = new Template('./templates/'.$style['styletemplate'].'/rankrow.html');
$Tframe = new Template('./templates/'.$style['styletemplate'].'/frame.html');

$a_rank = array();
$r_rank thwb_query("SELECT rankid, ranktitle, rankposts, rankimage FROM $pref"."rank ORDER BY rankposts DESC");
while( 
$rank mysql_fetch_array($r_rank) )
{
    
$a_rank[] = $rank;
}

if( 
count($a_rank) < || !$config['enable_ranks'] )
{
    
message('Fehler''R&#xE4;nge wurden vom Administrator deaktiviert.');
}

$r_user thwb_query("SELECT COUNT(userid) FROM $pref"."user");
list(
$usercount) = mysql_fetch_row($r_user);

while( list(
$i$rank) = each($a_rank) )
{
    
// users for this rank
    
if( isset($a_rank[($i 1)]) )
    {
        
$r_user thwb_query("SELECT COUNT(userid) FROM $pref"."user WHERE
            userposts >= "
.$rank['rankposts']." AND userposts < ".$a_rank[($i 1)]['rankposts']);
        list(
$rankusers) = mysql_fetch_row($r_user);
        
        
$r_user thwb_query("SELECT userid, username FROM $pref"."user WHERE
            userposts >= "
.$rank['rankposts']." AND userposts < ".$a_rank[($i 1)]['rankposts'].
            
" ORDER BY userposts DESC LIMIT 1");
        
$user mysql_fetch_array($r_user);
    }
    else
    {
        
$r_user thwb_query("SELECT COUNT(userid) FROM $pref"."user WHERE
            userposts >= "
.$rank['rankposts']);
        list(
$rankusers) = mysql_fetch_row($r_user);

        
$r_user thwb_query("SELECT userid, username FROM $pref"."user WHERE
            userposts >= "
.$rank['rankposts'].
            
" ORDER BY userposts DESC LIMIT 1");
        
$user mysql_fetch_array($r_user);
    }

    if( 
$rank['rankimage'] )
        
$rank['rankimage'] = '<img src="'.$rank['rankimage'].'">';
    else
        
$rank['rankimage'] = '&nbsp;';

    
$prozent intval($rankusers/$usercount 100);
    
$width intval($rankusers/$usercount 120);
    if( !
$width )
        
$width 1;
    
$invwidth 120 $width;
    
    eval(
$Trankrow->GetTemplate('RANKROWS'));
}

$navpath .= 'Rang&uuml;bersicht';
eval(
$Trank->GetTemplate('CONTENT'));
eval(
$Tframe->GetTemplate());

?>