*** adm/admforum.php
--- adm/admforum.php 2005-10-14 00:53:40.000000000 -0600
***************
*** 32,40 ****
--- 32,42 ----
fud_use('cat.inc', true);
fud_use('widgets.inc', true);
fud_use('logaction.inc');
+ fud_use('icons_adm.inc', true);
$tbl = $GLOBALS['DBHOST_TBL_PREFIX'];
$max_upload_size = get_max_upload_size();
+ $icon = new fud_icons('forum_icons', 'frm_forum');
if (!$cat_id || ($cat_name = q_singleval('SELECT name FROM '.$tbl.'cat WHERE id='.$cat_id)) === NULL) {
exit('no such category');
***************
*** 49,55 ****
/* (int) $_POST['frm_anon_forum'] is unused */
$_POST['frm_forum_opt'] = (int) $_POST['frm_mod_attach'] | (int) $_POST['frm_moderated'] | (int) $_POST['frm_passwd_posting'] | (int) $_POST['frm_tag_style'];
! $frm = new fud_forum;
if (!$edit) {
fud_use('groups_adm.inc', true);
--- 51,58 ----
/* (int) $_POST['frm_anon_forum'] is unused */
$_POST['frm_forum_opt'] = (int) $_POST['frm_mod_attach'] | (int) $_POST['frm_moderated'] | (int) $_POST['frm_passwd_posting'] | (int) $_POST['frm_tag_style'];
! $icon_store = $icon->submit_icon();
! $frm = new fud_forum($icon_store);
if (!$edit) {
fud_use('groups_adm.inc', true);
***************
*** 64,78 ****
--- 67,86 ----
$edit = '';
}
}
+
if ($edit && ($c = db_arr_assoc('SELECT * FROM '.$tbl.'forum WHERE id='.$edit))) {
foreach ($c as $k => $v) {
+ if ($k == 'forum_icon') continue;
${'frm_'.$k} = $v;
}
+ $icon_name = $c['forum_icon'];
} else {
$c = get_class_vars('fud_forum');
foreach ($c as $k => $v) {
+ if ($k == 'forum_icon') continue;
${'frm_'.$k} = '';
}
+ $icon_name = '';
/* some default values for new forums */
$frm_pos = 'LAST';
***************
*** 108,113 ****
--- 116,124 ----
rebuild_forum_cat_order();
}
}
+ $icon->setup_icon($icon_name);
+ $icon_html = $icon->icon_html();
+ $upload_html = $icon->upload_html();
require($WWW_ROOT_DISK . 'adm/admpanel.php');
?>
***************
*** 117,192 ****
?>
Back to categories
!