2006-12-02 04:36:16 +00:00
< ? php
/*
2009-11-17 13:48:46 +00:00
* e107 website system
*
2013-04-15 12:44:56 +02:00
* Copyright ( C ) 2008 - 2013 e107 Inc ( e107 . org )
2009-11-17 13:48:46 +00:00
* Released under the terms and conditions of the
* GNU General Public License ( http :// www . gnu . org / licenses / gpl . txt )
*
*/
2006-12-02 04:36:16 +00:00
require_once ( '../../class2.php' );
2011-04-25 14:13:45 +00:00
2011-03-13 14:15:51 +00:00
$e107 = e107 :: getInstance ();
2011-04-25 14:13:45 +00:00
$sql = e107 :: getDb ();
if ( ! $e107 -> isInstalled ( 'forum' ))
2011-03-13 14:15:51 +00:00
{
header ( 'Location: ' . e_BASE . 'index.php' );
exit ;
}
2006-12-02 04:36:16 +00:00
2010-03-10 01:23:57 +00:00
//TODO: Investigate the queries used here
2009-07-30 10:08:05 +00:00
include_lan ( e_PLUGIN . 'forum/languages/' . e_LANGUAGE . '/lan_forum_stats.php' );
2015-01-30 18:14:06 -08:00
e107 :: lan ( 'forum' , 'front' );
2008-12-10 21:00:48 +00:00
require_once ( e_PLUGIN . 'forum/forum_class.php' );
2006-12-02 04:36:16 +00:00
$gen = new convert ;
2008-12-10 21:00:48 +00:00
$forum = new e107forum ;
2006-12-02 04:36:16 +00:00
2008-12-10 21:00:48 +00:00
$barl = ( file_exists ( THEME . 'images/barl.png' ) ? THEME . 'images/barl.png' : e_PLUGIN . 'poll/images/barl.png' );
$barr = ( file_exists ( THEME . 'images/barr.png' ) ? THEME . 'images/barr.png' : e_PLUGIN . 'poll/images/barr.png' );
$bar = ( file_exists ( THEME . 'images/bar.png' ) ? THEME . 'images/bar.png' : e_PLUGIN . 'poll/images/bar.png' );
2006-12-02 04:36:16 +00:00
require_once ( HEADERF );
2013-03-10 19:44:54 -07:00
$total_posts = $sql -> count ( 'forum_post' );
$total_topics = $sql -> count ( 'forum_thread' );
2008-12-10 21:00:48 +00:00
$total_replies = $total_posts - $total_topics ;
2007-02-27 20:26:13 +00:00
$total_views = 0 ;
2008-12-10 21:00:48 +00:00
$query = 'SELECT sum(thread_views) AS total FROM `#forum_thread` ' ;
2013-06-12 21:37:54 +02:00
if ( $sql -> gen ( $query ))
2007-02-27 20:26:13 +00:00
{
2013-06-12 21:37:54 +02:00
$row = $sql -> fetch ();
2007-02-27 20:26:13 +00:00
$total_views = $row [ 'total' ];
}
2006-12-02 04:36:16 +00:00
2013-06-12 21:37:54 +02:00
$firstpost = $sql -> select ( 'forum_post' , 'post_datestamp' , 'post_datestamp > 0 ORDER BY post_datestamp ASC LIMIT 0,1' , 'default' );
$fp = $sql -> fetch ();
2006-12-02 04:36:16 +00:00
2008-12-10 21:00:48 +00:00
$open_ds = $fp [ 'post_datestamp' ];
$open_date = $gen -> convert_date ( $open_ds , 'long' );
2006-12-02 04:36:16 +00:00
$open_since = $gen -> computeLapse ( $open_ds );
$open_days = floor (( time () - $open_ds ) / 86400 );
$postsperday = ( $open_days < 1 ? $total_posts : round ( $total_posts / $open_days ));
2007-02-27 20:26:13 +00:00
2008-12-10 21:00:48 +00:00
$query = " SHOW TABLE STATUS FROM ` { $mySQLdefaultdb } ` " ;
2013-03-10 19:44:54 -07:00
$sql -> gen ( $query );
2006-12-02 04:36:16 +00:00
$array = $sql -> db_getList ();
foreach ( $array as $table )
{
2008-12-10 21:00:48 +00:00
if ( $table [ 'Name' ] == MPREFIX . 'forum_post' )
2006-12-02 04:36:16 +00:00
{
2008-10-19 11:35:00 +00:00
$db_size = $e107 -> parseMemorySize ( $table [ 'Data_length' ]);
$avg_row_len = $e107 -> parseMemorySize ( $table [ 'Avg_row_length' ]);
2006-12-02 04:36:16 +00:00
break ;
}
}
$query = "
2011-04-25 14:13:45 +00:00
SELECT ft . thread_id , ft . thread_user , ft . thread_name , ft . thread_total_replies , ft . thread_datestamp , f . forum_class , u . user_name , u . user_id FROM #forum_thread as ft
LEFT JOIN #user AS u ON ft.thread_user = u.user_id
2006-12-02 04:36:16 +00:00
LEFT JOIN #forum AS f ON f.forum_id = ft.thread_forum_id
2011-04-25 14:13:45 +00:00
WHERE ft . thread_active > 0
2006-12-02 04:36:16 +00:00
AND f . forum_class IN ( " .USERCLASS_LIST. " )
2011-04-25 14:13:45 +00:00
ORDER BY ft . thread_total_replies DESC LIMIT 0 , 10 " ;
2013-03-10 19:44:54 -07:00
$sql -> gen ( $query );
2013-06-12 21:37:54 +02:00
$most_activeArray = $sql -> db_getList ();
2006-12-02 04:36:16 +00:00
$query = "
2011-04-25 14:13:45 +00:00
SELECT ft .* , f . forum_class , u . user_name , u . user_id FROM #forum_thread as ft
LEFT JOIN #user AS u ON ft.thread_user = u.user_id
2006-12-02 04:36:16 +00:00
LEFT JOIN #forum AS f ON f.forum_id = ft.thread_forum_id
2011-04-25 14:13:45 +00:00
WHERE f . forum_class IN ( " .USERCLASS_LIST. " )
ORDER BY ft . thread_views DESC LIMIT 0 , 10 " ;
2006-12-02 04:36:16 +00:00
2013-03-10 19:44:54 -07:00
$sql -> gen ( $query );
2013-06-12 21:37:54 +02:00
$most_viewedArray = $sql -> db_getList ();
2006-12-02 04:36:16 +00:00
2011-04-25 14:13:45 +00:00
/* $sql -> db_Select ( " user " , " user_id, user_name, user_forums " , " ORDER BY user_forums DESC LIMIT 0, 10 " , " no_where " );
2006-12-02 04:36:16 +00:00
$posters = $sql -> db_getList ();
$top_posters = array ();
foreach ( $posters as $poster )
{
$percen = round (( $poster [ 'user_forums' ] / $total_posts ) * 100 , 2 );
$top_posters [] = array ( " user_id " => $poster [ 'user_id' ], " user_name " => $poster [ 'user_name' ], " user_forums " => $poster [ 'user_forums' ], " percentage " => $percen );
2011-04-25 14:13:45 +00:00
} */
// get all replies
$query = "
SELECT COUNT ( fp . post_id ) AS post_count , u . user_name , u . user_id , fp . post_thread FROM #forum_post as fp
LEFT JOIN #user AS u ON fp.post_user = u.user_id
GROUP BY fp . post_user
ORDER BY post_count DESC LIMIT 0 , 10 " ;
2013-03-10 19:44:54 -07:00
$sql -> gen ( $query );
2013-06-12 21:37:54 +02:00
$top_repliers_data = $sql -> db_getList ( 'ALL' , false , false , 'user_id' );
2011-04-25 14:13:45 +00:00
// build top posters meanwhile
$top_posters = array ();
foreach ( $top_repliers_data as $poster )
{
$percent = round (( $poster [ 'post_count' ] / $total_posts ) * 100 , 2 );
$top_posters [] = array ( " user_id " => $poster [ 'user_id' ], " user_name " => $poster [ 'user_name' ], " user_forums " => $poster [ 'post_count' ], " percentage " => $percent );
}
// end build top posters
$ids = implode ( ',' , array_keys ( $top_repliers_data ));
// find topics by top 10 users
$query = "
SELECT COUNT ( ft . thread_id ) AS thread_count , u . user_id FROM #forum_thread as ft
LEFT JOIN #user AS u ON ft.thread_user = u.user_id
WHERE u . user_id IN ({ $ids })
GROUP BY ft . thread_user " ;
2013-03-10 19:44:54 -07:00
$sql -> gen ( $query );
2013-06-12 21:37:54 +02:00
$top_repliers_data_c = $sql -> db_getList ( 'ALL' , false , false , 'user_id' );
2011-04-25 14:13:45 +00:00
$top_repliers = array ();
foreach ( $top_repliers_data as $uid => $poster )
{
$poster [ 'post_count' ] = $poster [ 'post_count' ] - $top_repliers_data_c [ $uid ][ 'thread_count' ];
$percent = round (( $poster [ 'post_count' ] / $total_replies ) * 100 , 2 );
$top_repliers_sort [ $uid ] = $poster [ 'post_count' ];
//$top_repliers[$uid] = $poster;
$top_repliers_data [ $uid ][ 'user_forums' ] = $poster [ 'post_count' ];
$top_repliers_data [ $uid ][ 'percentage' ] = $percent ;
//$top_repliers_data[$uid] = array("user_id" => $poster['user_id'], "user_name" => $poster['user_name'], "user_forums" => $poster['post_count'], "percentage" => $percent);
}
// sort
arsort ( $top_repliers_sort , SORT_NUMERIC );
// build top repliers
foreach ( $top_repliers_sort as $uid => $c )
{
$top_repliers [] = $top_repliers_data [ $uid ];
}
// get all replies
$query = "
SELECT COUNT ( ft . thread_id ) AS thread_count , u . user_name , u . user_id FROM #forum_thread as ft
LEFT JOIN #user AS u ON ft.thread_user = u.user_id
GROUP BY ft . thread_user
ORDER BY thread_count DESC LIMIT 0 , 10 " ;
2013-03-10 19:44:54 -07:00
$sql -> gen ( $query );
2013-06-12 21:37:54 +02:00
$top_topic_starters_data = $sql -> db_getList ();
2011-04-25 14:13:45 +00:00
$top_topic_starters = array ();
foreach ( $top_topic_starters_data as $poster )
{
$percent = round (( $poster [ 'thread_count' ] / $total_topics ) * 100 , 2 );
$top_topic_starters [] = array ( " user_id " => $poster [ 'user_id' ], " user_name " => $poster [ 'user_name' ], " user_forums " => $poster [ 'thread_count' ], " percentage " => $percent );
2006-12-02 04:36:16 +00:00
}
2011-04-25 14:13:45 +00:00
/*
2006-12-02 04:36:16 +00:00
$query = "
SELECT SUBSTRING_INDEX ( thread_user , '.' , 1 ) AS t_user , COUNT ( SUBSTRING_INDEX ( ft . thread_user , '.' , 1 )) AS ucount , u . user_name , u . user_id FROM #forum_t as ft
LEFT JOIN #user AS u ON SUBSTRING_INDEX(ft.thread_user,'.',1) = u.user_id
WHERE ft . thread_parent = 0
GROUP BY t_user
ORDER BY ucount DESC
LIMIT 0 , 10 " ;
$sql -> db_Select_gen ( $query );
$posters = $sql -> db_getList ();
$top_topic_starters = array ();
foreach ( $posters as $poster )
{
$percen = round (( $poster [ 'ucount' ] / $total_topics ) * 100 , 2 );
$top_topic_starters [] = array ( " user_id " => $poster [ 'user_id' ], " user_name " => $poster [ 'user_name' ], " user_forums " => $poster [ 'ucount' ], " percentage " => $percen );
2011-04-25 14:13:45 +00:00
} */
2006-12-02 04:36:16 +00:00
2011-04-25 14:13:45 +00:00
/*
2006-12-02 04:36:16 +00:00
$query = "
SELECT SUBSTRING_INDEX ( thread_user , '.' , 1 ) AS t_user , COUNT ( SUBSTRING_INDEX ( ft . thread_user , '.' , 1 )) AS ucount , u . user_name , u . user_id FROM #forum_t as ft
LEFT JOIN #user AS u ON SUBSTRING_INDEX(ft.thread_user,'.',1) = u.user_id
WHERE ft . thread_parent != 0
GROUP BY t_user
ORDER BY ucount DESC
LIMIT 0 , 10 " ;
$sql -> db_Select_gen ( $query );
$posters = $sql -> db_getList ();
$top_repliers = array ();
foreach ( $posters as $poster )
{
$percen = round (( $poster [ 'ucount' ] / $total_replies ) * 100 , 2 );
$top_repliers [] = array ( " user_id " => $poster [ 'user_id' ], " user_name " => $poster [ 'user_name' ], " user_forums " => $poster [ 'ucount' ], " percentage " => $percen );
}
2011-04-25 14:13:45 +00:00
*/
2006-12-02 04:36:16 +00:00
2013-03-10 19:44:54 -07:00
function showBar ( $perc )
{
return " <div class='progress'>
< div class = 'bar' style = 'width: ".intval($perc)."%;' ></ div >
</ div > " ;
// <div style='background-image: url($barl); width: 5px; height: 14px; float: left;'></div>
// <div style='background-image: url($bar); width: ".intval($percentage)."%; height: 14px; float: left;'></div>
// <div style='background-image: url($barr); width: 5px; height: 14px; float: left;'></div>
}
2006-12-02 04:36:16 +00:00
$text = "
< div class = 'spacer' >
2013-03-10 19:44:54 -07:00
< table style = 'width: 100%;' class = 'fborder table' >
2006-12-02 04:36:16 +00:00
< tr >
2015-02-02 15:19:13 -08:00
< th class = 'forumheader' colspan = '2' > " .LAN_FORUM_6000. " </ th >
2006-12-02 04:36:16 +00:00
</ tr >
2015-02-02 15:19:13 -08:00
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_6001. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $open_date } </ td ></ tr >
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_6002. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $open_since } </ td ></ tr >
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_6003. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $total_posts } </ td ></ tr >
2015-01-30 18:14:06 -08:00
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_1007. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $total_topics } </ td ></ tr >
2015-02-02 15:19:13 -08:00
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_6004. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $total_replies } </ td ></ tr >
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_6005. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $total_views } </ td ></ tr >
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_6014. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $postsperday } </ td ></ tr >
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_6006. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $db_size } </ td ></ tr >
< tr >< td style = 'width: 50%; text-align: right;' >< b > " .LAN_FORUM_6007. " :</ b >& nbsp ; & nbsp ; </ td >< td style = 'width: 50%;' > { $avg_row_len } </ td ></ tr >
2006-12-02 04:36:16 +00:00
</ table >
</ div >
< div class = 'spacer' >
2013-03-10 19:44:54 -07:00
< table style = 'width: 100%;' class = 'fborder table' >
2006-12-02 04:36:16 +00:00
< tr >
2015-01-30 18:14:06 -08:00
< td class = 'forumheader' colspan = '5' > " .LAN_FORUM_0011. " </ td >
2006-12-02 04:36:16 +00:00
</ tr >
< tr >
2015-02-02 15:19:13 -08:00
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_6008. " </ th >
2015-01-30 18:14:06 -08:00
< th style = 'width: 40%;' class = 'fcaption' > " .LAN_FORUM_1003. " </ th >
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_0003. " </ th >
2015-02-02 15:19:13 -08:00
< th style = 'width: 20%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_6009. " </ th >
2015-01-30 18:14:06 -08:00
< th style = 'width: 20%; text-align: center;' class = 'fcaption' > " .LAN_DATE. " </ th >
2006-12-02 04:36:16 +00:00
</ tr >
" ;
$count = 1 ;
foreach ( $most_activeArray as $ma )
{
if ( $ma [ 'user_name' ])
{
2009-07-30 10:08:05 +00:00
$uinfo = " <a href=' " . e_BASE . " user.php?id. { $ma [ 'user_id' ] } '> { $ma [ 'user_name' ] } </a> " ;
2006-12-02 04:36:16 +00:00
}
else
{
$tmp = explode ( chr ( 1 ), $ma [ 'thread_anon' ]);
$uinfo = $tp -> toHTML ( $tmp [ 0 ]);
}
2009-07-30 10:08:05 +00:00
$text .= "
< tr >
2006-12-02 04:36:16 +00:00
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $count </ td >
< td style = 'width: 40%;' class = 'forumheader3' >< a href = '".e_PLUGIN."forum/forum_viewtopic.php?{$ma[' thread_id ']}' > { $ma [ 'thread_name' ]} </ a ></ td >
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > { $ma [ 'thread_total_replies' ]} </ td >
< td style = 'width: 20%; text-align: center;' class = 'forumheader3' > { $uinfo } </ td >
< td style = 'width: 20%; text-align: center;' class = 'forumheader3' > " . $gen->convert_date ( $ma['thread_datestamp'] , " forum " ). " </ td >
</ tr >
" ;
$count ++ ;
}
$text .= " </table>
</ div >
< div class = 'spacer' >
2013-03-10 19:44:54 -07:00
< table style = 'width: 100%;' class = 'fborder table' >
2006-12-02 04:36:16 +00:00
< tr >
2015-02-02 15:19:13 -08:00
< td class = 'forumheader' colspan = '5' > " .LAN_FORUM_6010. " </ td >
2006-12-02 04:36:16 +00:00
</ tr >
< tr >
2015-02-02 15:19:13 -08:00
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_6008. " </ th >
2015-01-30 18:14:06 -08:00
< th style = 'width: 40%;' class = 'fcaption' > " .LAN_FORUM_1003. " </ th >
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_1005. " </ th >
2015-02-02 15:19:13 -08:00
< th style = 'width: 20%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_6009. " </ th >
2015-01-30 18:14:06 -08:00
< th style = 'width: 20%; text-align: center;' class = 'fcaption' > " .LAN_DATE. " </ th >
2006-12-02 04:36:16 +00:00
</ tr >
" ;
$count = 1 ;
foreach ( $most_viewedArray as $ma )
{
2009-07-30 10:08:05 +00:00
if ( $ma [ 'user_name' ])
{
$uinfo = " <a href=' " . e_BASE . " user.php?id. { $ma [ 'user_id' ] } '> { $ma [ 'user_name' ] } </a> " ;
}
else
{
$tmp = explode ( chr ( 1 ), $ma [ 'thread_anon' ]);
$uinfo = $tp -> toHTML ( $tmp [ 0 ]);
}
$text .= "
< tr >
2006-12-02 04:36:16 +00:00
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $count </ td >
2009-07-30 10:08:05 +00:00
< td style = 'width: 40%;' class = 'forumheader3' >< a href = '".e_PLUGIN."forum/forum_viewtopic.php?{$ma[' thread_id ']}' > { $ma [ 'thread_name' ]} </ a ></ td >
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > { $ma [ 'thread_views' ]} </ td >
< td style = 'width: 20%; text-align: center;' class = 'forumheader3' > { $uinfo } </ td >
< td style = 'width: 20%; text-align: center;' class = 'forumheader3' > " . $gen->convert_date ( $ma['thread_datestamp'] , " forum " ). " </ td >
2006-12-02 04:36:16 +00:00
</ tr >
" ;
$count ++ ;
}
$text .= " </table>
</ div >
< div class = 'spacer' >
2013-03-10 19:44:54 -07:00
< table style = 'width: 100%;' class = 'fborder table' >
2006-12-02 04:36:16 +00:00
< tr >
2015-01-30 18:14:06 -08:00
< td class = 'forumheader' colspan = '5' > " .LAN_FORUM_0010. " </ td >
2006-12-02 04:36:16 +00:00
</ tr >
2013-03-10 19:44:54 -07:00
< thead >
2006-12-02 04:36:16 +00:00
< tr >
2015-02-02 15:19:13 -08:00
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_6008. " </ th >
2015-01-30 18:14:06 -08:00
< th style = 'width: 20%;' class = 'fcaption' > " .LAN_NAME. " </ th >
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_2032. " </ th >
2013-03-10 19:44:54 -07:00
< th style = 'width: 10%; text-align: center;' class = 'fcaption' >%</ th >
< th style = 'width: 50%; text-align: center;' class = 'fcaption' >& nbsp ; </ th >
2006-12-02 04:36:16 +00:00
</ tr >
2013-03-10 19:44:54 -07:00
</ thead >
< tbody >
2006-12-02 04:36:16 +00:00
" ;
$count = 1 ;
foreach ( $top_posters as $ma )
{
extract ( $ma );
$text .= " <tr>
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $count </ td >
< td style = 'width: 20%;' class = 'forumheader3' >< a href = '".e_BASE."user.php?id.$user_id' > $user_name </ a ></ td >
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $user_forums </ td >
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $percentage %</ td >
2013-03-10 19:44:54 -07:00
< td style = 'width: 50%;' class = 'forumheader3' > " .showBar( $percentage ). "
2006-12-02 04:36:16 +00:00
</ td >
</ tr >
" ;
$count ++ ;
}
2013-03-10 19:44:54 -07:00
$text .= " </tbody>
2006-12-02 04:36:16 +00:00
</ table >
</ div >
< div class = 'spacer' >
2013-03-10 19:44:54 -07:00
< table style = 'width: 100%;' class = 'fborder table' >
2006-12-02 04:36:16 +00:00
< tr >
2015-02-02 15:19:13 -08:00
< td class = 'forumheader' colspan = '5' > " .LAN_FORUM_6011. " </ td >
2006-12-02 04:36:16 +00:00
</ tr >
< tr >
2015-02-02 15:19:13 -08:00
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_6008. " </ th >
2015-01-30 18:14:06 -08:00
< th style = 'width: 20%;' class = 'fcaption' > " .LAN_NAME. " </ th >
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_2032. " </ th >
2013-03-10 19:44:54 -07:00
< th style = 'width: 10%; text-align: center;' class = 'fcaption' >%</ th >
< th style = 'width: 50%; text-align: center;' class = 'fcaption' >& nbsp ; </ th >
2006-12-02 04:36:16 +00:00
</ tr >
" ;
$count = 1 ;
foreach ( $top_topic_starters as $ma )
{
extract ( $ma );
$text .= " <tr>
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $count </ td >
< td style = 'width: 20%;' class = 'forumheader3' >< a href = '".e_BASE."user.php?id.$user_id' > $user_name </ a ></ td >
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $user_forums </ td >
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $percentage %</ td >
2013-03-10 19:44:54 -07:00
< td style = 'width: 50%; text-align: center;' class = 'forumheader3' > " .showBar( $percentage ). " </ td >
2006-12-02 04:36:16 +00:00
</ tr >
" ;
$count ++ ;
}
$text .= " </table>
</ div >
< div class = 'spacer' >
2013-03-10 19:44:54 -07:00
< table style = 'width: 100%;' class = 'fborder table' >
2006-12-02 04:36:16 +00:00
< tr >
2015-02-02 15:19:13 -08:00
< td class = 'forumheader' colspan = '5' > " .LAN_FORUM_6012. " </ td >
2006-12-02 04:36:16 +00:00
</ tr >
< tr >
2015-02-02 15:19:13 -08:00
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_6008. " </ th >
2015-01-30 18:14:06 -08:00
< th style = 'width: 20%;' class = 'fcaption' > " .LAN_NAME. " </ th >
< th style = 'width: 10%; text-align: center;' class = 'fcaption' > " .LAN_FORUM_2032. " </ th >
2013-03-10 19:44:54 -07:00
< th style = 'width: 10%; text-align: center;' class = 'fcaption' >%</ th >
< th style = 'width: 50%; text-align: center;' class = 'fcaption' >& nbsp ; </ th >
2006-12-02 04:36:16 +00:00
</ tr >
" ;
$count = 1 ;
foreach ( $top_repliers as $ma )
{
extract ( $ma );
$text .= " <tr>
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $count </ td >
< td style = 'width: 20%;' class = 'forumheader3' >< a href = '".e_BASE."user.php?id.$user_id' > $user_name </ a ></ td >
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $user_forums </ td >
< td style = 'width: 10%; text-align: center;' class = 'forumheader3' > $percentage %</ td >
2013-03-10 19:44:54 -07:00
< td style = 'width: 50%; text-align: center;' class = 'forumheader3' > " .showBar( $percentage ). " </ td >
2006-12-02 04:36:16 +00:00
</ tr >
" ;
$count ++ ;
}
2008-12-10 21:00:48 +00:00
$text .= ' </ table >
2006-12-02 04:36:16 +00:00
</ div >
2008-12-10 21:00:48 +00:00
' ;
2006-12-02 04:36:16 +00:00
2015-02-02 15:19:13 -08:00
$ns -> tablerender ( LAN_FORUM_6013 , $text );
2006-12-02 04:36:16 +00:00
require_once ( FOOTERF );
?>