5 if ( $cgi->param('error') ) {
6 $svc_acct_pop = new FS::svc_acct_pop ( {
7 map { $_, scalar($cgi->param($_)) } fields('svc_acct_pop')
9 } elsif ( $cgi->keywords ) { #editing
10 my($query)=$cgi->keywords;
12 $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1});
14 $svc_acct_pop = new FS::svc_acct_pop {};
16 my $action = $svc_acct_pop->popnum ? 'Edit' : 'Add';
17 my $hashref = $svc_acct_pop->hashref;
20 print header("$action Access Number", menubar(
21 'Main Menu' => popurl(2),
22 'View all Access Numbers' => popurl(2). "browse/svc_acct_pop.cgi",
25 print qq!<FONT SIZE="+1" COLOR="#ff0000">Error: !, $cgi->param('error'),
27 if $cgi->param('error');
29 print qq!<FORM ACTION="${p1}process/svc_acct_pop.cgi" METHOD=POST>!;
33 print qq!<INPUT TYPE="hidden" NAME="popnum" VALUE="$hashref->{popnum}">!,
34 "POP #", $hashref->{popnum} ? $hashref->{popnum} : "(NEW)";
38 City <INPUT TYPE="text" NAME="city" SIZE=32 VALUE="$hashref->{city}">
39 State <INPUT TYPE="text" NAME="state" SIZE=16 MAXLENGTH=16 VALUE="$hashref->{state}">
40 Area Code <INPUT TYPE="text" NAME="ac" SIZE=4 MAXLENGTH=3 VALUE="$hashref->{ac}">
41 Exchange <INPUT TYPE="text" NAME="exch" SIZE=4 MAXLENGTH=3 VALUE="$hashref->{exch}">
42 Local <INPUT TYPE="text" NAME="loc" SIZE=5 MAXLENGTH=4 VALUE="$hashref->{loc}">
46 print qq!<BR><INPUT TYPE="submit" VALUE="!,
47 $hashref->{popnum} ? "Apply changes" : "Add Access Number",