exit; } //////////////////////////////////////////////////////////////////////////// // // M A I N // //////////////////////////////////////////////////////////////////////////// $vars = get_input_vars(); switch (@$vars['action']) { case 'browse': case '': display_folders_list(); break; case 'add': if ($vars['save']) { if ($err = validate_add_form($vars)) { display_add_form($vars, $err); } else { protect_folder($vars); } } else { display_add_form($vars); } break; case 'edit': if ($vars['save']) { if ($err = validate_edit_form($vars)) { display_edit_form($vars, $err); } else { protect_change_folder($vars); }
global $db, $config; global $_reorder; $_reorder = $o; usort($config['member_fields'], 'reorder_cmp'); $db->config_set('member_fields', $config['member_fields'], 1); } $ff = get_member_fields(); $t->assign('validate_functions', get_validate_functions()); $t->assign('sql_type_options', get_sql_type_options()); switch ($vars['action']) { case 'add': $field = array(); if ($vars['save']) { check_demo(); $field = get_field_from_form($vars); if ($err = validate_add_form($field)) { $t->assign('error', $err); } elseif ($err = add_field($field)) { $t->assign('error', $err); } else { admin_log("Additonal Field ({$field['name']}) inserted"); admin_html_redirect("fields.php", "Field info added", "Field info added to config"); break; } } display_add_form($field); break; case 'edit': foreach ($ff as $f) { if ($f['name'] == $vars['name']) { $old_field = $f;