!empty($_POST['user_albums']), 'user_albums_parent' => $_POST['user_albums_parent'], ); conf_update_param('community', serialize($conf['community'])); array_push($page['infos'], l10n('Information data registered in database')); } // +-----------------------------------------------------------------------+ // | template init | // +-----------------------------------------------------------------------+ $template->set_filename('plugin_admin_content', dirname(__FILE__).'/admin_config.tpl'); // +-----------------------------------------------------------------------+ // | form options | // +-----------------------------------------------------------------------+ $template->assign('user_albums', $conf['community']['user_albums']); if (isset($conf['community']['user_albums_parent'])) { $category_options_selected = $conf['community']['user_albums_parent']; } else { // is there a "Community" album? $query = ' SELECT id FROM '.CATEGORIES_TABLE.' WHERE name = \'Community\' ;'; $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { $category_options_selected = $row['id']; break; } } // list of albums $query = ' SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE.' ;'; display_select_cat_wrapper( $query, isset($category_options_selected) ? $category_options_selected : array(), 'category_options' ); // image level options $selected_level = isset($_POST['level']) ? $_POST['level'] : 0; $template->assign( array( 'level_options'=> get_privacy_level_options(), 'level_options_selected' => array($selected_level) ) ); // +-----------------------------------------------------------------------+ // | sending html code | // +-----------------------------------------------------------------------+ $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); ?>