sql_query($sql)))
{
bb_die('Could not query extension groups table #1');
}
$group_select = '';
return $group_select;
}
/**
* select download mode
*/
function download_select($select_name, $group_id = 0)
{
global $types_download, $modes_download;
if ($group_id)
{
$sql = 'SELECT download_mode
FROM ' . BB_EXTENSION_GROUPS . '
WHERE group_id = ' . (int) $group_id;
if (!($result = DB()->sql_query($sql)))
{
bb_die('Could not query extension groups table #2');
}
$row = DB()->sql_fetchrow($result);
DB()->sql_freeresult($result);
if (!isset($row['download_mode']))
{
return '';
}
$download_mode = $row['download_mode'];
}
$group_select = '';
return $group_select;
}
/**
* select category types
*/
function category_select($select_name, $group_id = 0)
{
global $types_category, $modes_category;
$sql = 'SELECT group_id, cat_id FROM ' . BB_EXTENSION_GROUPS;
if (!($result = DB()->sql_query($sql)))
{
bb_die('Could not select category');
}
$rows = DB()->sql_fetchrowset($result);
$num_rows = DB()->num_rows($result);
DB()->sql_freeresult($result);
$type_category = 0;
if ($num_rows > 0)
{
for ($i = 0; $i < $num_rows; $i++)
{
if ($group_id == $rows[$i]['group_id'])
{
$category_type = $rows[$i]['cat_id'];
}
}
}
$types = array(NONE_CAT);
$modes = array('none');
for ($i = 0; $i < sizeof($types_category); $i++)
{
$types[] = $types_category[$i];
$modes[] = $modes_category[$i];
}
$group_select = '';
return $group_select;
}
/**
* Select size mode
*/
function size_select($select_name, $size_compare)
{
global $lang;
$size_types_text = array($lang['BYTES'], $lang['KB'], $lang['MB']);
$size_types = array('b', 'kb', 'mb');
$select_field = '';
return $select_field;
}
/**
* select quota limit
*/
function quota_limit_select($select_name, $default_quota = 0)
{
global $lang;
$sql = 'SELECT quota_limit_id, quota_desc FROM ' . BB_QUOTA_LIMITS . ' ORDER BY quota_limit ASC';
if (!($result = DB()->sql_query($sql)))
{
bb_die('Could not query quota limits table #1');
}
$quota_select = '';
return $quota_select;
}
/**
* select default quota limit
*/
function default_quota_limit_select($select_name, $default_quota = 0)
{
global $lang;
$sql = 'SELECT quota_limit_id, quota_desc FROM ' . BB_QUOTA_LIMITS . ' ORDER BY quota_limit ASC';
if (!($result = DB()->sql_query($sql)))
{
bb_die('Could not query quota limits table #2');
}
$quota_select = '';
return $quota_select;
}