Error: You don't have access to do this." unless LJ::check_priv($remote, "supporthelp"); # perform action if (LJ::did_post()) { my $u = LJ::load_user($POST{user}) or return "Error: Invalid user: $POST{user}"; unless ($POST{area} =~ /^[LTMSRKPCO]$/) { return "Error: Invalid area: $POST{area}"; } my $dbh = LJ::get_db_writer() or return "Error: Unable to contact global master"; my $rv = $dbh->do ("DELETE FROM usercounter WHERE journalid=? AND area=?", undef, $u->{userid}, $POST{area}); if ($dbh->err) { return "Error: Error in query: " . $dbh->errstr; } unless ($rv) { return "Error: Unknown error in query"; } return "User counter successfully reset\n"; } # form $ret .= ""; $ret .= ""; $ret .= ""; $ret .= "Notes: When specifying a username, you must give the username of " . "the journal on which the problem is happening, not necessarly the " . "journal of the logged in user. This means that if there is an error posting " . "to a community, the username of that community should be given. Likewise if " . "there is an error posting a comment to a journal, the username should be that " . "of the comment to which the comment is being posted. p?>"; $ret .= "