1 _info?>Change Notifications body<= login."; } if ($mode eq "save" && ! LJ::did_post) { push @errors, ""; } return LJ::bad_input(@errors) if @errors; LJ::Support::init_remote($remote); my $cats = LJ::Support::load_cats(); my @filter_cats = LJ::Support::filter_cats($remote, $cats); if ($mode eq "modify") { my $ret = ""; $ret .= "
\n"; return $ret; } if ($mode eq "save") { my $dbh = LJ::get_db_writer(); $dbh->do("DELETE FROM supportnotify WHERE userid=$remote->{'userid'}"); my $sql; foreach my $cat (@filter_cats) { my $id = $cat->{'spcatid'}; my $setting = $FORM{"spcatid_$id"}; if ($setting eq "all" || $setting eq "new") { if ($sql) { $sql .= ", "; } else { $sql .= "REPLACE INTO supportnotify (spcatid, userid, level) VALUES "; } $sql .= "($id, $remote->{'userid'}, '$setting')"; } } if ($sql) { $dbh->do($sql); } return ""; } return "Unknown mode." _code?> <=body page?> link: htdocs/login.bml post: htdocs/support/changenotify.bml _c?>