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

  1. <?php
  2. /**
  3. * @package uForum
  4. * @file includes/cache/cache_index.php
  5. * @version $Id$
  6. * @copyright 2007-2010 (c) PioDer <pioder@wp.pl>
  7. * @link http://www.pioder.pl/
  8. * @license see LICENSE.txt
  9. **/
  10. if(!defined('IN_uF'))
  11. {
  12. die('Hacking attempt');
  13. }
  14. //
  15. //cache forums and posts - version v1.0 Alpha 2---------------------------------
  16. //
  17. //lastpost in forum cache
  18. //cache forums --don't modify!!!
  19. $cache_id=1;
  20. $sql = "SELECT ".FORUMS_TABLE.".*
  21. FROM ".FORUMS_TABLE."
  22. ORDER BY `c_id`, `sort`";
  23. $query = DataBase::sql_query($sql,CRITICAL,'Could not obtain forum information.');
  24. while($result = DataBase::fetch($query))
  25. {
  26. $forum[$cache_id]['f_id'] = $result['f_id'];
  27. $forum[$cache_id]['name'] = $result['name'];
  28. $forum[$cache_id]['desc'] = $result['desc'];
  29. $forum[$cache_id]['c_id'] = $result['c_id'];
  30. $forum[$cache_id]['sort'] = $result['sort'];
  31. $forum[$cache_id]['lastpost'] = $result['lastpost'];
  32. $count_forum[$result['f_id']] = $result['posts'];
  33. $cache_id+=1;
  34. }
  35. $sql = "SELECT `u_id`,`nick`, `regdate` AS count FROM ".USERS_TABLE." ORDER BY `regdate` DESC";
  36. $query = DataBase::sql_query($sql,GENERAL,'Could not obtain amout of count users information');
  37. $lastuser = DataBase::fetch($query);
  38. $count_users = DataBase::num_rows($query) -1;
  39. ?>