name == "query:mode") continue; if($r->name == "sidebar") continue; if($r->name == "window:query") continue; if($r->name == "query:hide_header") continue; if($r->name == "query:hide_sidebar") continue; if($r->name == "debug") continue; } $input = html_select("pref_$r->name", explode('|', $r->value_list), $_SESSION['current']->getpref($r->name, $r->def_value)); echo html_tr(array("  $r->description", $input)); } } function show_user_fields() { $user = new User(); $ext_username = $_SESSION['current']->username; $ext_realname = $user->lookup_realname($_SESSION['current']->userid); $ext_email = $user->lookup_email($_SESSION['current']->userid); include(BASE."include/"."form_edit.php"); } if($HTTP_POST_VARS) { global $ext_username, $ext_password1, $ext_password2, $ext_realname, $ext_email; $user = new User(); while(list($key, $value) = each($HTTP_POST_VARS)) { if(!ereg("^pref_(.+)$", $key, $arr)) continue; $_SESSION['current']->setpref($arr[1], $value); } if ($ext_password == $ext_password2) { $passwd = $ext_password; } else if ($ext_password) { addmsg("The Passwords you entered did not match.", "red"); } if ($user->update($_SESSION['current']->userid, $passwd, $ext_realname, $ext_email)) { addmsg("Preferences Updated", "green"); } else { addmsg("There was a problem updating your userinfo", "red"); } } apidb_header("User Preferences"); echo "
\n"; echo html_frame_start("Preferences for ".$_SESSION['current']->username, "80%"); echo html_table_begin("width='100%' border=0 align=left cellspacing=0 class='box-body'"); show_user_fields(); build_prefs_list(); echo html_table_end(); echo html_frame_end(); echo "

\n"; echo "
\n"; apidb_footer(); ?>