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
869 B

<?php
/**
* @package uForum
* @file includes/admin/class_forum.php
* @version $Id$
* @copyright 2007-2010 (c) PioDer <[email protected]>
* @link http://www.pioder.pl/
* @license see LICENSE.txt
**/
if ( !defined('IN_uF') )
{
die('Hacking attempt');
}
class Admin_Forum
{
function AddCats($fid)
{
global $forum_config;
$cat = Forum::ForumInformation($fid,'c_id');
$all='';
$query = DataBase::sql_query("SELECT `name`, `c_id` FROM `".CATS_TABLE."`",GENERAL,'Could not obtain category information');
while($t = DataBase::fetch($query))
{
if ($t['c_id']==$cat)
{
$all .= '<option value="'.$t['c_id'].'" selected="selected">'.$t['name'].'</option>'."\n";
}
else
{
$all .= '<option value="'.$t['c_id'].'">'.$t['name'].'</option>'."\n";
}
}
return $all;
unset($t, $all);
}
}
?>