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