A lightweight forum engine written in PHP. Repository is now obsolete and read-only. http://www.pioder.pl/uforum.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.3 KiB

<?php
/**
* @package uForum
* @file includes/cache/cache_index.php
* @version $Id$
* @copyright 2009(c) PioDer <[email protected]>
* @link http://pioder.gim2przemysl.int.pl/
* @license GNU GPL v3
**/
if(!defined('IN_uF'))
{
die('Hacking attempt');
}
//
//cache forums and posts - version v1.0 Alpha 2---------------------------------
//
//lastpost in forum cache
//cache forums --don't modify!!!
$cache_id=1;
$sql = "SELECT ".FORUMS_TABLE.".*
FROM ".FORUMS_TABLE."
ORDER BY `c_id`, `sort`";
$query = DataBase::sql_query($sql,CRITICAL,'Could not obtain forum information.');
while($result = DataBase::fetch($query))
{
$forum[$cache_id]['f_id'] = $result['f_id'];
$forum[$cache_id]['name'] = $result['name'];
$forum[$cache_id]['desc'] = $result['desc'];
$forum[$cache_id]['c_id'] = $result['c_id'];
$forum[$cache_id]['sort'] = $result['sort'];
$forum[$cache_id]['lastpost'] = $result['lastpost'];
$count_forum[$result['f_id']] = $result['posts'];
$cache_id+=1;
}
$sql = "SELECT `u_id`,`nick`, `regdate` AS count FROM ".USERS_TABLE." ORDER BY `regdate` DESC";
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain amout of count users information');
$lastuser = DataBase::fetch($query);
$count_users = DataBase::num_rows($query) -1;
?>