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.

38 lines
864 B

  1. <?php
  2. /**
  3. * @package uForum
  4. * @file includes/admin/class_forum.php
  5. * @version $Id$
  6. * @copyright 2009(c) PioDer <pioder@wp.pl>
  7. * @link http://pioder.gim2przemysl.int.pl/
  8. * @license GNU GPL v3
  9. **/
  10. if ( !defined('IN_uF') )
  11. {
  12. die('Hacking attempt');
  13. }
  14. class Admin_Forum
  15. {
  16. function AddCats($fid)
  17. {
  18. global $forum_config;
  19. $cat = Forum::ForumInformation($fid,'c_id');
  20. $all='';
  21. $query = DataBase::sql_query("SELECT `name`, `c_id` FROM `".CATS_TABLE."`",'GENERAL','Could not obtain category information');
  22. while($t = DataBase::fetch($query))
  23. {
  24. if ($t['c_id']==$cat)
  25. {
  26. $all .= '<option value="'.$t['c_id'].'" selected="selected">'.$t['name'].'</option>'."\n";
  27. }
  28. else
  29. {
  30. $all .= '<option value="'.$t['c_id'].'">'.$t['name'].'</option>'."\n";
  31. }
  32. }
  33. return $all;
  34. unset($t, $all);
  35. }
  36. }
  37. ?>