($ML{'error.noremote'}) unless $remote; $body .= ""; $body .= ""; # print dollars my $damt = sub { sprintf("\$%.02f", shift()) }; my $dbh = LJ::get_db_writer(); my $sth = $dbh->prepare("SELECT * FROM payments " . "WHERE userid=? AND anum IS NOT NULL AND (used='Y' OR used='N' " . "OR (used='C' AND datesent>(NOW() - INTERVAL 1 MONTH)))"); $sth->execute($remote->{'userid'}); my @rows = (); push @rows, $_ while $_ = $sth->fetchrow_hashref; unless (@rows) { $body .= "
No Orders
"; return; } $_->{'datesent'} = substr($_->{'datesent'}, 0, 10) foreach @rows; $body .= ""; $body .= ""; $body .= ""; foreach my $row (sort { $b->{'datesent'} cmp $a->{'datesent'} } @rows) { $body .= ""; $body .= ""; $body .= ""; my $id = "$row->{'payid'}-$row->{'anum'}"; $body .= ""; } $body .= "
DateStatusAmountOrder ID
$row->{'datesent'}" . ($row->{'used'} eq 'C' ? "pending" : "completed") . "" . $damt->($row->{'amount'}) . "[$id]
"; return; } _code?> body=> page?>