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);
$CVSrelease = $user->lookup_CVSrelease($_SESSION['current']->userid);
include(BASE."include/"."form_edit.php");
echo "
| Wine version | ";
make_bugzilla_version_list("CVSrelease", $CVSrelease);
echo " |
";
}
if($_POST)
{
$user = new User();
while(list($key, $value) = each($_REQUEST))
{
if(!ereg("^pref_(.+)$", $key, $arr))
continue;
$_SESSION['current']->setpref($arr[1], $value);
}
if ($_REQUEST['ext_password'] == $_REQUEST['ext_password2'])
{
$str_passwd = $_REQUEST['ext_password'];
}
else if ($_REQUEST['ext_password'])
{
addmsg("The Passwords you entered did not match.", "red");
}
if ($user->update($_SESSION['current']->userid, $str_passwd, $_REQUEST['ext_realname'], $_REQUEST['ext_email'], $_REQUEST['CVSrelease']))
{
addmsg("Preferences Updated", "green");
}
else
{
addmsg("There was a problem updating your userinfo", "red");
}
}
apidb_header("User Preferences");
echo "\n";
apidb_footer();
?>