$id)
{
$query.= $id;
if ($i+1<$nb) $query.=',';
}
$query.=');';
pwg_query ($query);
}
// Cache management
$query = 'SELECT id, name, uploadable FROM '.CATEGORIES_TABLE;
$query.= ' WHERE dir IS NOT NULL';
$query.= ' ORDER BY name ASC';
$query.= ';';
$result = pwg_query( $query );
while ( $row = mysql_fetch_assoc( $result ) )
{
if ($row['uploadable'] == 'false')
{
$categories.='';
}
else
{
$uploadable.='';
}
}
//----------------------------------------------------- template initialization
$template->set_filenames( array('upload'=>'admin/admin_upload.tpl') );
$template->assign_vars(array(
'PRIVATE_CATEGORIES'=>$categories,
'UPLOADABLE_CATEGORIES'=>$uploadable,
'L_UPLOAD_TITLE'=>$lang['cat_upload'],
'L_SUBMIT'=>$lang['submit'],
'L_DELETE'=>$lang['delete'],
'L_RESET'=>$lang['reset'],
'L_UPLOAD_INFO'=>$lang['cat_upload_info'],
'L_AUTHORIZED'=>$lang['authorized'],
'L_FORBIDDEN'=>$lang['forbidden']
));
//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'upload');
?>