#!/usr/bin/perl
# $Id$
# /usr/local/bin/adm_pay.pl

sub aexit {
    ($status)=@_; exit $status;
}
push(@INC,"/usr/local/lib/apc"); require("alib.pl");
print "User: "; chop ($user = <STDIN>);
if ($user =~ /\./) {}
elsif ( $user =~ /@/ ) { $user .= '.'.$fqdn; } # UUCP node
else { $user .= '@'.$fqdn; }	# online user
print "User: $user\n";
print "Payment: "; chop ($payment=<STDIN>);$payment=-$payment;print "Payment: $payment\n";
open(ABORT, ">&STDERR");
if(&adduser($user))
{
    print "New group (<ENTER> to leave as is): "; chop ($newgrp=<STDIN>);
    &charge($user, "PAYMENT", $payment, $newgrp, TRUE);
#    print &getbalance($user);
}
