3 # svc_acct_pop.cgi: Add/Edit pop (output form)
5 # ivan@sisd.com 98-mar-8
7 # Changes to allow page to work at a relative position in server
8 # bmccane@maxbaud.net 98-apr-3
10 # lose background, FS::CGI ivan@sisd.com 98-sep-2
12 # $Log: svc_acct_pop.cgi,v $
13 # Revision 1.2 1998-11-13 09:56:47 ivan
14 # change configuration file layout to support multiple distinct databases (with
15 # own set of config files, export, etc.)
20 use CGI::Carp qw(fatalsToBrowser);
21 use FS::UID qw(cgisuidsetup);
22 use FS::Record qw(qsearch qsearchs);
24 use FS::CGI qw(header menubar);
30 my($svc_acct_pop,$action);
31 if ( $cgi->query_string =~ /^(\d+)$/ ) { #editing
32 $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1});
35 $svc_acct_pop=create FS::svc_acct_pop {};
38 my($hashref)=$svc_acct_pop->hashref;
40 print $cgi->header, header("$action POP", menubar(
42 'View all POPs' => "../browse/svc_acct_pop.cgi",
44 <FORM ACTION="process/svc_acct_pop.cgi" METHOD=POST>
49 print qq!<INPUT TYPE="hidden" NAME="popnum" VALUE="$hashref->{popnum}">!,
50 "POP #", $hashref->{popnum} ? $hashref->{popnum} : "(NEW)";
54 City <INPUT TYPE="text" NAME="city" SIZE=32 VALUE="$hashref->{city}">
55 State <INPUT TYPE="text" NAME="state" SIZE=3 MAXLENGTH=2 VALUE="$hashref->{state}">
56 Area Code <INPUT TYPE="text" NAME="ac" SIZE=4 MAXLENGTH=3 VALUE="$hashref->{ac}">
57 Exchange <INPUT TYPE="text" NAME="exch" SIZE=4 MAXLENGTH=3 VALUE="$hashref->{exch}">
61 print qq!<BR><INPUT TYPE="submit" VALUE="!,
62 $hashref->{popnum} ? "Apply changes" : "Add POP",