log in." unless $remote; return "You don't have access to use this tool." unless LJ::remote_has_priv($remote, "moneyenter"); if ($POST{'payid'} && $POST{'piid'}) { my $dbh = LJ::get_db_writer(); my ($piid, $status) = $dbh->selectrow_array("SELECT piid, status FROM payitems " . "WHERE piid=? AND payid=?", undef, $POST{'piid'}, $POST{'payid'}); return "Error: Payid/Piid pair not found!" unless $piid; return "Error: Status = '$status' (not 'pending')" unless $status eq 'pend'; $dbh->do("UPDATE payitems SET giveafter=NULL " . "WHERE piid=? AND payid=? AND status='pend'", undef, $POST{'piid'}, $POST{'payid'}); return "Success: Delivery date set to now. " . "(PAYID: $POST{'payid'}, PIID: $POST{'piid'})"; } return "This tool will will set an item's delivery date to be now." . "
\n"; } _code?>