($ML{'error.noremote'}) unless $remote; my $authas = $GET{'authas'} || $remote->{'user'}; my $u = LJ::get_authas_user($authas); return $err->($ML{'error.invalidauth'}) unless $u; # authas switcher form $body .= "
\n"; $body .= LJ::make_authas_select($remote, { 'authas' => $GET{'authas'} }) . "\n"; $body .= "
\n\n"; $body .= ""; $body .= ""; $body .= "$LJ::SITENAMESHORT Store. Used coupons are marked out, but "; $body .= "still appear in the table. p?>"; my $tbl; $tbl .= ""; $tbl .= ""; $tbl .= ""; # print dollars my $damt = sub { sprintf("\$%.02f", shift()) }; my $dbh = LJ::get_db_writer(); my $sth = $dbh->prepare("SELECT * FROM coupon WHERE rcptid=?"); $sth->execute($u->{'userid'}); my $ct = 0; while (my $row = $sth->fetchrow_hashref) { my $str = sub { $row->{'payid'} ? "$_[0]" : $_[0] }; $tbl .= ""; $ct++; } if ($ct) { $tbl .= "
ItemAmountCode
"; $tbl .= $str->(LJ::Pay::product_name('coupon', $row->{'type'})); $tbl .= "" . $str->($damt->($row->{'arg'})) . ""; $tbl .= $str->($row->{'cpid'} . "-" . $row->{'auth'}); $tbl .= "
"; $body .= $tbl; } else { $body .= "
No Coupons
"; } return; } _code?> body=> page?>