Location: PHPKode > projects > vuBB Community Forums > includes/footer.php
<?php 
/**
 * vuBB
 * Copyright 2005-2006 the vuBB Group
 *
 * http://www.vubb.com/
 * http://community.vubb.com/
 */

if ($act == 'forum') {

	// Run the users update function
	update_users_online();

	// Run the guest update function
	update_guests_online();

	// Run the counting for stats
	$last_member = mysql_fetch_array(mysql_query("SELECT `id`,`user` FROM `members` ORDER BY `id` DESC LIMIT 1"));
	$results = mysql_fetch_array(mysql_query("SELECT COUNT(id) AS `count` FROM `forum_topics`"));
	$results1 = mysql_fetch_array(mysql_query("SELECT COUNT(id) AS `count` FROM `forum_replies`"));
	$user_count = mysql_fetch_array(mysql_query("SELECT COUNT(id) AS `count` FROM `members` WHERE `id` != '-1'"));
	
	$urls['last_member'] = makeurl('member', $last_member['id']);
	
	$guests_online = mysql_fetch_array(mysql_query("SELECT COUNT(*) AS `count` FROM `guests_online`"));
	
	// Counter.
	if ($stat['id'] == -1 && $guests_online['count'] > 1)
		$guests_online['count']--;
	$guests_online = $guests_online['count'] ? $lang['text']['guests_online'] .' '. $guests_online['count'] : $lang['text']['no_guests_online'];
	
	$users_online = '';
	$fetch_users = mysql_query("SELECT `user`, `id` FROM `members` WHERE `online` = '1' AND `id` != '-1'");
	while ($echo_users = mysql_fetch_array($fetch_users)) 
	{ 
		$users_online .= '<a href="'.makeurl('member', $echo_users['id']).'">'.$echo_users['user'] . '</a>, '; 
	} 
	$users_online_len = strlen($users_online); 
	$online_old = $users_online; 
	$users_online = ""; 
	for($i=0; $i < $users_online_len-2; $i++) { 
		$users_online .= $online_old[$i]; 
	}
	
	$users_online = (!empty($users_online)) ? $lang['text']['users_online'] .' '. $users_online : $lang['text']['no_users_online'];
	
	$online_sep = (!empty($guests_online) && !empty($users_online)) ? '<br />' : '';
	
	// Stats
	$stats = eval(get_template('footer_stats'));
	
} else {
	$stats = '';
}

echo eval(get_template('footer'));

?>
Return current item: vuBB Community Forums