From 1d758388ce3b17b8de1ae1d3a8ec39c1026baefc Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 13 Aug 2001 01:09:02 +0000 Subject: [PATCH] removing --- htdocs/.htaccess | 3 - htdocs/browse/agent.cgi | 134 ------ htdocs/browse/agent_type.cgi | 105 ----- htdocs/browse/cust_main_county.cgi | 104 ----- htdocs/browse/nas.cgi | 94 ----- htdocs/browse/part_pkg.cgi | 110 ----- htdocs/browse/part_referral.cgi | 88 ---- htdocs/browse/part_svc.cgi | 118 ------ htdocs/browse/svc_acct_pop.cgi | 97 ----- htdocs/docs/admin.html | 59 --- htdocs/docs/billing.html | 67 --- htdocs/docs/config.html | 107 ----- htdocs/docs/export.html | 41 -- htdocs/docs/index.html | 31 -- htdocs/docs/install.html | 86 ---- htdocs/docs/legacy.html | 34 -- htdocs/docs/man/FS.html | 138 ------- htdocs/docs/man/FS/Bill.html | 32 -- htdocs/docs/man/FS/CGI.html | 95 ----- htdocs/docs/man/FS/CGIwrapper.html | 16 - htdocs/docs/man/FS/Conf.html | 81 ---- htdocs/docs/man/FS/Invoice.html | 32 -- htdocs/docs/man/FS/Record.html | 342 ---------------- htdocs/docs/man/FS/SSH.html | 104 ----- htdocs/docs/man/FS/SessionClient.html | 97 ----- htdocs/docs/man/FS/SignupClient.html | 125 ------ htdocs/docs/man/FS/UI/Base.html | 100 ----- htdocs/docs/man/FS/UI/CGI.html | 94 ----- htdocs/docs/man/FS/UI/Gtk.html | 91 ----- htdocs/docs/man/FS/UI/agent.html | 16 - htdocs/docs/man/FS/UID.html | 142 ------- htdocs/docs/man/FS/agent.html | 121 ------ htdocs/docs/man/FS/agent_type.html | 126 ------ htdocs/docs/man/FS/cust_bill.html | 161 -------- htdocs/docs/man/FS/cust_bill_pkg.html | 112 ----- htdocs/docs/man/FS/cust_credit.html | 118 ------ htdocs/docs/man/FS/cust_main.html | 252 ------------ htdocs/docs/man/FS/cust_main_county.html | 106 ----- htdocs/docs/man/FS/cust_main_invoice.html | 111 ----- htdocs/docs/man/FS/cust_pay.html | 108 ----- htdocs/docs/man/FS/cust_pay_batch.html | 132 ------ htdocs/docs/man/FS/cust_pkg.html | 205 ---------- htdocs/docs/man/FS/cust_refund.html | 108 ----- htdocs/docs/man/FS/cust_svc.html | 118 ------ htdocs/docs/man/FS/dbdef.html | 97 ----- htdocs/docs/man/FS/dbdef_colgroup.html | 86 ---- htdocs/docs/man/FS/dbdef_column.html | 118 ------ htdocs/docs/man/FS/dbdef_index.html | 58 --- htdocs/docs/man/FS/dbdef_table.html | 144 ------- htdocs/docs/man/FS/dbdef_unique.html | 58 --- htdocs/docs/man/FS/domain_record.html | 122 ------ htdocs/docs/man/FS/nas.html | 117 ------ htdocs/docs/man/FS/part_pkg.html | 138 ------- htdocs/docs/man/FS/part_referral.html | 100 ----- htdocs/docs/man/FS/part_svc.html | 110 ----- htdocs/docs/man/FS/pkg_svc.html | 115 ------ htdocs/docs/man/FS/port.html | 120 ------ htdocs/docs/man/FS/prepay_credit.html | 118 ------ htdocs/docs/man/FS/session.html | 129 ------ htdocs/docs/man/FS/svc_Common.html | 94 ----- htdocs/docs/man/FS/svc_acct.html | 219 ---------- htdocs/docs/man/FS/svc_acct_pop.html | 107 ----- htdocs/docs/man/FS/svc_acct_sm.html | 141 ------- htdocs/docs/man/FS/svc_domain.html | 162 -------- htdocs/docs/man/FS/svc_www.html | 150 ------- htdocs/docs/man/FS/type_pkgs.html | 100 ----- htdocs/docs/overview.dia | Bin 2800 -> 0 bytes htdocs/docs/overview.png | Bin 13064 -> 0 bytes htdocs/docs/passwd.html | 16 - htdocs/docs/postgresql.html | 23 -- htdocs/docs/schema.html | 264 ------------ htdocs/docs/session.html | 54 --- htdocs/docs/signup.html | 57 --- htdocs/docs/trouble.html | 26 -- htdocs/docs/upgrade.html | 24 -- htdocs/docs/upgrade2.html | 11 - htdocs/docs/upgrade3.html | 40 -- htdocs/docs/upgrade4.html | 27 -- htdocs/docs/upgrade5.html | 34 -- htdocs/docs/upgrade6.html | 66 --- htdocs/docs/upgrade7.html | 24 -- htdocs/edit/agent.cgi | 108 ----- htdocs/edit/agent_type.cgi | 124 ------ htdocs/edit/cust_credit.cgi | 121 ------ htdocs/edit/cust_main.cgi | 516 ------------------------ htdocs/edit/cust_main_county-expand.cgi | 88 ---- htdocs/edit/cust_main_county.cgi | 100 ----- htdocs/edit/cust_pay.cgi | 97 ----- htdocs/edit/cust_pkg.cgi | 167 -------- htdocs/edit/part_pkg.cgi | 176 -------- htdocs/edit/part_referral.cgi | 90 ----- htdocs/edit/part_svc.cgi | 208 ---------- htdocs/edit/process/agent.cgi | 69 ---- htdocs/edit/process/agent_type.cgi | 96 ----- htdocs/edit/process/cust_credit.cgi | 76 ---- htdocs/edit/process/cust_main.cgi | 192 --------- htdocs/edit/process/cust_main_county-expand.cgi | 100 ----- htdocs/edit/process/cust_main_county.cgi | 60 --- htdocs/edit/process/cust_pay.cgi | 67 --- htdocs/edit/process/cust_pkg.cgi | 80 ---- htdocs/edit/process/part_pkg.cgi | 148 ------- htdocs/edit/process/part_referral.cgi | 65 --- htdocs/edit/process/part_svc.cgi | 69 ---- htdocs/edit/process/svc_acct.cgi | 96 ----- htdocs/edit/process/svc_acct_pop.cgi | 66 --- htdocs/edit/process/svc_acct_sm.cgi | 83 ---- htdocs/edit/process/svc_domain.cgi | 80 ---- htdocs/edit/svc_acct.cgi | 228 ----------- htdocs/edit/svc_acct_pop.cgi | 102 ----- htdocs/edit/svc_acct_sm.cgi | 247 ------------ htdocs/edit/svc_domain.cgi | 164 -------- htdocs/images/mid-logo.png | Bin 9727 -> 0 bytes htdocs/images/small-logo.png | Bin 4781 -> 0 bytes htdocs/index.html | 105 ----- htdocs/misc/bill.cgi | 58 --- htdocs/misc/cancel-unaudited.cgi | 93 ----- htdocs/misc/cancel_pkg.cgi | 71 ---- htdocs/misc/delete-customer.cgi | 58 --- htdocs/misc/expire_pkg.cgi | 61 --- htdocs/misc/link.cgi | 85 ---- htdocs/misc/print-invoice.cgi | 51 --- htdocs/misc/process/delete-customer.cgi | 46 --- htdocs/misc/process/link.cgi | 76 ---- htdocs/misc/susp_pkg.cgi | 64 --- htdocs/misc/unsusp_pkg.cgi | 61 --- htdocs/search/cust_bill.cgi | 176 -------- htdocs/search/cust_bill.html | 21 - htdocs/search/cust_main-payinfo.html | 20 - htdocs/search/cust_main.cgi | 311 -------------- htdocs/search/cust_main.html | 36 -- htdocs/search/cust_pkg.cgi | 151 ------- htdocs/search/svc_acct.cgi | 207 ---------- htdocs/search/svc_acct.html | 21 - htdocs/search/svc_acct_sm.cgi | 140 ------- htdocs/search/svc_acct_sm.html | 23 -- htdocs/search/svc_domain.cgi | 210 ---------- htdocs/search/svc_domain.html | 22 - htdocs/view/cust_bill.cgi | 93 ----- htdocs/view/cust_main.cgi | 437 -------------------- htdocs/view/cust_pkg.cgi | 206 ---------- htdocs/view/svc_acct.cgi | 177 -------- htdocs/view/svc_acct_sm.cgi | 128 ------ htdocs/view/svc_domain.cgi | 102 ----- 143 files changed, 15023 deletions(-) delete mode 100644 htdocs/.htaccess delete mode 100755 htdocs/browse/agent.cgi delete mode 100755 htdocs/browse/agent_type.cgi delete mode 100755 htdocs/browse/cust_main_county.cgi delete mode 100755 htdocs/browse/nas.cgi delete mode 100755 htdocs/browse/part_pkg.cgi delete mode 100755 htdocs/browse/part_referral.cgi delete mode 100755 htdocs/browse/part_svc.cgi delete mode 100755 htdocs/browse/svc_acct_pop.cgi delete mode 100644 htdocs/docs/admin.html delete mode 100644 htdocs/docs/billing.html delete mode 100644 htdocs/docs/config.html delete mode 100644 htdocs/docs/export.html delete mode 100644 htdocs/docs/index.html delete mode 100644 htdocs/docs/install.html delete mode 100644 htdocs/docs/legacy.html delete mode 100644 htdocs/docs/man/FS.html delete mode 100644 htdocs/docs/man/FS/Bill.html delete mode 100644 htdocs/docs/man/FS/CGI.html delete mode 100644 htdocs/docs/man/FS/CGIwrapper.html delete mode 100644 htdocs/docs/man/FS/Conf.html delete mode 100644 htdocs/docs/man/FS/Invoice.html delete mode 100644 htdocs/docs/man/FS/Record.html delete mode 100644 htdocs/docs/man/FS/SSH.html delete mode 100644 htdocs/docs/man/FS/SessionClient.html delete mode 100644 htdocs/docs/man/FS/SignupClient.html delete mode 100644 htdocs/docs/man/FS/UI/Base.html delete mode 100644 htdocs/docs/man/FS/UI/CGI.html delete mode 100644 htdocs/docs/man/FS/UI/Gtk.html delete mode 100644 htdocs/docs/man/FS/UI/agent.html delete mode 100644 htdocs/docs/man/FS/UID.html delete mode 100644 htdocs/docs/man/FS/agent.html delete mode 100644 htdocs/docs/man/FS/agent_type.html delete mode 100644 htdocs/docs/man/FS/cust_bill.html delete mode 100644 htdocs/docs/man/FS/cust_bill_pkg.html delete mode 100644 htdocs/docs/man/FS/cust_credit.html delete mode 100644 htdocs/docs/man/FS/cust_main.html delete mode 100644 htdocs/docs/man/FS/cust_main_county.html delete mode 100644 htdocs/docs/man/FS/cust_main_invoice.html delete mode 100644 htdocs/docs/man/FS/cust_pay.html delete mode 100644 htdocs/docs/man/FS/cust_pay_batch.html delete mode 100644 htdocs/docs/man/FS/cust_pkg.html delete mode 100644 htdocs/docs/man/FS/cust_refund.html delete mode 100644 htdocs/docs/man/FS/cust_svc.html delete mode 100644 htdocs/docs/man/FS/dbdef.html delete mode 100644 htdocs/docs/man/FS/dbdef_colgroup.html delete mode 100644 htdocs/docs/man/FS/dbdef_column.html delete mode 100644 htdocs/docs/man/FS/dbdef_index.html delete mode 100644 htdocs/docs/man/FS/dbdef_table.html delete mode 100644 htdocs/docs/man/FS/dbdef_unique.html delete mode 100644 htdocs/docs/man/FS/domain_record.html delete mode 100644 htdocs/docs/man/FS/nas.html delete mode 100644 htdocs/docs/man/FS/part_pkg.html delete mode 100644 htdocs/docs/man/FS/part_referral.html delete mode 100644 htdocs/docs/man/FS/part_svc.html delete mode 100644 htdocs/docs/man/FS/pkg_svc.html delete mode 100644 htdocs/docs/man/FS/port.html delete mode 100644 htdocs/docs/man/FS/prepay_credit.html delete mode 100644 htdocs/docs/man/FS/session.html delete mode 100644 htdocs/docs/man/FS/svc_Common.html delete mode 100644 htdocs/docs/man/FS/svc_acct.html delete mode 100644 htdocs/docs/man/FS/svc_acct_pop.html delete mode 100644 htdocs/docs/man/FS/svc_acct_sm.html delete mode 100644 htdocs/docs/man/FS/svc_domain.html delete mode 100644 htdocs/docs/man/FS/svc_www.html delete mode 100644 htdocs/docs/man/FS/type_pkgs.html delete mode 100644 htdocs/docs/overview.dia delete mode 100644 htdocs/docs/overview.png delete mode 100644 htdocs/docs/passwd.html delete mode 100755 htdocs/docs/postgresql.html delete mode 100644 htdocs/docs/schema.html delete mode 100644 htdocs/docs/session.html delete mode 100644 htdocs/docs/signup.html delete mode 100644 htdocs/docs/trouble.html delete mode 100644 htdocs/docs/upgrade.html delete mode 100644 htdocs/docs/upgrade2.html delete mode 100644 htdocs/docs/upgrade3.html delete mode 100644 htdocs/docs/upgrade4.html delete mode 100644 htdocs/docs/upgrade5.html delete mode 100644 htdocs/docs/upgrade6.html delete mode 100644 htdocs/docs/upgrade7.html delete mode 100755 htdocs/edit/agent.cgi delete mode 100755 htdocs/edit/agent_type.cgi delete mode 100755 htdocs/edit/cust_credit.cgi delete mode 100755 htdocs/edit/cust_main.cgi delete mode 100755 htdocs/edit/cust_main_county-expand.cgi delete mode 100755 htdocs/edit/cust_main_county.cgi delete mode 100755 htdocs/edit/cust_pay.cgi delete mode 100755 htdocs/edit/cust_pkg.cgi delete mode 100755 htdocs/edit/part_pkg.cgi delete mode 100755 htdocs/edit/part_referral.cgi delete mode 100755 htdocs/edit/part_svc.cgi delete mode 100755 htdocs/edit/process/agent.cgi delete mode 100755 htdocs/edit/process/agent_type.cgi delete mode 100755 htdocs/edit/process/cust_credit.cgi delete mode 100755 htdocs/edit/process/cust_main.cgi delete mode 100755 htdocs/edit/process/cust_main_county-expand.cgi delete mode 100755 htdocs/edit/process/cust_main_county.cgi delete mode 100755 htdocs/edit/process/cust_pay.cgi delete mode 100755 htdocs/edit/process/cust_pkg.cgi delete mode 100755 htdocs/edit/process/part_pkg.cgi delete mode 100755 htdocs/edit/process/part_referral.cgi delete mode 100755 htdocs/edit/process/part_svc.cgi delete mode 100755 htdocs/edit/process/svc_acct.cgi delete mode 100755 htdocs/edit/process/svc_acct_pop.cgi delete mode 100755 htdocs/edit/process/svc_acct_sm.cgi delete mode 100755 htdocs/edit/process/svc_domain.cgi delete mode 100755 htdocs/edit/svc_acct.cgi delete mode 100755 htdocs/edit/svc_acct_pop.cgi delete mode 100755 htdocs/edit/svc_acct_sm.cgi delete mode 100755 htdocs/edit/svc_domain.cgi delete mode 100644 htdocs/images/mid-logo.png delete mode 100644 htdocs/images/small-logo.png delete mode 100755 htdocs/index.html delete mode 100755 htdocs/misc/bill.cgi delete mode 100755 htdocs/misc/cancel-unaudited.cgi delete mode 100755 htdocs/misc/cancel_pkg.cgi delete mode 100755 htdocs/misc/delete-customer.cgi delete mode 100755 htdocs/misc/expire_pkg.cgi delete mode 100755 htdocs/misc/link.cgi delete mode 100755 htdocs/misc/print-invoice.cgi delete mode 100755 htdocs/misc/process/delete-customer.cgi delete mode 100755 htdocs/misc/process/link.cgi delete mode 100755 htdocs/misc/susp_pkg.cgi delete mode 100755 htdocs/misc/unsusp_pkg.cgi delete mode 100755 htdocs/search/cust_bill.cgi delete mode 100755 htdocs/search/cust_bill.html delete mode 100755 htdocs/search/cust_main-payinfo.html delete mode 100755 htdocs/search/cust_main.cgi delete mode 100755 htdocs/search/cust_main.html delete mode 100755 htdocs/search/cust_pkg.cgi delete mode 100755 htdocs/search/svc_acct.cgi delete mode 100755 htdocs/search/svc_acct.html delete mode 100755 htdocs/search/svc_acct_sm.cgi delete mode 100755 htdocs/search/svc_acct_sm.html delete mode 100755 htdocs/search/svc_domain.cgi delete mode 100755 htdocs/search/svc_domain.html delete mode 100755 htdocs/view/cust_bill.cgi delete mode 100755 htdocs/view/cust_main.cgi delete mode 100755 htdocs/view/cust_pkg.cgi delete mode 100755 htdocs/view/svc_acct.cgi delete mode 100755 htdocs/view/svc_acct_sm.cgi delete mode 100755 htdocs/view/svc_domain.cgi diff --git a/htdocs/.htaccess b/htdocs/.htaccess deleted file mode 100644 index f8c6b9c0c..000000000 --- a/htdocs/.htaccess +++ /dev/null @@ -1,3 +0,0 @@ -AuthName Freeside -AuthType Basic -require valid-user diff --git a/htdocs/browse/agent.cgi b/htdocs/browse/agent.cgi deleted file mode 100755 index b73d17b76..000000000 --- a/htdocs/browse/agent.cgi +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: agent.cgi,v 1.13 1999-04-09 04:22:34 ivan Exp $ -# -# ivan@sisd.com 97-dec-12 -# -# changes to allow pages to load from a relative location in the web tree. -# bmccane@maxbaud.net 98-mar-25 -# -# changed 'type' to 'atype' because type is reserved word in Pg6.3 -# bmccane@maxbaud.net 98-apr-3 -# -# agent type was linking to wrong cgi ivan@sisd.com 98-jul-18 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: agent.cgi,v $ -# Revision 1.13 1999-04-09 04:22:34 ivan -# also table() -# -# Revision 1.12 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.11 1999/01/20 09:43:16 ivan -# comment out future UI code (but look at it, it's neat!) -# -# Revision 1.10 1999/01/19 05:13:24 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.9 1999/01/18 09:41:14 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.8 1999/01/18 09:22:26 ivan -# changes to track email addresses for email invoicing -# -# Revision 1.7 1998/12/17 05:25:16 ivan -# fix visual and other bugs -# -# Revision 1.6 1998/11/23 05:29:46 ivan -# use CGI::Carp -# -# Revision 1.5 1998/11/23 05:27:31 ivan -# to eliminate warnings -# -# Revision 1.4 1998/11/20 08:50:36 ivan -# s/CGI::Base/CGI.pm, visual fixes -# -# Revision 1.3 1998/11/08 10:11:02 ivan -# CGI.pm -# -# Revision 1.2 1998/11/07 10:24:22 ivan -# don't use depriciated FS::Bill and FS::Invoice, other miscellania -# - -use strict; -use vars qw( $ui $cgi $p $agent ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup swapuid); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar table popurl); -use FS::agent; -use FS::agent_type; - -#Begin silliness -# -#use FS::UI::CGI; -#use FS::UI::agent; -# -#$ui = new FS::UI::agent; -#$ui->browse; -#exit; -#__END__ -#End silliness - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header('Agent Listing', menubar( - 'Main Menu' => $p, - 'Agent Types' => $p. 'browse/agent_type.cgi', -# 'Add new agent' => '../edit/agent.cgi' -)), <
-END -print &table(), < - Agent - Type - Freq. (unimp.) - Prog. (unimp.) - -END -# Agent # -# Agent - -foreach $agent ( sort { - $a->getfield('agentnum') <=> $b->getfield('agentnum') -} qsearch('agent',{}) ) { - my($hashref)=$agent->hashref; - my($typenum)=$hashref->{typenum}; - my($agent_type)=qsearchs('agent_type',{'typenum'=>$typenum}); - my($atype)=$agent_type->getfield('atype'); - print < - - $hashref->{agentnum} - - $hashref->{agent} - $atype - $hashref->{freq} - $hashref->{prog} - -END - -} - -print < - Add new agent - Add new agent type - - - - - -END - diff --git a/htdocs/browse/agent_type.cgi b/htdocs/browse/agent_type.cgi deleted file mode 100755 index 9d8687299..000000000 --- a/htdocs/browse/agent_type.cgi +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: agent_type.cgi,v 1.8 1999-04-09 04:22:34 ivan Exp $ -# -# ivan@sisd.com 97-dec-10 -# -# Changes to allow page to work at a relative position in server -# Changes to make "Packages" display 2-wide in table (old way was too vertical) -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: agent_type.cgi,v $ -# Revision 1.8 1999-04-09 04:22:34 ivan -# also table() -# -# Revision 1.7 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.6 1999/04/07 11:10:46 ivan -# harmless typo -# -# Revision 1.5 1999/01/19 05:13:25 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:15 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/17 05:25:17 ivan -# fix visual and other bugs -# -# Revision 1.2 1998/11/21 07:39:52 ivan -# visual -# - -use strict; -use vars qw( $cgi $p $agent_type ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup swapuid); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar popurl table); -use FS::agent_type; -use FS::type_pkgs; -use FS::part_pkg; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header("Agent Type Listing", menubar( - 'Main Menu' => $p, -)), "Agent types define groups of packages that you can then assign to". - " particular agents.

", &table(), < - Agent Type - Packages - -END - -foreach $agent_type ( sort { - $a->getfield('typenum') <=> $b->getfield('typenum') -} qsearch('agent_type',{}) ) { - my($hashref)=$agent_type->hashref; - my(@type_pkgs)=qsearch('type_pkgs',{'typenum'=> $hashref->{typenum} }); - my($rowspan)=scalar(@type_pkgs); - $rowspan = int($rowspan/2+0.5) ; - print < - - $hashref->{typenum} - - $hashref->{atype} -END - - my($type_pkgs); - my($tdcount) = -1 ; - foreach $type_pkgs ( @type_pkgs ) { - my($pkgpart)=$type_pkgs->getfield('pkgpart'); - my($part_pkg) = qsearchs('part_pkg',{'pkgpart'=> $pkgpart }); - print qq!! if ($tdcount == 0) ; - $tdcount = 0 if ($tdcount == -1) ; - print qq!!, - $part_pkg->getfield('pkg'),""; - $tdcount ++ ; - if ($tdcount == 2) - { - print qq!\n! ; - $tdcount = 0 ; - } - } - - print ""; -} - -print <Add new agent type - - - -END - diff --git a/htdocs/browse/cust_main_county.cgi b/htdocs/browse/cust_main_county.cgi deleted file mode 100755 index 5f2b13dc0..000000000 --- a/htdocs/browse/cust_main_county.cgi +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_main_county.cgi,v 1.7 1999-04-09 04:22:34 ivan Exp $ -# -# ivan@sisd.com 97-dec-13 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: cust_main_county.cgi,v $ -# Revision 1.7 1999-04-09 04:22:34 ivan -# also table() -# -# Revision 1.6 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.5 1999/01/19 05:13:26 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:16 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/17 05:25:18 ivan -# fix visual and other bugs -# -# Revision 1.2 1998/11/18 09:01:34 ivan -# i18n! i18n! -# - -use strict; -use vars qw( $cgi $p $cust_main_county ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup swapuid); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar popurl table); -use FS::cust_main_county; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header("Tax Rate Listing", menubar( - 'Main Menu' => $p, - 'Edit tax rates' => $p. "edit/cust_main_county.cgi", -)),<expand country to specify a country's tax rates by state. -
Click on expand state to specify a state's tax rates by county. -

-END -print &table(), < - Country - State - County - Tax - -END - -foreach $cust_main_county ( qsearch('cust_main_county',{}) ) { - my($hashref)=$cust_main_county->hashref; - print < - $hashref->{country} -END - print "", $hashref->{state} - ? $hashref->{state} - : qq!(ALL) !. - qq!expand country! - , ""; - print ""; - if ( $hashref->{county} ) { - print $hashref->{county}; - } else { - print "(ALL)"; - if ( $hashref->{state} ) { - print qq!!. - qq!expand state!; - } - } - print ""; - - print <$hashref->{tax}% - -END - -} - -print < - - - -END - diff --git a/htdocs/browse/nas.cgi b/htdocs/browse/nas.cgi deleted file mode 100755 index a65235b1e..000000000 --- a/htdocs/browse/nas.cgi +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use vars qw( $cgi $p ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use Date::Format; -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch); # qsearchs); -use FS::CGI qw(header menubar table popurl); -use FS::nas; -use FS::port; -use FS::session; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$p=popurl(2); - -print $cgi->header( '-expires' => 'now' ), header('NAS ports', menubar( - 'Main Menu' => $p, -)); - -my $now = time; - -foreach my $nas ( sort { $a->nasnum <=> $b->nasnum } qsearch( 'nas', {} ) ) { - print $nas->nasnum. ": ". $nas->nas. " ". - $nas->nasfqdn. " (". $nas->nasip. ") ". - "as of ". time2str("%c",$nas->last). - " (". &pretty_interval($now - $nas->last). " ago)
". - &table(). "Nas
Port #Global
Port #
". - "IP addressUserSinceDuration", - ; - foreach my $port ( sort { - $a->nasport <=> $b->nasport || $a->portnum <=> $b->portnum - } qsearch( 'port', { 'nasnum' => $nas->nasnum } ) ) { - my $session = $port->session; - my($user, $since, $pretty_since, $duration); - if ( ! $session ) { - $user = "(empty)"; - $since = 0; - $pretty_since = "(never)"; - $duration = ''; - } elsif ( $session->logout ) { - $user = "(empty)"; - $since = $session->logout; - } else { - my $svc_acct = $session->svc_acct; - $user = "svcnum. "\">". - $svc_acct->username. ""; - $since = $session->login; - } - $pretty_since = time2str("%c", $since) if $since; - $duration = pretty_interval( $now - $since ). " ago" - unless defined($duration); - print "". $port->nasport. "". $port->portnum. "". - $port->ip. "$user$pretty_since". - "$duration" - ; - } - print "
"; -} - -sub pretty_interval { - my $interval = shift; - my %howlong = ( - '604800' => 'week', - '86400' => 'day', - '3600' => 'hour', - '60' => 'minute', - '1' => 'second', - ); - - my $pretty = ""; - foreach my $key ( sort { $b <=> $a } keys %howlong ) { - my $value = int( $interval / $key ); - if ( $value ) { - if ( $value == 1 ) { - $pretty .= - ( $howlong{$key} eq 'hour' ? 'an ' : 'a ' ). $howlong{$key}. " " - } else { - $pretty .= $value. ' '. $howlong{$key}. 's '; - } - } - $interval -= $value * $key; - } - $pretty =~ /^\s*(\S.*\S)\s*$/; - $1; -} - -#print &table(), < -# # -# NASheader calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1998/12/17 05:25:19 ivan -# fix visual and other bugs -# -# Revision 1.3 1998/11/21 07:23:45 ivan -# visual -# -# Revision 1.2 1998/11/21 07:00:32 ivan -# visual -# - -use strict; -use vars qw( $cgi $p $part_pkg ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup swapuid); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar popurl table); -use FS::part_pkg; -use FS::pkg_svc; -use FS::part_svc; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header("Package Part Listing",menubar( - 'Main Menu' => $p, -)), "One or more services are grouped together into a package and given", - " pricing information. Customers purchase packages, not services.

", - &table(), < - - Package - Comment - Setup Fee - Freq. - Recur. Fee - Service - Quan. - -END - -foreach $part_pkg ( sort { - $a->getfield('pkgpart') <=> $b->getfield('pkgpart') -} qsearch('part_pkg',{}) ) { - my($hashref)=$part_pkg->hashref; - my(@pkg_svc)=grep $_->getfield('quantity'), - qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); - my($rowspan)=scalar(@pkg_svc); - print < - - $hashref->{pkgpart} - - $hashref->{pkg} - $hashref->{comment} - $hashref->{setup} - $hashref->{freq} - $hashref->{recur} -END - - my($pkg_svc); - my($n)=""; - foreach $pkg_svc ( @pkg_svc ) { - my($svcpart)=$pkg_svc->getfield('svcpart'); - my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); - print $n,qq!!, - $part_svc->getfield('svc'),"", - $pkg_svc->getfield('quantity'),"\n"; - $n=""; - } - - print ""; -} - -print <Add new package - - - -END - diff --git a/htdocs/browse/part_referral.cgi b/htdocs/browse/part_referral.cgi deleted file mode 100755 index e4ca25a65..000000000 --- a/htdocs/browse/part_referral.cgi +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: part_referral.cgi,v 1.9 1999-04-09 04:22:34 ivan Exp $ -# -# ivan@sisd.com 98-feb-23 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: part_referral.cgi,v $ -# Revision 1.9 1999-04-09 04:22:34 ivan -# also table() -# -# Revision 1.8 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.7 1999/01/19 05:13:28 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.6 1999/01/18 09:41:18 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.5 1998/12/17 05:25:20 ivan -# fix visual and other bugs -# -# Revision 1.4 1998/12/17 04:32:55 ivan -# print $cgi->header -# -# Revision 1.3 1998/12/17 04:31:36 ivan -# use CGI::Carp -# -# Revision 1.2 1998/12/17 04:26:04 ivan -# use CGI; no relative URLs -# - -use strict; -use vars qw( $cgi $p $part_referral ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup swapuid); -use FS::Record qw(qsearch); -use FS::CGI qw(header menubar popurl table); -use FS::part_referral; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header("Referral Listing", menubar( - 'Main Menu' => $p, -# 'Add new referral' => "../edit/part_referral.cgi", -)), "Where a customer heard about your service. Tracked for informational purposes.

", &table(), < - Referral - -END - -foreach $part_referral ( sort { - $a->getfield('refnum') <=> $b->getfield('refnum') -} qsearch('part_referral',{}) ) { - my($hashref)=$part_referral->hashref; - print < - - $hashref->{refnum} - - $hashref->{referral} - -END - -} - -print < - Add new referral - - - - - -END - diff --git a/htdocs/browse/part_svc.cgi b/htdocs/browse/part_svc.cgi deleted file mode 100755 index 123cb7d2a..000000000 --- a/htdocs/browse/part_svc.cgi +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: part_svc.cgi,v 1.11 1999-04-09 04:22:34 ivan Exp $ -# -# ivan@sisd.com 97-nov-14, 97-dec-9 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: part_svc.cgi,v $ -# Revision 1.11 1999-04-09 04:22:34 ivan -# also table() -# -# Revision 1.10 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.9 1999/01/19 05:13:29 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.8 1999/01/18 09:41:19 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.7 1998/12/30 23:06:22 ivan -# typo -# -# Revision 1.6 1998/12/30 23:03:20 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.5 1998/12/17 05:25:21 ivan -# fix visual and other bugs -# -# Revision 1.4 1998/11/21 02:26:22 ivan -# visual -# -# Revision 1.3 1998/11/20 23:10:57 ivan -# visual -# -# Revision 1.2 1998/11/20 08:50:37 ivan -# s/CGI::Base/CGI.pm, visual fixes -# - -use strict; -use vars qw( $cgi $p $part_svc ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch fields); -use FS::part_svc; -use FS::CGI qw(header menubar popurl table); - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header('Service Part Listing', menubar( - 'Main Menu' => $p, -)),<
-END -print &table(), < - Service - Table - Field - Modifier - -END - -foreach $part_svc ( sort { - $a->getfield('svcpart') <=> $b->getfield('svcpart') -} qsearch('part_svc',{}) ) { - my($hashref)=$part_svc->hashref; - my($svcdb)=$hashref->{svcdb}; - my(@rows)= - grep $hashref->{${svcdb}.'__'.$_.'_flag'}, - map { /^${svcdb}__(.*)$/; $1 } - grep ! /_flag$/, - grep /^${svcdb}__/, - fields('part_svc') - ; - my($rowspan)=scalar(@rows) || 1; - print < - - $hashref->{svcpart} - $hashref->{svc} - $hashref->{svcdb} -END - - my($n1)=''; - my($row); - foreach $row ( @rows ) { - my($flag)=$part_svc->getfield($svcdb.'__'.$row.'_flag'); - print $n1,"$row"; - if ( $flag eq "D" ) { print "Default"; } - elsif ( $flag eq "F" ) { print "Fixed"; } - else { print "(Unknown!)"; } - print "",$part_svc->getfield($svcdb."__".$row),""; - $n1=""; - } -print ""; -} - -print < - Add new service - - - - -END - diff --git a/htdocs/browse/svc_acct_pop.cgi b/htdocs/browse/svc_acct_pop.cgi deleted file mode 100755 index 8094a9fd1..000000000 --- a/htdocs/browse/svc_acct_pop.cgi +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct_pop.cgi,v 1.8 2000-01-28 22:56:13 ivan Exp $ -# -# ivan@sisd.com 98-mar-8 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: svc_acct_pop.cgi,v $ -# Revision 1.8 2000-01-28 22:56:13 ivan -# track full phone number -# -# Revision 1.7 1999/04/09 04:22:34 ivan -# also table() -# -# Revision 1.6 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.5 1999/01/19 05:13:30 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:20 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/17 05:25:22 ivan -# fix visual and other bugs -# -# Revision 1.2 1998/12/17 04:36:59 ivan -# use CGI;, use CGI::Carp, visual changes, relative URLs -# - -use strict; -use vars qw( $cgi $p $svc_acct_pop ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup swapuid); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar table popurl); -use FS::svc_acct_pop; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header('POP Listing', menubar( - 'Main Menu' => $p, -)), "Points of Presence

", &table(), < - - City - State - Area code - Exchange - Local - -END - -foreach $svc_acct_pop ( sort { - $a->getfield('popnum') <=> $b->getfield('popnum') -} qsearch('svc_acct_pop',{}) ) { - my($hashref)=$svc_acct_pop->hashref; - print < - - $hashref->{popnum} - - $hashref->{city} - - $hashref->{state} - - $hashref->{ac} - - $hashref->{exch} - - $hashref->{loc} - -END - -} - -print < - Add new POP - - - - - -END - diff --git a/htdocs/docs/admin.html b/htdocs/docs/admin.html deleted file mode 100644 index be53c0950..000000000 --- a/htdocs/docs/admin.html +++ /dev/null @@ -1,59 +0,0 @@ - - Administration - - -

Administration

- -
    -
  • Open up the root of the Freeside document tree in your web - browser. For example, if you created the Freeside document tree in - /home/httpd/html/freeside, and your web browser's DocumentRoot is - /home/httpd/html, open http://your_host/freeside/. Replace - "your_host" with the name or network address of your web server. - -
  • Once in the Freeside web interface, you must first create a - service. An example of a service would be a dial-up account or a - hosted virtual domain. - -
  • After you create your first service or services, you must then - create a package of that service or services which you will sell to - your customer. To allow flexibility in changing your service - offerings, Freeside requires that you bundle your services into a - package before customers may purchase them. For instance, you could - create a leased line package which would consist of a one-time - charge for the customer premise equipment, the monthly service fee - for the leased line, a backup dial-up account, and a support - contract. You could also create a leased line package which omits - the support contract simply by adding a new package that does not - include the support contract. - -
  • After you create your first package, then you must define who is - able to sell that package by creating an agent type. An example of - an agent type would be an internal sales representitive which sells - regular and promotional packages, as opposed to an external sales - representitive which would only sell regular packages of services. - -
  • After creating a new agent type, you must create an agent, and - assign the the agent type you just created to it. - -
  • If the service you created was of type svc_acct, you may have to - create a POP from the main menu before you can create your first new - customer. - -
  • If you are using Freeside to keep track of sales taxes, you must - define tax information for your locale by clicking on the "View/Edit - locales and tax rates" link on the Freeside main menu. - -
  • Finally, set up at least one referral by clicking on the - "View/Edit referrals" link in the Freeside main menu. Referrals - will help you keep track of how effective your advertising is, by - helping you keep track of where customers heard of your service - offerings. You must create at least one referral. If you do not wish to - use the referral functionality, simply create a single referral only. - -
  • You should now be ready to sign up your first customer by - clicking on the "New Customer" link at the top of the Freeside main - menu. -
- - diff --git a/htdocs/docs/billing.html b/htdocs/docs/billing.html deleted file mode 100644 index ecb5e1799..000000000 --- a/htdocs/docs/billing.html +++ /dev/null @@ -1,67 +0,0 @@ - - Billing - - -

Billing

-
    -
  • To enable billing, you must create an invoice_template configuration file. An example file is available in the conf/ directory of the distribution. You also need to create an lpr configuration file to enable postal invoices. -
      -
    • Optional: Invoice template customization -
        -
      • See the Text::Template documentation for details on the substitution language. -
      • You must call the invoice_lines() function at least once - pass it a number of lines, and it returns a list of array references, each of two elements: a service description column, and a price column. -
      • In addition, the following variables are available: -
          -
        • $invnum - invoice number -
        • $date - as a UNIX timestamp (see Date::Format for conversion functions). -
        • $page - current page -
        • $total_pages - total pages -
        • @address - A six-element array containing the customer name, company, and address. -
        • $overdue - true if this invoice is overdue -
        -
      -
    -
  • You can bill individual customers by clicking on the Bill now link on the main customer view. -
  • The freeside-bill script can be run daily to bill all customers. Usage:
    freeside-bill [ -c [ i ] ] [ -d date ] [ -b ] user
    -
      -
    • -c: Turn on collecting (you probably want this). -
    • -i: Real-time billing (as opposed to bacth billing). Only relevant for credit cards. -
    • -d: Pretend it is date (parsed by Date::Parse) -
    • -b: N/A -
    -

    Batch credit card processing -
      -
    • After this script is run, a credit card batch will be in the cust_pay_batch table. Export this table to your credit card batching. -
    • When your batch completes, erase the cust_pay_batch records in that batch and add any necessary paymants to the cust_pay table. Example code to add payments is: -
      use FS::cust_pay;
      -
      -# loop over all records in batch
      -
      -my $payment=create FS::cust_pay (
      -  'invnum' => $invnum,
      -  'paid' => $paid,
      -  '_date' => $_date,
      -  'payby' => $payby,
      -  'payinfo' => $payinfo,
      -  'paybatch' => $paybatch,
      -);
      -
      -my $error=$payment->insert;
      -if ( $error ) {
      -  #process error
      -}
      -
      -# end loop
      -
      -All fields except paybatch are contained in the cust_pay_batch table. You can use paybatch field to track particular batches and/or particular transactions within a batch.

      -
    • The freeside-print-batch script can print or email pending credit card batches for manual entry. Usage: freeside-print-batch [-v] [-p] [-e] [-a] [-d] user -
        -
      • -v: Verbose - Prints records to STDOUT. -
      • -p: Print to printer lpr as found in the conf directory. -
      • -e: Email output to user found in the Conf email file. -
      • -a: Automatically pays all records in cust_pay_batch. Use -d with this option usually. -
      • -d: Delete - Pays account and deletes record from cust_pay_batch. -
      -
    -
- diff --git a/htdocs/docs/config.html b/htdocs/docs/config.html deleted file mode 100644 index 532a826be..000000000 --- a/htdocs/docs/config.html +++ /dev/null @@ -1,107 +0,0 @@ - - Configuration files - - -

Configuration files

-
    -
  • Create the /usr/local/etc/freeside directory to hold your configuration. -
  • Setting up Apache user authetication is mandatory. -
  • Create the /usr/local/etc/freeside/mapsecrets file, which maps Apache users to a secrets file which contains a DBI data source, username and password. Every -line in /usr/local/etc/freeside/mapsecrets should contain a username and -filename, separated by whitespace. Note that these are not local usernames - -they are passed from Apache. -Apache user authetication is mandatory. For example, if you had the Apache users admin, -john, and sam, -you mapsecrets file might look like: -
    -admin secretfile
    -john secretfile
    -sam secretfile
    -
    -
  • Next, the filename(s) referenced in /usr/local/etc/freeside/mapsecrets file should be created in the /usr/local/etc/freeside/ directory. Each file contains three lines: DBI data source (for example, - DBI:mysql:freeside or DBI:Pg:host=localhost;dbname=freeside), database username, and database password. - These files should not be world readable. See the DBI manpage and the manpage for your DBD for the exact syntax of a DBI data source. In a normal installation such as the example above, a single file /usr/local/etc/freeside/secretfile would be created - for example: -
    -DBI:Pg:host=localhost;dbname=freeside
    -dbusername
    -dbpassword
    -
    -
-All further configuration files and directories are located in -/usr/local/etc/freeside/conf.datasource, for example, -/usr/local/etc/freeside/conf.DBI:Pg:host=localhost;dbname=freeside (remember to backslash-escape the ; character when creating directories in the shell: mkdir /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=freeside). -
    -
  • address - This configuration file is no longer used. See invoice_template instead. -
  • apacheroot - The directory containing Apache virtual hosts -
  • apachemachine - A machine with the apacheroot directory and user home directories. The existance of this file enables setup of virtual host directories, and, in conjunction with the `home' configuration file, symlinks into user home directories. -
  • apachemachines - Your Apache machines, one per line. This enables export of `/etc/apache/vhosts.conf', which can be included in your Apache configuration via the Include directive. -
  • bindprimary - Your BIND primary nameserver. This enables export of /var/named/named.conf and zone files into /var/named -
  • bindsecondaries - Your BIND secondary nameservers, one per line. This enables export of /var/named/named.conf -
  • bsdshellmachines - Your BSD flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd' and `/etc/master.passwd'. -
  • countrydefault - Default two-letter country code (if not supplied, the default is `US') -
  • cybercash2 - CyberCash v2 support, four lines: paymentserverhost, paymentserverport, paymentserversecret, and transaction type (`mauthonly' or `mauthcapture'). CCLib.pm is required. -
  • cybercash3.2 - CyberCash v3.2 support. Two lines: the full path and name of your merchant_conf file, and the transaction type (`mauthonly' or `mauthcapture'). CCMckLib3_2.pm, CCMckDirectLib3_2.pm and CCMckErrno3_2 are required. -
  • deletecustomers - The existance of this file will enable customer deletions. Be very careful! Deleting a customer will remove all traces that this customer ever existed! It should probably only be used when auditing a legacy database. Normally, you cancel all of a customers' packages if they cancel service. -
  • domain - Your domain name. -
  • editreferrals - The existance of this file will allow you to change the referral of existing customers. -
  • erpcdmachines - Your ERPCD authenticaion machines, one per line. This enables export of `/usr/annex/acp_passwd' and `/usr/annex/acp_dialup'. -
  • hidecancelledpackages - The existance of this file will prevent cancelled packages from showing up in listings (though they will still be in the database) -
  • hidecancelledcustomers - The existance of this file will prevent customers with only cancelled packages from showing up in listings (though they will still be in the database) -
  • home - For new users, prefixed to usrename to create a directory name. Should have a leading but not a trailing slash. -
  • icradiusmachines - Your ICRADIUS machines, one per line. The existance of this file (even if empty) turns on radcheck table creation (in the freeside database - the radcheck table needs to be created manually). Machines listed in this file will have the radcheck table exported to them. Each line of this file should contain four items, separted by whitespace: machine name, MySQL database name, MySQL username, and MySQL password. For example: "radius.isp.tld radius_db radius_user passw0rd". Note that to use ICRADIUS export you need to be using MySQL. -
  • icradius_mysqldest - Destination directory for the MySQL databases, on the ICRADIUS machines. Defaults to "/usr/local/var/". -
  • icradius_mysqlsource - Source directory for for the MySQL radcheck table files, on the Freeside machine. Defaults to "/usr/local/var/freeside". -
  • icradius_secrets - Optionally specifies a MySQL database for ICRADIUS export, if you're not running MySQL for your Freeside database. The database should be on the Freeside machine and store data in the icradius_mysqlsource directory. Three lines: DBI data source, username and password. This file should not be world readable. -
  • invoice_from - Return address on email invoices. -
  • invoice_template - Required template file for invoices. See the section on billing for details. -
  • lpr - Print command for paper invoices, for example `lpr -h'. -
  • maildisablecatchall - The existance of this file will disable the requirement that each virtual domain have a catch-all mailbox. -
  • money_char - Currency symbol - defaults to `$'. -
  • mxmachines - MX entries for new domains, weight and machine, one per line, with trailing `.' -
  • nsmachines - NS nameservers for new domains, one per line, with trailing `.' -
  • nismachines - Your NIS master (not slave master) machines, one per line. This enables export of `/etc/global/passwd' and `/etc/global/shadow'. -
  • passwordmin - Minimum password length (default 6); -
  • qmailmachines - Your qmail machines, one per line. This enables export of `/var/qmail/control/virtualdomains', `/var/qmail/control/recipientmap', and `/var/qmail/control/rcpthosts'. The existance of this file (even if empty) also turns on user `.qmail-extension' file maintenance in conjunction with `shellmachine'. -
  • radiusmachines - Your RADIUS authentication machines, one per line. This enables export of `/etc/raddb/users'. -
  • referraldefault - Default referral, specified by refnum. -
  • registries - Directory which contains domain registry information. Each registry is a directory. -
      -
    • registries/internic - Currently the only supported registry -
        -
      • registries/internic/from - Email address from which InterNIC domain registrations are sent. -
      • regestries/internic/nameservers - The nameservers for InterNIC domain registrations, one per line. Each line contains an IP address and hostname, separated by whitespace. -
      • registries/internic/tech_contact - Technical contact NIC handle for domain registrations. -
      • registries/internic/template - Template for InterNIC domain registrations with special markup. A suitable copy of the InterNIC domain template v4.0 is in `fs-x.y.z/etc/domain-template.txt'. -
      • registries/internic/to - Email address to which InterNIC domain registrations are sent. -
      -
    -
  • sendmailconfigpath - Sendmail configuration file path - defaults to `/etc'. Many newer distributions use `/etc/mail'. -
  • sendmailmachines - Your sendmail machines, one per line. This enables export of `/etc/virtusertable' and `/etc/sendmail.cw'. -
  • sendmailrestart - If defined, the command which is run on sendmail machines after files are copied. -
  • session-start - If defined, the command which is executed on the Freeside machine when a session begins. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on. -
  • session-stop - If defined, the command which is executed on the Freeside machine when a session ends. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on. -
  • shellmachine - A single machine with user home directories mounted. This enables home directory creation, renaming and archiving/deletion. In conjunction with `qmailmachines', it also enables `.qmail-extension' file maintenance. -
  • shellmachine-useradd - The command(s) to run on shellmachine when an account is created. If this file does not exist, useradd -d $dir -m -s $shell -u $uid $username is the default. If the file exists but is empty, cp -pr /etc/skel $dir; chown -R $uid.$gid $dir is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username, $uid, $gid, $dir, and $shell. -
  • shellmachine-userdel - The command(s) to run on shellmachine when an account is deleted. If this file does not exist, userdel $username is the default. If the file exists but is empty, rm -rf $dir is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username and $dir. -
  • shellmachine-usermod - The command(s) to run on shellmachine when an account is modified. If this file does not exist or is empty, [ -d $old_dir ] && mv $old_dir $new_dir || ( chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; find . -depth -print | cpio -pdm $new_dir; chmod u-t $new_dir; chown -R $uid.$gid $new_dir; rm -rf $old_dir ) is the default. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $old_dir, $new_dir, $uid and $gid. -
  • shellmachines - Your Linux and System V flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd' and `/etc/shadow' files. -
  • shells - Legal shells (think /etc/shells). You probably want to `cut -d: -f7 /etc/passwd | sort | uniq' initially so that importing doesn't fail with `Illegal shell' errors, then remove any special entries afterwords. A blank line specifies that an empty shell is permitted. -
  • showpasswords - The existance of this file will allow unencrypted user passwords to be displayed. -
  • smtpmachine - SMTP relay for Freeside's outgoing mail. -
  • soadefaultttl - SOA default TTL for new domains. -
  • soaemail - SOA email for new domains, in BIND form (`.' instead of `@'), with trailing `.' -
  • soaexpire - SOA expire for new domains -
  • soamachine - SOA machine for new domains, with trailing `.' -
  • soarefresh - SOA refresh for new domains -
  • soaretry - SOA retry for new domains -
  • statedefault - Default state or province (if not supplied, the default is `CA') -
  • textradiusprepend - The contents of this file will be prepended to the first line of a user's RADIUS entry in text exports. If necessary, usually `Auth-Type = Local, '. -
  • usernamemin - Minimum username length (default 2); -
  • usernamemax - Maximum username length (default is the size of the SQL column, probably specified when fs-setup was run) -
  • username-letter - The existance of this file will turn on the requirement that usernames contain at least one letter. -
  • username-letterfirst - The existance of this file will turn on the requirement that usernames start with a letter. -
  • username_policy - This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts. This should be one of 'prepend domsvc' 'append domsvc' or 'append domain' -
  • vpopmailmachines - Your vpopmail pop toasters, one per line. Each line is of the form "machinename vpopdir vpopuid vpopgid". Eg: poptoaster.domain.tld /home/vpopmail 508 508 Note: vpopuid and vpopgid are values taken from the vpopmail machine's /etc/passwd -
- - diff --git a/htdocs/docs/export.html b/htdocs/docs/export.html deleted file mode 100644 index d92eec346..000000000 --- a/htdocs/docs/export.html +++ /dev/null @@ -1,41 +0,0 @@ - - File exporting - - -

File exporting

-
    -
  • bin/svc_acct.export will create UNIX passwd, shadow and master.passwd files, ERPCD acp_passwd and acp_dialup files and a RADIUS users file in the /usr/local/etc/freeside/export.datasrc directory. Some RADIUS servers (such as Radiator and ICRADIUS) will authenticate directly out of an SQL database. In these cases, -it is reccommended that you replicate the data to an external RADIUS machine rather than running the RADIUS server on your Freeside machine. Using the appropriate configuration files, you can export these files to your remote machines unattended: -
      -
    • shellmachines - passwd and shadow are copied to the remote machine as /etc/passwd.new and /etc/shadow.new and then moved to /etc/passwd and /etc/shadow if no errors occur. -
    • bsdshellmachines - passwd and master.passwd are copied to the remote machine as /etc/passwd.new and /etc/master.passwd.new and moved to /etc/passwd and /etc/master.passwd if no errors occur. -
    • nismachines - passwd and shadow are copied to the /etc/global directory on the remote machine. If no errors occur, the command ( cd /var/yp; make; ) is executed on the remote machine. -
    • erpcdmachines - acp_passwd and acp_dialup are copied to the /usr/annex directory on the remote machine. If no errors occur, the command ( kill -USR1 `cat /usr/annex/erpcd.pid` ) is executed on the remote machine. -
    • radiusmachines - users is copied to the /etc/raddb directory on the remote machine. If no errors occur, the command ( builddbm ) is executed on the remote machine. -
    • icradiusmachines - Local radcheck and radreply tables will be created. If any machines are specified, the remote MySQL database will be locked and the radcheck table will be copied to the those machines. You may also need to set the icradius_mysqlsource and/or icradius_mysqldest configuration files. Currently you need to be running MySQL for your Freeside database to use this feature. -
    -
  • site_perl/svc_acct.pm - If a shellmachine is defined, users can be created, modified and deleted remotely; see below. -
      -
    • Account creation - If the username, uid and dir fields are defined for a new user, the command(s) specified in the shellmachine-useradd configuration file are executed on shellmachine via ssh. If this file does not exist, useradd -d $dir -m -s $shell -u $uid $username is the default. If the file exists but is empty, cp -pr /etc/skel $dir; chown -R $uid.$gid $dir is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username, $uid, $gid, $dir, and $shell. -
    • Account deletion - The command(s) specified in the shellmachine-userdel configuration file are executed on shellmachine via ssh. If this file does not exist, userdel $username is the default. If the file exists but is empty, rm -rf $dir is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username and $dir. -
    • Account modification - If a user's home directory changes, the command(s) specified in the shellmachine-usermod configuration file are execute on shellmachine via ssh. If this file does not exist or is empty, [ -d $old_dir ] && mv $old_dir $new_dir || ( chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; find . -depth -print | cpio -pdm $new_dir; chmod u-t $new_dir; chown -R $uid.$gid $new_dir; rm -rf $old_dir ) is the default. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $old_dir, $new_dir, $uid and $gid. -
    -
  • bin/svc_acct_sm.export will create Qmail rcpthosts, recipientmap and virtualdomains files and Sendmail virtusertable and sendmail.cw files in the /usr/local/etc/freeside/export.datasrc directory. Using the appropriate configuration files, you can export these files to your remote machines unattemded: -
      -
    • qmailmachines - recipientmap, virtualdomains and rcpthosts are copied to the /var/qmail/control directory on the remote machine. Note: If you imported qmail configuration files, run the generated /usr/local/etc/freeside/export.datasrc/virtualdomains.FIX on a machine with your user home directories before exporting qmail configuration files. -
    • shellmachine - The command [ -e homedir/.qmail-default ] || { touch homedir/.qmail-default; chown uid.gid homedir/.qmail-default; } will be run on this machine for users in the virtualdomains file. -
    • sendmailmachines - sendmail.cw and virtusertable are copied to the remote machine as /etc/sendmail.cw.new and /etc/virtusertable.new. If no errors occur, they are moved to /etc/sendmail.cw and /etc/virtusertable and the command specified in the sendmailrestart configuration file is executed. (The path can be changed from the default /etc with the sendmailconfigpath configuration file.) -
    -
  • site_perl/svc_acct_sm.pm - If the qmailmachines configuration file exists and a shellmachine is defined, user .qmail- files can be updated. -
      -
    • The command [ -e homedir/.qmail-domain-default ] || { touch homedir/.qmail-domain-default; chown uid.gid homedir/.qmail-domain-default; } is run. -
    -
-
Unattended remote login - Freeside can login to remote machines unattended using SSH. This can pose a security risk if not configured correctly, and will allow an intruder who breaks into your freeside machine full access to your remote machines. Do not use this feature unless you understand what you are doing! -
    -
  • As the freeside user (on your freeside machine), generate an authentication key using ssh-keygen. Since this is for unattended operation, you need to use a blank passphrase. -
  • Append the newly-created identity.pub file to root's authorized_keys on the remote machine(s). -
- - - diff --git a/htdocs/docs/index.html b/htdocs/docs/index.html deleted file mode 100644 index 83e3b3e02..000000000 --- a/htdocs/docs/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - Documentation - - -

Documentation

- - - diff --git a/htdocs/docs/install.html b/htdocs/docs/install.html deleted file mode 100644 index 8fadc1088..000000000 --- a/htdocs/docs/install.html +++ /dev/null @@ -1,86 +0,0 @@ - - Installation - - -

Installation

-Before installing, you need: - -Install the Freeside distribution: -
    -
  • Add the user `freeside' to your system. -
  • Allow the freeside user full access to the freeside database. -
      -
    • with MySQL:
      $ mysqladmin -u root password 'set_a_root_database_password'
      -$ mysql -u root -p
      -mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY 'set_a_freeside_database_password';
      -
    • with PostgreSQL -
    -
  • Add the freeside database to your database engine. (with MySQL) (with PostgreSQL) -
  • Unpack the tarball:
    gunzip -c fs-x.y.z.tar.gz | tar xvf -
    -
  • Build and install the Perl libraries: -
    -$ cd FS/
    -$ perl Makefile.PL
    -$ make
    -$ su
    -# make install UNINST=1
    -
  • Copy or link fs-x.y.z/htdocs to your web server's document space.
    mkdir /usr/local/apache/htdocs/freeside
    -cp -r fs-x.y.z/htdocs/* /usr/local/apache/htdocs/freeside
    or
    ln -s /full/path/to/fs-x.y.z/htdocs /usr/local/apache/htdocs/freeside
    -
  • Restrict access to this web interface. (with Apache) -
  • Enable CGI execution for files with the `.cgi' extension. (with Apache) -
  • Set ownership and permissions for the web interface. The web interface needs to run as the freeside user - there are several ways to do this. -
      -
    • Use Perl's setuid emulation: see the Security Bugs section of the perlsec manpage. -
      cd /usr/local/apache/htdocs/freeside
      -chown -R freeside .
      -chmod 4755 browse/*.cgi edit/*.cgi edit/process/*.cgi misc/*.cgi misc/process/*.cgi search/*.cgi view/*.cgi
      -
    • Use Apache's suEXEC. -
      cd /usr/local/apache/htdocs/freeside
      -chown -R freeside .
      -chmod 755 browse/*.cgi edit/*.cgi edit/process/*.cgi misc/*.cgi misc/process/*.cgi search/*.cgi view/*.cgi
      -
    • Use mod_perl. You should run a separate iteration of Apache[-SSL] as the freeside user. (Warning: The redirect method of CGI.pm 2.36 [as distributed with Perl 5.004_04] is broken under mod_perl. Downlaod the current version from CPAN. Apache 1.3.6 is also highly recommended because of signal handling problems in earlier versions.) -
      cd /usr/local/apache/htdocs/freeside
      -chown -R root .
      -chmod 755 browse/*.cgi edit/*.cgi edit/process/*.cgi misc/*.cgi misc/process/*.cgi search/*.cgi view/*.cgi
      -
    -
  • Create the necessary configuration files. -
  • Create the `/usr/local/etc/freeside/counters.datasrc', and - `/usr/local/etc/freeside/export.datasrc' directories for each datasrc (owned by the freeside user). -
  • As the freeside user, run bin/fs-setup to create the database tables. -
  • Now proceed to the initial administration of your installation. -
- diff --git a/htdocs/docs/legacy.html b/htdocs/docs/legacy.html deleted file mode 100644 index 3ab21dab2..000000000 --- a/htdocs/docs/legacy.html +++ /dev/null @@ -1,34 +0,0 @@ - - Importing legacy data - - -

Importing legacy data

-
    -
  • bin/svc_acct.import - Import `passwd', ( `shadow' or `master.passwd' ) and RADIUS `users'. Before running bin/svc_acct.import, you need services (with table svc_acct) as follows: -
      -
    • Most accounts probably have entries in passwd and users (with Port-Limit nonexistant or 1) -
    • Some accounts have entries in passwd and users, but with Port-Limit 2 (or more) -
    • Some accounts might have entries in users only (Port-Limit 1) -
    • Some accounts might have entries in users only (Port-Limit >= 2) -
    • POP mail accounts have entries in passwd only, and have a particular shell. -
    • Everything else in passwd is a shell account. -
    -
  • bin/svc_acct_sm.import - Import qmail ( `virtualdomains' and `rcpthosts' ), or sendmail ( `virtusertable' and `sendmail.cw' ) files. Before running bin/svc_acct_sm.import, you need services as follows: -
      -
    • Domain (table svc_acct) -
    • Mail alias (table svc_acct_sm) -
    -
  • Importing customer data -
      -
    • Manually -
        -
      • Add a new customer -
      • Add one or more packages for this customer -
      • Enter a package by clicking on the package number -
      • Pick the `Link to existing' option -
      -
    • Batch - You will need to write a script to import your particular legacy data. You can use eg/TEMPLATE_cust_main.import as a starting point. -
    -
- - diff --git a/htdocs/docs/man/FS.html b/htdocs/docs/man/FS.html deleted file mode 100644 index 3d07462af..000000000 --- a/htdocs/docs/man/FS.html +++ /dev/null @@ -1,138 +0,0 @@ - - -FS - Freeside Perl modules - - - - - - - - - - - -
-

-

NAME

-

FS - Freeside Perl modules

-

-


-

SYNOPSIS

-

FS is the unofficial (i.e. non-CPAN) prefix for the Perl module portion of the -Freeside ISP billing software. This includes:

-

-

Utility classes

-

the FS::Conf manpage - Freeside configuration values

-

the FS::UID manpage - User class (not yet OO)

-

the FS::CGI manpage - Non OO-subroutines for the web interface. This is -depriciated. Future development will be focused on the FS::UI user-interface -classes (see below).

-

-

Database record classes

-

the FS::Record manpage - Database record base class

-

the FS::svc_acct_pop manpage - POP (Point of Presence, not Post -Office Protocol) class

-

the FS::part_referral manpage - Referral class

-

the FS::cust_main_county manpage - Locale (tax rate) class

-

the FS::svc_Common manpage - Service base class

-

the FS::svc_acct manpage - Account (shell, RADIUS, POP3) class

-

the FS::svc_domain manpage - Domain class

-

the FS::domain_record manpage - DNS zone entries

-

the FS::svc_acct_sm manpage - Vitual mail alias class

-

the FS::svc_www manpage - Web virtual host class.

-

the FS::part_svc manpage - Service definition class

-

the FS::part_pkg manpage - Package (billing item) definition class

-

the FS::pkg_svc manpage - Class linking package (billing item) -definitions (see the FS::part_pkg manpage) with service definitions -(see the FS::part_svc manpage)

-

the FS::agent manpage - Agent (reseller) class

-

the FS::agent_type manpage - Agent type class

-

the FS::type_pkgs manpage - Class linking agent types (see -the FS::agent_type manpage) with package (billing item) definitions -(see the FS::part_pkg manpage)

-

the FS::cust_svc manpage - Service class

-

the FS::cust_pkg manpage - Package (billing item) class

-

the FS::cust_main manpage - Customer class

-

the FS::cust_main_invoice manpage - Invoice destination -class

-

the FS::cust_bill manpage - Invoice class

-

the FS::cust_bill_pkg manpage - Invoice line item class

-

the FS::cust_pay manpage - Payment class

-

the FS::cust_credit manpage - Credit class

-

the FS::cust_refund manpage - Refund class

-

the FS::cust_pay_batch manpage - Credit card transaction queue class

-

the FS::prepay_credit manpage - Prepaid ``calling card'' credit class.

-

the FS::nas manpage - Network Access Server class

-

the FS::port manpage - NAS port class

-

the FS::session manpage - User login session class

-

-

User Interface classes (under development; not yet usable)

-

the FS::UI::Base manpage - User-interface base class

-

the FS::UI::Gtk manpage - Gtk user-interface class

-

the FS::UI::CGI manpage - CGI (HTML) user-interface class

-

the FS::UI::agent manpage - agent table user-interface class

-

-

Notes

-

To quote perl(1), ``If you're intending to read these straight through for the -first time, the suggested order will tend to reduce the number of forward -references.''

-

-


-

DESCRIPTION

-

Freeside is a billing and administration package for Internet Service -Providers.

-

The Freeside home page is at <http://www.sisd.com/freeside>.

-

The main documentation is in htdocs/docs.

-

-


-

VERSION

-

$Id: FS.html,v 1.3 2001-04-23 12:40:30 ivan Exp $

-

-


-

SUPPORT

-

A mailing list for users and developers is available. Send a blank message to -<ivan-freeside-subscribe@sisd.com> to subscribe.

-

Commercial support is available; see -<http://www.sisd.com/freeside/commercial.html>.

-

-


-

AUTHOR

-

Primarily Ivan Kohler <ivan@sisd.com>, with help from many kind folks.

-

See the CREDITS file in the Freeside distribution for a (hopefully) complete -list and the individal files for details.

-

-


-

SEE ALSO

-

perl(1), main Freeside documentation in htdocs/docs/

-

-


-

BUGS

-

The version number of the FS Perl extension differs from the version of the -Freeside distribution, which are both different from the CVS version tag for -each file, which appears under the VERSION heading.

-

Those modules which would be useful separately should be pulled out, -renamed appropriately and uploaded to CPAN. So far: DBIx::DBSchema, Net::SSH -and Net::SCP...

- - - - diff --git a/htdocs/docs/man/FS/Bill.html b/htdocs/docs/man/FS/Bill.html deleted file mode 100644 index cf996ae80..000000000 --- a/htdocs/docs/man/FS/Bill.html +++ /dev/null @@ -1,32 +0,0 @@ - - -FS::Bill - Legacy stub - - - - - - - - - - -
-

-

NAME

-

-FS::Bill - Legacy stub - -

-


-

SYNOPSIS

-

-The functionality of FS::Bill has been integrated into FS::cust_main. - - - - diff --git a/htdocs/docs/man/FS/CGI.html b/htdocs/docs/man/FS/CGI.html deleted file mode 100644 index 05f7823b4..000000000 --- a/htdocs/docs/man/FS/CGI.html +++ /dev/null @@ -1,95 +0,0 @@ - - -FS::CGI - Subroutines for the web interface - - - - - - - - -

- - -
-

-

NAME

-

FS::CGI - Subroutines for the web interface

-

-


-

SYNOPSIS

-
-  use FS::CGI qw(header menubar idiot eidiot popurl);
-
-  print header( 'Title', '' );
-  print header( 'Title', menubar('item', 'URL', ... ) );
-
-  idiot "error message"; 
-  eidiot "error message";
-
-  $url = popurl; #returns current url
-  $url = popurl(3); #three levels up
-

-


-

DESCRIPTION

-

Provides a few common subroutines for the web interface.

-

-


-

SUBROUTINES

-
-
header TITLE, MENUBAR
-
-Returns an HTML header. -

-
menubar ITEM, URL, ...
-
-Returns an HTML menubar. -

-
idiot ERROR
-
-This is depriciated. Don't use it. -

Sends headers and an HTML error message.

-

-
eidiot ERROR
-
-This is depriciated. Don't use it. -

Sends headers and an HTML error message, then exits.

-

-
popurl LEVEL
-
-Returns current URL with LEVEL levels of path removed from the end (default 0). -

-
table
-
-Returns HTML tag for beginning a table. -

-
itable
-
-Returns HTML tag for beginning an (invisible) table. -

-
ntable
-
-This is getting silly. -

-

-


-

BUGS

-

Not OO.

-

Not complete.

-

-


-

SEE ALSO

-

the CGI manpage, the CGI::Base manpage

- - - - diff --git a/htdocs/docs/man/FS/CGIwrapper.html b/htdocs/docs/man/FS/CGIwrapper.html deleted file mode 100644 index bab5e7f37..000000000 --- a/htdocs/docs/man/FS/CGIwrapper.html +++ /dev/null @@ -1,16 +0,0 @@ - - -./FS/FS/CGIwrapper.pm - - - - - - - - - - - - - diff --git a/htdocs/docs/man/FS/Conf.html b/htdocs/docs/man/FS/Conf.html deleted file mode 100644 index 7b1613efd..000000000 --- a/htdocs/docs/man/FS/Conf.html +++ /dev/null @@ -1,81 +0,0 @@ - - -FS::Conf - Read access to Freeside configuration values - - - - - - - - - - - -
-

-

NAME

-

FS::Conf - Read access to Freeside configuration values

-

-


-

SYNOPSIS

-
-  use FS::Conf;
-
-  $conf = new FS::Conf "/config/directory";
-
-  $FS::Conf::default_dir = "/config/directory";
-  $conf = new FS::Conf;
-
-  $dir = $conf->dir;
-
-  $value = $conf->config('key');
-  @list  = $conf->config('key');
-  $bool  = $conf->exists('key');
-

-


-

DESCRIPTION

-

Read access to Freeside configuration values. Keys currently map to filenames, -but this may change in the future.

-

-


-

METHODS

-
-
new [ DIRECTORY ]
-
-Create a new configuration object. A directory arguement is required if -$FS::Conf::default_dir has not been set. -

-
dir
-
-Returns the directory. -

-
config
-
-Returns the configuration value or values (depending on context) for key. -

-
exists
-
-Returns true if the specified key exists, even if the corresponding value -is undefined. -

-

-


-

BUGS

-

Write access (with locking) should be implemented.

-

-


-

SEE ALSO

-

config.html from the base documentation contains a list of configuration files.

- - - - diff --git a/htdocs/docs/man/FS/Invoice.html b/htdocs/docs/man/FS/Invoice.html deleted file mode 100644 index cc837be2e..000000000 --- a/htdocs/docs/man/FS/Invoice.html +++ /dev/null @@ -1,32 +0,0 @@ - - -FS::Invoice - Legacy stub - - - - - - - - - - -
-

-

NAME

-

-FS::Invoice - Legacy stub - -

-


-

SYNOPSIS

-

-The functionality of FS::Invoice has been integrated in FS::cust_bill. - - - - diff --git a/htdocs/docs/man/FS/Record.html b/htdocs/docs/man/FS/Record.html deleted file mode 100644 index cc3d37795..000000000 --- a/htdocs/docs/man/FS/Record.html +++ /dev/null @@ -1,342 +0,0 @@ - - -FS::Record - Database record objects - - - - - - - - -

- - -
-

-

NAME

-

FS::Record - Database record objects

-

-


-

SYNOPSIS

-
-    use FS::Record;
-    use FS::Record qw(dbh fields qsearch qsearchs dbdef);
-
-    $record = new FS::Record 'table', \%hash;
-    $record = new FS::Record 'table', { 'column' => 'value', ... };
-
-    $record  = qsearchs FS::Record 'table', \%hash;
-    $record  = qsearchs FS::Record 'table', { 'column' => 'value', ... };
-    @records = qsearch  FS::Record 'table', \%hash; 
-    @records = qsearch  FS::Record 'table', { 'column' => 'value', ... };
-
-    $table = $record->table;
-    $dbdef_table = $record->dbdef_table;
-
-    $value = $record->get('column');
-    $value = $record->getfield('column');
-    $value = $record->column;
-
-    $record->set( 'column' => 'value' );
-    $record->setfield( 'column' => 'value' );
-    $record->column('value');
-
-    %hash = $record->hash;
-
-    $hashref = $record->hashref;
-
-    $error = $record->insert;
-    #$error = $record->add; #depriciated
-
-    $error = $record->delete;
-    #$error = $record->del; #depriciated
-
-    $error = $new_record->replace($old_record);
-    #$error = $new_record->rep($old_record); #depriciated
-
-    $value = $record->unique('column');
-
-    $value = $record->ut_float('column');
-    $value = $record->ut_number('column');
-    $value = $record->ut_numbern('column');
-    $value = $record->ut_money('column');
-    $value = $record->ut_text('column');
-    $value = $record->ut_textn('column');
-    $value = $record->ut_alpha('column');
-    $value = $record->ut_alphan('column');
-    $value = $record->ut_phonen('column');
-    $value = $record->ut_anythingn('column');
-
-    $dbdef = reload_dbdef;
-    $dbdef = reload_dbdef "/non/standard/filename";
-    $dbdef = dbdef;
-
-    $quoted_value = _quote($value,'table','field');
-
-    #depriciated
-    $fields = hfields('table');
-    if ( $fields->{Field} ) { # etc.
-
-    @fields = fields 'table'; #as a subroutine
-    @fields = $record->fields; #as a method call
-

-


-

DESCRIPTION

-

(Mostly) object-oriented interface to database records. Records are currently -implemented on top of DBI. FS::Record is intended as a base class for -table-specific classes to inherit from, i.e. FS::cust_main.

-

-


-

CONSTRUCTORS

-
-
new [ TABLE, ] HASHREF
-
-Creates a new record. It doesn't store it in the database, though. See -insert for that. -

Note that the object stores this hash reference, not a distinct copy of the -hash it points to. You can ask the object for a copy with the hash -method.

-

TABLE can only be omitted when a dervived class overrides the table method.

-

-
qsearch TABLE, HASHREF, SELECT, EXTRA_SQL
-
-Searches the database for all records matching (at least) the key/value pairs -in HASHREF. Returns all the records found as `FS::TABLE' objects if that -module is loaded (i.e. via `use FS::cust_main;'), otherwise returns FS::Record -objects. -

###oops, argh, FS::Record::new only lets us create database fields. -#Normal behaviour if SELECT is not specified is `*', as in -#SELECT * FROM table WHERE .... However, there is an experimental new -#feature where you can specify SELECT - remember, the objects returned, -#although blessed into the appropriate `FS::TABLE' package, will only have the -#fields you specify. This might have unwanted results if you then go calling -#regular FS::TABLE methods -#on it.

-

-
qsearchs TABLE, HASHREF
-
-Same as qsearch, except that if more than one record matches, it carps but -returns the first. If this happens, you either made a logic error in asking -for a single item, or your data is corrupted. -

-

-


-

METHODS

-
-
table
-
-Returns the table name. -

-
dbdef_table
-
-Returns the FS::dbdef_table object for the table. -

-
get, getfield COLUMN
-
-Returns the value of the column/field/key COLUMN. -

-
set, setfield COLUMN, VALUE
-
-Sets the value of the column/field/key COLUMN to VALUE. Returns VALUE. -

-
AUTLOADED METHODS
-
-$record->column is a synonym for $record->get('column'); -

$record->column('value') is a synonym for $record->set('column','value');

-

-
hash
-
-Returns a list of the column/value pairs, usually for assigning to a new hash. -

To make a distinct duplicate of an FS::Record object, you can do:

-
-    $new = new FS::Record ( $old->table, { $old->hash } );
-

-
hashref
-
-Returns a reference to the column/value hash. -

-
insert
-
-Inserts this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
add
-
-Depriciated (use insert instead). -

-
delete
-
-Delete this record from the database. If there is an error, returns the error, -otherwise returns false. -

-
del
-
-Depriciated (use delete instead). -

-
replace OLD_RECORD
-
-Replace the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
rep
-
-Depriciated (use replace instead). -

-
check
-
-Not yet implemented, croaks. Derived classes should provide a check method. -

-
unique COLUMN
-
-Replaces COLUMN in record with a unique number. Called by the add method -on primary keys and single-field unique columns (see the DBIx::DBSchema::Table manpage). -Returns the new value. -

-
ut_float COLUMN
-
-Check/untaint floating point numeric data: 1.1, 1, 1.1e10, 1e10. May not be -null. If there is an error, returns the error, otherwise returns false. -

-
ut_number COLUMN
-
-Check/untaint simple numeric data (whole numbers). May not be null. If there -is an error, returns the error, otherwise returns false. -

-
ut_numbern COLUMN
-
-Check/untaint simple numeric data (whole numbers). May be null. If there is -an error, returns the error, otherwise returns false. -

-
ut_money COLUMN
-
-Check/untaint monetary numbers. May be negative. Set to 0 if null. If there -is an error, returns the error, otherwise returns false. -

-
ut_text COLUMN
-
-Check/untaint text. Alphanumerics, spaces, and the following punctuation -symbols are currently permitted: ! @ # $ % & ( ) - + ; : ' `` , . ? / -May not be null. If there is an error, returns the error, otherwise returns -false. -

-
ut_textn COLUMN
-
-Check/untaint text. Alphanumerics, spaces, and the following punctuation -symbols are currently permitted: ! @ # $ % & ( ) - + ; : ' `` , . ? / -May be null. If there is an error, returns the error, otherwise returns false. -

-
ut_alpha COLUMN
-
-Check/untaint alphanumeric strings (no spaces). May not be null. If there is -an error, returns the error, otherwise returns false. -

-
ut_alpha COLUMN
-
-Check/untaint alphanumeric strings (no spaces). May be null. If there is an -error, returns the error, otherwise returns false. -

-
ut_phonen COLUMN [ COUNTRY ]
-
-Check/untaint phone numbers. May be null. If there is an error, returns -the error, otherwise returns false. -

Takes an optional two-letter ISO country code; without it or with unsupported -countries, ut_phonen simply calls ut_alphan.

-

-
ut_ip COLUMN
-
-Check/untaint ip addresses. IPv4 only for now. -

-
ut_ipn COLUMN
-
-Check/untaint ip addresses. IPv4 only for now. May be null. -

-
ut_domain COLUMN
-
-Check/untaint host and domain names. -

-
ut_anything COLUMN
-
-Untaints arbitrary data. Be careful. -

-
fields [ TABLE ]
-
-This can be used as both a subroutine and a method call. It returns a list -of the columns in this record's table, or an explicitly specified table. -(See the DBIx::DBSchema::Table manpage). -

-

-


-

SUBROUTINES

-
-
reload_dbdef([FILENAME])
-
-Load a database definition (see the DBIx::DBSchema manpage), optionally from a -non-default filename. This command is executed at startup unless -$FS::Record::setup_hack is true. Returns a DBIx::DBSchema object. -

-
dbdef
-
-Returns the current database definition. See the FS::dbdef manpage. -

-
_quote VALUE, TABLE, COLUMN
-
-This is an internal function used to construct SQL statements. It returns -VALUE DBI-quoted (see DBI/``quote'') unless VALUE is a number and the column -type (see the FS::dbdef_column manpage) does not end in `char' or `binary'. -

-
hfields TABLE
-
-This is depriciated. Don't use it. -

It returns a hash-type list with the fields of this record's table set true.

-

-

-


-

VERSION

-

$Id: Record.html,v 1.3 2001-04-23 12:40:30 ivan Exp $

-

-


-

BUGS

-

This module should probably be renamed, since much of the functionality is -of general use. It is not completely unlike Adapter::DBI (see below).

-

Exported qsearch and qsearchs should be depriciated in favor of method calls -(against an FS::Record object like the old search and searchs that qsearch -and qsearchs were on top of.)

-

The whole fields / hfields mess should be removed.

-

The various WHERE clauses should be subroutined.

-

table string should be depriciated in favor of FS::dbdef_table.

-

No doubt we could benefit from a Tied hash. Documenting how exists / defined -true maps to the database (and WHERE clauses) would also help.

-

The ut_ methods should ask the dbdef for a default length.

-

ut_sqltype (like ut_varchar) should all be defined

-

A fallback check method should be provided which uses the dbdef.

-

The ut_money method assumes money has two decimal digits.

-

The Pg money kludge in the new method only strips `$'.

-

The ut_phonen method assumes US-style phone numbers.

-

The _quote function should probably use ut_float instead of a regex.

-

All the subroutines probably should be methods, here or elsewhere.

-

Probably should borrow/use some dbdef methods where appropriate (like sub -fields)

-

As of 1.14, DBI fetchall_hashref( {} ) doesn't set fetchrow_hashref NAME_lc, -or allow it to be set. Working around it is ugly any way around - DBI should -be fixed. (only affects RDBMS which return uppercase column names)

-

-


-

SEE ALSO

-

the DBIx::DBSchema manpage, the FS::UID manpage, DBI

-

Adapter::DBI from Ch. 11 of Advanced Perl Programming by Sriram Srinivasan.

- - - - diff --git a/htdocs/docs/man/FS/SSH.html b/htdocs/docs/man/FS/SSH.html deleted file mode 100644 index 4368b8c11..000000000 --- a/htdocs/docs/man/FS/SSH.html +++ /dev/null @@ -1,104 +0,0 @@ - - -FS::SSH - Subroutines to call ssh and scp - - - - - - - - - - -
-

-

NAME

-

-FS::SSH - Subroutines to call ssh and scp - -

-


-

SYNOPSIS

-

-

  use FS::SSH qw(ssh scp issh iscp sshopen2 sshopen3);
-
-

-

  ssh($host, $command);
-
-

-

  issh($host, $command);
-
-

-

  scp($source, $destination);
-
-

-

  iscp($source, $destination);
-
-

-

  sshopen2($host, $reader, $writer, $command);
-
-

-

  sshopen3($host, $reader, $writer, $error, $command);
-
-

-


-

DESCRIPTION

-

-

  Simple wrappers around ssh and scp commands.
-
-

-


-

SUBROUTINES

-
-
ssh HOST, COMMAND
-

-Calls ssh in batch mode. - -

issh HOST, COMMAND
-

-Prints the ssh command to be executed, waits for the user to confirm, and -(optionally) executes the command. - -

scp SOURCE, DESTINATION
-

-Calls scp in batch mode. - -

iscp SOURCE, DESTINATION
-

-Prints the scp command to be executed, waits for the user to confirm, and -(optionally) executes the command. - -

sshopen2 HOST, READER, WRITER, COMMAND
-

-Connects the supplied filehandles to the ssh process (in batch mode). - -

sshopen3 HOST, WRITER, READER, ERROR, COMMAND
-

-Connects the supplied filehandles to the ssh process (in batch mode). - -

BUGS

-

-Not OO. - -

-scp stuff should transparantly use rsync-over-ssh instead. - -

SEE ALSO

-

-ssh, scp, IPC::Open2, IPC::Open3 - - - -

- - - diff --git a/htdocs/docs/man/FS/SessionClient.html b/htdocs/docs/man/FS/SessionClient.html deleted file mode 100644 index 5f180eee4..000000000 --- a/htdocs/docs/man/FS/SessionClient.html +++ /dev/null @@ -1,97 +0,0 @@ - - -FS::SessionClient - Freeside session client API - - - - - - - - - - - -
-

-

NAME

-

FS::SessionClient - Freeside session client API

-

-


-

SYNOPSIS

-
-  use FS::SessionClient qw( login portnum logout );
-
-  $error = login ( {
-    'username' => $username,
-    'password' => $password,
-    'login'    => $timestamp,
-    'portnum'  => $portnum,
-  } );
-
-  $portnum = portnum( { 'ip' => $ip } ) or die "unknown ip!"
-  $portnum = portnum( { 'nasnum' => $nasnum, 'nasport' => $nasport } )
-    or die "unknown nasnum/nasport";
-
-  $error = logout ( {
-    'username' => $username,
-    'password' => $password,
-    'logout'   => $timestamp,
-    'portnum'  => $portnum,
-  } );
-

-


-

DESCRIPTION

-

This modules provides an API for a remote session application.

-

It needs to be run as the freeside user. Because of this, the program which -calls these subroutines should be written very carefully.

-

-


-

SUBROUTINES

-
-
login HASHREF
-
-HASHREF should have the following keys: username, password, login and portnum. -login is a UNIX timestamp; if not specified, will default to the current time. -Starts a new session for the specified user and portnum. The password is -optional, but must be correct if specified. -

Returns a scalar error message, or the empty string for success.

-

-
portnum
-
-HASHREF should contain a single key: ip, or the two keys: nasnum and nasport. -Returns a portnum suitable for the login and logout subroutines, or false -on error. -

-
logout HASHREF
-
-HASHREF should have the following keys: usrename, password, logout and portnum. -logout is a UNIX timestamp; if not specified, will default to the current time. -Starts a new session for the specified user and portnum. The password is -optional, but must be correct if specified. -

Returns a scalar error message, or the empty string for success.

-

-

-


-

VERSION

-

$Id: SessionClient.html,v 1.1 2001-04-25 01:06:09 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

fs_sessiond

- - - - diff --git a/htdocs/docs/man/FS/SignupClient.html b/htdocs/docs/man/FS/SignupClient.html deleted file mode 100644 index 0c621edcb..000000000 --- a/htdocs/docs/man/FS/SignupClient.html +++ /dev/null @@ -1,125 +0,0 @@ - - -FS::SignupClient - Freeside signup client API - - - - - - - - - - -
-

-

NAME

-

-FS::SignupClient - Freeside signup client API - -

-


-

SYNOPSIS

-

-

  use FS::SignupClient qw( signup_info new_customer );
-
-

-

  ( $locales, $packages, $pops ) = signup_info;
-
-

-

  $error = new_customer ( {
-    'first'          => $first,
-    'last'           => $last,
-    'ss'             => $ss,
-    'comapny'        => $company,
-    'address1'       => $address1,
-    'address2'       => $address2,
-    'city'           => $city,
-    'county'         => $county,
-    'state'          => $state,
-    'zip'            => $zip,
-    'country'        => $country,
-    'daytime'        => $daytime,
-    'night'          => $night,
-    'fax'            => $fax,
-    'payby'          => $payby,
-    'payinfo'        => $payinfo,
-    'paydate'        => $paydate,
-    'payname'        => $payname,
-    'invoicing_list' => $invoicing_list,
-    'pkgpart'        => $pkgpart,
-    'username'       => $username,
-    '_password'       => $password,
-    'popnum'         => $popnum,
-  } );
-
-

-


-

DESCRIPTION

-

-This module provides an API for a remote signup server. - -

-It needs to be run as the freeside user. Because of this, the program which -calls these subroutines should be written very carefully. - -

-


-

SUBROUTINES

-
-
signup_info
-

-Returns three array references of hash references. - -

-The first set of hash references is of allowable locales. Each hash -reference has the following keys: taxnum state county country - -

-The second set of hash references is of allowable packages. Each hash -reference has the following keys: pkgpart pkg - -

-The third set of hash references is of allowable POPs (Points Of Presence). -Each hash reference has the following keys: popnum city state ac exch - -

new_customer HASHREF
-

-Adds a customer to the remote Freeside system. Requires a hash reference as -a paramater with the following keys: first last ss comapny address1 -address2 city county state zip country daytime night fax payby payinfo -paydate payname invoicing_list pkgpart username _password popnum - -

-Returns a scalar error message, or the empty string for success. - -

-

-


-

VERSION

-

-$Id: SignupClient.html,v 1.1 2001-04-23 12:41:57 ivan Exp $ - -

-


-

BUGS

-

-


-

SEE ALSO

-

-fs_signupd, FS::SignupServer, FS::cust_main - - - - - - diff --git a/htdocs/docs/man/FS/UI/Base.html b/htdocs/docs/man/FS/UI/Base.html deleted file mode 100644 index 96c60847d..000000000 --- a/htdocs/docs/man/FS/UI/Base.html +++ /dev/null @@ -1,100 +0,0 @@ - - -FS::UI::Base - Base class for all user-interface objects - - - - - - - - -

- - -
-

-

NAME

-

FS::UI::Base - Base class for all user-interface objects

-

-


-

SYNOPSIS

-
-  use FS::UI::SomeInterface;
-  use FS::UI::some_table;
-
-  $interface = new FS::UI::some_table;
-
-  $error = $interface->browse;
-  $error = $interface->search;
-  $error = $interface->view;
-  $error = $interface->edit;
-  $error = $interface->process;
-

-


-

DESCRIPTION

-

An FS::UI::Base object represents a user interface object. FS::UI::Base -is intended as a base class for table-specfic classes to inherit from, i.e. -FS::UI::cust_main. The simplest case, which will provide a default UI for your -new table, is as follows:

-
-  package FS::UI::table_name;
-  use vars qw ( @ISA );
-  use FS::UI::Base;
-  @ISA = qw( FS::UI::Base );
-  sub db_table { 'table_name'; }
-

Currently available interfaces are: - FS::UI::Gtk, an X-Windows UI implemented using the Gtk+ toolkit - FS::UI::CGI, a web interface implemented using CGI.pm, etc.

-

-


-

METHODS

-
-
new
-
-
browse
-
-
title
-
-
addwidget
-
-
-

-


-

VERSION

-

$Id: Base.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

This documentation is incomplete.

-

There should be some sort of per-(freeside)-user preferences and the ability -for specific FS::UI:: modules to put their own values there as well.

-

-


-

SEE ALSO

-

the FS::UI::Gtk manpage, the FS::UI::CGI manpage

-

-


-

HISTORY

-

$Log: Base.html,v $ -

Revision 1.3 2001-04-23 12:40:31 ivan -

documentation and webdemo updates -

-Revision 1.1 1999/08/04 09:03:53 ivan -initial checkin of module files for proper perl installation

-

Revision 1.1 1999/01/20 09:30:36 ivan -skeletal cross-UI UI code.

- - - - diff --git a/htdocs/docs/man/FS/UI/CGI.html b/htdocs/docs/man/FS/UI/CGI.html deleted file mode 100644 index 49991f1aa..000000000 --- a/htdocs/docs/man/FS/UI/CGI.html +++ /dev/null @@ -1,94 +0,0 @@ - - -FS::UI::CGI - Base class for CGI user-interface objects - - - - - - - - - - - -
-

-

NAME

-

FS::UI::CGI - Base class for CGI user-interface objects

-

-


-

SYNOPSIS

-
-  use FS::UI::CGI;
-  use FS::UI::some_table;
-
-  $interface = new FS::UI::some_table;
-
-  $error = $interface->browse;
-  $error = $interface->search;
-  $error = $interface->view;
-  $error = $interface->edit;
-  $error = $interface->process;
-

-


-

DESCRIPTION

-

An FS::UI::CGI object represents a CGI interface object.

-

-


-

METHODS

-
-
new
-
-
_header
-
-
_footer
-
-
interface
-
-Returns the string `CGI'. Useful for the author of a table-specific UI class -to conditionally specify certain behaviour. -

-

-


-

VERSION

-

$Id: CGI.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

This documentation is incomplete.

-

In _Tableborder, headers should be links that sort on their fields.

-

_Link uses a constant $BASE_URL

-

_Link passes the arguments as a manually-constructed GET string instead -of POSTing, for compatability while the web interface is upgraded. Once -this is done it should pass arguements properly (i.e. as a POST, 8-bit clean)

-

Still some small bits of widget code same as FS::UI::Gtk.

-

-


-

SEE ALSO

-

the FS::UI::Base manpage

-

-


-

HISTORY

-

$Log: CGI.html,v $ -

Revision 1.3 2001-04-23 12:40:31 ivan -

documentation and webdemo updates -

-Revision 1.1 1999/08/04 09:03:53 ivan -initial checkin of module files for proper perl installation

-

Revision 1.1 1999/01/20 09:30:36 ivan -skeletal cross-UI UI code.

- - - - diff --git a/htdocs/docs/man/FS/UI/Gtk.html b/htdocs/docs/man/FS/UI/Gtk.html deleted file mode 100644 index 24d620087..000000000 --- a/htdocs/docs/man/FS/UI/Gtk.html +++ /dev/null @@ -1,91 +0,0 @@ - - -FS::UI::Gtk - Base class for Gtk user-interface objects - - - - - - - - - - - -
-

-

NAME

-

FS::UI::Gtk - Base class for Gtk user-interface objects

-

-


-

SYNOPSIS

-
-  use FS::UI::Gtk;
-  use FS::UI::some_table;
-
-  $interface = new FS::UI::some_table;
-
-  $error = $interface->browse;
-  $error = $interface->search;
-  $error = $interface->view;
-  $error = $interface->edit;
-  $error = $interface->process;
-

-


-

DESCRIPTION

-

An FS::UI::Gtk object represents a Gtk user interface object.

-

-


-

METHODS

-
-
new
-
-
interface
-
-Returns the string `Gtk'. Useful for the author of a table-specific UI class -to conditionally specify certain behaviour. -

-

-


-

VERSION

-

$Id: Gtk.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

This documentation is incomplete.

-

_Tableborder is just a _Table now. _Tableborders should scroll (but not the -headers) and need and need more decoration. (data in white section ala gtksql -and sliding field widths) headers should be buttons that callback to sort on -their fields.

-

There should be a persistant, per-(freeside)-user store for window positions -and sizes and sort fields etc (see BUGS in the FS::UI::CGI manpage.

-

Still some small bits of widget code same as FS::UI::CGI.

-

-


-

SEE ALSO

-

the FS::UI::Base manpage

-

-


-

HISTORY

-

$Log: Gtk.html,v $ -

Revision 1.3 2001-04-23 12:40:31 ivan -

documentation and webdemo updates -

-Revision 1.1 1999/08/04 09:03:53 ivan -initial checkin of module files for proper perl installation

-

Revision 1.1 1999/01/20 09:30:36 ivan -skeletal cross-UI UI code.

- - - - diff --git a/htdocs/docs/man/FS/UI/agent.html b/htdocs/docs/man/FS/UI/agent.html deleted file mode 100644 index 8608e4ef4..000000000 --- a/htdocs/docs/man/FS/UI/agent.html +++ /dev/null @@ -1,16 +0,0 @@ - - -./FS/FS/UI/agent.pm - - - - - - - - - - - - - diff --git a/htdocs/docs/man/FS/UID.html b/htdocs/docs/man/FS/UID.html deleted file mode 100644 index 9c4da492b..000000000 --- a/htdocs/docs/man/FS/UID.html +++ /dev/null @@ -1,142 +0,0 @@ - - -FS::UID - Subroutines for database login and assorted other stuff - - - - - - - - - - - -
-

-

NAME

-

FS::UID - Subroutines for database login and assorted other stuff

-

-


-

SYNOPSIS

-
-  use FS::UID qw(adminsuidsetup cgisuidsetup dbh datasrc getotaker
-  checkeuid checkruid swapuid);
-
-  adminsuidsetup $user;
-
-  $cgi = new CGI;
-  $dbh = cgisuidsetup($cgi);
-
-  $dbh = dbh;
-
-  $datasrc = datasrc;
-
-  $driver_name = driver_name;
-

-


-

DESCRIPTION

-

Provides a hodgepodge of subroutines.

-

-


-

SUBROUTINES

-
-
adminsuidsetup USER
-
-Sets the user to USER (see config.html from the base documentation). -Cleans the environment. -Make sure the script is running as freeside, or setuid freeside. -Opens a connection to the database. -Swaps real and effective UIDs. -Runs any defined callbacks (see below). -Returns the DBI database handle (usually you don't need this). -

-
cgisuidsetup CGI_object
-
-Takes a single argument, which is a CGI (see the CGI manpage) or Apache (see Apache) -object (CGI::Base is depriciated). Runs cgisetotaker and then adminsuidsetup. -

-
cgi
-
-Returns the CGI (see the CGI manpage) object. -

-
dbh
-
-Returns the DBI database handle. -

-
datasrc
-
-Returns the DBI data source. -

-
driver_name
-
-Returns just the driver name portion of the DBI data source. -

-
getotaker
-
-Returns the current Freeside user. -

-
cgisetotaker
-
-Sets and returns the CGI REMOTE_USER. $cgi should be defined as a CGI.pm -object (see the CGI manpage) or an Apache object (see Apache). Support for CGI::Base -and derived classes is depriciated. -

-
checkeuid
-
-Returns true if effective UID is that of the freeside user. -

-
checkruid
-
-Returns true if the real UID is that of the freeside user. -

-
swapuid
-
-Swaps real and effective UIDs. -

-
getsecrets [ USER ]
-
-Sets the user to USER, if supplied. -Sets and returns the DBI datasource, username and password for this user from -the `/usr/local/etc/freeside/mapsecrets' file. -

-

-


-

CALLBACKS

-

Warning: this interface is likely to change in future releases.

-

A package can install a callback to be run in adminsuidsetup by putting a -coderef into the hash %FS::UID::callback :

-
-    $coderef = sub { warn "Hi, I'm returning your call!" };
-    $FS::UID::callback{'Package::Name'};
-

-


-

VERSION

-

$Id: UID.html,v 1.3 2001-04-23 12:40:30 ivan Exp $

-

-


-

BUGS

-

Too many package-global variables.

-

Not OO.

-

No capabilities yet. When mod_perl and Authen::DBI are implemented, -cgisuidsetup will go away as well.

-

Goes through contortions to support non-OO syntax with multiple datasrc's.

-

Callbacks are inelegant.

-

-


-

SEE ALSO

-

the FS::Record manpage, the CGI manpage, DBI, config.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/agent.html b/htdocs/docs/man/FS/agent.html deleted file mode 100644 index 39d89a770..000000000 --- a/htdocs/docs/man/FS/agent.html +++ /dev/null @@ -1,121 +0,0 @@ - - -FS::agent - Object methods for agent records - - - - - - - - - - - -
-

-

NAME

-

FS::agent - Object methods for agent records

-

-


-

SYNOPSIS

-
-  use FS::agent;
-
-  $record = new FS::agent \%hash;
-  $record = new FS::agent { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $agent_type = $record->agent_type;
-
-  $hashref = $record->pkgpart_hashref;
-  #may purchase $pkgpart if $hashref->{$pkgpart};
-

-


-

DESCRIPTION

-

An FS::agent object represents an agent. Every customer has an agent. Agents -can be used to track things like resellers or salespeople. FS::agent inherits -from FS::Record. The following fields are currently supported:

-
-
agemtnum - primary key (assigned automatically for new agents)
-
-
agent - Text name of this agent
-
-
typenum - Agent type. See the FS::agent_type manpage
-
-
prog - For future use.
-
-
freq - For future use.
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new agent. To add the agent to the database, see insert. -

-
insert
-
-Adds this agent to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Deletes this agent from the database. Only agents with no customers can be -deleted. If there is an error, returns the error, otherwise returns false. -

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid agent. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

-
agent_type
-
-Returns the FS::agent_type object (see the FS::agent_type manpage) for this agent. -

-
pkgpart_hashref
-
-Returns a hash reference. The keys of the hash are pkgparts. The value is -true if this agent may purchase the specified package definition. See -the FS::part_pkg manpage. -

-

-


-

VERSION

-

$Id: agent.html,v 1.3 2001-04-23 12:40:30 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::agent_type manpage, the FS::cust_main manpage, the FS::part_pkg manpage, -schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/agent_type.html b/htdocs/docs/man/FS/agent_type.html deleted file mode 100644 index b34940752..000000000 --- a/htdocs/docs/man/FS/agent_type.html +++ /dev/null @@ -1,126 +0,0 @@ - - -FS::agent_type - Object methods for agent_type records - - - - - - - - - - - -
-

-

NAME

-

FS::agent_type - Object methods for agent_type records

-

-


-

SYNOPSIS

-
-  use FS::agent_type;
-
-  $record = new FS::agent_type \%hash;
-  $record = new FS::agent_type { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $hashref = $record->pkgpart_hashref;
-  #may purchase $pkgpart if $hashref->{$pkgpart};
-
-  @type_pkgs = $record->type_pkgs;
-
-  @pkgparts = $record->pkgpart;
-

-


-

DESCRIPTION

-

An FS::agent_type object represents an agent type. Every agent (see -the FS::agent manpage) has an agent type. Agent types define which packages (see -the FS::part_pkg manpage) may be purchased by customers (see the FS::cust_main manpage), via -FS::type_pkgs records (see the FS::type_pkgs manpage). FS::agent_type inherits from -FS::Record. The following fields are currently supported:

-
-
typenum - primary key (assigned automatically for new agent types)
-
-
atype - Text name of this agent type
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new agent type. To add the agent type to the database, see -insert. -

-
insert
-
-Adds this agent type to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Deletes this agent type from the database. Only agent types with no agents -can be deleted. If there is an error, returns the error, otherwise returns -false. -

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid agent type. If there is an -error, returns the error, otherwise returns false. Called by the insert and -replace methods. -

-
pkgpart_hashref
-
-Returns a hash reference. The keys of the hash are pkgparts. The value is -true iff this agent may purchase the specified package definition. See -the FS::part_pkg manpage. -

-
type_pkgs
-
-Returns all FS::type_pkgs objects (see the FS::type_pkgs manpage) for this agent type. -

-
pkgpart
-
-Returns the pkgpart of all package definitions (see the FS::part_pkg manpage) for this -agent type. -

-

-


-

VERSION

-

$Id: agent_type.html,v 1.3 2001-04-23 12:40:30 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::agent manpage, the FS::type_pkgs manpage, the FS::cust_main manpage, -the FS::part_pkg manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/cust_bill.html b/htdocs/docs/man/FS/cust_bill.html deleted file mode 100644 index a59542c76..000000000 --- a/htdocs/docs/man/FS/cust_bill.html +++ /dev/null @@ -1,161 +0,0 @@ - - -FS::cust_bill - Object methods for cust_bill records - - - - - - - - - - - -
-

-

NAME

-

FS::cust_bill - Object methods for cust_bill records

-

-


-

SYNOPSIS

-
-  use FS::cust_bill;
-
-  $record = new FS::cust_bill \%hash;
-  $record = new FS::cust_bill { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  ( $total_previous_balance, @previous_cust_bill ) = $record->previous;
-
-  @cust_bill_pkg_objects = $cust_bill->cust_bill_pkg;
-
-  ( $total_previous_credits, @previous_cust_credit ) = $record->cust_credit;
-
-  @cust_pay_objects = $cust_bill->cust_pay;
-
-  @lines = $cust_bill->print_text;
-  @lines = $cust_bill->print_text $time;
-

-


-

DESCRIPTION

-

An FS::cust_bill object represents an invoice; a declaration that a customer -owes you money. The specific charges are itemized as cust_bill_pkg records -(see the FS::cust_bill_pkg manpage). FS::cust_bill inherits from FS::Record. The -following fields are currently supported:

-
-
invnum - primary key (assigned automatically for new invoices)
-
-
custnum - customer (see the FS::cust_main manpage)
-
-
_date - specified as a UNIX timestamp; see perlfunc/``time''. Also see -the Time::Local manpage and the Date::Parse manpage for conversion functions.
-
-
charged - amount of this invoice
-
-
printed - how many times this invoice has been printed automatically -(see collect in the FS::cust_main manpage).
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new invoice. To add the invoice to the database, see insert. -Invoices are normally created by calling the bill method of a customer object -(see the FS::cust_main manpage). -

-
insert
-
-Adds this invoice to the database (``Posts'' the invoice). If there is an error, -returns the error, otherwise returns false. -

-
delete
-
-Currently unimplemented. I don't remove invoices because there would then be -no record you ever posted this invoice (which is bad, no?) -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

Only printed may be changed. printed is normally updated by calling the -collect method of a customer object (see the FS::cust_main manpage).

-

-
check
-
-Checks all fields to make sure this is a valid invoice. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

-
previous
-
-Returns a list consisting of the total previous balance for this customer, -followed by the previous outstanding invoices (as FS::cust_bill objects also). -

-
cust_bill_pkg
-
-Returns the line items (see the FS::cust_bill_pkg manpage) for this invoice. -

-
cust_credit
-
-Returns a list consisting of the total previous credited (see -the FS::cust_credit manpage) for this customer, followed by the previous outstanding -credits (FS::cust_credit objects). -

-
cust_pay
-
-Returns all payments (see the FS::cust_pay manpage) for this invoice. -

-
owed
-
-Returns the amount owed (still outstanding) on this invoice, which is charged -minus all payments (see the FS::cust_pay manpage). -

-
print_text [TIME];
-
-Returns an text invoice, as a list of lines. -

TIME an optional value used to control the printing of overdue messages. The -default is now. It isn't the date of the invoice; that's the `_date' field. -It is specified as a UNIX timestamp; see perlfunc/``time''. Also see -the Time::Local manpage and the Date::Parse manpage for conversion functions.

-

-

-


-

VERSION

-

$Id: cust_bill.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

The delete method.

-

print_text formatting (and some logic :/) is in source, but needs to be -slurped in from a file. Also number of lines ($=).

-

missing print_ps for a nice postscript copy (maybe HylaFAX-cover-page-style -or something similar so the look can be completely customized?)

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_main manpage, the FS::cust_pay manpage, the FS::cust_bill_pkg manpage, -the FS::cust_credit manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/cust_bill_pkg.html b/htdocs/docs/man/FS/cust_bill_pkg.html deleted file mode 100644 index 2cdd8952e..000000000 --- a/htdocs/docs/man/FS/cust_bill_pkg.html +++ /dev/null @@ -1,112 +0,0 @@ - - -FS::cust_bill_pkg - Object methods for cust_bill_pkg records - - - - - - - - - - - -
-

-

NAME

-

FS::cust_bill_pkg - Object methods for cust_bill_pkg records

-

-


-

SYNOPSIS

-
-  use FS::cust_bill_pkg;
-
-  $record = new FS::cust_bill_pkg \%hash;
-  $record = new FS::cust_bill_pkg { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::cust_bill_pkg object represents an invoice line item. -FS::cust_bill_pkg inherits from FS::Record. The following fields are currently -supported:

-
-
invnum - invoice (see the FS::cust_bill manpage)
-
-
pkgnum - package (see the FS::cust_pkg manpage) or 0 for the special virtual sales tax package
-
-
setup - setup fee
-
-
recur - recurring fee
-
-
sdate - starting date of recurring fee
-
-
edate - ending date of recurring fee
-
-
-

sdate and edate are specified as UNIX timestamps; see perlfunc/``time''. Also -see the Time::Local manpage and the Date::Parse manpage for conversion functions.

-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new line item. To add the line item to the database, see -insert. Line items are normally created by calling the bill method of a -customer object (see the FS::cust_main manpage). -

-
insert
-
-Adds this line item to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Currently unimplemented. I don't remove line items because there would then be -no record the items ever existed (which is bad, no?) -

-
replace OLD_RECORD
-
-Currently unimplemented. This would be even more of an accounting nightmare -than deleteing the items. Just don't do it. -

-
check
-
-Checks all fields to make sure this is a valid line item. If there is an -error, returns the error, otherwise returns false. Called by the insert -method. -

-

-


-

VERSION

-

$Id: cust_bill_pkg.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_bill manpage, the FS::cust_pkg manpage, the FS::cust_main manpage, schema.html -from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/cust_credit.html b/htdocs/docs/man/FS/cust_credit.html deleted file mode 100644 index f08424561..000000000 --- a/htdocs/docs/man/FS/cust_credit.html +++ /dev/null @@ -1,118 +0,0 @@ - - -FS::cust_credit - Object methods for cust_credit records - - - - - - - - - - - -
-

-

NAME

-

FS::cust_credit - Object methods for cust_credit records

-

-


-

SYNOPSIS

-
-  use FS::cust_credit;
-
-  $record = new FS::cust_credit \%hash;
-  $record = new FS::cust_credit { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::cust_credit object represents a credit; the equivalent of a negative -cust_bill record (see the FS::cust_bill manpage). FS::cust_credit inherits from -FS::Record. The following fields are currently supported:

-
-
crednum - primary key (assigned automatically for new credits)
-
-
custnum - customer (see the FS::cust_main manpage)
-
-
amount - amount of the credit
-
-
_date - specified as a UNIX timestamp; see perlfunc/``time''. Also see -the Time::Local manpage and the Date::Parse manpage for conversion functions.
-
-
otaker - order taker (assigned automatically, see the FS::UID manpage)
-
-
reason - text
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new credit. To add the credit to the database, see insert. -

-
insert
-
-Adds this credit to the database (``Posts'' the credit). If there is an error, -returns the error, otherwise returns false. -

-
delete
-
-Currently unimplemented. -

-
replace OLD_RECORD
-
-Credits may not be modified; there would then be no record the credit was ever -posted. -

-
check
-
-Checks all fields to make sure this is a valid credit. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

-
cust_refund
-
-Returns all refunds (see the FS::cust_refund manpage) for this credit. -

-
credited
-
-Returns the amount of this credit that is still outstanding; which is -amount minus all refunds (see the FS::cust_refund manpage). -

-

-


-

VERSION

-

$Id: cust_credit.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

The delete method.

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_refund manpage, the FS::cust_bill manpage, schema.html from the base -documentation.

- - - - diff --git a/htdocs/docs/man/FS/cust_main.html b/htdocs/docs/man/FS/cust_main.html deleted file mode 100644 index c5df1da12..000000000 --- a/htdocs/docs/man/FS/cust_main.html +++ /dev/null @@ -1,252 +0,0 @@ - - -FS::cust_main - Object methods for cust_main records - - - - - - - - - - - -
-

-

NAME

-

FS::cust_main - Object methods for cust_main records

-

-


-

SYNOPSIS

-
-  use FS::cust_main;
-
-  $record = new FS::cust_main \%hash;
-  $record = new FS::cust_main { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  @cust_pkg = $record->all_pkgs;
-
-  @cust_pkg = $record->ncancelled_pkgs;
-
-  $error = $record->bill;
-  $error = $record->bill %options;
-  $error = $record->bill 'time' => $time;
-
-  $error = $record->collect;
-  $error = $record->collect %options;
-  $error = $record->collect 'invoice_time'   => $time,
-                            'batch_card'     => 'yes',
-                            'report_badcard' => 'yes',
-                          ;
-

-


-

DESCRIPTION

-

An FS::cust_main object represents a customer. FS::cust_main inherits from -FS::Record. The following fields are currently supported:

-
-
custnum - primary key (assigned automatically for new customers)
-
-
agentnum - agent (see the FS::agent manpage)
-
-
refnum - referral (see the FS::part_referral manpage)
-
-
first - name
-
-
last - name
-
-
ss - social security number (optional)
-
-
company - (optional)
-
-
address1
-
-
address2 - (optional)
-
-
city
-
-
county - (optional, see the FS::cust_main_county manpage)
-
-
state - (see the FS::cust_main_county manpage)
-
-
zip
-
-
country - (see the FS::cust_main_county manpage)
-
-
daytime - phone (optional)
-
-
night - phone (optional)
-
-
fax - phone (optional)
-
-
payby - `CARD' (credit cards), `BILL' (billing), `COMP' (free), or `PREPAY' (special billing type: applies a credit - see the FS::prepay_credit manpage and sets billing type to BILL)
-
-
payinfo - card number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) or prepayment identifier (see the FS::prepay_credit manpage)
-
-
paydate - expiration date, mm/yyyy, m/yyyy, mm/yy or m/yy
-
-
payname - name on card or billing name
-
-
tax - tax exempt, empty or `Y'
-
-
otaker - order taker (assigned automatically, see the FS::UID manpage)
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new customer. To add the customer to the database, see insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this customer to the database. If there is an error, returns the error, -otherwise returns false. -

There is a special insert mode in which you pass a data structure to the insert -method containing FS::cust_pkg and FS::svc_tablename objects. When -running under a transactional database, all records are inserted atomicly, or -the transaction is rolled back. There should be a better explanation of this, -but until then, here's an example:

-
-  use Tie::RefHash;
-  tie %hash, 'Tie::RefHash'; #this part is important
-  %hash = {
-    $cust_pkg => [ $svc_acct ],
-  };
-  $cust_main->insert( \%hash );
-

-
delete NEW_CUSTNUM
-
-This deletes the customer. If there is an error, returns the error, otherwise -returns false. -

This will completely remove all traces of the customer record. This is not -what you want when a customer cancels service; for that, cancel all of the -customer's packages (see cancel in the FS::cust_pkg manpage).

-

If the customer has any packages, you need to pass a new (valid) customer -number for those packages to be transferred to.

-

You can't delete a customer with invoices (see the FS::cust_bill manpage), -or credits (see the FS::cust_credit manpage).

-

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid customer record. If there is -an error, returns the error, otherwise returns false. Called by the insert -and repalce methods. -

-
all_pkgs
-
-Returns all packages (see the FS::cust_pkg manpage) for this customer. -

-
ncancelled_pkgs
-
-Returns all non-cancelled packages (see the FS::cust_pkg manpage) for this customer. -

-
bill OPTIONS
-
-Generates invoices (see the FS::cust_bill manpage) for this customer. Usually used in -conjunction with the collect method. -

The only currently available option is `time', which bills the customer as if -it were that time. It is specified as a UNIX timestamp; see -perlfunc/``time''). Also see the Time::Local manpage and the Date::Parse manpage for conversion -functions.

-

If there is an error, returns the error, otherwise returns false.

-

-
collect OPTIONS
-
-(Attempt to) collect money for this customer's outstanding invoices (see -the FS::cust_bill manpage). Usually used after the bill method. -

Depending on the value of `payby', this may print an invoice (`BILL'), charge -a credit card (`CARD'), or just add any necessary (pseudo-)payment (`COMP').

-

If there is an error, returns the error, otherwise returns false.

-

Currently available options are:

-

invoice_time - Use this time when deciding when to print invoices and -late notices on those invoices. The default is now. It is specified as a UNIX timestamp; see perlfunc/``time''). Also see the Time::Local manpage and the Date::Parse manpage -for conversion functions.

-

batch_card - Set this true to batch cards (see the cust_pay_batch manpage). By -default, cards are processed immediately, which will generate an error if -CyberCash is not installed.

-

report_badcard - Set this true if you want bad card transactions to -return an error. By default, they don't.

-

-
total_owed
-
-Returns the total owed for this customer on all invoices -(see the FS::cust_bill manpage). -

-
total_credited
-
-Returns the total credits (see the FS::cust_credit manpage) for this customer. -

-
balance
-
-Returns the balance for this customer (total owed minus total credited). -

-
invoicing_list [ ARRAYREF ]
-
-If an arguement is given, sets these email addresses as invoice recipients -(see the FS::cust_main_invoice manpage). Errors are not fatal and are not reported -(except as warnings), so use check_invoicing_list first. -

Returns a list of email addresses (with svcnum entries expanded).

-

Note: You can clear the invoicing list by passing an empty ARRAYREF. You can -check it without disturbing anything by passing nothing.

-

This interface may change in the future.

-

-
check_invoicing_list ARRAYREF
-
-Checks these arguements as valid input for the invoicing_list method. If there -is an error, returns the error, otherwise returns false. -

-

-


-

VERSION

-

$Id: cust_main.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

The delete method.

-

The delete method should possibly take an FS::cust_main object reference -instead of a scalar customer number.

-

Bill and collect options should probably be passed as references instead of a -list.

-

CyberCash v2 forces us to define some variables in package main.

-

There should probably be a configuration file with a list of allowed credit -card types.

-

CyberCash is the only processor.

-

No multiple currency support (probably a larger project than just this module).

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_pkg manpage, the FS::cust_bill manpage, the FS::cust_credit manpage -the FS::cust_pay_batch manpage, the FS::agent manpage, the FS::part_referral manpage, -the FS::cust_main_county manpage, the FS::cust_main_invoice manpage, -the FS::UID manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/cust_main_county.html b/htdocs/docs/man/FS/cust_main_county.html deleted file mode 100644 index 575eaedca..000000000 --- a/htdocs/docs/man/FS/cust_main_county.html +++ /dev/null @@ -1,106 +0,0 @@ - - -FS::cust_main_county - Object methods for cust_main_county objects - - - - - - - - - - - -
-

-

NAME

-

FS::cust_main_county - Object methods for cust_main_county objects

-

-


-

SYNOPSIS

-
-  use FS::cust_main_county;
-
-  $record = new FS::cust_main_county \%hash;
-  $record = new FS::cust_main_county { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::cust_main_county object represents a tax rate, defined by locale. -FS::cust_main_county inherits from FS::Record. The following fields are -currently supported:

-
-
taxnum - primary key (assigned automatically for new tax rates)
-
-
state
-
-
county
-
-
country
-
-
tax - percentage
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new tax rate. To add the tax rate to the database, see insert. -

-
insert
-
-Adds this tax rate to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Deletes this tax rate from the database. If there is an error, returns the -error, otherwise returns false. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid tax rate. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

-

-


-

VERSION

-

$Id: cust_main_county.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_main manpage, the FS::cust_bill manpage, schema.html from the base -documentation.

- - - - diff --git a/htdocs/docs/man/FS/cust_main_invoice.html b/htdocs/docs/man/FS/cust_main_invoice.html deleted file mode 100644 index 7a3719711..000000000 --- a/htdocs/docs/man/FS/cust_main_invoice.html +++ /dev/null @@ -1,111 +0,0 @@ - - -FS::cust_main_invoice - Object methods for cust_main_invoice records - - - - - - - - - - - -
-

-

NAME

-

FS::cust_main_invoice - Object methods for cust_main_invoice records

-

-


-

SYNOPSIS

-
-  use FS::cust_main_invoice;
-
-  $record = new FS::cust_main_invoice \%hash;
-  $record = new FS::cust_main_invoice { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $email_address = $record->address;
-

-


-

DESCRIPTION

-

An FS::cust_main_invoice object represents an invoice destination. FS::cust_main_invoice inherits from -FS::Record. The following fields are currently supported:

-
-
destnum - primary key
-
-
custnum - customer (see the FS::cust_main manpage)
-
-
dest - Invoice destination: If numeric, a svcnum (see the FS::svc_acct manpage), if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist)
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new invoice destination. To add the invoice destination to the database, see insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Delete this record from the database. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid invoice destination. If there is -an error, returns the error, otherwise returns false. Called by the insert -and repalce methods. -

-
checkdest
-
-Checks the dest field only. -

-
address
-
-Returns the literal email address for this record (or `POST'). -

-

-


-

VERSION

-

$Id: cust_main_invoice.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_main manpage

- - - - diff --git a/htdocs/docs/man/FS/cust_pay.html b/htdocs/docs/man/FS/cust_pay.html deleted file mode 100644 index dc7b54c8d..000000000 --- a/htdocs/docs/man/FS/cust_pay.html +++ /dev/null @@ -1,108 +0,0 @@ - - -FS::cust_pay - Object methods for cust_pay objects - - - - - - - - - - - -
-

-

NAME

-

FS::cust_pay - Object methods for cust_pay objects

-

-


-

SYNOPSIS

-
-  use FS::cust_pay;
-
-  $record = new FS::cust_pay \%hash;
-  $record = new FS::cust_pay { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::cust_pay object represents a payment; the transfer of money from a -customer. FS::cust_pay inherits from FS::Record. The following fields are -currently supported:

-
-
paynum - primary key (assigned automatically for new payments)
-
-
invnum - Invoice (see the FS::cust_bill manpage)
-
-
paid - Amount of this payment
-
-
_date - specified as a UNIX timestamp; see perlfunc/``time''. Also see -the Time::Local manpage and the Date::Parse manpage for conversion functions.
-
-
payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free)
-
-
payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)
-
-
paybatch - text field for tracking card processing
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new payment. To add the payment to the databse, see insert. -

-
insert
-
-Adds this payment to the databse, and updates the invoice (see -the FS::cust_bill manpage). -

-
delete
-
-Currently unimplemented (accounting reasons). -

-
replace OLD_RECORD
-
-Currently unimplemented (accounting reasons). -

-
check
-
-Checks all fields to make sure this is a valid payment. If there is an error, -returns the error, otherwise returns false. Called by the insert method. -

-

-


-

VERSION

-

$Id: cust_pay.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

Delete and replace methods.

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_bill manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/cust_pay_batch.html b/htdocs/docs/man/FS/cust_pay_batch.html deleted file mode 100644 index b7637bc6d..000000000 --- a/htdocs/docs/man/FS/cust_pay_batch.html +++ /dev/null @@ -1,132 +0,0 @@ - - -FS::cust_pay_batch - Object methods for batch cards - - - - - - - - - - - -
-

-

NAME

-

FS::cust_pay_batch - Object methods for batch cards

-

-


-

SYNOPSIS

-
-  use FS::cust_pay_batch;
-
-  $record = new FS::cust_pay_batch \%hash;
-  $record = new FS::cust_pay_batch { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::cust_pay_batch object represents a credit card transaction ready to be -batched (sent to a processor). FS::cust_pay_batch inherits from FS::Record. -Typically called by the collect method of an FS::cust_main object. The -following fields are currently supported:

-
-
trancode - 77 for charges
-
-
cardnum
-
-
exp - card expiration
-
-
amount
-
-
invnum - invoice
-
-
custnum - customer
-
-
payname - name on card
-
-
first - name
-
-
last - name
-
-
address1
-
-
address2
-
-
city
-
-
state
-
-
zip
-
-
country
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new record. To add the record to the database, see insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Delete this record from the database. If there is an error, returns the error, -otherwise returns false. -

-
replace OLD_RECORD
-
-#inactive -# -#Replaces the OLD_RECORD with this one in the database. If there is an error, -#returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid transaction. If there is -an error, returns the error, otherwise returns false. Called by the insert -and repalce methods. -

-

-


-

VERSION

-

$Id: cust_pay_batch.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

There should probably be a configuration file with a list of allowed credit -card types.

-

-


-

SEE ALSO

-

the FS::cust_main manpage, the FS::Record manpage

- - - - diff --git a/htdocs/docs/man/FS/cust_pkg.html b/htdocs/docs/man/FS/cust_pkg.html deleted file mode 100644 index 19c8ff842..000000000 --- a/htdocs/docs/man/FS/cust_pkg.html +++ /dev/null @@ -1,205 +0,0 @@ - - -FS::cust_pkg - Object methods for cust_pkg objects - - - - - - - - - - - -
-

-

NAME

-

FS::cust_pkg - Object methods for cust_pkg objects

-

-


-

SYNOPSIS

-
-  use FS::cust_pkg;
-
-  $record = new FS::cust_pkg \%hash;
-  $record = new FS::cust_pkg { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $error = $record->cancel;
-
-  $error = $record->suspend;
-
-  $error = $record->unsuspend;
-
-  $part_pkg = $record->part_pkg;
-
-  @labels = $record->labels;
-
-  $error = FS::cust_pkg::order( $custnum, \@pkgparts );
-  $error = FS::cust_pkg::order( $custnum, \@pkgparts, \@remove_pkgnums ] );
-

-


-

DESCRIPTION

-

An FS::cust_pkg object represents a customer billing item. FS::cust_pkg -inherits from FS::Record. The following fields are currently supported:

-
-
pkgnum - primary key (assigned automatically for new billing items)
-
-
custnum - Customer (see the FS::cust_main manpage)
-
-
pkgpart - Billing item definition (see the FS::part_pkg manpage)
-
-
setup - date
-
-
bill - date
-
-
susp - date
-
-
expire - date
-
-
cancel - date
-
-
otaker - order taker (assigned automatically if null, see the FS::UID manpage)
-
-
-

Note: setup, bill, susp, expire and cancel are specified as UNIX timestamps; -see perlfunc/``time''. Also see the Time::Local manpage and the Date::Parse manpage for -conversion functions.

-

-


-

METHODS

-
-
new HASHREF
-
-Create a new billing item. To add the item to the database, see insert. -

-
insert
-
-Adds this billing item to the database (``Orders'' the item). If there is an -error, returns the error, otherwise returns false. -

sub insert { - my $self = shift;

-
-  # custnum might not have have been defined in sub check (for one-shot new
-  # customers), so check it here instead
-
-  my $error = $self->ut_number('custnum');
-  return $error if $error
-
-  return "Unknown customer"
-    unless qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
-
-  $self->SUPER::insert;
-

}

-

-
delete
-
-Currently unimplemented. You don't want to delete billing items, because there -would then be no record the customer ever purchased the item. Instead, see -the cancel method. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

Currently, custnum, setup, bill, susp, expire, and cancel may be changed.

-

Changing pkgpart may have disasterous effects. See the order subroutine.

-

setup and bill are normally updated by calling the bill method of a customer -object (see the FS::cust_main manpage).

-

suspend is normally updated by the suspend and unsuspend methods.

-

cancel is normally updated by the cancel method (and also the order subroutine -in some cases).

-

-
check
-
-Checks all fields to make sure this is a valid billing item. If there is an -error, returns the error, otherwise returns false. Called by the insert and -replace methods. -

-
cancel
-
-Cancels and removes all services (see the FS::cust_svc manpage and the FS::part_svc manpage) -in this package, then cancels the package itself (sets the cancel field to -now). -

If there is an error, returns the error, otherwise returns false.

-

-
suspend
-
-Suspends all services (see the FS::cust_svc manpage and the FS::part_svc manpage) in this -package, then suspends the package itself (sets the susp field to now). -

If there is an error, returns the error, otherwise returns false.

-

-
unsuspend
-
-Unsuspends all services (see the FS::cust_svc manpage and the FS::part_svc manpage) in this -package, then unsuspends the package itself (clears the susp field). -

If there is an error, returns the error, otherwise returns false.

-

-
part_pkg
-
-Returns the definition for this billing item, as an FS::part_pkg object (see -the FS::part_pkg manpage). -

-
labels
-
-Returns a list of lists, calling the label method for all services -(see the FS::cust_svc manpage) of this billing item. -

-

-


-

SUBROUTINES

-
-
order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF ]
-
-CUSTNUM is a customer (see the FS::cust_main manpage) -

PKGPARTS is a list of pkgparts specifying the the billing item definitions (see -the FS::part_pkg manpage) to order for this customer. Duplicates are of course -permitted.

-

REMOVE_PKGNUMS is an optional list of pkgnums specifying the billing items to -remove for this customer. The services (see the FS::cust_svc manpage) are moved to the -new billing items. An error is returned if this is not possible (see -the FS::pkg_svc manpage).

-

-

-


-

VERSION

-

$Id: cust_pkg.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

sub order is not OO. Perhaps it should be moved to FS::cust_main and made so?

-

In sub order, the @pkgparts array (passed by reference) is clobbered.

-

Also in sub order, no money is adjusted. Once FS::part_pkg defines a standard -method to pass dates to the recur_prog expression, it should do so.

-

FS::svc_acct, FS::svc_acct_sm, and FS::svc_domain are loaded via 'use' at -compile time, rather than via 'require' in sub { setup, suspend, unsuspend, -cancel } because they use %FS::UID::callback to load configuration values. -Probably need a subroutine which decides what to do based on whether or not -we've fetched the user yet, rather than a hash. See FS::UID and the TODO.

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_main manpage, the FS::part_pkg manpage, the FS::cust_svc manpage -, the FS::pkg_svc manpage, schema.html from the base documentation

- - - - diff --git a/htdocs/docs/man/FS/cust_refund.html b/htdocs/docs/man/FS/cust_refund.html deleted file mode 100644 index 8162c0b78..000000000 --- a/htdocs/docs/man/FS/cust_refund.html +++ /dev/null @@ -1,108 +0,0 @@ - - -FS::cust_refund - Object method for cust_refund objects - - - - - - - - - - - -
-

-

NAME

-

FS::cust_refund - Object method for cust_refund objects

-

-


-

SYNOPSIS

-
-  use FS::cust_refund;
-
-  $record = new FS::cust_refund \%hash;
-  $record = new FS::cust_refund { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::cust_refund represents a refund: the transfer of money to a customer; -equivalent to a negative payment (see the FS::cust_pay manpage). FS::cust_refund -inherits from FS::Record. The following fields are currently supported:

-
-
refundnum - primary key (assigned automatically for new refunds)
-
-
crednum - Credit (see the FS::cust_credit manpage)
-
-
refund - Amount of the refund
-
-
_date - specified as a UNIX timestamp; see perlfunc/``time''. Also see -the Time::Local manpage and the Date::Parse manpage for conversion functions.
-
-
payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free)
-
-
payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)
-
-
otaker - order taker (assigned automatically, see the FS::UID manpage)
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new refund. To add the refund to the database, see insert. -

-
insert
-
-Adds this refund to the database, and updates the credit (see -the FS::cust_credit manpage). -

-
delete
-
-Currently unimplemented (accounting reasons). -

-
replace OLD_RECORD
-
-Currently unimplemented (accounting reasons). -

-
check
-
-Checks all fields to make sure this is a valid refund. If there is an error, -returns the error, otherwise returns false. Called by the insert method. -

-

-


-

VERSION

-

$Id: cust_refund.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

Delete and replace methods.

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_credit manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/cust_svc.html b/htdocs/docs/man/FS/cust_svc.html deleted file mode 100644 index 19416d5b7..000000000 --- a/htdocs/docs/man/FS/cust_svc.html +++ /dev/null @@ -1,118 +0,0 @@ - - -FS::cust_svc - Object method for cust_svc objects - - - - - - - - - - - -
-

-

NAME

-

FS::cust_svc - Object method for cust_svc objects

-

-


-

SYNOPSIS

-
-  use FS::cust_svc;
-
-  $record = new FS::cust_svc \%hash
-  $record = new FS::cust_svc { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  ($label, $value) = $record->label;
-

-


-

DESCRIPTION

-

An FS::cust_svc represents a service. FS::cust_svc inherits from FS::Record. -The following fields are currently supported:

-
-
svcnum - primary key (assigned automatically for new services)
-
-
pkgnum - Package (see the FS::cust_pkg manpage)
-
-
svcpart - Service definition (see the FS::part_svc manpage)
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new service. To add the refund to the database, see insert. -Services are normally created by creating FS::svc_ objects (see -the FS::svc_acct manpage, the FS::svc_domain manpage, and the FS::svc_acct_sm manpage, among others). -

-
insert
-
-Adds this service to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Deletes this service from the database. If there is an error, returns the -error, otherwise returns false. -

Called by the cancel method of the package (see the FS::cust_pkg manpage).

-

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid service. If there is an error, -returns the error, otehrwise returns false. Called by the insert and -replace methods. -

-
label
-
-Returns a list consisting of: -- The name of this service (from part_svc) -- A meaningful identifier (username, domain, or mail alias) -- The table name (i.e. svc_domain) for this service -

-

-


-

VERSION

-

$Id: cust_svc.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

Behaviour of changing the svcpart of cust_svc records is undefined and should -possibly be prohibited, and pkg_svc records are not checked.

-

pkg_svc records are not checked in general (here).

-

Deleting this record doesn't check or delete the svc_* record associated -with this record.

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_pkg manpage, the FS::part_svc manpage, the FS::pkg_svc manpage, -schema.html from the base documentation

- - - - diff --git a/htdocs/docs/man/FS/dbdef.html b/htdocs/docs/man/FS/dbdef.html deleted file mode 100644 index a986ad95b..000000000 --- a/htdocs/docs/man/FS/dbdef.html +++ /dev/null @@ -1,97 +0,0 @@ - - -FS::dbdef - Database objects - - - - - - - - - - -
-

-

NAME

-

-FS::dbdef - Database objects - -

-


-

SYNOPSIS

-

-

  use FS::dbdef;
-
-

-

  $dbdef = new FS::dbdef (@dbdef_table_objects);
-  $dbdef = load FS::dbdef "filename";
-
-

-

  $dbdef->save("filename");
-
-

-

  $dbdef->addtable($dbdef_table_object);
-
-

-

  @table_names = $dbdef->tables;
-
-

-

  $FS_dbdef_table_object = $dbdef->table;
-
-

-


-

DESCRIPTION

-

-FS::dbdef objects are collections of FS::dbdef_table objects and represnt a -database (a collection of tables). - -

-


-

METHODS

-
-
new TABLE, TABLE, ...
-

-Creates a new FS::dbdef object - -

load FILENAME
-

-Loads an FS::dbdef object from a file. - -

save FILENAME
-

-Saves an FS::dbdef object to a file. - -

addtable TABLE
-

-Adds this FS::dbdef_table object. - -

tables
-

-Returns the names of all tables. - -

table TABLENAME
-

-Returns the named FS::dbdef_table object. - -

BUGS

-

-Each FS::dbdef object should have a name which corresponds to its name -within the SQL database engine. - -

SEE ALSO

-

-FS::dbdef_table, FS::Record, - -

- - - diff --git a/htdocs/docs/man/FS/dbdef_colgroup.html b/htdocs/docs/man/FS/dbdef_colgroup.html deleted file mode 100644 index 8b9e12baf..000000000 --- a/htdocs/docs/man/FS/dbdef_colgroup.html +++ /dev/null @@ -1,86 +0,0 @@ - - -FS::dbdef_colgroup - Column group objects - - - - - - - - - - -
-

-

NAME

-

-FS::dbdef_colgroup - Column group objects - -

-


-

SYNOPSIS

-

-

  use FS::dbdef_colgroup;
-
-

-

  $colgroup = new FS::dbdef_colgroup ( $lol );
-  $colgroup = new FS::dbdef_colgroup (
-    [
-      [ 'single_column' ],
-      [ 'multiple_columns', 'another_column', ],
-    ]
-  );
-
-

-

  @sql_lists = $colgroup->sql_list;
-
-

-

  @singles = $colgroup->singles;
-
-

-


-

DESCRIPTION

-

-FS::dbdef_colgroup objects represent sets of sets of columns. - -

-


-

METHODS

-
-
new
-

-Creates a new FS::dbdef_colgroup object. - -

sql_list
-

-Returns a flat list of comma-separated values, for SQL statements. - -

singles
-

-Returns a flat list of all single item lists. - -

-

-


-

BUGS

-

-


-

SEE ALSO

-

-FS::dbdef_table, FS::dbdef_unique, FS::dbdef_index, -FS::dbdef_column, FS::dbdef, perldsc - - - - - - diff --git a/htdocs/docs/man/FS/dbdef_column.html b/htdocs/docs/man/FS/dbdef_column.html deleted file mode 100644 index 6a5ebc3c1..000000000 --- a/htdocs/docs/man/FS/dbdef_column.html +++ /dev/null @@ -1,118 +0,0 @@ - - -FS::dbdef_column - Column object - - - - - - - -

- - -
-

-

NAME

-

-FS::dbdef_column - Column object - -

-


-

SYNOPSIS

-

-

  use FS::dbdef_column;
-
-

-

  $column_object = new FS::dbdef_column ( $name, $sql_type, '' );
-  $column_object = new FS::dbdef_column ( $name, $sql_type, 'NULL' );
-  $column_object = new FS::dbdef_column ( $name, $sql_type, '', $length );
-  $column_object = new FS::dbdef_column ( $name, $sql_type, 'NULL', $length );
-
-

-

  $name = $column_object->name;
-  $column_object->name ( 'name' );
-
-

-

  $name = $column_object->type;
-  $column_object->name ( 'sql_type' );
-
-

-

  $name = $column_object->null;
-  $column_object->name ( 'NOT NULL' );
-
-

-

  $name = $column_object->length;
-  $column_object->name ( $length );
-
-

-

  $sql_line = $column->line;
-  $sql_line = $column->line $datasrc;
-
-

-


-

DESCRIPTION

-

-FS::dbdef::column objects represend columns in tables (see FS::dbdef_table). - -

-


-

METHODS

-
-
new
-

-Creates a new FS::dbdef_column object. - -

name
-

-Returns or sets the column name. - -

type
-

-Returns or sets the column type. - -

null
-

-Returns or sets the column null flag. - -

type
-

-Returns or sets the column length. - -

line [ $datasrc ]
-

-Returns an SQL column definition. - -

-If passed a DBI $datasrc specifying DBD::mysql or DBD::Pg, will use engine-specific syntax. - -

-

-


-

BUGS

-

-


-

SEE ALSO

-

-FS::dbdef_table, FS::dbdef, DBI - - - -

-


-

VERSION

-

-$Id: dbdef_column.html,v 1.2 2000-03-03 18:22:43 ivan Exp $ - - - - diff --git a/htdocs/docs/man/FS/dbdef_index.html b/htdocs/docs/man/FS/dbdef_index.html deleted file mode 100644 index 9d0d12a76..000000000 --- a/htdocs/docs/man/FS/dbdef_index.html +++ /dev/null @@ -1,58 +0,0 @@ - - -FS::dbdef_unique.pm - Index object - - - - - - - -

- - -
-

-

NAME

-

-FS::dbdef_unique.pm - Index object - -

-


-

SYNOPSIS

-

-

  use FS::dbdef_index;
-
-

-

    # see FS::dbdef_colgroup methods
-
-

-


-

DESCRIPTION

-

-FS::dbdef_unique objects represent the (non-unique) indices of a table (FS::dbdef_table). FS::dbdef_unique inherits from FS::dbdef_colgroup. - -

-


-

BUGS

-

-Is this empty subclass needed? - -

-


-

SEE ALSO

-

-FS::dbdef_colgroup, FS::dbdef_record, FS::Record - - - - - - diff --git a/htdocs/docs/man/FS/dbdef_table.html b/htdocs/docs/man/FS/dbdef_table.html deleted file mode 100644 index a2442729f..000000000 --- a/htdocs/docs/man/FS/dbdef_table.html +++ /dev/null @@ -1,144 +0,0 @@ - - -FS::dbdef_table - Table objects - - - - - - - -

- - -
-

-

NAME

-

-FS::dbdef_table - Table objects - -

-


-

SYNOPSIS

-

-

  use FS::dbdef_table;
-
-

-

  $dbdef_table = new FS::dbdef_table (
-    "table_name",
-    "primary_key",
-    $FS_dbdef_unique_object,
-    $FS_dbdef_index_object,
-    @FS_dbdef_column_objects,
-  );
-
-

-

  $dbdef_table->addcolumn ( $FS_dbdef_column_object );
-
-

-

  $table_name = $dbdef_table->name;
-  $dbdef_table->name ("table_name");
-
-

-

  $table_name = $dbdef_table->primary_keye;
-  $dbdef_table->primary_key ("primary_key");
-
-

-

  $FS_dbdef_unique_object = $dbdef_table->unique;
-  $dbdef_table->unique ( $FS_dbdef_unique_object );
-
-

-

  $FS_dbdef_index_object = $dbdef_table->index;
-  $dbdef_table->index ( $FS_dbdef_index_object );
-
-

-

  @column_names = $dbdef->columns;
-
-

-

  $FS_dbdef_column_object = $dbdef->column;
-
-

-

  @sql_statements = $dbdef->sql_create_table;
-  @sql_statements = $dbdef->sql_create_table $datasrc;
-
-

-


-

DESCRIPTION

-

-FS::dbdef_table objects represent a single database table. - -

-


-

METHODS

-
-
new
-

-Creates a new FS::dbdef_table object. - -

addcolumn
-

-Adds this FS::dbdef_column object. - -

name
-

-Returns or sets the table name. - -

primary_key
-

-Returns or sets the primary key. - -

unique
-

-Returns or sets the FS::dbdef_unique object. - -

index
-

-Returns or sets the FS::dbdef_index object. - -

columns
-

-Returns a list consisting of the names of all columns. - -

column "column"
-

-Returns the column object (see FS::dbdef_column) for ``column''. - -

sql_create_table [ $datasrc ]
-

-Returns an array of SQL statments to create this table. - -

-If passed a DBI $datasrc specifying DBD::mysql, will use MySQL-specific syntax. Non-standard syntax for other engines (if -applicable) may also be supported in the future. - -

-

-


-

BUGS

-

-


-

SEE ALSO

-

-FS::dbdef, FS::dbdef_unique, FS::dbdef_index, FS::dbdef_unique, -DBI - - - -

-


-

VERSION

-

-$Id: dbdef_table.html,v 1.2 2000-03-03 18:22:43 ivan Exp $ - - - - diff --git a/htdocs/docs/man/FS/dbdef_unique.html b/htdocs/docs/man/FS/dbdef_unique.html deleted file mode 100644 index 201f3aa61..000000000 --- a/htdocs/docs/man/FS/dbdef_unique.html +++ /dev/null @@ -1,58 +0,0 @@ - - -FS::dbdef_unique.pm - Unique object - - - - - - - -

- - -
-

-

NAME

-

-FS::dbdef_unique.pm - Unique object - -

-


-

SYNOPSIS

-

-

  use FS::dbdef_unique;
-
-

-

  # see FS::dbdef_colgroup methods
-
-

-


-

DESCRIPTION

-

-FS::dbdef_unique objects represent the unique indices of a database table (FS::dbdef_table). FS::dbdef_unique inherits from FS::dbdef_colgroup. - -

-


-

BUGS

-

-Is this empty subclass needed? - -

-


-

SEE ALSO

-

-FS::dbdef_colgroup, FS::dbdef_record, FS::Record - - - - - - diff --git a/htdocs/docs/man/FS/domain_record.html b/htdocs/docs/man/FS/domain_record.html deleted file mode 100644 index 78601b4d0..000000000 --- a/htdocs/docs/man/FS/domain_record.html +++ /dev/null @@ -1,122 +0,0 @@ - - -FS::domain_record - Object methods for domain_record records - - - - - - - - -

- - -
-

-

NAME

-

FS::domain_record - Object methods for domain_record records

-

-


-

SYNOPSIS

-
-  use FS::domain_record;
-
-  $record = new FS::domain_record \%hash;
-  $record = new FS::domain_record { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::domain_record object represents an entry in a DNS zone. -FS::domain_record inherits from FS::Record. The following fields are currently -supported:

-
-
recnum - primary key
-
-
svcnum - Domain (see the FS::svc_domain manpage) of this entry
-
-
reczone - partial (or full) zone for this entry
-
-
recaf - address family for this entry, currently only `IN' is recognized.
-
-
rectype - record type for this entry (A, MX, etc.)
-
-
recdata - data for this entry
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new entry. To add the example to the database, see insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Delete this record from the database. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. -

-

-


-

VERSION

-

$Id: domain_record.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

-

-


-

BUGS

-

The data validation doesn't check everything it could. In particular, -there is no protection against bad data that passes the regex, duplicate -SOA records, forgetting the trailing `.', impossible IP addersses, etc. Of -course, it's still better than editing the zone files directly. :)

-

-


-

SEE ALSO

-

the FS::Record manpage, schema.html from the base documentation.

-

-


-

HISTORY

-

$Log: domain_record.html,v $ -

Revision 1.1 2001-04-23 12:41:57 ivan -

new API documentation -

-Revision 1.1 2000/02/03 05:16:52 ivan -beginning of DNS and Apache support

- - - - diff --git a/htdocs/docs/man/FS/nas.html b/htdocs/docs/man/FS/nas.html deleted file mode 100644 index db704c777..000000000 --- a/htdocs/docs/man/FS/nas.html +++ /dev/null @@ -1,117 +0,0 @@ - - -FS::nas - Object methods for nas records - - - - - - - - - - - -
-

-

NAME

-

FS::nas - Object methods for nas records

-

-


-

SYNOPSIS

-
-  use FS::nas;
-
-  $record = new FS::nas \%hash;
-  $record = new FS::nas {
-    'nasnum'  => 1,
-    'nasip'   => '10.4.20.23',
-    'nasfqdn' => 'box1.brc.nv.us.example.net',
-  };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $error = $record->heartbeat($timestamp);
-

-


-

DESCRIPTION

-

An FS::nas object represents an Network Access Server on your network, such as -a terminal server or equivalent. FS::nas inherits from FS::Record. The -following fields are currently supported:

-
-
nasnum - primary key
-
-
nas - NAS name
-
-
nasip - NAS ip address
-
-
nasfqdn - NAS fully-qualified domain name
-
-
last - timestamp indicating the last instant the NAS was in a known - state (used by the session monitoring).
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new NAS. To add the NAS to the database, see insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Delete this record from the database. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. -

-
heartbeat TIMESTAMP
-
-Updates the timestamp for this nas -

-

-


-

VERSION

-

$Id: nas.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/part_pkg.html b/htdocs/docs/man/FS/part_pkg.html deleted file mode 100644 index 4bf46742e..000000000 --- a/htdocs/docs/man/FS/part_pkg.html +++ /dev/null @@ -1,138 +0,0 @@ - - -FS::part_pkg - Object methods for part_pkg objects - - - - - - - - - - - -
-

-

NAME

-

FS::part_pkg - Object methods for part_pkg objects

-

-


-

SYNOPSIS

-
-  use FS::part_pkg;
-
-  $record = new FS::part_pkg \%hash
-  $record = new FS::part_pkg { 'column' => 'value' };
-
-  $custom_record = $template_record->clone;
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  @pkg_svc = $record->pkg_svc;
-
-  $svcnum = $record->svcpart;
-  $svcnum = $record->svcpart( 'svc_acct' );
-

-


-

DESCRIPTION

-

An FS::part_pkg object represents a billing item definition. FS::part_pkg -inherits from FS::Record. The following fields are currently supported:

-
-
pkgpart - primary key (assigned automatically for new billing item definitions)
-
-
pkg - Text name of this billing item definition (customer-viewable)
-
-
comment - Text name of this billing item definition (non-customer-viewable)
-
-
setup - Setup fee
-
-
freq - Frequency of recurring fee
-
-
recur - Recurring fee
-
-
-

setup and recur are evaluated as Safe perl expressions. You can use numbers -just as you would normally. More advanced semantics are not yet defined.

-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new billing item definition. To add the billing item definition to -the database, see insert. -

-
clone
-
-An alternate constructor. Creates a new billing item definition by duplicating -an existing definition. A new pkgpart is assigned and `(CUSTOM) ' is prepended -to the comment field. To add the billing item definition to the database, see -insert. -

-
insert
-
-Adds this billing item definition to the database. If there is an error, -returns the error, otherwise returns false. -

-
delete
-
-Currently unimplemented. -

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid billing item definition. If -there is an error, returns the error, otherwise returns false. Called by the -insert and replace methods. -

-
pkg_svc
-
-Returns all FS::pkg_svc objects (see the FS::pkg_svc manpage) for this package -definition (with non-zero quantity). -

-
svcpart [ SVCDB ]
-
-Returns the svcpart of a single service definition (see the FS::part_svc manpage) -associated with this billing item definition (see the FS::pkg_svc manpage). Returns -false if there not exactly one service definition with quantity 1, or if -SVCDB is specified and does not match the svcdb of the service definition, -

-

-


-

VERSION

-

$Id: part_pkg.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

The delete method is unimplemented.

-

setup and recur semantics are not yet defined (and are implemented in -FS::cust_bill. hmm.).

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_pkg manpage, the FS::type_pkgs manpage, the FS::pkg_svc manpage, Safe. -schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/part_referral.html b/htdocs/docs/man/FS/part_referral.html deleted file mode 100644 index 61f49de04..000000000 --- a/htdocs/docs/man/FS/part_referral.html +++ /dev/null @@ -1,100 +0,0 @@ - - -FS::part_referral - Object methods for part_referral objects - - - - - - - - - - - -
-

-

NAME

-

FS::part_referral - Object methods for part_referral objects

-

-


-

SYNOPSIS

-
-  use FS::part_referral;
-
-  $record = new FS::part_referral \%hash
-  $record = new FS::part_referral { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::part_referral represents a referral - where a customer heard of your -services. This can be used to track the effectiveness of a particular piece of -advertising, for example. FS::part_referral inherits from FS::Record. The -following fields are currently supported:

-
-
refnum - primary key (assigned automatically for new referrals)
-
-
referral - Text name of this referral
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new referral. To add the referral to the database, see insert. -

-
insert
-
-Adds this referral to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Currently unimplemented. -

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid referral. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

-

-


-

VERSION

-

$Id: part_referral.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

The delete method is unimplemented.

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_main manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/part_svc.html b/htdocs/docs/man/FS/part_svc.html deleted file mode 100644 index d5a521f5c..000000000 --- a/htdocs/docs/man/FS/part_svc.html +++ /dev/null @@ -1,110 +0,0 @@ - - -FS::part_svc - Object methods for part_svc objects - - - - - - - - - - - -
-

-

NAME

-

FS::part_svc - Object methods for part_svc objects

-

-


-

SYNOPSIS

-
-  use FS::part_svc;
-
-  $record = new FS::part_referral \%hash
-  $record = new FS::part_referral { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::part_svc represents a service definition. FS::part_svc inherits from -FS::Record. The following fields are currently supported:

-
-
svcpart - primary key (assigned automatically for new service definitions)
-
-
svc - text name of this service definition
-
-
svcdb - table used for this service. See the FS::svc_acct manpage, -the FS::svc_domain manpage, and the FS::svc_acct_sm manpage, among others.
-
-
svcdb__field - Default or fixed value for field in svcdb.
-
-
svcdb__field_flag - defines svcdb__field action: null, `D' for default, or `F' for fixed
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new service definition. To add the service definition to the -database, see insert. -

-
insert
-
-Adds this service definition to the database. If there is an error, returns -the error, otherwise returns false. -

-
delete
-
-Currently unimplemented. -

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid service definition. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. -

-

-


-

VERSION

-

$Id: part_svc.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

Delete is unimplemented.

-

The list of svc_* tables is hardcoded. When svc_acct_pop is renamed, this -should be fixed.

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::part_pkg manpage, the FS::pkg_svc manpage, the FS::cust_svc manpage, -the FS::svc_acct manpage, the FS::svc_acct_sm manpage, the FS::svc_domain manpage, schema.html from the -base documentation.

- - - - diff --git a/htdocs/docs/man/FS/pkg_svc.html b/htdocs/docs/man/FS/pkg_svc.html deleted file mode 100644 index 31592d4bd..000000000 --- a/htdocs/docs/man/FS/pkg_svc.html +++ /dev/null @@ -1,115 +0,0 @@ - - -FS::pkg_svc - Object methods for pkg_svc records - - - - - - - - - - - -
-

-

NAME

-

FS::pkg_svc - Object methods for pkg_svc records

-

-


-

SYNOPSIS

-
-  use FS::pkg_svc;
-
-  $record = new FS::pkg_svc \%hash;
-  $record = new FS::pkg_svc { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $part_pkg = $record->part_pkg;
-
-  $part_svc = $record->part_svc;
-

-


-

DESCRIPTION

-

An FS::pkg_svc record links a billing item definition (see the FS::part_pkg manpage) to -a service definition (see the FS::part_svc manpage). FS::pkg_svc inherits from -FS::Record. The following fields are currently supported:

-
-
pkgpart - Billing item definition (see the FS::part_pkg manpage)
-
-
svcpart - Service definition (see the FS::part_svc manpage)
-
-
quantity - Quantity of this service definition that this billing item -definition includes
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Create a new record. To add the record to the database, see insert. -

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Deletes this record from the database. If there is an error, returns the -error, otherwise returns false. -

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid record. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

-
part_pkg
-
-Returns the FS::part_pkg object (see the FS::part_pkg manpage). -

-
part_svc
-
-Returns the FS::part_svc object (see the FS::part_svc manpage). -

-

-


-

VERSION

-

$Id: pkg_svc.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::part_pkg manpage, the FS::part_svc manpage, schema.html from the base -documentation.

- - - - diff --git a/htdocs/docs/man/FS/port.html b/htdocs/docs/man/FS/port.html deleted file mode 100644 index b747f0ca3..000000000 --- a/htdocs/docs/man/FS/port.html +++ /dev/null @@ -1,120 +0,0 @@ - - -FS::port - Object methods for port records - - - - - - - - - - - -
-

-

NAME

-

FS::port - Object methods for port records

-

-


-

SYNOPSIS

-
-  use FS::port;
-
-  $record = new FS::port \%hash;
-  $record = new FS::port { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $session = $port->session;
-

-


-

DESCRIPTION

-

An FS::port object represents an individual port on a NAS. FS::port inherits -from FS::Record. The following fields are currently supported:

-
-
portnum - primary key
-
-
ip - IP address of this port
-
-
nasport - port number on the NAS
-
-
nasnum - NAS this port is on - see the FS::nas manpage
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new port. To add the example to the database, see insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Delete this record from the database. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. -

-
session
-
-Returns the currently open session on this port, or if no session is currently -open, the most recent session. See the FS::session manpage. -

-

-


-

VERSION

-

$Id: port.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

-

-


-

BUGS

-

The author forgot to customize this manpage.

-

The session method won't deal well if you have multiple open sessions on a -port, for example if your RADIUS server drops stop records. Suggestions for -how to deal with this sort of lossage welcome; should we close the session -when we get a new session on that port? Tag it as invalid somehow? Close it -one second after it was opened? *sigh* Maybe FS::session shouldn't let you -create overlapping sessions, at least folks will find out their logging is -dropping records.

-

If you think the above refers multiple user logins you need to read the -manpages again.

-

-


-

SEE ALSO

-

the FS::Record manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/prepay_credit.html b/htdocs/docs/man/FS/prepay_credit.html deleted file mode 100644 index 699b1c16f..000000000 --- a/htdocs/docs/man/FS/prepay_credit.html +++ /dev/null @@ -1,118 +0,0 @@ - - -FS::prepay_credit - Object methods for prepay_credit records - - - - - - - - - - - -
-

-

NAME

-

FS::prepay_credit - Object methods for prepay_credit records

-

-


-

SYNOPSIS

-
-  use FS::prepay_credit;
-
-  $record = new FS::prepay_credit \%hash;
-  $record = new FS::prepay_credit {
-    'identifier' => '4198123455512121'
-    'amount'     => '19.95',
-  };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::table_name object represents an pre--paid credit, such as a pre-paid -``calling card''. FS::prepay_credit inherits from FS::Record. The following -fields are currently supported:

-
-
field - description
-
-
identifier - identifier entered by the user to receive the credit
-
-
amount - amount of the credit
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new pre-paid credit. To add the example to the database, see -insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Delete this record from the database. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid pre-paid credit. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. -

-

-


-

VERSION

-

$Id: prepay_credit.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, schema.html from the base documentation.

-

-


-

HISTORY

-

$Log: prepay_credit.html,v $ -

Revision 1.1 2001-04-23 12:41:57 ivan -

new API documentation -

-Revision 1.2 2000/02/02 20:22:18 ivan -bugfix prepayment in signup server

-

Revision 1.1 2000/01/31 05:22:23 ivan -prepaid ``internet cards''

- - - - diff --git a/htdocs/docs/man/FS/session.html b/htdocs/docs/man/FS/session.html deleted file mode 100644 index c714337be..000000000 --- a/htdocs/docs/man/FS/session.html +++ /dev/null @@ -1,129 +0,0 @@ - - -FS::session - Object methods for session records - - - - - - - - - - - -
-

-

NAME

-

FS::session - Object methods for session records

-

-


-

SYNOPSIS

-
-  use FS::session;
-
-  $record = new FS::session \%hash;
-  $record = new FS::session {
-    'portnum' => 1,
-    'svcnum'  => 2,
-    'login'   => $timestamp,
-    'logout'  => $timestamp,
-  };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $error = $record->nas_heartbeat($timestamp);
-

-


-

DESCRIPTION

-

An FS::session object represents an user login session. FS::session inherits -from FS::Record. The following fields are currently supported:

-
-
sessionnum - primary key
-
-
portnum - NAS port for this session - see the FS::port manpage
-
-
svcnum - User for this session - see the FS::svc_acct manpage
-
-
login - timestamp indicating the beginning of this user session.
-
-
logout - timestamp indicating the end of this user session. May be null, - which indicates a currently open session.
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new session. To add the session to the database, see insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. If the `login' field is empty, it is replaced with -the current time. -

-
delete
-
-Delete this record from the database. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. If the `logout' field is empty, -it is replaced with the current time. -

-
check
-
-Checks all fields to make sure this is a valid session. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. -

-
nas_heartbeat
-
-Heartbeats the nas associated with this session (see the FS::nas manpage). -

-
svc_acct
-
-Returns the svc_acct record associated with this session (see the FS::svc_acct manpage). -

-

-


-

VERSION

-

$Id: session.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

-

-


-

BUGS

-

Maybe you shouldn't be able to insert a session if there's currently an open -session on that port. Or maybe the open session on that port should be flagged -as problematic? autoclosed? *sigh*

-

Hmm, sessions refer to current svc_acct records... probably need to constrain -deletions to svc_acct records such that no svc_acct records are deleted which -have a session (even if long-closed).

-

-


-

SEE ALSO

-

the FS::Record manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/svc_Common.html b/htdocs/docs/man/FS/svc_Common.html deleted file mode 100644 index 7ce9ff36a..000000000 --- a/htdocs/docs/man/FS/svc_Common.html +++ /dev/null @@ -1,94 +0,0 @@ - - -FS::svc_Common - Object method for all svc_ records - - - - - - - - - - - -
-

-

NAME

-

FS::svc_Common - Object method for all svc_ records

-

-


-

SYNOPSIS

-

use FS::svc_Common;

-

@ISA = qw( FS::svc_Common );

-

-


-

DESCRIPTION

-

FS::svc_Common is intended as a base class for table-specific classes to -inherit from, i.e. FS::svc_acct. FS::svc_Common inherits from FS::Record.

-

-


-

METHODS

-
-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

The additional fields pkgnum and svcpart (see the FS::cust_svc manpage) should be -defined. An FS::cust_svc record will be created and inserted.

-

-
delete
-
-Deletes this account from the database. If there is an error, returns the -error, otherwise returns false. -

The corresponding FS::cust_svc record will be deleted as well.

-

-
setfixed
-
-Sets any fixed fields for this service (see the FS::part_svc manpage). If there is an -error, returns the error, otherwise returns the FS::part_svc object (use ref() -to test the return). Usually called by the check method. -

-
setdefault
-
-Sets all fields to their defaults (see the FS::part_svc manpage), overriding their -current values. If there is an error, returns the error, otherwise returns -the FS::part_svc object (use ref() to test the return). -

-
suspend
-
-
unsuspend
-
-
cancel
-
-Stubs - return false (no error) so derived classes don't need to define these -methods. Called by the cancel method of FS::cust_pkg (see the FS::cust_pkg manpage). -

-

-


-

VERSION

-

$Id: svc_Common.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

The setfixed method return value.

-

The new method should set defaults from part_svc (like the check method -sets fixed values)?

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::cust_svc manpage, the FS::part_svc manpage, the FS::cust_pkg manpage, schema.html -from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/svc_acct.html b/htdocs/docs/man/FS/svc_acct.html deleted file mode 100644 index 524fe3324..000000000 --- a/htdocs/docs/man/FS/svc_acct.html +++ /dev/null @@ -1,219 +0,0 @@ - - -FS::svc_acct - Object methods for svc_acct records - - - - - - - - - - - -
-

-

NAME

-

FS::svc_acct - Object methods for svc_acct records

-

-


-

SYNOPSIS

-
-  use FS::svc_acct;
-
-  $record = new FS::svc_acct \%hash;
-  $record = new FS::svc_acct { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $error = $record->suspend;
-
-  $error = $record->unsuspend;
-
-  $error = $record->cancel;
-
-  %hash = $record->radius;
-

-


-

DESCRIPTION

-

An FS::svc_acct object represents an account. FS::svc_acct inherits from -FS::svc_Common. The following fields are currently supported:

-
-
svcnum - primary key (assigned automatcially for new accounts)
-
-
username
-
-
_password - generated if blank
-
-
popnum - Point of presence (see the FS::svc_acct_pop manpage)
-
-
uid
-
-
gid
-
-
finger - GECOS
-
-
dir - set automatically if blank (and uid is not)
-
-
shell
-
-
quota - (unimplementd)
-
-
slipip - IP address
-
-
radius_Radius_Attribute - Radius-Attribute
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new account. To add the account to the database, see insert. -

-
insert
-
-Adds this account to the database. If there is an error, returns the error, -otherwise returns false. -

The additional fields pkgnum and svcpart (see the FS::cust_svc manpage) should be -defined. An FS::cust_svc record will be created and inserted.

-

If the configuration value (see the FS::Conf manpage) shellmachine exists, and the -username, uid, and dir fields are defined, the command(s) specified in -the shellmachine-useradd configuration are exectued on shellmachine via ssh. -This behaviour can be surpressed by setting $FS::svc_acct::nossh_hack true. -If the shellmachine-useradd configuration file does not exist,

-
-  useradd -d $dir -m -s $shell -u $uid $username
-

is the default. If the shellmachine-useradd configuration file exists but -it empty,

-
-  cp -pr /etc/skel $dir; chown -R $uid.$gid $dir
-

is the default instead. Otherwise the contents of the file are treated as -a double-quoted perl string, with the following variables available: -$username, $uid, $gid, $dir, and $shell.

-

-
delete
-
-Deletes this account from the database. If there is an error, returns the -error, otherwise returns false. -

The corresponding FS::cust_svc record will be deleted as well.

-

If the configuration value (see the FS::Conf manpage) shellmachine exists, the -command(s) specified in the shellmachine-userdel configuration file are -executed on shellmachine via ssh. This behavior can be surpressed by setting -$FS::svc_acct::nossh_hack true. If the shellmachine-userdel configuration -file does not exist,

-
-  userdel $username
-

is the default. If the shellmachine-userdel configuration file exists but -is empty,

-
-  rm -rf $dir
-

is the default instead. Otherwise the contents of the file are treated as a -double-quoted perl string, with the following variables available: -$username and $dir.

-

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

If the configuration value (see the FS::Conf manpage) shellmachine exists, and the -dir field has changed, the command(s) specified in the shellmachine-usermod -configuraiton file are executed on shellmachine via ssh. This behavior can -be surpressed by setting $FS::svc-acct::nossh_hack true. If the -shellmachine-userdel configuration file does not exist or is empty, :

-
-  [ -d $old_dir ] && mv $old_dir $new_dir || (
-    chmod u+t $old_dir;
-    mkdir $new_dir;
-    cd $old_dir;
-    find . -depth -print | cpio -pdm $new_dir;
-    chmod u-t $new_dir;
-    chown -R $uid.$gid $new_dir;
-    rm -rf $old_dir
-  )
-

is executed on shellmachine via ssh. This behaviour can be surpressed by -setting $FS::svc_acct::nossh_hack true.

-

-
suspend
-
-Suspends this account by prefixing *SUSPENDED* to the password. If there is an -error, returns the error, otherwise returns false. -

Called by the suspend method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
unsuspend
-
-Unsuspends this account by removing *SUSPENDED* from the password. If there is -an error, returns the error, otherwise returns false. -

Called by the unsuspend method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
cancel
-
-Just returns false (no error) for now. -

Called by the cancel method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
check
-
-Checks all fields to make sure this is a valid service. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

Sets any fixed values; see the FS::part_svc manpage.

-

-
radius
-
-Depriciated, use radius_reply instead. -

-
radius_reply
-
-Returns key/value pairs, suitable for assigning to a hash, for any RADIUS -reply attributes of this record. -

Note that this is now the preferred method for reading RADIUS attributes - -accessing the columns directly is discouraged, as the column names are -expected to change in the future.

-

-
radius_check
-
-Returns key/value pairs, suitable for assigning to a hash, for any RADIUS -check attributes of this record. -

Accessing RADIUS attributes directly is not supported and will break in the -future.

-

-

-


-

VERSION

-

$Id: svc_acct.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

The bits which ssh should fork before doing so (or maybe queue jobs for a -daemon).

-

The $recref stuff in sub check should be cleaned up.

-

The suspend, unsuspend and cancel methods update the database, but not the -current object. This is probably a bug as it's unexpected and -counterintuitive.

-

-


-

SEE ALSO

-

the FS::svc_Common manpage, the FS::Record manpage, the FS::Conf manpage, the FS::cust_svc manpage, -the FS::part_svc manpage, the FS::cust_pkg manpage, the Net::SSH manpage, ssh, the FS::svc_acct_pop manpage, -schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/svc_acct_pop.html b/htdocs/docs/man/FS/svc_acct_pop.html deleted file mode 100644 index e8c6f35d5..000000000 --- a/htdocs/docs/man/FS/svc_acct_pop.html +++ /dev/null @@ -1,107 +0,0 @@ - - -FS::svc_acct_pop - Object methods for svc_acct_pop records - - - - - - - - - - - -
-

-

NAME

-

FS::svc_acct_pop - Object methods for svc_acct_pop records

-

-


-

SYNOPSIS

-
-  use FS::svc_acct_pop;
-
-  $record = new FS::svc_acct_pop \%hash;
-  $record = new FS::svc_acct_pop { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::svc_acct object represents an point of presence. FS::svc_acct_pop -inherits from FS::Record. The following fields are currently supported:

-
-
popnum - primary key (assigned automatically for new accounts)
-
-
city
-
-
state
-
-
ac - area code
-
-
exch - exchange
-
-
loc - rest of number
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new point of presence (if only it were that easy!). To add the -point of presence to the database, see insert. -

-
insert
-
-Adds this point of presence to the database. If there is an error, returns the -error, otherwise returns false. -

-
delete
-
-Removes this point of presence from the database. -

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid point of presence. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. -

-

-


-

VERSION

-

$Id: svc_acct_pop.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

It should be renamed to part_pop.

-

-


-

SEE ALSO

-

the FS::Record manpage, the svc_acct manpage, schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/svc_acct_sm.html b/htdocs/docs/man/FS/svc_acct_sm.html deleted file mode 100644 index 1f513536d..000000000 --- a/htdocs/docs/man/FS/svc_acct_sm.html +++ /dev/null @@ -1,141 +0,0 @@ - - -FS::svc_acct_sm - Object methods for svc_acct_sm records - - - - - - - - - - - -
-

-

NAME

-

FS::svc_acct_sm - Object methods for svc_acct_sm records

-

-


-

SYNOPSIS

-
-  use FS::svc_acct_sm;
-
-  $record = new FS::svc_acct_sm \%hash;
-  $record = new FS::svc_acct_sm { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $error = $record->suspend;
-
-  $error = $record->unsuspend;
-
-  $error = $record->cancel;
-

-


-

DESCRIPTION

-

An FS::svc_acct object represents a virtual mail alias. FS::svc_acct inherits -from FS::Record. The following fields are currently supported:

-
-
svcnum - primary key (assigned automatcially for new accounts)
-
-
domsvc - svcnum of the virtual domain (see the FS::svc_domain manpage)
-
-
domuid - uid of the target account (see the FS::svc_acct manpage)
-
-
domuser - virtual username
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new virtual mail alias. To add the virtual mail alias to the -database, see insert. -

-
insert
-
-Adds this virtual mail alias to the database. If there is an error, returns -the error, otherwise returns false. -

The additional fields pkgnum and svcpart (see the FS::cust_svc manpage) should be -defined. An FS::cust_svc record will be created and inserted.

-

If the configuration values (see the FS::Conf manpage) shellmachine and qmailmachines -exist, and domuser is `*' (meaning a catch-all mailbox), the command:

-
-  [ -e $dir/.qmail-$qdomain-default ] || {
-    touch $dir/.qmail-$qdomain-default;
-    chown $uid:$gid $dir/.qmail-$qdomain-default;
-  }
-

is executed on shellmachine via ssh (see dot-qmail/``EXTENSION ADDRESSES''). -This behaviour can be surpressed by setting $FS::svc_acct_sm::nossh_hack true.

-

-
delete
-
-Deletes this virtual mail alias from the database. If there is an error, -returns the error, otherwise returns false. -

The corresponding FS::cust_svc record will be deleted as well.

-

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
suspend
-
-Just returns false (no error) for now. -

Called by the suspend method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
unsuspend
-
-Just returns false (no error) for now. -

Called by the unsuspend method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
cancel
-
-Just returns false (no error) for now. -

Called by the cancel method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
check
-
-Checks all fields to make sure this is a valid virtual mail alias. If there is -an error, returns the error, otherwise returns false. Called by the insert and -replace methods. -

Sets any fixed values; see the FS::part_svc manpage.

-

-

-


-

VERSION

-

$Id: svc_acct_sm.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

The remote commands should be configurable.

-

The $recref stuff in sub check should be cleaned up.

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::Conf manpage, the FS::cust_svc manpage, the FS::part_svc manpage, the FS::cust_pkg manpage, -the FS::svc_acct manpage, the FS::svc_domain manpage, the Net::SSH manpage, ssh, dot-qmail, -schema.html from the base documentation.

- - - - diff --git a/htdocs/docs/man/FS/svc_domain.html b/htdocs/docs/man/FS/svc_domain.html deleted file mode 100644 index 5c75ab221..000000000 --- a/htdocs/docs/man/FS/svc_domain.html +++ /dev/null @@ -1,162 +0,0 @@ - - -FS::svc_domain - Object methods for svc_domain records - - - - - - - - - - - -
-

-

NAME

-

FS::svc_domain - Object methods for svc_domain records

-

-


-

SYNOPSIS

-
-  use FS::svc_domain;
-
-  $record = new FS::svc_domain \%hash;
-  $record = new FS::svc_domain { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $error = $record->suspend;
-
-  $error = $record->unsuspend;
-
-  $error = $record->cancel;
-

-


-

DESCRIPTION

-

An FS::svc_domain object represents a domain. FS::svc_domain inherits from -FS::svc_Common. The following fields are currently supported:

-
-
svcnum - primary key (assigned automatically for new accounts)
-
-
domain
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new domain. To add the domain to the database, see insert. -

-
insert
-
-Adds this domain to the database. If there is an error, returns the error, -otherwise returns false. -

The additional fields pkgnum and svcpart (see the FS::cust_svc manpage) should be -defined. An FS::cust_svc record will be created and inserted.

-

The additional field action should be set to N for new domains or M -for transfers.

-

A registration or transfer email will be submitted unless -$FS::svc_domain::whois_hack is true.

-

The additional field email can be used to manually set the admin contact -email address on this email. Otherwise, the svc_acct records for this package -(see the FS::cust_pkg manpage) are searched. If there is exactly one svc_acct record -in the same package, it is automatically used. Otherwise an error is returned.

-

If any soamachine configuration file exists, an SOA record is added to -the domain_record table (see <FS::domain_record>).

-

If any machines are defined in the nsmachines configuration file, NS -records are added to the domain_record table (see the FS::domain_record manpage).

-

If any machines are defined in the mxmachines configuration file, MX -records are added to the domain_record table (see the FS::domain_record manpage).

-

Any problems adding FS::domain_record records will emit warnings, but will -not return errors from this method. If your configuration files are correct -you shouln't have any problems.

-

-
delete
-
-Deletes this domain from the database. If there is an error, returns the -error, otherwise returns false. -

The corresponding FS::cust_svc record will be deleted as well.

-

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
suspend
-
-Just returns false (no error) for now. -

Called by the suspend method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
unsuspend
-
-Just returns false (no error) for now. -

Called by the unsuspend method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
cancel
-
-Just returns false (no error) for now. -

Called by the cancel method of FS::cust_pkg (see the FS::cust_pkg manpage).

-

-
check
-
-Checks all fields to make sure this is a valid domain. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

Sets any fixed values; see the FS::part_svc manpage.

-

-
whois
-
-Returns the Net::Whois::Domain object (see the Net::Whois manpage) for this domain, or -undef if the domain is not found in whois. -

(If $FS::svc_domain::whois_hack is true, returns that in all cases instead.)

-

-
_whois
-
-Depriciated. -

-
submit_internic
-
-Submits a registration email for this domain. -

-

-


-

VERSION

-

$Id: svc_domain.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

All BIND/DNS fields should be included (and exported).

-

Delete doesn't send a registration template.

-

All registries should be supported.

-

Should change action to a real field.

-

The $recref stuff in sub check should be cleaned up.

-

-


-

SEE ALSO

-

the FS::svc_Common manpage, the FS::Record manpage, the FS::Conf manpage, the FS::cust_svc manpage, -the FS::part_svc manpage, the FS::cust_pkg manpage, the Net::Whois manpage, ssh, -dot-qmail, schema.html from the base documentation, config.html from the -base documentation.

- - - - diff --git a/htdocs/docs/man/FS/svc_www.html b/htdocs/docs/man/FS/svc_www.html deleted file mode 100644 index 8f3a99a64..000000000 --- a/htdocs/docs/man/FS/svc_www.html +++ /dev/null @@ -1,150 +0,0 @@ - - -FS::svc_www - Object methods for svc_www records - - - - - - - - - - - -
-

-

NAME

-

FS::svc_www - Object methods for svc_www records

-

-


-

SYNOPSIS

-
-  use FS::svc_www;
-
-  $record = new FS::svc_www \%hash;
-  $record = new FS::svc_www { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-
-  $error = $record->suspend;
-
-  $error = $record->unsuspend;
-
-  $error = $record->cancel;
-

-


-

DESCRIPTION

-

An FS::svc_www object represents an web virtual host. FS::svc_www inherits -from FS::svc_Common. The following fields are currently supported:

-
-
svcnum - primary key
-
-
recnum - DNS `A' record corresponding to this web virtual host. (see the FS::domain_record manpage)
-
-
usersvc - account (see the FS::svc_acct manpage) corresponding to this web virtual host.
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Creates a new web virtual host. To add the record to the database, see -insert. -

Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the hash method.

-

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

The additional fields pkgnum and svcpart (see the FS::cust_svc manpage) should be -defined. An FS::cust_svc record will be created and inserted.

-

If the configuration values (see the FS::Conf manpage) apachemachine, and -apacheroot exist, the command:

-
-  mkdir $apacheroot/$zone;
-  chown $username $apacheroot/$zone;
-  ln -s $apacheroot/$zone $homedir/$zone
-

$zone is the DNS A record pointed to by recnum -$username is the username pointed to by usersvc -$homedir is that user's home directory

-

is executed on apachemachine via ssh. This behaviour can be surpressed by -setting $FS::svc_www::nossh_hack true.

-

-
delete
-
-Delete this record from the database. -

-
replace OLD_RECORD
-
-Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
suspend
-
-Called by the suspend method of FS::cust_pkg (see the FS::cust_pkg manpage). -

-
unsuspend
-
-Called by the unsuspend method of FS::cust_pkg (see the FS::cust_pkg manpage). -

-
cancel
-
-Called by the cancel method of FS::cust_pkg (see the FS::cust_pkg manpage). -

-
check
-
-Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and repalce methods. -

-

-


-

VERSION

-

$Id: svc_www.html,v 1.1 2001-04-23 12:41:57 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::svc_Common manpage, the FS::Record manpage, the FS::domain_record manpage, the FS::cust_svc manpage, -the FS::part_svc manpage, the FS::cust_pkg manpage, schema.html from the base documentation.

-

-


-

HISTORY

-

$Log: svc_www.html,v $ -

Revision 1.1 2001-04-23 12:41:57 ivan -

new API documentation -

-Revision 1.4 2001/04/22 01:56:15 ivan -get rid of FS::SSH.pm (became Net::SSH and Net::SCP on CPAN)

-

Revision 1.3 2000/11/22 23:30:51 ivan -tyop

-

Revision 1.2 2000/03/01 08:13:59 ivan -compilation bugfixes

-

Revision 1.1 2000/02/03 05:16:52 ivan -beginning of DNS and Apache support

- - - - diff --git a/htdocs/docs/man/FS/type_pkgs.html b/htdocs/docs/man/FS/type_pkgs.html deleted file mode 100644 index 30b052b81..000000000 --- a/htdocs/docs/man/FS/type_pkgs.html +++ /dev/null @@ -1,100 +0,0 @@ - - -FS::type_pkgs - Object methods for type_pkgs records - - - - - - - - - - - -
-

-

NAME

-

FS::type_pkgs - Object methods for type_pkgs records

-

-


-

SYNOPSIS

-
-  use FS::type_pkgs;
-
-  $record = new FS::type_pkgs \%hash;
-  $record = new FS::type_pkgs { 'column' => 'value' };
-
-  $error = $record->insert;
-
-  $error = $new_record->replace($old_record);
-
-  $error = $record->delete;
-
-  $error = $record->check;
-

-


-

DESCRIPTION

-

An FS::type_pkgs record links an agent type (see the FS::agent_type manpage) to a -billing item definition (see the FS::part_pkg manpage). FS::type_pkgs inherits from -FS::Record. The following fields are currently supported:

-
-
typenum - Agent type, see the FS::agent_type manpage
-
-
pkgpart - Billing item definition, see the FS::part_pkg manpage
-
-
-

-


-

METHODS

-
-
new HASHREF
-
-Create a new record. To add the record to the database, see insert. -

-
insert
-
-Adds this record to the database. If there is an error, returns the error, -otherwise returns false. -

-
delete
-
-Deletes this record from the database. If there is an error, returns the -error, otherwise returns false. -

-
replace OLD_RECORD
-
-Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. -

-
check
-
-Checks all fields to make sure this is a valid record. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. -

-

-


-

VERSION

-

$Id: type_pkgs.html,v 1.3 2001-04-23 12:40:31 ivan Exp $

-

-


-

BUGS

-

-


-

SEE ALSO

-

the FS::Record manpage, the FS::agent_type manpage, the FS::part_pkgs manpage, schema.html from the base -documentation.

- - - - diff --git a/htdocs/docs/overview.dia b/htdocs/docs/overview.dia deleted file mode 100644 index a0e34c30e77f4fbebb734e44750c40ef07580f4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2800 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 H#fSd}JIN9x diff --git a/htdocs/docs/passwd.html b/htdocs/docs/passwd.html deleted file mode 100644 index a8f8151e2..000000000 --- a/htdocs/docs/passwd.html +++ /dev/null @@ -1,16 +0,0 @@ - - fs_passwd - - -

fs_passwd

-You may use fs_passwd/fs_passwd as a "passwd", "chfn" and "chsh" replacement on your shell machine(s) to cause password, gecos and shell changes to update your freeside machine. This can pose a security risk if not configured correctly. Do not use this feature unless you understand what you are doing! -

Currently it is assumed that the the crypt(3) function in the C library is the same on the Freeside machine as on the target machine. -
    -
  • Create a freeside account on the shell machine(s). -
  • Append the identity.pub from the freeside user on your freeside machine to the authorized_keys file of the newly created freeside user on the shell machine(s). -
  • Copy fs_passwd/fs_passwd to /usr/local/bin on the shell machine(s). (chown freeside, chmod 4755). You may link it to passwd, chfn and chsh as well. -
  • Copy fs_passwd/fs_passwdd to /usr/local/sbin on the shell machine(s). (chown freeside, chmod 500) -
  • Create /usr/local/freeside on the shell machine(s). (chown freeside, chmod 700) -
  • Run an iteration of "fs_passwd/fs_passwd_server shell.machine" as the freeside user for each shell machine (this is a daemon process). -
- diff --git a/htdocs/docs/postgresql.html b/htdocs/docs/postgresql.html deleted file mode 100755 index 151081176..000000000 --- a/htdocs/docs/postgresql.html +++ /dev/null @@ -1,23 +0,0 @@ - - PostgreSQL notes - - -

PostgreSQL notes

-

-PostgreSQL ships by default with a maximum of 31 character column names. If -you use arbitrary RADIUS attributes longer than 9 characters, fs-setup will -fail with `duplicate column' errors (in the part_svc table). -Solution: use a different database -engine, or recompile PostgreSQL with 64 character column names. -

-Future versions of Freeside will keep all column names under 31 characters to -avoid this problem. -

-

-( I've personally been unable to get PostgreSQL working with larger column names, -though the process does look like it should be straightforward. If anyone is -interested in assisting me with this, please get in touch. - -Ivan <ivan@sisd.com> ) -

- - diff --git a/htdocs/docs/schema.html b/htdocs/docs/schema.html deleted file mode 100644 index a61000f1f..000000000 --- a/htdocs/docs/schema.html +++ /dev/null @@ -1,264 +0,0 @@ - - Schema reference - - -

Schema reference

-
    -
  • agent - Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their agent type). -
      -
    • agentnum - primary key -
    • agent - name of this agent -
    • typenum - agent type -
    • prog - (unimplemented) -
    • freq - (unimplemented) -
    -
  • agent_type - Agent types define groups of packages that you can then assign to particular agents. -
      -
    • typenum - primary key -
    • atype - name of this agent type -
    -
  • cust_bill - Invoices. Declarations that a customer owes you money. The specific charges are itemized in cust_bill_pkg. -
      -
    • invnum - primary key -
    • custnum - customer -
    • _date -
    • charged - amount of this invoice -
    • printed - how many times this invoice has been printed automatically -
    -
  • cust_bill_pkg - Invoice line items -
      -
    • invnum - (multiple) key -
    • pkgnum - package or 0 for the special virtual sales tax package -
    • setup - setup fee -
    • recur - recurring fee -
    • sdate - starting date -
    • edate - ending date -
    -
  • cust_credit - Credits. The equivalent of a negative cust_bill record. -
      -
    • crednum - primary key -
    • custnum - customer -
    • amount - amount credited -
    • _date -
    • otaker - order taker -
    • reason -
    -
  • cust_main - Customers -
      -
    • custnum - primary key -
    • agentnum - agent -
    • refnum - referral -
    • titlenum - title -
    • first - name -
    • middle - name -
    • last - name -
    • ss - social security number -
    • company -
    • address1 -
    • address2 -
    • city -
    • county -
    • state -
    • zip -
    • country -
    • daytime - phone -
    • night - phone -
    • fax - phone -
    • payby - CARD, BILL, or COMP -
    • payinfo - card number, P.O.#, or comp issuer -
    • paydate - expiration date -
    • payname - billing name (name on card) -
    • tax - tax exempt, Y or null -
    • otaker - order taker -
    -
  • cust_main_invoice - Invoice destinations for email invoices. Note that a customer can have many email destinations for their invoice (either literal or via svcnum), but only one postal destination. -
      -
    • destnum - primary key -
    • custnum - customer -
    • dest - Invoice destination. Freeside supports three types of invoice delivery: send directly to a service defined in Freeside, send to an arbitrary email address, or print the invoice to a printer and have someone send it out via snail mail. Freeside determines which method to use based on the contents of the dest field. If the contents are numeric, a svcnum pointing to a valid service is expected in the field. If the contents are a string, a literal email address is expected to be in the field. If the special keyword `POST' is present, the snail mail method is used (which is the default if no cust_main_invoice records exist). Snail mail invoices get their address information from cust_main and are printed with the printer defined in the configuration files. -
    -
  • cust_main_county - Tax rates -
      -
    • taxnum - primary key -
    • state -
    • county -
    • country -
    • tax - % rate -
    -
  • cust_pay - Payments. Money being transferred from a customer. -
      -
    • paynum - primary key -
    • invnum - invoice -
    • paid - amount -
    • _date -
    • payby - CARD, BILL, or COMP -
    • payinfo - card number, P.O.#, or comp issuer -
    • paybatch - text field for tracking card processor batches -
    -
  • cust_pay_batch - Pending batch -
      -
    • trancode - 77 for charges -
    • cardnum -
    • exp - card expiration -
    • amount -
    • invnum - invoice -
    • custnum - customer -
    • payname - name on card -
    • first - name -
    • last - name -
    • address1 -
    • address2 -
    • city -
    • state -
    • zip -
    • country -
    -
  • cust_pkg - Customer billing items -
      -
    • pkgnum - primary key -
    • custnum - customer -
    • pkgpart - Package definition -
    • setup - date -
    • bill - next bill date -
    • susp - (past) suspension date -
    • expire - (future) cancellation date -
    • cancel - (past) cancellation date -
    • otaker - order taker -
    -
  • cust_refund - Refunds. The transfer of money to a customer; equivalent to a negative cust_pay record. -
      -
    • refundnum - primary key -
    • crednum - credit -
    • refund - amount -
    • _date -
    • payby - CARD, BILL or COMP -
    • payinfo - card number, P.O.#, or comp issuer -
    • otaker - order taker -
    -
  • cust_svc - Customer services - -
  • nas - Network Access Server (terminal server) -
      -
    • nasnum - primary key -
    • nas - NAS name -
    • nasip - NAS ip address -
    • nasfqdn - NAS fully-qualified domain name -
    • last - timestamp indicating the last instant the NAS was in a known state (used by the session monitoring). -
    -
  • part_pkg - Package definitions -
      -
    • pkgpart - primary key -
    • pkg - package name -
    • comment - non-customer visable package comment -
    • setup - setup fee -
    • freq - recurring frequency (months) -
    • recur - recurring fee -
    -
  • part_referral - Referral listing -
      -
    • refnum - primary key -
    • referral - referral -
    -
  • part_svc - Service definitions -
      -
    • svcpart - primary key -
    • svc - name of this service -
    • svcdb - table used for this service: svc_acct, svc_acct_sm, svc_domain, svc_charge or svc_wo -
    • table__field - Default or fixed value for field in table -
    • table__field_flag - null, D or F -
    -
  • part_title - Personal titles -
      -
    • titlenum - primary key -
    • title - personal title (`Dr.' or `Mr.') -
    -
  • pkg_svc - -
  • port - individual port on a nas -
      -
    • portnum - primary key -
    • ip - IP address of this port -
    • nasport - port number on the NAS -
    • nasnum - NAS -
    -
  • prepay_credit -
      -
    • prepaynum - primary key -
    • identifier - text or numeric string used to receive this credit -
    • amount - amount of credit -
    -
  • session -
      -
    • sessionnum - primary key -
    • portnum - Port -
    • svcnum - Account -
    • login - timestamp indicating the beginning of this user session. -
    • logout - timestamp indicating the end of this user session. May be null, which indicates a currently open session. -
    - -
  • svc_acct - Accounts -
      -
    • svcnum - primary key -
    • username -
    • _password -
    • popnum - Point of Presence -
    • uid -
    • gid -
    • finger - GECOS -
    • dir -
    • shell -
    • quota - (unimplementd) -
    • slipip - IP address -
    • radius_Radius_Attribute - Radius-Attribute -
    -
  • svc_acct_pop - Points of Presence -
      -
    • popnum - primary key -
    • city -
    • state -
    • ac - area code -
    • exch - exchange -
    • loc - rest of number -
    -
  • svc_acct_sm - Domain mail aliases - -
  • svc_domain - Domains - -
  • domain_record - Domain zone detail -
      -
    • recnum - primary key -
    • svcnum - Domain (by svcnum) -
    • reczone - zone for this line -
    • recaf - address family, usually IN -
    • rectype - type for this record (A, MX, etc.) -
    • recdata - data for this record -
    -
  • svc_www - -
  • type_pkgs - -
- diff --git a/htdocs/docs/session.html b/htdocs/docs/session.html deleted file mode 100644 index 7dac5fdf7..000000000 --- a/htdocs/docs/session.html +++ /dev/null @@ -1,54 +0,0 @@ - - Session monitor - - -

Session monitor

-

Installation

-For security reasons, the client portion of the session montior may run on one -or more external public machine(s). On these machines, install: -
    -
  • Perl (at l -east 5.004_05 for the 5.004 series or 5.005_03 for the 5.005 series. Don't enable experimental features like threads or the PerlIO abstraction layer.) -
  • FS::SessionClient (copy the fs_session/FS-SessionClient directory to the external machine, then: perl Makefile.PL; make; make install) -
-Then: -
    -
  • Add the user `freeside' to the the external machine. -
  • Create the /usr/local/freeside directory on the external machine (owned by the freeside user). -
  • touch /usr/local/freeside/fs_sessiond_socket; chown freeside /usr/local/freeside/fs_sessiond_socket; chmod 600 /usr/local/freeside/fs_sessiond_socket -
  • Append the identity.pub from the freeside user on your freeside machine to the authorized_keys file of the newly created freeside user on the external machine(s). -
  • Run
    fs_session_server user machine
    on the Freeside machine. -
      -
    • user is a user from the mapsecrets file. -
    • machine is the name of the external machine. -
    -
-

Usage

-
    -
  • Web -
      -
    • Copy FS-SessionClient/cgi/login.cgi and logout.cgi to your web - server's document space. -
    • Use suEXEC or setuid (see install.html for details) to run login.cgi and logout.cgi as the freeside user. -
    -
  • Command-line -
    freeside-login username ( portnum | ip | nasnum nasport )
    -freeside-logout username ( portnum | ip | nasnum nasport )
    -
      -
    • username is a customer username from the svc_acct table -
    • portnum, ip or nasport and nasnum uniquely identify a port in the port database table. -
    -
  • RADIUS -
      -
    • Configure your RADIUS server's login and logout callbacks to use the command-line freeside-login and freeside-logout utilites. -
    -
-

Callbacks

-
    -
  • Sesstion start - The command(s) specified in the session-start configuration file are executed on the Freeside machine. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on. -
  • Session end - The command(s) specified in the session-stop configuration file are executed on the Freeside machine. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on. -
-

Dropping expired users

-Run
bin/freeside-session-kill username
periodically from cron. - - diff --git a/htdocs/docs/signup.html b/htdocs/docs/signup.html deleted file mode 100644 index a40b1f963..000000000 --- a/htdocs/docs/signup.html +++ /dev/null @@ -1,57 +0,0 @@ - - Signup server - - -

Signup server

-For security reasons, the signup server should run on an external public -webserver. On this machine, install: -
    -
  • A web server, such as Apache-SSL or Apache -
  • SSH -
  • Perl (at least 5.004_05 for the 5.004 series or 5.005_03 for the 5.005 series. Don't enable experimental features like threads or the PerlIO abstraction layer.) -
  • Text::Template -
  • HTTP::Headers::UserAgent (version 2.0 or higher; not yet indexed correctly on CPAN) - -
  • FS::SignupClient (copy the fs_signup/FS-SignupClient directory to the external machine, then: perl Makefile.PL; make; make install) -
-Then: -
    -
  • Add the user `freeside' to the the external machine. -
  • Copy or symlink fs_signup/FS-SignupClient/cgi/signup.cgi into the web server's document space. -
  • Enable CGI execution for files with the `.cgi' extension. (with Apache) -
  • Create the /usr/local/freeside directory on the external machine (owned by the freeside user). -
  • touch /usr/local/freeside/fs_signupd_socket; chown freeside /usr/local/freeside/fs_signupd_socket; chmod 600 /usr/local/freeside/fs_signupd_socket -
  • Use suEXEC or setuid (see install.html for details) to run signup.cgi as the freeside user. -
  • Append the identity.pub from the freeside user on your freeside machine to the authorized_keys file of the newly created freeside user on the external machine(s). -
  • Run
    fs_signup_server user machine agentnum refnum
    on the Freeside machine. -
      -
    • user is a user from the mapsecrets file. -
    • machine is the name of the external machine. -
    • agentnum and refnum are the agent and referral, respectively, to use for customers who sign up via this signup server. -
    -
-Optional: -
    -
  • If you create a /usr/local/freeside/ieak.template file on the external machine, it will be sent to IE users with MIME type application/x-Internet-signup. This file will be processed with Text::Template with the following variables available: -
      -
    • $ac - area code of selected POP -
    • $exch - exchange of selected POP -
    • $loc - local part of selected POP -
    • $username -
    • $password -
    • $email_name - first and last name -
    - (an example file is included as fs_signup/ieak.template) -
  • If you create a /usr/local/freeside/cck.template file on the external machine, the variables defined will be sent to Netscape users with MIME type application/x-netscape-autoconfigure-dialer-v2. This file will be processed with Text::Template with the following variables available: -
      -
    • $ac - area code of selected POP -
    • $exch - exchange of selected POP -
    • $loc - local part of selected POP -
    • $username -
    • $password -
    • $email_name - first and last name -
    - (an example file is included as fs_signup/cck.template). See the Netscape documentation for more information. -
  • If there are any entries in the prepay_credit table, a user can enter a string matching the identifier column to receive the credit specified in the amount column, and/or the time specified in the seconds column (for use with the session monitor), after which that identifier is no longer valid. This can be used to implement pre-paid "calling card" type signups. The bin/generate-prepay script can be used to populate the prepay_credit table. -
- diff --git a/htdocs/docs/trouble.html b/htdocs/docs/trouble.html deleted file mode 100644 index fce743928..000000000 --- a/htdocs/docs/trouble.html +++ /dev/null @@ -1,26 +0,0 @@ - - Troubleshooting - - -

Troubleshooting

-
    -
  • When troubleshooting the web interface, helpful information is often in your web server's error log. -
  • If bin/svc_acct.import fails with an "Out of memory!" error using MySQL, upgrede MySQL and recompile the Perl DBD. There was a memory leak in some older versions of MySQL. -
  • If you get tons of errors in your web server's error log like this: -
    -Ambiguous use of value => resolved to "value" =>
    -at /usr/lib/perl5/site_perl/File/CounterFile.pm line 132.
    -
    - This clutters up your log files but is otherwise harmless. Upgrade to the latest File::CounterFile. -
  • If you get errors like this: -
    -UID.pm: Can't open /var/spool/freeside/conf/secrets: Permission denied 
    -at /your/path/site_perl/FS/UID.pm line 26.
    -BEGIN failed--compilation aborted at
    -/your/path/edit/process/part_svc.cgi line 15.
    -
    - Then the scripts are not running as the freeside freeside user. See -the New Installation section of the documentation. -
  • If you receive `can not connect to server' errors using MySQL on a system that doesn't support native threading, you may need to specify the full hostname in your DBI datasource. See the MySQL documentation, DBI manpage and the DBD::mysql manpage for details. -
- diff --git a/htdocs/docs/upgrade.html b/htdocs/docs/upgrade.html deleted file mode 100644 index d2201f601..000000000 --- a/htdocs/docs/upgrade.html +++ /dev/null @@ -1,24 +0,0 @@ - - Upgrading to 1.1.x - - -

Upgrading to 1.1.x

-
    -
  • Back up your data and current Freeside installation. -
  • Unpack a copy of the 1.0.0 distribution in a separate location. -
  • Diff your current installation against the 1.0.0 distribution. -
  • Apply all the diffs you found above, if applicable. -
  • Apply (at least) the following changes to your database: -
    -ALTER TABLE cust_main CHANGE ss ss char(11) NULL;
    -ALTER TABLE cust_main CHANGE day daytime varchar(20) NULL;
    -ALTER TABLE svc_acct CHANGE password _password varchar(25) NOT NULL;
    -ALTER TABLE part_svc CHANGE svc_acct__password svc_acct___password varchar(25) NULL;
    -ALTER TABLE part_svc CHANGE svc_acct__password_flag svc_acct___password_flag char(1) NULL;
    -ALTER TABLE agent_type CHANGE type atype varchar(80) NOT NULL;
    -
    -
  • Optionally change the field lengths and types to match a 1.1.x install; see `bin/fs-setup'. -
  • Create the necessary configuration files, -
  • Copy or symlink htdocs and site_perl to the new 1.1.x copies. -
  • Run bin/dbdef-create. This file uses MySQL-specific syntax. If you are running a different database engine you will need to modify it slightly. - diff --git a/htdocs/docs/upgrade2.html b/htdocs/docs/upgrade2.html deleted file mode 100644 index 7acae48f7..000000000 --- a/htdocs/docs/upgrade2.html +++ /dev/null @@ -1,11 +0,0 @@ - - Upgrading to 1.1.4 - - -

    Upgrading to 1.1.4 from 1.1.x

    -
      -
    • If migrating from 1.0.0, see these instructions first. -
    • Back up your data and current Freeside installation. -
    • If applicable, create the new configuration files: lpr, cybercash2, cybercash3.2 -
    • Copy or symlink htdocs and site_perl to the new copies. - diff --git a/htdocs/docs/upgrade3.html b/htdocs/docs/upgrade3.html deleted file mode 100644 index 0837e0207..000000000 --- a/htdocs/docs/upgrade3.html +++ /dev/null @@ -1,40 +0,0 @@ - - Upgrading to 1.2.x - - -

      Upgrading to 1.2.x from 1.1.x

      -
        -
      • If migrating from 1.0.0, see these instructions first. -
      • If migrating from less than 1.1.4, see these instructions first. -
      • Back up your data and current Freeside installation. -
      • Install the Perl module String-Approx -
      • Configuration file location has changed! -
      • Move /var/spool/freeside/dbdef.datasrc to /usr/local/etc/freeside/dbdef.datasrc. -
      • Move /var/spool/freeside/counters to /usr/local/etc/freeside/counters.datasrc. -
      • Move /var/spool/freeside/export to /usr/local/etc/freeside/export.datasrc. -
      • Apply the following changes to your database: -
        -ALTER TABLE cust_main CHANGE state state varchar(80) NULL;
        -ALTER TABLE cust_main_county CHANGE state state varchar(80) NULL;
        -ALTER TABLE cust_main_county ADD country char(2);
        -ALTER TABLE cust_main CHANGE paydate paydate varchar(10);
        -UPDATE cust_main SET country = "US" where country IS NULL OR country = '';
        -UPDATE cust_main_county SET country = "US" where country IS NULL OR country = "";
        -CREATE TABLE cust_main_invoice (
        -   destnum int NOT NULL,
        -   custnum int NOT NULL,
        -   dest varchar(80) NOT NULL,
        -   PRIMARY KEY (destnum),
        -   INDEX ( custnum )
        -);
        -
        -
      • Run bin/dbdef-create. This file uses MySQL-specific syntax. If you are running a different database engine you will need to modify it slightly. -
      • Copy or symlink htdocs and site_perl to the new copies. - diff --git a/htdocs/docs/upgrade4.html b/htdocs/docs/upgrade4.html deleted file mode 100644 index 1d70f8b73..000000000 --- a/htdocs/docs/upgrade4.html +++ /dev/null @@ -1,27 +0,0 @@ - - Upgrading to 1.2.2 - - -

        Upgrading to 1.2.2 from 1.2.x

        -
          -
        • If migrating from 1.0.0, see these instructions first. -
        • If migrating from less than 1.1.4, see these instructions first. -
        • If migrating from less than 1.2.0, see these instructions first. -
        • Back up your data and current Freeside installation. -
        • Install the Perl modules Locale-Codes and Net-Whois. -
        • Apply the following changes to your database: -
          -ALTER TABLE cust_pay_batch CHANGE exp exp VARCHAR(11);
          -
          -
        • Copy or symlink htdocs to the new copy. -
        • Remove the symlink or directory (your_site_perl_directory)/FS. -
        • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
          -$ cd FS/
          -$ perl Makefile.PL
          -$ make
          -$ su
          -# make install
          -
        • Run bin/dbdef-create. This file uses MySQL-specific syntax. If you are running a different database engine you will need to modify it slightly. - diff --git a/htdocs/docs/upgrade5.html b/htdocs/docs/upgrade5.html deleted file mode 100644 index 3f3431653..000000000 --- a/htdocs/docs/upgrade5.html +++ /dev/null @@ -1,34 +0,0 @@ - - Upgrading to 1.3.0 - - -

          Upgrading to 1.2.3 from 1.2.2

          -
            -
          • If migrating from 1.0.0, see these instructions first. -
          • If migrating from less than 1.1.4, see these instructions first. -
          • If migrating from less than 1.2.0, see these instructions first. -
          • If migrating from less than 1.2.2, see these instructions first. -
          • Back up your data and current Freeside installation. -
          • Apply the following changes to your database: -
            -ALTER TABLE svc_acct_pop ADD loc CHAR(4);
            -CREATE TABLE prepay_credit (
            -  prepaynum int NOT NULL,
            -  identifier varchar(80) NOT NULL,
            -  amount decimal(10,2) NOT NULL,
            -  PRIMARY KEY (prepaynum),
            -  INDEX (identifier)
            -);
            -
            -
          • Copy or symlink htdocs to the new copy. -
          • Remove the symlink or directory (your_site_perl_directory)/FS. -
          • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
            -$ cd FS/
            -$ perl Makefile.PL
            -$ make
            -$ su
            -# make install
            -
          • Run bin/dbdef-create. This file uses MySQL-specific syntax. If you are running a different database engine you will need to modify it slightly. - diff --git a/htdocs/docs/upgrade6.html b/htdocs/docs/upgrade6.html deleted file mode 100644 index dc82975f3..000000000 --- a/htdocs/docs/upgrade6.html +++ /dev/null @@ -1,66 +0,0 @@ - - Upgrading to 1.3.0 - - -

            Upgrading to 1.3.0 from 1.2.3

            -
              -
            • If migrating from 1.0.0, see these instructions first. -
            • If migrating from less than 1.1.4, see these instructions first. -
            • If migrating from less than 1.2.0, see these instructions first. -
            • If migrating from less than 1.2.2, see these instructions first. -
            • If migrating from less than 1.2.3, see these instructions first. -
            • Back up your data and current Freeside installation. -
            • As 1.3.0 requires transactions, MySQL's default MyISAM and ISAM table types are no longer supported. Converting to PostgreSQL is recommended. If you really want to use MySQL, convert your tables to one of the transaction-safe table types such as BDB. -
            • Copy the invoice_template file from the conf/ directory in the distribution to your configuration directory. -
            • Install the Text-Template, DBIx-DBSchema, Net-SSH, String-ShellQuote and Net-SCP Perl modules. -
            • Apply the following changes to your database: -
              -CREATE TABLE domain_record (
              -  recnum int NOT NULL,
              -  svcnum int NOT NULL,
              -  reczone varchar(80) NOT NULL,
              -  recaf char(2) NOT NULL,
              -  rectype char(5) NOT NULL,
              -  recdata varchar(80) NOT NULL,
              -  PRIMARY KEY (recnum)
              -);
              -CREATE TABLE svc_www (
              -  svcnum int NOT NULL,
              -  recnum int NOT NULL,
              -  usersvc int NOT NULL,
              -  PRIMARY KEY (svcnum)
              -);
              -ALTER TABLE part_svc ADD svc_www__recnum varchar(80) NULL;
              -ALTER TABLE part_svc ADD svc_www__recnum_flag char(1) NULL;
              -ALTER TABLE part_svc ADD svc_www__usersvc varchar(80) NULL;
              -ALTER TABLE part_svc ADD svc_www__uesrsvc_flag char(1) NULL;
              -ALTER TABLE svc_acct CHANGE _password _password varchar(50) NULL;
              -ALTER TABLE svc_acct ADD seconds integer NULL;
              -ALTER TABLE part_svc ADD svc_acct__seconds integer NULL;
              -ALTER TABLE part_svc ADD svc_acct__seconds_flag char(1) NULL;
              -ALTER TABLE prepay_credit ADD seconds integer NULL;
              -
              -
              -
            • If your database supports dropping columns: -
              -ALTER TABLE cust_bill DROP owed;
              -ALTER TABLE cust_credit DROP credited;
              -
              - Or, if your database does not support dropping columns, you can do this: -
              -ALTER TABLE cust_bill CHANGE owed depriciated decimal(10,2);
              -ALTER TABLE cust_credit CHANGE credited depriciated2 decimal(10,2);
              -
              - -
            • Copy or symlink htdocs to the new copy. -
            • Remove the symlink or directory (your_site_perl_directory)/FS. -
            • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
              -$ cd FS/
              -$ perl Makefile.PL
              -$ make
              -$ su
              -# make install
              -
            • Run bin/dbdef-create. - diff --git a/htdocs/docs/upgrade7.html b/htdocs/docs/upgrade7.html deleted file mode 100644 index d9dcfe2ae..000000000 --- a/htdocs/docs/upgrade7.html +++ /dev/null @@ -1,24 +0,0 @@ - - Upgrading to 1.3.1 - - -

              Upgrading to 1.3.1 from 1.3.0

              -
                -
              • If migrating from 1.0.0, see these instructions first. -
              • If migrating from less than 1.1.4, see these instructions first. -
              • If migrating from less than 1.2.0, see these instructions first. -
              • If migrating from less than 1.2.2, see these instructions first. -
              • If migrating from less than 1.2.3, see these instructions first. -
              • If migrating from less than 1.3.0, see these instructions first. -
              • Back up your data and current Freeside installation. -
              • Copy or symlink htdocs to the new copy. -
              • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
                -$ cd FS/
                -$ perl Makefile.PL
                -$ make
                -$ su
                -# make install UNINST=1
                -
              • Run bin/dbdef-create. - diff --git a/htdocs/edit/agent.cgi b/htdocs/edit/agent.cgi deleted file mode 100755 index 5b42095b3..000000000 --- a/htdocs/edit/agent.cgi +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: agent.cgi,v 1.7 1999-04-07 11:27:50 ivan Exp $ -# -# ivan@sisd.com 97-dec-12 -# -# Changes to allow page to work at a relative position in server -# Changed 'type' to 'atype' because Pg6.3 reserves the type word -# bmccane@maxbaud.net 98-apr-3 -# -# use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 -# -# $Log: agent.cgi,v $ -# Revision 1.7 1999-04-07 11:27:50 ivan -# avoid perl's silly arguement not numeric error -# -# Revision 1.6 1999/01/25 12:09:50 ivan -# yet more mod_perl stuff -# -# Revision 1.5 1999/01/19 05:13:31 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:21 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/17 06:16:57 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.2 1998/11/23 07:52:08 ivan -# *** empty log message *** -# - -use strict; -use vars qw ( $cgi $agent $action $hashref $p $agent_type ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header menubar popurl); -use FS::Record qw(qsearch qsearchs fields); -use FS::agent; -use FS::agent_type; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - $agent = new FS::agent ( { - map { $_, scalar($cgi->param($_)) } fields('agent') - } ); -} elsif ( $cgi->keywords ) { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $agent = qsearchs( 'agent', { 'agentnum' => $1 } ); -} else { #adding - $agent = new FS::agent {}; -} -$action = $agent->agentnum ? 'Edit' : 'Add'; -$hashref = $agent->hashref; - -$p = popurl(2); - -print $cgi->header( '-expires' => 'now' ), header("$action Agent", menubar( - 'Main Menu' => $p, - 'View all agents' => $p. 'browse/agent.cgi', -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print '
                ', - qq!!, - "Agent #", $hashref->{agentnum} ? $hashref->{agentnum} : "(NEW)"; - -print < -Agent -Agent type -Program (unimplemented) - -END - -print qq!
                !; - -print < - - -END - diff --git a/htdocs/edit/agent_type.cgi b/htdocs/edit/agent_type.cgi deleted file mode 100755 index bdf64c58f..000000000 --- a/htdocs/edit/agent_type.cgi +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: agent_type.cgi,v 1.11 1999-04-07 11:19:21 ivan Exp $ -# -# agent_type.cgi: Add/Edit agent type (output form) -# -# ivan@sisd.com 97-dec-10 -# -# Changes to allow page to work at a relative position in server -# Changed 'type' to 'atype' because Pg6.3 reserves the type word -# bmccane@maxbaud.net 98-apr-3 -# -# use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 -# -# $Log: agent_type.cgi,v $ -# Revision 1.11 1999-04-07 11:19:21 ivan -# silly HTML typo -# -# Revision 1.10 1999/01/25 12:09:51 ivan -# yet more mod_perl stuff -# -# Revision 1.9 1999/01/19 05:13:32 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.8 1999/01/18 09:41:22 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.7 1999/01/18 09:22:29 ivan -# changes to track email addresses for email invoicing -# -# Revision 1.6 1998/12/17 06:16:58 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.5 1998/11/21 07:58:27 ivan -# package names link to them -# -# Revision 1.4 1998/11/21 07:45:19 ivan -# visual, use FS::table_name when doing qsearch('table_name') -# -# Revision 1.3 1998/11/15 11:20:12 ivan -# s/CGI-Base/CGI.pm/ causes s/QUERY_STRING/keywords/; -# -# Revision 1.2 1998/11/13 09:56:46 ivan -# change configuration file layout to support multiple distinct databases (with -# own set of config files, export, etc.) -# - -use strict; -use vars qw( $cgi $agent_type $action $hashref $p $part_pkg ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs fields); -use FS::agent_type; -use FS::CGI qw(header menubar popurl); -use FS::agent_type; -use FS::part_pkg; -use FS::type_pkgs; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - $agent_type = new FS::agent_type ( { - map { $_, scalar($cgi->param($_)) } fields('agent') - } ); -} elsif ( $cgi->keywords ) { #editing - my( $query ) = $cgi->keywords; - $query =~ /^(\d+)$/; - $agent_type=qsearchs('agent_type',{'typenum'=>$1}); -} else { #adding - $agent_type = new FS::agent_type {}; -} -$action = $agent_type->typenum ? 'Edit' : 'Add'; -$hashref = $agent_type->hashref; - -$p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header("$action Agent Type", menubar( - 'Main Menu' => "$p", - 'View all agent types' => "${p}browse/agent_type.cgi", -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print '', - qq!!, - "Agent Type #", $hashref->{typenum} ? $hashref->{typenum} : "(NEW)"; - -print <
                Agent Type -

                Select which packages agents of this type may sell to customers
                -END - -foreach $part_pkg ( qsearch('part_pkg',{}) ) { - print qq!
                $agent_type->getfield('typenum'), - 'pkgpart' => $part_pkg->getfield('pkgpart'), - }) - ? 'CHECKED ' - : '', - qq!VALUE="ON"> !, - qq!', $part_pkg->getfield('pkg'), '', - ; -} - -print qq!
                !; - -print < - - -END - diff --git a/htdocs/edit/cust_credit.cgi b/htdocs/edit/cust_credit.cgi deleted file mode 100755 index 35c4d48fe..000000000 --- a/htdocs/edit/cust_credit.cgi +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_credit.cgi,v 1.7 1999-02-28 00:03:33 ivan Exp $ -# -# Usage: cust_credit.cgi custnum [ -paybatch ] -# http://server.name/path/cust_credit?custnum [ -paybatch ] -# -# some hooks in here for modifications as well as additions, but needs (lots) more work. -# also see process/cust_credit.cgi, the script that processes the form. -# -# ivan@voicenet.com 96-dec-05 -# -# paybatch field, differentiates between credits & credits+refunds by commandline -# ivan@voicenet.com 96-dec-08 -# -# added (but commented out) sprintf("%.2f" in amount field. Hmm. -# ivan@voicenet.com 97-jan-3 -# -# paybatch stuff thrown out - has checkbox now instead. -# (well, sort of. still passed around for backward compatability and possible editing hook) -# ivan@voicenet.com 97-apr-21 -# -# rewrite ivan@sisd.com 98-mar-16 -# -# $Log: cust_credit.cgi,v $ -# Revision 1.7 1999-02-28 00:03:33 ivan -# removed misleading comments -# -# Revision 1.6 1999/01/25 12:09:52 ivan -# yet more mod_perl stuff -# -# Revision 1.5 1999/01/19 05:13:33 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:23 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/23 02:26:06 ivan -# *** empty log message *** -# -# Revision 1.2 1998/12/17 06:16:59 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# - -use strict; -use vars qw( $cgi $query $custnum $otaker $p1 $crednum $_date $amount $reason ); -use Date::Format; -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup getotaker); -use FS::CGI qw(header popurl); -use FS::Record qw(fields); -#use FS::cust_credit; - -$cgi = new CGI; -cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - #$cust_credit = new FS::cust_credit ( { - # map { $_, scalar($cgi->param($_)) } fields('cust_credit') - #} ); - $custnum = $cgi->param('custnum'); - $amount = $cgi->param('amount'); - #$refund = $cgi->param('refund'); - $reason = $cgi->param('reason'); -} else { - ($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum = $1; - $amount = ''; - #$refund = 'yes'; - $reason = ''; -} -$_date = time; - -$otaker = getotaker; - -$p1 = popurl(1); - -print $cgi->header( '-expires' => 'now' ), header("Post Credit", ''); -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); -print < -
                -END
                -
                -$crednum = "";
                -print qq!Credit #!, $crednum ? $crednum : " (NEW)", qq!!;
                -
                -print qq!\nCustomer #$custnum!;
                -
                -print qq!!;
                -
                -print qq!\nDate: !, time2str("%D",$_date), qq!!;
                -
                -print qq!\nAmount \$!;
                -print qq!!;
                -
                -#print qq! Also post refund!;
                -
                -print qq!!;
                -
                -print qq!\nReason !;
                -
                -print <
                -
                -
                -END - -print < - - -END - diff --git a/htdocs/edit/cust_main.cgi b/htdocs/edit/cust_main.cgi deleted file mode 100755 index 9c61c654e..000000000 --- a/htdocs/edit/cust_main.cgi +++ /dev/null @@ -1,516 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_main.cgi,v 1.29 2001-05-23 13:47:07 ivan Exp $ -# -# Usage: cust_main.cgi custnum -# http://server.name/path/cust_main.cgi?custnum -# -# ivan@voicenet.com 96-nov-29 -> 96-dec-04 -# -# Blank custnum for new customer. -# ivan@voicenet.com 96-dec-16 -# -# referral defaults to blank, to force people to pick something -# ivan@voicenet.com 97-jun-4 -# -# rewrote for new API -# ivan@voicenet.com 97-jul-28 -# -# new customer is null, not '#' -# otaker gotten from &getotaker instead of $ENV{REMOTE_USER} -# ivan@sisd.com 97-nov-12 -# -# cgisuidsetup($cgi); -# no need for old_ fields. -# now state+county is a select field (took out PA hack) -# used autoloaded $cust_main->field methods -# ivan@sisd.com 97-dec-17 -# -# fixed quoting problems ivan@sisd.com 98-feb-23 -# -# paydate sql update ivan@sisd.com 98-mar-5 -# -# Changes to allow page to work at a relative position in server -# Changed 'day' to 'daytime' because Pg6.3 reserves the day word -# Added test for paydate in mm-dd-yyyy format for Pg6.3 default format -# bmccane@maxbaud.net 98-apr-3 -# -# fixed one missed day->daytime ivan@sisd.com 98-jul-13 -# -# $Log: cust_main.cgi,v $ -# Revision 1.29 2001-05-23 13:47:07 ivan -# bugfix for defaultcountry -# -# Revision 1.28 2000/12/26 23:51:40 ivan -# statedefault & referraldefault config files -# -# Revision 1.27 2000/12/03 13:45:15 ivan -# patch from Jason Spence : admin.html doc, autocapgen -# -# Revision 1.26 2000/06/27 12:15:50 ivan -# i18n -# -# Revision 1.25 2000/03/02 08:09:38 ivan -# still need to allow blank expiration dates -# -# Revision 1.24 2000/01/30 06:54:50 ivan -# credit card expiration dates not sticky bug fixed? -# -# Revision 1.23 2000/01/27 00:53:14 ivan -# 5.004_04 workaround -# -# Revision 1.22 1999/12/17 02:33:23 ivan -# argh -# -# Revision 1.21 1999/08/23 07:40:38 ivan -# missing flag -# -# Revision 1.20 1999/08/23 07:08:11 ivan -# no CGI::Switch for now -# -# Revision 1.19 1999/08/21 02:14:25 ivan -# better error message for no agents -# -# Revision 1.18 1999/08/11 15:38:33 ivan -# fix for perl 5.004_04 -# -# Revision 1.17 1999/08/10 11:15:45 ivan -# corrected a misleading comment -# -# Revision 1.15 1999/04/14 13:14:54 ivan -# configuration option to edit referrals of existing customers -# -# Revision 1.14 1999/04/14 07:47:53 ivan -# i18n fixes -# -# Revision 1.13 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.12 1999/04/06 11:16:16 ivan -# give a meaningful error message if you try to create a customer before you've -# created an agent -# -# Revision 1.11 1999/03/25 13:55:10 ivan -# one-screen new customer entry (including package and service) for simple -# packages with one svc_acct service -# -# Revision 1.10 1999/02/28 00:03:34 ivan -# removed misleading comments -# -# Revision 1.9 1999/02/23 08:09:20 ivan -# beginnings of one-screen new customer entry and some other miscellania -# -# Revision 1.8 1999/01/25 12:09:53 ivan -# yet more mod_perl stuff -# -# Revision 1.7 1999/01/19 05:13:34 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.6 1999/01/18 09:41:24 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.5 1999/01/18 09:22:30 ivan -# changes to track email addresses for email invoicing -# -# Revision 1.4 1998/12/23 08:08:15 ivan -# fix typo -# -# Revision 1.3 1998/12/17 06:17:00 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# - -use strict; -use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum - $last $first $ss $company $address1 $address2 $city $zip - $daytime $night $fax @invoicing_list $invoicing_list $payinfo - $payname %payby %paybychecked $refnum $otaker $r ); -use vars qw ( $conf $pkgpart $username $password $popnum $ulen $ulen2 ); -#use CGI::Switch; -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup getotaker); -#use FS::Record qw(qsearch qsearchs fields); -use FS::Record qw(qsearch qsearchs fields dbdef); -use FS::CGI qw(header popurl itable table); -use FS::cust_main; -use FS::agent; -use FS::part_referral; -use FS::cust_main_county; - - #for misplaced logic below - use FS::part_pkg; - - #for false laziness below - use FS::svc_acct_pop; - - #for (other) false laziness below - use FS::agent; - use FS::type_pkgs; - -$cgi = new CGI; -cgisuidsetup($cgi); - -$conf = new FS::Conf; - -#get record - -if ( $cgi->param('error') ) { - $cust_main = new FS::cust_main ( { - map { $_, scalar($cgi->param($_)) } fields('cust_main') - } ); - $custnum = $cust_main->custnum; - $pkgpart = $cgi->param('pkgpart_svcpart') || ''; - if ( $pkgpart =~ /^(\d+)_/ ) { - $pkgpart = $1; - } else { - $pkgpart = ''; - } - $username = $cgi->param('username'); - $password = $cgi->param('_password'); - $popnum = $cgi->param('popnum'); -} elsif ( $cgi->keywords ) { #editing - my( $query ) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum=$1; - $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); - $pkgpart = 0; - $username = ''; - $password = ''; - $popnum = 0; -} else { - $custnum=''; - $cust_main = new FS::cust_main ( {} ); - $cust_main->setfield('otaker',&getotaker); - $pkgpart = 0; - $username = ''; - $password = ''; - $popnum = 0; -} -$action = $custnum ? 'Edit' : 'Add'; - -# top - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("Customer $action", ''); -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -# JRS: Javascript to set up the form for us - if ( $conf->exists('autocapnames') ) { - print < - -END -} - -print qq!!, - qq!!, - qq!Customer # !, ( $custnum ? $custnum : " (NEW)" ), - -; - -# agent - -$r = qq!*!; - -@agents = qsearch( 'agent', {} ); -#die "No agents created!" unless @agents; -die "You have not created any agents. You must create at least one agent before adding a customer. Go to ". popurl(2). "browse/agent.cgi and create one or more agents." unless @agents; -$agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first -if ( scalar(@agents) == 1 ) { - print qq!!; -} else { - print qq!

                ${r}Agent "; -} - -#referral - -$refnum = $cust_main->refnum || $conf->config('referraldefault') || 0; -if ( $custnum && ! $conf->exists('editreferrals') ) { - print qq!!; -} else { - my(@referrals) = qsearch('part_referral',{}); - if ( scalar(@referrals) == 1 ) { - $refnum ||= $referrals[0]->refnum; - print qq!!; - } else { - print qq!

                ${r}Referral "; - } -} - - -# contact info - -($last,$first,$ss,$company,$address1,$address2,$city,$zip)=( - $cust_main->last, - $cust_main->first, - $cust_main->ss, - $cust_main->company, - $cust_main->address1, - $cust_main->address2, - $cust_main->city, - $cust_main->zip, -); - -print "

                Contact information", &itable("#c0c0c0"), <${r}Contact name
                (last, first) -END - -if ( $conf->exists('autocapnames') ) { - print <, - -END -} else { - print <, - -END -} - -print <SS# -Company -${r}Address -${r}City${r}State/Country${r}Zip!; - -($daytime,$night,$fax)=( - $cust_main->daytime, - $cust_main->night, - $cust_main->fax, -); - -print <Day Phone -Night Phone -Fax -END - -print "$r required fields
                "; - -# billing info - -sub expselect { - my $prefix = shift; - my( $m, $y ) = (0, 0); - if ( scalar(@_) ) { - my $date = shift || '01-2000'; - if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format - ( $m, $y ) = ( $2, $1 ); - } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) { - ( $m, $y ) = ( $1, $3 ); - } else { - die "unrecognized expiration date format: $date"; - } - } - - my $return = qq!!; - for ( 2001 .. 2037 ) { - $return .= "Billing information", &itable("#c0c0c0"), - qq!tax eq "Y"; -print qq!>Tax Exempt!; -print qq!invoicing_list; -print qq! CHECKED! - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; -print qq!>Postal mail invoice!; -$invoicing_list = join(', ', grep { $_ ne 'POST' } @invoicing_list ); -print qq!Email invoice !; - -print "Billing type", - "", - &table("#c0c0c0"), ""; - -($payinfo, $payname)=( - $cust_main->payinfo, - $cust_main->payname, -); - -%payby = ( - 'CARD' => qq!Credit card
                ${r}
                ${r}Exp !. expselect("CARD"). qq!
                ${r}Name on card
                !, - 'BILL' => qq!Billing
                P.O.
                ${r}Exp !. expselect("BILL", "12-2037"). qq!
                ${r}Attention
                !, - 'COMP' => qq!Complimentary
                ${r}Approved by
                ${r}Exp !. expselect("COMP"), -); -%paybychecked = ( - 'CARD' => qq!Credit card
                ${r}
                ${r}Exp !. expselect("CARD", $cust_main->paydate). qq!
                ${r}Name on card
                !, - 'BILL' => qq!Billing
                P.O.
                ${r}Exp !. expselect("BILL", $cust_main->paydate). qq!
                ${r}Attention
                !, - 'COMP' => qq!Complimentary
                ${r}Approved by
                ${r}Exp !. expselect("COMP", $cust_main->paydate), -); -for (qw(CARD BILL COMP)) { - print qq!payby eq "$_") { - print qq! CHECKED> $paybychecked{$_}!; - } else { - print qq!> $payby{$_}!; - } -} - -print "$r required fields for each billing type"; - -unless ( $custnum ) { - # pry the wrong place for this logic. also pretty expensive - #use FS::part_pkg; - - #false laziness, copied from FS::cust_pkg::order - my $pkgpart; - if ( scalar(@agents) == 1 ) { - # $pkgpart->{PKGPART} is true iff $custnum may purchase $pkgpart - my($agent)=qsearchs('agent',{'agentnum'=> $agentnum }); - $pkgpart = $agent->pkgpart_hashref; - } else { - #can't know (agent not chosen), so, allow all - my %typenum; - foreach my $agent ( @agents ) { - next if $typenum{$agent->typenum}++; - #fixed in 5.004_05 #$pkgpart->{$_}++ foreach keys %{ $agent->pkgpart_hashref } - foreach ( keys %{ $agent->pkgpart_hashref } ) { $pkgpart->{$_}++; } #5.004_04 workaround - } - } - #eslaf - - my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } - qsearch( 'part_pkg', {} ); - - if ( @part_pkg ) { - - print "

                First package", &itable("#c0c0c0"), - qq!"; - - #false laziness: (mostly) copied from edit/svc_acct.cgi - #$ulen = $svc_acct->dbdef_table->column('username')->length; - $ulen = dbdef->table('svc_acct')->column('username')->length; - $ulen2 = $ulen+2; - print <Username - -Password - -(blank to generate) -END - print qq!POP"; - } -} - -$otaker = $cust_main->otaker; -print qq!!, - qq!

                !, - "", -; - diff --git a/htdocs/edit/cust_main_county-expand.cgi b/htdocs/edit/cust_main_county-expand.cgi deleted file mode 100755 index 783e92826..000000000 --- a/htdocs/edit/cust_main_county-expand.cgi +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_main_county-expand.cgi,v 1.6 1999-01-25 12:09:54 ivan Exp $ -# -# ivan@sisd.com 97-dec-16 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: cust_main_county-expand.cgi,v $ -# Revision 1.6 1999-01-25 12:09:54 ivan -# yet more mod_perl stuff -# -# Revision 1.5 1999/01/19 05:13:35 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:25 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/17 06:17:01 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.2 1998/11/18 09:01:38 ivan -# i18n! i18n! -# - -use strict; -use vars qw( $cgi $taxnum $cust_main_county $p1 $delim $expansion ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar popurl); -use FS::cust_main_county; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - $taxnum = $cgi->param('taxnum'); - $delim = $cgi->param('delim'); - $expansion = $cgi->param('expansion'); -} else { - my ($query) = $cgi->keywords; - $query =~ /^(\d+)$/ - or die "Illegal taxnum!"; - $taxnum = $1; - $delim = 'n'; - $expansion = ''; -} - -$cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum}); -die "Can't expand entry!" if $cust_main_county->getfield('county'); - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("Tax Rate (expand)", menubar( - 'Main Menu' => popurl(2), -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print < - - Separate by -END -print 'line (rumor has it broken on some browsers) or', - 'whitespace.'; -print < -
                - - - - -END - diff --git a/htdocs/edit/cust_main_county.cgi b/htdocs/edit/cust_main_county.cgi deleted file mode 100755 index 747a63df6..000000000 --- a/htdocs/edit/cust_main_county.cgi +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_main_county.cgi,v 1.8 1999-04-09 04:22:34 ivan Exp $ -# -# ivan@sisd.com 97-dec-13-16 -# -# Changes to allow page to work at a relative position in server -# Changed tax field to accept 6 chars (MO uses 6.1%) -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: cust_main_county.cgi,v $ -# Revision 1.8 1999-04-09 04:22:34 ivan -# also table() -# -# Revision 1.7 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.6 1999/01/25 12:09:55 ivan -# yet more mod_perl stuff -# -# Revision 1.5 1999/01/19 05:13:36 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:26 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/17 06:17:02 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.2 1998/11/18 09:01:39 ivan -# i18n! i18n! -# - -use strict; -use vars qw( $cgi $cust_main_county ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar popurl table); -use FS::cust_main_county; - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -print $cgi->header( '-expires' => 'now' ), header("Edit tax rates", menubar( - 'Main Menu' => popurl(2), -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!
                !, &table(), < - Country - State - County - Tax - -END - -foreach $cust_main_county ( qsearch('cust_main_county',{}) ) { - my($hashref)=$cust_main_county->hashref; - print < - $hashref->{country} -END - - print "", $hashref->{state} - ? $hashref->{state} - : '(ALL)' - , ""; - - print "", $hashref->{county} - ? $hashref->{county} - : '(ALL)' - , ""; - - print qq!%!; -END - -} - -print < - - - - - -END - diff --git a/htdocs/edit/cust_pay.cgi b/htdocs/edit/cust_pay.cgi deleted file mode 100755 index 5dee76ed9..000000000 --- a/htdocs/edit/cust_pay.cgi +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_pay.cgi,v 1.6 1999-02-28 00:03:35 ivan Exp $ -# -# Usage: cust_pay.cgi invnum -# http://server.name/path/cust_pay.cgi?invnum -# -# some hooks for modifications as well as additions, but needs work. -# -# ivan@voicenet.com 96-dec-11 -# -# rewrite ivan@sisd.com 98-mar-16 -# -# $Log: cust_pay.cgi,v $ -# Revision 1.6 1999-02-28 00:03:35 ivan -# removed misleading comments -# -# Revision 1.5 1999/01/25 12:09:56 ivan -# yet more mod_perl stuff -# -# Revision 1.4 1999/01/19 05:13:37 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1999/01/18 09:41:27 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.2 1998/12/17 06:17:03 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# - -use strict; -use vars qw( $cgi $invnum $p1 $_date $payby $payinfo $paid ); -use Date::Format; -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl); - -$cgi = new CGI; -cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - $invnum = $cgi->param('invnum'); - $paid = $cgi->param('paid'); - $payby = $cgi->param('payby'); - $payinfo = $cgi->param('payinfo'); -} else { - my ($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $invnum = $1; - $paid = ''; - $payby = "BILL"; - $payinfo = ""; -} -$_date = time; - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("Enter payment", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print < -
                -END
                -
                -print qq!Invoice #$invnum!;
                -
                -print qq!
                Date: !, time2str("%D",$_date), qq!!; - -print qq!
                Amount \$!; - -print qq!
                Payby: $payby!; - -#payinfo (check # now as payby="BILL" hardcoded.. what to do later?) -print qq!
                Check #!; - -#paybatch -print qq!!; - -print < -
                - -END - -print < - - -END - diff --git a/htdocs/edit/cust_pkg.cgi b/htdocs/edit/cust_pkg.cgi deleted file mode 100755 index b3c92249f..000000000 --- a/htdocs/edit/cust_pkg.cgi +++ /dev/null @@ -1,167 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_pkg.cgi,v 1.8 1999-07-21 07:34:13 ivan Exp $ -# -# this is for changing packages around, not editing things within the package -# -# Usage: cust_pkg.cgi custnum -# http://server.name/path/cust_pkg.cgi?custnum -# -# started with /sales/add/cust_pkg.cgi, which added packages -# ivan@voicenet.com 97-jan-5, 97-mar-21 -# -# Rewrote for new API -# ivan@voicenet.com 97-jul-7 -# -# FS::Search is no more, &cgisuidsetup needs $cgi, ivan@sisd.com 98-mar-7 -# -# Changes to allow page to work at a relative position in server -# Changed to display packages 2-wide in a table -# bmccane@maxbaud.net 98-apr-3 -# -# fixed a pretty cool bug from above which caused a visual glitch ivan@sisd.com -# 98-jun-1 -# -# $Log: cust_pkg.cgi,v $ -# Revision 1.8 1999-07-21 07:34:13 ivan -# links to package browse and agent type edit if there aren't any packages to -# order. thanks to "Tech Account" -# -# Revision 1.7 1999/04/14 01:03:01 ivan -# oops, in 1.2 tree, can't do searches until [cgi|admin]suidsetup, -# bug is hidden by mod_perl persistance -# -# Revision 1.6 1999/02/28 00:03:36 ivan -# removed misleading comments -# -# Revision 1.5 1999/02/07 09:59:18 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.4 1999/01/19 05:13:38 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1999/01/18 09:41:28 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.2 1998/12/17 06:17:04 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# - -use strict; -use vars qw( $cgi %pkg %comment $custnum $p1 @cust_pkg - $cust_main $agent $type_pkgs $count %remove_pkg $pkgparts ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header popurl); -use FS::part_pkg; -use FS::type_pkgs; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -%pkg = (); -%comment = (); -foreach (qsearch('part_pkg', {})) { - $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); - $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); -} - -if ( $cgi->param('error') ) { - $custnum = $cgi->param('custnum'); - %remove_pkg = map { $_ => 1 } $cgi->param('remove_pkg'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum = $1; - undef %remove_pkg; -} - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("Add/Edit Packages", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!
                !; - -print qq!!; - -#current packages -@cust_pkg = qsearch('cust_pkg',{ 'custnum' => $custnum, 'cancel' => '' } ); - -if (@cust_pkg) { - print <
                -END - - my ($count) = 0 ; - print qq!! ; - foreach (@cust_pkg) { - print '' if $count == 0; - my($pkgnum,$pkgpart)=( $_->getfield('pkgnum'), $_->getfield('pkgpart') ); - print qq!\n!; - $count ++ ; - if ($count == 2) - { - $count = 0 ; - print qq!\n! ; - } - } - print qq!
                $pkgnum: $pkg{$pkgpart} - $comment{$pkgpart}


                !; -} - -print <
                -END - -$cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); -$agent = qsearchs('agent',{'agentnum'=> $cust_main->agentnum }); - -$count = 0; -$pkgparts = 0; -print qq!!; -foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { - $pkgparts++; - my($pkgpart)=$type_pkgs->pkgpart; - print qq!! if ( $count == 0 ); - my $value = $cgi->param("pkg$pkgpart") || 0; - print < - - $pkgpart: $pkg{$pkgpart} - $comment{$pkgpart}\n -END - $count ++ ; - if ( $count == 2 ) { - print qq!\n! ; - $count = 0; - } -} -print qq!
                !; - -unless ( $pkgparts ) { - my $p2 = popurl(2); - my $typenum = $agent->typenum; - my $agent_type = qsearchs( 'agent_type', { 'typenum' => $typenum } ); - my $atype = $agent_type->atype; - print <package definitions, or agent type -$atype not allowed to purchase -any packages.) -END -} - -#submit -print < - - - -END diff --git a/htdocs/edit/part_pkg.cgi b/htdocs/edit/part_pkg.cgi deleted file mode 100755 index f7ade88c8..000000000 --- a/htdocs/edit/part_pkg.cgi +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: part_pkg.cgi,v 1.9 1999-02-07 09:59:19 ivan Exp $ -# -# part_pkg.cgi: Add/Edit package (output form) -# -# ivan@sisd.com 97-dec-10 -# -# Changes to allow page to work at a relative position in server -# Changed to display services 2-wide in table -# bmccane@maxbaud.net 98-apr-3 -# -# use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 -# -# $Log: part_pkg.cgi,v $ -# Revision 1.9 1999-02-07 09:59:19 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.8 1999/01/19 05:13:39 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.7 1999/01/18 09:41:29 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.6 1998/12/17 06:17:05 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.5 1998/11/21 07:12:26 ivan -# *** empty log message *** -# -# Revision 1.4 1998/11/21 07:11:08 ivan -# *** empty log message *** -# -# Revision 1.3 1998/11/21 07:07:40 ivan -# popurl, bugfix -# -# Revision 1.2 1998/11/15 13:14:55 ivan -# first pass as per-user custom pricing -# - -use strict; -use vars qw( $cgi $part_pkg $action $query $hashref $part_svc $count ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs fields); -use FS::part_pkg; -use FS::part_svc; -use FS::pkg_svc; -use FS::CGI qw(header menubar popurl); - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { - $cgi->param('clone', $1); -} else { - $cgi->param('clone', ''); -} -if ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) { - $cgi->param('pkgnum', $1); -} else { - $cgi->param('pkgnum', ''); -} - -($query) = $cgi->keywords; -$action = ''; -$part_pkg = ''; -if ( $cgi->param('error') ) { - $part_pkg = new FS::part_pkg ( { - map { $_, scalar($cgi->param($_)) } fields('part_pkg') - } ); -} -if ( $cgi->param('clone') ) { - $action='Custom Pricing'; - my $old_part_pkg = - qsearchs('part_pkg', { 'pkgpart' => $cgi->param('clone') } ); - $part_pkg ||= $old_part_pkg->clone; -} elsif ( $query && $query =~ /^(\d+)$/ ) { - $part_pkg ||= qsearchs('part_pkg',{'pkgpart'=>$1}); -} else { - $part_pkg ||= new FS::part_pkg {}; -} -$action ||= $part_pkg->pkgpart ? 'Edit' : 'Add'; -$hashref = $part_pkg->hashref; - -print $cgi->header( '-expires' => 'now' ), header("$action Package Definition", menubar( - 'Main Menu' => popurl(2), - 'View all packages' => popurl(2). 'browse/part_pkg.cgi', -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print '
                '; - -if ( $cgi->param('clone') ) { - print qq!!; -} -if ( $cgi->param('pkgnum') ) { - print qq!!; -} - -print qq!!, - "Package Part #", $hashref->{pkgpart} ? $hashref->{pkgpart} : "(NEW)"; - -print < -Package (customer-visable) -Comment (customer-hidden) -Setup fee for this package -Recurring fee for this package -Frequency (months) of recurring fee - -
                - -END - -unless ( $cgi->param('clone') ) { - print <
                - - -END -} - -$count = 0; -foreach $part_svc ( ( qsearch( 'part_svc', {} ) ) ) { - my $svcpart = $part_svc->svcpart; - my $pkg_svc = qsearchs( 'pkg_svc', { - 'pkgpart' => $cgi->param('clone') || $part_pkg->pkgpart, - 'svcpart' => $svcpart, - } ) || new FS::pkg_svc ( { - 'pkgpart' => $cgi->param('clone') || $part_pkg->pkgpart, - 'svcpart' => $svcpart, - 'quantity' => 0, - }); - #? #next unless $pkg_svc; - - unless ( defined ($cgi->param('clone')) && $cgi->param('clone') ) { - print '' if $count == 0 ; - print qq!"; - $count++; - if ($count == 2) - { - print ''; - $count = 0; - } - } else { - print qq!quantity || 0, qq!">\n!; - } -} - -unless ( $cgi->param('clone') ) { - print qq!! if ($count != 0) ; - print "
                Quan.ServiceQuan.Service
                quantity || 0, - qq!">!, $part_svc->getfield('svc'), "
                "; -} - -print qq!
                !; - -print < - - -END - diff --git a/htdocs/edit/part_referral.cgi b/htdocs/edit/part_referral.cgi deleted file mode 100755 index 24ac9dd82..000000000 --- a/htdocs/edit/part_referral.cgi +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: part_referral.cgi,v 1.6 1999-04-07 11:43:23 ivan Exp $ -# -# ivan@sisd.com 98-feb-23 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# confisuing typo on submit button ivan@sisd.com 98-jun-14 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: part_referral.cgi,v $ -# Revision 1.6 1999-04-07 11:43:23 ivan -# pick up errors right away, leave input -# -# Revision 1.5 1999/02/07 09:59:20 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.4 1999/01/19 05:13:41 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1999/01/18 09:41:30 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.2 1998/12/17 06:17:06 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# - -use strict; -use vars qw( $cgi $part_referral $action $hashref $p1 $query ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs fields); -use FS::part_referral; -use FS::CGI qw(header menubar popurl); - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - $part_referral = new FS::part_referral ( { - map { $_, scalar($cgi->param($_)) } fields('part_referral') - } ); -} elsif ( $cgi->keywords ) { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $part_referral = qsearchs( 'part_referral', { 'refnum' => $1 } ); -} else { #adding - $part_referral = new FS::part_referral {}; -} -$action = $part_referral->refnum ? 'Edit' : 'Add'; -$hashref = $part_referral->hashref; - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("$action Referral", menubar( - 'Main Menu' => popurl(2), - 'View all referrals' => popurl(2). "browse/part_referral.cgi", -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!!; - -print qq!!, - "Referral #", $hashref->{refnum} ? $hashref->{refnum} : "(NEW)"; - -print < -Referral -
                -END - -print qq!
                !; - -print < - - -END - diff --git a/htdocs/edit/part_svc.cgi b/htdocs/edit/part_svc.cgi deleted file mode 100755 index e82306d74..000000000 --- a/htdocs/edit/part_svc.cgi +++ /dev/null @@ -1,208 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: part_svc.cgi,v 1.14 2001-05-30 14:42:11 ivan Exp $ -# -# ivan@sisd.com 97-nov-14 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# use FS::CGI, added inline documentation ivan@sisd.com 98-jul-12 -# -# $Log: part_svc.cgi,v $ -# Revision 1.14 2001-05-30 14:42:11 ivan -# Adam Rose : "In the /edit/part_svc.cgi is there a need to add -# another section for svc_www?". Yes. Thanks Adam. -# -# Revision 1.13 2000/06/15 11:10:31 ivan -# update to the inline documentation, hopefully will make things more clear -# -# Revision 1.12 1999/04/09 04:22:34 ivan -# also table() -# -# Revision 1.11 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.10 1999/04/08 13:01:50 ivan -# [ AND DOCUMENT! ] all svc_acct services should have a default -# or fixed shell -# -# Revision 1.9 1999/02/23 08:09:21 ivan -# beginnings of one-screen new customer entry and some other miscellania -# -# Revision 1.8 1999/02/07 09:59:21 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.7 1999/01/19 05:13:42 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.6 1999/01/18 09:41:31 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.5 1998/12/30 23:03:21 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.4 1998/12/17 06:17:07 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.3 1998/11/21 06:43:26 ivan -# visual -# - -use strict; -use vars qw( $cgi $part_svc $action $query $hashref $p %defs $svcdb ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearchs fields); -use FS::part_svc; -use FS::CGI qw(header menubar popurl table); - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - $part_svc = new FS::part_svc ( { - map { $_, scalar($cgi->param($_)) } fields('part_svc') - } ); -} elsif ( $cgi->keywords ) { - my ($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $part_svc=qsearchs('part_svc',{'svcpart'=>$1}); -} else { #adding - $part_svc = new FS::part_svc {}; -} -$action = $part_svc->svcpart ? 'Edit' : 'Add'; -$hashref = $part_svc->hashref; - -$p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header("$action Service Definition", menubar( - 'Main Menu' => $p, - 'View all services' => "${p}browse/part_svc.cgi", -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print ''; - -print qq!!, - "Service Part #", $hashref->{svcpart} ? $hashref->{svcpart} : "(NEW)"; - -print < -Service - -Services are items you offer to your customers. -
                • svc_acct - Shell accounts, POP mailboxes, SLIP/PPP and ISDN accounts -
                • svc_domain - Virtual domains -
                • svc_acct_sm - Virtual domain mail aliasing -
                • svc_www - Virtual domain website -END -#
                • svc_charge - One-time charges (Partially unimplemented) -#
                • svc_wo - Work orders (Partially unimplemented) -print < -For the selected table, you can give fields default or fixed (unchangable) -values. For example, a SLIP/PPP account may have a default (or perhaps fixed) -slipip of 0.0.0.0, while a POP mailbox will probably have a fixed -blank slipip as well as a fixed shell something like /bin/true or -/usr/bin/passwd. -

                  -END -print &table(), 'Table"; -# svc_acct svc_domain svc_acct_sm svc_charge svc_wo - -print <Field -Modifier -END - -#these might belong somewhere else for other user interfaces -#pry need to eventually create stuff that's shared amount UIs -%defs = ( - 'svc_acct' => { - 'dir' => 'Home directory', - 'uid' => 'UID (set to fixed and blank for dial-only)', - 'slipip' => 'IP address (set to fixed and blank to disable dialin)', - 'popnum' => qq!POP number!, - 'username' => 'Username', - 'quota' => '(unimplemented)', - '_password' => 'Password', - 'gid' => 'GID (when blank, defaults to UID)', - 'shell' => 'Shell (all service definitions should have a default or fixed shell that is present in the shells configuration file)', - 'finger' => 'GECOS', - }, - 'svc_domain' => { - 'domain' => 'Domain', - }, - 'svc_acct_sm' => { - 'domuser' => 'domuser@virtualdomain.com', - 'domuid' => 'UID where domuser@virtualdomain.com mail is forwarded', - 'domsvc' => 'svcnum from svc_domain for virtualdomain.com', - }, - 'svc_charge' => { - 'amount' => 'amount', - }, - 'svc_wo' => { - 'worker' => 'Worker', - '_date' => 'Date', - }, - 'svc_www' => { - #'recnum' => '', - #'usersvc' => '', - }, -); - -# svc_acct svc_domain svc_acct_sm svc_charge svc_wo -foreach $svcdb ( qw( - svc_acct svc_domain svc_acct_sm svc_www -) ) { - - my(@rows)=map { /^${svcdb}__(.*)$/; $1 } - grep ! /_flag$/, - grep /^${svcdb}__/, - fields('part_svc'); - my($rowspan)=scalar(@rows); - - my($ptmp)="$svcdb"; - my($row); - foreach $row (@rows) { - my $value = $part_svc->getfield($svcdb. '__'. $row); - my $flag = $part_svc->getfield($svcdb. '__'. $row. '_flag'); - print "$ptmp$row"; - print "- $defs{$svcdb}{$row}" - if defined $defs{$svcdb}{$row}; - print ""; - print qq!Off"; - print qq!Default "; - print qq!Fixed "; - print qq!!, - "\n"; - $ptmp=''; - } -} -print ""; - -print qq!\n
                  !; - -print < - - -END - diff --git a/htdocs/edit/process/agent.cgi b/htdocs/edit/process/agent.cgi deleted file mode 100755 index c1b397aac..000000000 --- a/htdocs/edit/process/agent.cgi +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: agent.cgi,v 1.7 1999-01-25 12:09:57 ivan Exp $ -# -# ivan@sisd.com 97-dec-12 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: agent.cgi,v $ -# Revision 1.7 1999-01-25 12:09:57 ivan -# yet more mod_perl stuff -# -# Revision 1.6 1999/01/19 05:13:47 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 22:47:49 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.4 1998/12/30 23:03:26 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.3 1998/12/17 08:40:16 ivan -# s/CGI::Request/CGI.pm/; etc -# -# Revision 1.2 1998/11/23 07:52:29 ivan -# *** empty log message *** -# - -use strict; -use vars qw ( $cgi $agentnum $old $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs fields); -use FS::agent; -use FS::CGI qw(popurl); - -$cgi = new CGI; - -&cgisuidsetup($cgi); - -$agentnum = $cgi->param('agentnum'); - -$old = qsearchs('agent',{'agentnum'=>$agentnum}) if $agentnum; - -$new = new FS::agent ( { - map { - $_, scalar($cgi->param($_)); - } fields('agent') -} ); - -if ( $agentnum ) { - $error=$new->replace($old); -} else { - $error=$new->insert; - $agentnum=$new->getfield('agentnum'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "agent.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/agent.cgi"); -} - diff --git a/htdocs/edit/process/agent_type.cgi b/htdocs/edit/process/agent_type.cgi deleted file mode 100755 index 99c54ab3b..000000000 --- a/htdocs/edit/process/agent_type.cgi +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: agent_type.cgi,v 1.7 1999-01-25 12:09:58 ivan Exp $ -# -# ivan@sisd.com 97-dec-11 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: agent_type.cgi,v $ -# Revision 1.7 1999-01-25 12:09:58 ivan -# yet more mod_perl stuff -# -# Revision 1.6 1999/01/19 05:13:48 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 22:47:50 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.4 1998/12/30 23:03:27 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.3 1998/12/17 08:40:17 ivan -# s/CGI::Request/CGI.pm/; etc -# -# Revision 1.2 1998/11/21 07:49:20 ivan -# s/CGI::Request/CGI.pm/ -# - -use strict; -use vars qw ( $cgi $typenum $old $new $error $part_pkg ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::CGI qw( popurl); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs fields); -use FS::agent_type; -use FS::type_pkgs; -use FS::part_pkg; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$typenum = $cgi->param('typenum'); -$old = qsearchs('agent_type',{'typenum'=>$typenum}) if $typenum; - -$new = new FS::agent_type ( { - map { - $_, scalar($cgi->param($_)); - } fields('agent_type') -} ); - -if ( $typenum ) { - $error=$new->replace($old); -} else { - $error=$new->insert; - $typenum=$new->getfield('typenum'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "agent_type.cgi?". $cgi->query_string ); - exit; -} - -foreach $part_pkg (qsearch('part_pkg',{})) { - my($pkgpart)=$part_pkg->getfield('pkgpart'); - - my($type_pkgs)=qsearchs('type_pkgs',{ - 'typenum' => $typenum, - 'pkgpart' => $pkgpart, - }); - if ( $type_pkgs && ! $cgi->param("pkgpart$pkgpart") ) { - my($d_type_pkgs)=$type_pkgs; #need to save $type_pkgs for below. - $error=$d_type_pkgs->delete; - die $error if $error; - - } elsif ( $cgi->param("pkgpart$pkgpart") - && ! $type_pkgs - ) { - #ok to clobber it now (but bad form nonetheless?) - $type_pkgs=new FS::type_pkgs ({ - 'typenum' => $typenum, - 'pkgpart' => $pkgpart, - }); - $error= $type_pkgs->insert; - die $error if $error; - } - -} - -print $cgi->redirect(popurl(3). "browse/agent_type.cgi"); - diff --git a/htdocs/edit/process/cust_credit.cgi b/htdocs/edit/process/cust_credit.cgi deleted file mode 100755 index ea9c5a3a2..000000000 --- a/htdocs/edit/process/cust_credit.cgi +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_credit.cgi,v 1.7 1999-04-07 15:23:05 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/cust_credit.cgi -# -# ivan@voicenet.com 96-dec-05 -> 96-dec-08 -# -# post a refund if $new_paybatch -# ivan@voicenet.com 96-dec-08 -# -# refunds are no longer applied against a specific payment (paybatch) -# paybatch field removed -# ivan@voicenet.com 97-apr-22 -# -# rewrite ivan@sisd.com 98-mar-16 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: cust_credit.cgi,v $ -# Revision 1.7 1999-04-07 15:23:05 ivan -# don't use anchor in redirect -# -# Revision 1.6 1999/02/28 00:03:41 ivan -# removed misleading comments -# -# Revision 1.5 1999/01/25 12:09:59 ivan -# yet more mod_perl stuff -# -# Revision 1.4 1999/01/19 05:13:49 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1999/01/18 22:47:51 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.2 1998/12/17 08:40:18 ivan -# s/CGI::Request/CGI.pm/; etc -# - -use strict; -use vars qw( $cgi $custnum $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup getotaker); -use FS::CGI qw(popurl); -use FS::Record qw(fields); -use FS::cust_credit; - -$cgi = new CGI; -cgisuidsetup($cgi); - -$cgi->param('custnum') =~ /^(\d*)$/ or die "Illegal custnum!"; -$custnum = $1; - -$cgi->param('otaker',getotaker); - -$new = new FS::cust_credit ( { - map { - $_, scalar($cgi->param($_)); - #} qw(custnum _date amount otaker reason) - } fields('cust_credit') -} ); - -$error=$new->insert; - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_credit.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); -} - - diff --git a/htdocs/edit/process/cust_main.cgi b/htdocs/edit/process/cust_main.cgi deleted file mode 100755 index 25dc0299b..000000000 --- a/htdocs/edit/process/cust_main.cgi +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_main.cgi,v 1.11 1999-08-10 12:54:06 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/cust_main.cgi -# -# ivan@voicenet.com 96-dec-04 -# -# added referral check -# ivan@voicenet.com 97-jun-4 -# -# rewrote for new API -# ivan@voicenet.com 97-jul-28 -# -# same as above (again) and clean up some stuff ivan@sisd.com 98-feb-23 -# -# Changes to allow page to work at a relative position in server -# Changed 'day' to 'daytime' because Pg6.3 reserves the day word -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: cust_main.cgi,v $ -# Revision 1.11 1999-08-10 12:54:06 ivan -# use FS::cust_pkg::pkgpart_href -# -# Revision 1.10 1999/04/14 07:47:53 ivan -# i18n fixes -# -# Revision 1.9 1999/04/07 15:22:19 ivan -# don't use anchor in redirect -# -# Revision 1.8 1999/03/25 13:55:10 ivan -# one-screen new customer entry (including package and service) for simple -# packages with one svc_acct service -# -# Revision 1.7 1999/02/28 00:03:42 ivan -# removed misleading comments -# -# Revision 1.6 1999/01/25 12:10:00 ivan -# yet more mod_perl stuff -# -# Revision 1.5 1999/01/19 05:13:50 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:22:32 ivan -# changes to track email addresses for email invoicing -# -# Revision 1.3 1998/12/17 08:40:19 ivan -# s/CGI::Request/CGI.pm/; etc -# -# Revision 1.2 1998/11/18 08:57:36 ivan -# i18n, s/CGI-modules/CGI.pm/, FS::CGI::idiot instead of inline, FS::CGI::popurl -# - -use strict; -use vars qw( $cgi $payby @invoicing_list $new $custnum $error ); -use vars qw( $cust_pkg $cust_svc $svc_acct ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup getotaker); -use FS::CGI qw( popurl ); -use FS::Record qw( qsearch qsearchs fields ); -use FS::cust_main; -use FS::type_pkgs; -use FS::agent; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -#unmunge stuff - -$cgi->param('tax','') unless defined($cgi->param('tax')); - -$cgi->param('refnum', (split(/:/, ($cgi->param('refnum'))[0] ))[0] ); - -$cgi->param('state') =~ /^(\w*)( \(([\w ]+)\))? ?\/ ?(\w+)$/ - or die "Oops, illegal \"state\" param: ". $cgi->param('state'); -$cgi->param('state', $1); -$cgi->param('county', $3 || ''); -$cgi->param('country', $4); - -if ( $payby = $cgi->param('payby') ) { - $cgi->param('payinfo', $cgi->param( $payby. '_payinfo' ) ); - $cgi->param('paydate', - $cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ) ); - $cgi->param('payname', $cgi->param( $payby. '_payname' ) ); -} - -$cgi->param('otaker', &getotaker ); - -@invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') ); -push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST'); - -#create new record object - -$new = new FS::cust_main ( { - map { - $_, scalar($cgi->param($_)) -# } qw(custnum agentnum last first ss company address1 address2 city county -# state zip daytime night fax payby payinfo paydate payname tax -# otaker refnum) - } fields('cust_main') -} ); - -#perhaps the invocing_list magic should move to cust_main.pm? -$error = $new->check_invoicing_list( \@invoicing_list ); - -#perhaps this stuff should go to cust_main.pm as well -$cust_pkg = ''; -$svc_acct = ''; -if ( $new->custnum eq '' ) { - - if ( $cgi->param('pkgpart_svcpart') ) { - my $x = $cgi->param('pkgpart_svcpart'); - $x =~ /^(\d+)_(\d+)$/; - my($pkgpart, $svcpart) = ($1, $2); - #false laziness: copied from FS::cust_pkg::order (which should become a - #FS::cust_main method) - my(%part_pkg); - # generate %part_pkg - # $part_pkg{$pkgpart} is true iff $custnum may purchase $pkgpart - my $agent = qsearchs('agent',{'agentnum'=> $new->agentnum }); - #my($type_pkgs); - #foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { - # my($pkgpart)=$type_pkgs->pkgpart; - # $part_pkg{$pkgpart}++; - #} - # $pkgpart_href->{PKGPART} is true iff $custnum may purchase $pkgpart - my $pkgpart_href = $agent->pkgpart_hashref; - #eslaf - - # this should wind up in FS::cust_pkg! - $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't". - "purchase pkgpart ". $pkgpart - #unless $part_pkg{ $pkgpart }; - unless $pkgpart_href->{ $pkgpart }; - - $cust_pkg = new FS::cust_pkg ( { - #later 'custnum' => $custnum, - 'pkgpart' => $pkgpart, - } ); - $error ||= $cust_pkg->check; - - #$cust_svc = new FS::cust_svc ( { 'svcpart' => $svcpart } ); - - #$error ||= $cust_svc->check; - - $svc_acct = new FS::svc_acct ( { - 'svcpart' => $svcpart, - 'username' => $cgi->param('username'), - '_password' => $cgi->param('_password'), - 'popnum' => $cgi->param('popnum'), - } ); - - my $y = $svc_acct->setdefault; # arguably should be in new method - $error ||= $y unless ref($y); - #and just in case you were silly - $svc_acct->svcpart($svcpart); - $svc_acct->username($cgi->param('username')); - $svc_acct->_password($cgi->param('_password')); - $svc_acct->popnum($cgi->param('popnum')); - - $error ||= $svc_acct->check; - - } elsif ( $cgi->param('username') ) { #good thing to catch - $error = "Can't assign username without a package!"; - } - - $error ||= $new->insert; - if ( $cust_pkg && ! $error ) { - $cust_pkg->custnum( $new->custnum ); - $error ||= $cust_pkg->insert; - warn "WARNING: $error on pre-checked cust_pkg record!" if $error; - $svc_acct->pkgnum( $cust_pkg->pkgnum ); - $error ||= $svc_acct->insert; - warn "WARNING: $error on pre-checked svc_acct record!" if $error; - } -} else { #create old record object - my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } ); - $error ||= "Old record not found!" unless $old; - $error ||= $new->replace($old); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_main.cgi?". $cgi->query_string ); -} else { - $new->invoicing_list( \@invoicing_list ); - $custnum = $new->custnum; - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); -} diff --git a/htdocs/edit/process/cust_main_county-expand.cgi b/htdocs/edit/process/cust_main_county-expand.cgi deleted file mode 100755 index a174a0a8e..000000000 --- a/htdocs/edit/process/cust_main_county-expand.cgi +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_main_county-expand.cgi,v 1.7 2000-12-21 05:22:30 ivan Exp $ -# -# ivan@sisd.com 97-dec-16 -# -# Changes to allow page to work at a relative position in server -# Added import of datasrc from UID.pm for Pg6.3 -# Default tax to 0.0 if using Pg6.3 -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI -# undo default tax to 0.0 if using Pg6.3: comes from pre-expanded record -# for that state -# ivan@sisd.com 98-sep-2 -# -# $Log: cust_main_county-expand.cgi,v $ -# Revision 1.7 2000-12-21 05:22:30 ivan -# perldoc -f split -# -# Revision 1.6 1999/01/25 12:19:07 ivan -# yet more mod_perl stuff -# -# Revision 1.5 1999/01/19 05:13:51 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 22:47:52 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.3 1998/12/17 08:40:20 ivan -# s/CGI::Request/CGI.pm/; etc -# -# Revision 1.2 1998/11/18 09:01:40 ivan -# i18n! i18n! -# - -use strict; -use vars qw ( $cgi $taxnum $cust_main_county @expansion $expansion ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup datasrc); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(popurl); -use FS::cust_main_county; -use FS::cust_main; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$cgi->param('taxnum') =~ /^(\d+)$/ or die "Illegal taxnum!"; -$taxnum = $1; -$cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum}) - or die ("Unknown taxnum!"); - -if ( $cgi->param('delim') eq 'n' ) { - @expansion=split(/\n/,$cgi->param('expansion')); -} elsif ( $cgi->param('delim') eq 's' ) { - @expansion=split(' ',$cgi->param('expansion')); -} else { - die "Illegal delim!"; -} - -@expansion=map { - unless ( /^\s*([\w\- ]+)\s*$/ ) { - $cgi->param('error', "Illegal item in expansion"); - print $cgi->redirect(popurl(2). "cust_main_county-expand.cgi?". $cgi->query_string ); - exit; - } - $1; -} @expansion; - -foreach ( @expansion) { - my(%hash)=$cust_main_county->hash; - my($new)=new FS::cust_main_county \%hash; - $new->setfield('taxnum',''); - if ( ! $cust_main_county->state ) { - $new->setfield('state',$_); - } else { - $new->setfield('county',$_); - } - #if (datasrc =~ m/Pg/) - #{ - # $new->setfield('tax',0.0); - #} - my($error)=$new->insert; - die $error if $error; -} - -unless ( qsearch('cust_main',{ - 'state' => $cust_main_county->getfield('state'), - 'county' => $cust_main_county->getfield('county'), - 'country' => $cust_main_county->getfield('country'), -} ) ) { - my($error)=($cust_main_county->delete); - die $error if $error; -} - -print $cgi->redirect(popurl(3). "edit/cust_main_county.cgi"); - diff --git a/htdocs/edit/process/cust_main_county.cgi b/htdocs/edit/process/cust_main_county.cgi deleted file mode 100755 index 0fc1708c5..000000000 --- a/htdocs/edit/process/cust_main_county.cgi +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_main_county.cgi,v 1.6 1999-01-25 12:19:08 ivan Exp $ -# -# ivan@sisd.com 97-dec-16 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: cust_main_county.cgi,v $ -# Revision 1.6 1999-01-25 12:19:08 ivan -# yet more mod_perl stuff -# -# Revision 1.5 1999/01/19 05:13:52 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 22:47:53 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.3 1998/12/17 08:40:21 ivan -# s/CGI::Request/CGI.pm/; etc -# -# Revision 1.2 1998/11/18 09:01:41 ivan -# i18n! i18n! -# - -use strict; -use vars qw( $cgi ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl); -use FS::Record qw(qsearch qsearchs); -use FS::cust_main_county; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -foreach ( $cgi->param ) { - /^tax(\d+)$/ or die "Illegal form $_!"; - my($taxnum)=$1; - my($old)=qsearchs('cust_main_county',{'taxnum'=>$taxnum}) - or die "Couldn't find taxnum $taxnum!"; - next unless $old->getfield('tax') ne $cgi->param("tax$taxnum"); - my(%hash)=$old->hash; - $hash{tax}=$cgi->param("tax$taxnum"); - my($new)=new FS::cust_main_county \%hash; - my($error)=$new->replace($old); - if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_main_county.cgi?". $cgi->query_string ); - exit; - } -} - -print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi"); - diff --git a/htdocs/edit/process/cust_pay.cgi b/htdocs/edit/process/cust_pay.cgi deleted file mode 100755 index ca5029c3c..000000000 --- a/htdocs/edit/process/cust_pay.cgi +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_pay.cgi,v 1.7 1999-02-28 00:03:43 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/cust_pay.cgi -# -# ivan@voicenet.com 96-dec-11 -# -# rewrite ivan@sisd.com 98-mar-16 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: cust_pay.cgi,v $ -# Revision 1.7 1999-02-28 00:03:43 ivan -# removed misleading comments -# -# Revision 1.6 1999/01/25 12:19:09 ivan -# yet more mod_perl stuff -# -# Revision 1.5 1999/01/19 05:13:53 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 22:47:54 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.3 1998/12/30 23:03:28 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.2 1998/12/17 08:40:22 ivan -# s/CGI::Request/CGI.pm/; etc -# - -use strict; -use vars qw( $cgi $invnum $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl); -use FS::Record qw(fields); -use FS::cust_pay; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$cgi->param('invnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -$invnum = $1; - -$new = new FS::cust_pay ( { - map { - $_, scalar($cgi->param($_)); - #} qw(invnum paid _date payby payinfo paybatch) - } fields('cust_pay') -} ); - -$error=$new->insert; - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). 'cust_pay.cgi?'. $cgi->query_string ); - exit; -} else { - print $cgi->redirect(popurl(3). "view/cust_bill.cgi?$invnum"); -} - diff --git a/htdocs/edit/process/cust_pkg.cgi b/htdocs/edit/process/cust_pkg.cgi deleted file mode 100755 index 9d82b3c24..000000000 --- a/htdocs/edit/process/cust_pkg.cgi +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_pkg.cgi,v 1.7 1999-04-07 15:24:06 ivan Exp $ -# -# this is for changing packages around, not for editing things within the -# package -# -# Usage: post form to: -# http://server.name/path/cust_pkg.cgi -# -# ivan@voicenet.com 97-mar-21 - 97-mar-24 -# -# rewrote for new API -# ivan@voicenet.com 97-jul-7 - 15 -# -# &cgisuidsetup($cgi) ivan@sisd.com 98-mar-7 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: cust_pkg.cgi,v $ -# Revision 1.7 1999-04-07 15:24:06 ivan -# don't use anchor in redirect -# -# Revision 1.6 1999/02/28 00:03:44 ivan -# removed misleading comments -# -# Revision 1.5 1999/02/07 09:59:26 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.3 1999/01/19 05:13:54 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.2 1998/12/17 08:40:23 ivan -# s/CGI::Request/CGI.pm/; etc -# - -use strict; -use vars qw( $cgi $custnum @remove_pkgnums @pkgparts $pkgpart $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl); -use FS::cust_pkg; - -$cgi = new CGI; # create form object -&cgisuidsetup($cgi); -$error = ''; - -#untaint custnum -$cgi->param('custnum') =~ /^(\d+)$/; -$custnum = $1; - -@remove_pkgnums = map { - /^(\d+)$/ or die "Illegal remove_pkg value!"; - $1; -} $cgi->param('remove_pkg'); - -foreach $pkgpart ( map /^pkg(\d+)$/ ? $1 : (), $cgi->param ) { - if ( $cgi->param("pkg$pkgpart") =~ /^(\d+)$/ ) { - my $num_pkgs = $1; - while ( $num_pkgs-- ) { - push @pkgparts,$pkgpart; - } - } else { - $error = "Illegal quantity"; - last; - } -} - -$error ||= FS::cust_pkg::order($custnum,\@pkgparts,\@remove_pkgnums); - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_pkg.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); -} - diff --git a/htdocs/edit/process/part_pkg.cgi b/htdocs/edit/process/part_pkg.cgi deleted file mode 100755 index 5af9055d6..000000000 --- a/htdocs/edit/process/part_pkg.cgi +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: part_pkg.cgi,v 1.9 2001-04-09 23:05:16 ivan Exp $ -# -# process/part_pkg.cgi: Edit package definitions (process form) -# -# ivan@sisd.com 97-dec-10 -# -# don't update non-changing records in part_svc (causing harmless but annoying -# "Records identical" errors). ivan@sisd.com 98-feb-19 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# Added `|| 0 ' when getting quantity off web page ivan@sisd.com 98-jun-4 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: part_pkg.cgi,v $ -# Revision 1.9 2001-04-09 23:05:16 ivan -# Transactions Part I!!! -# -# Revision 1.8 1999/02/07 09:59:27 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.7 1999/01/19 05:13:55 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.6 1999/01/18 22:47:56 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.5 1998/12/30 23:03:29 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.4 1998/12/17 08:40:24 ivan -# s/CGI::Request/CGI.pm/; etc -# -# Revision 1.3 1998/11/21 07:17:58 ivan -# bugfix to work for regular aswell as custom pricing -# -# Revision 1.2 1998/11/15 13:16:15 ivan -# first pass as per-user custom pricing -# - -use strict; -use vars qw( $cgi $pkgpart $old $new $part_svc $error $dbh ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl); -use FS::Record qw(qsearch qsearchs fields); -use FS::part_pkg; -use FS::pkg_svc; -use FS::cust_pkg; - -$cgi = new CGI; -$dbh = &cgisuidsetup($cgi); - -$pkgpart = $cgi->param('pkgpart'); - -$old = qsearchs('part_pkg',{'pkgpart'=>$pkgpart}) if $pkgpart; - -$new = new FS::part_pkg ( { - map { - $_, scalar($cgi->param($_)); - } fields('part_pkg') -} ); - -#most of the stuff below should move to part_pkg.pm - -foreach $part_svc ( qsearch('part_svc', {} ) ) { - my $quantity = $cgi->param('pkg_svc'. $part_svc->svcpart) || 0; - unless ( $quantity =~ /^(\d+)$/ ) { - $cgi->param('error', "Illegal quantity" ); - print $cgi->redirect(popurl(2). "part_pkg.cgi?". $cgi->query_string ); - exit; - } -} - -local $SIG{HUP} = 'IGNORE'; -local $SIG{INT} = 'IGNORE'; -local $SIG{QUIT} = 'IGNORE'; -local $SIG{TERM} = 'IGNORE'; -local $SIG{TSTP} = 'IGNORE'; -local $SIG{PIPE} = 'IGNORE'; - -local $FS::UID::AutoCommit = 0; - -if ( $pkgpart ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $pkgpart=$new->pkgpart; -} -if ( $error ) { - $dbh->rollback; - $cgi->param('error', $error ); - print $cgi->redirect(popurl(2). "part_pkg.cgi?". $cgi->query_string ); - exit; -} - -foreach $part_svc (qsearch('part_svc',{})) { - my $quantity = $cgi->param('pkg_svc'. $part_svc->svcpart) || 0; - my $old_pkg_svc = qsearchs('pkg_svc', { - 'pkgpart' => $pkgpart, - 'svcpart' => $part_svc->svcpart, - } ); - my $old_quantity = $old_pkg_svc ? $old_pkg_svc->quantity : 0; - next unless $old_quantity != $quantity; #!here - my $new_pkg_svc = new FS::pkg_svc( { - 'pkgpart' => $pkgpart, - 'svcpart' => $part_svc->svcpart, - 'quantity' => $quantity, - } ); - if ( $old_pkg_svc ) { - my $myerror = $new_pkg_svc->replace($old_pkg_svc); - if ( $myerror ) { - $dbh->rollback; - die $myerror; - } - } else { - my $myerror = $new_pkg_svc->insert; - if ( $myerror ) { - $dbh->rollback; - die $myerror; - } - } -} - -unless ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) { - $dbh->commit or die $dbh->errstr; - print $cgi->redirect(popurl(3). "browse/part_pkg.cgi"); -} else { - my($old_cust_pkg) = qsearchs( 'cust_pkg', { 'pkgnum' => $1 } ); - my %hash = $old_cust_pkg->hash; - $hash{'pkgpart'} = $pkgpart; - my($new_cust_pkg) = new FS::cust_pkg \%hash; - my $myerror = $new_cust_pkg->replace($old_cust_pkg); - if ( $myerror ) { - $dbh->rollback; - die "Error modifying cust_pkg record: $myerror\n"; - } - - $dbh->commit or die $dbh->errstr; - print $cgi->redirect(popurl(3). "view/cust_main.cgi?". $new_cust_pkg->custnum); -} - diff --git a/htdocs/edit/process/part_referral.cgi b/htdocs/edit/process/part_referral.cgi deleted file mode 100755 index cde27ede1..000000000 --- a/htdocs/edit/process/part_referral.cgi +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: part_referral.cgi,v 1.6 1999-02-07 09:59:28 ivan Exp $ -# -# ivan@sisd.com 98-feb-23 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: part_referral.cgi,v $ -# Revision 1.6 1999-02-07 09:59:28 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.5 1999/01/19 05:13:56 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 22:47:57 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.3 1998/12/30 23:03:30 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.2 1998/12/17 08:40:25 ivan -# s/CGI::Request/CGI.pm/; etc -# - -use strict; -use vars qw( $cgi $refnum $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearchs fields); -use FS::part_referral; -use FS::CGI qw(popurl); - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$refnum = $cgi->param('refnum'); - -$new = new FS::part_referral ( { - map { - $_, scalar($cgi->param($_)); - } fields('part_referral') -} ); - -if ( $refnum ) { - my $old = qsearchs( 'part_referral', { 'refnum' =>$ refnum } ); - die "(Old) Record not found!" unless $old; - $error = $new->replace($old); -} else { - $error = $new->insert; -} -$refnum=$new->refnum; - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "part_referral.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/part_referral.cgi"); -} - diff --git a/htdocs/edit/process/part_svc.cgi b/htdocs/edit/process/part_svc.cgi deleted file mode 100755 index 0b3e2cd1c..000000000 --- a/htdocs/edit/process/part_svc.cgi +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: part_svc.cgi,v 1.7 1999-02-07 09:59:29 ivan Exp $ -# -# ivan@sisd.com 97-nov-14 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: part_svc.cgi,v $ -# Revision 1.7 1999-02-07 09:59:29 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.6 1999/01/19 05:13:57 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 22:47:58 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.4 1998/12/30 23:03:31 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.3 1998/12/17 08:40:26 ivan -# s/CGI::Request/CGI.pm/; etc -# -# Revision 1.2 1998/11/21 06:43:08 ivan -# s/CGI::Request/CGI.pm/ -# - -use strict; -use vars qw ( $cgi $svcpart $old $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearchs fields); -use FS::part_svc; -use FS::CGI qw(popurl); - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$svcpart = $cgi->param('svcpart'); - -$old = qsearchs('part_svc',{'svcpart'=>$svcpart}) if $svcpart; - -$new = new FS::part_svc ( { - map { - $_, scalar($cgi->param($_)); -# } qw(svcpart svc svcdb) - } fields('part_svc') -} ); - -if ( $svcpart ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $svcpart=$new->getfield('svcpart'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "part_svc.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3)."browse/part_svc.cgi"); -} - diff --git a/htdocs/edit/process/svc_acct.cgi b/htdocs/edit/process/svc_acct.cgi deleted file mode 100755 index 84f93abe8..000000000 --- a/htdocs/edit/process/svc_acct.cgi +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct.cgi,v 1.7 1999-08-27 00:26:33 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/svc_acct.cgi -# -# ivan@voicenet.com 96-dec-18 -# -# Changed /u to /u2 -# ivan@voicenet.com 97-may-6 -# -# rewrote for new API -# ivan@voicenet.com 97-jul-17 - 21 -# -# no FS::Search, FS::svc_acct creates FS::cust_svc record, used for adding -# and editing ivan@sisd.com 98-mar-8 -# -# Changes to allow page to work at a relative position in server -# Changed 'password' to '_password' because Pg6.3 reserves the password word -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: svc_acct.cgi,v $ -# Revision 1.7 1999-08-27 00:26:33 ivan -# better error messages -# -# Revision 1.6 1999/02/28 00:03:45 ivan -# removed misleading comments -# -# Revision 1.5 1999/02/07 09:59:30 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.4 1999/01/19 05:13:58 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1999/01/18 22:47:59 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.2 1998/12/17 08:40:27 ivan -# s/CGI::Request/CGI.pm/; etc -# - -use strict; -use vars qw( $cgi $svcnum $old $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl); -use FS::Record qw(qsearchs fields); -use FS::svc_acct; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -$svcnum = $1; - -if ( $svcnum ) { - $old = qsearchs('svc_acct', { 'svcnum' => $svcnum } ) - or die "fatal: can't find account (svcnum $svcnum)!"; -} else { - $old = ''; -} - -#unmunge popnum -$cgi->param('popnum', (split(/:/, $cgi->param('popnum') ))[0] ); - -#unmunge passwd -if ( $cgi->param('_password') eq '*HIDDEN*' ) { - die "fatal: no previous account to recall hidden password from!" unless $old; - $cgi->param('_password',$old->getfield('_password')); -} - -$new = new FS::svc_acct ( { - map { - $_, scalar($cgi->param($_)); - #} qw(svcnum pkgnum svcpart username _password popnum uid gid finger dir - # shell quota slipip) - } ( fields('svc_acct'), qw( pkgnum svcpart ) ) -} ); - -if ( $svcnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $svcnum = $new->svcnum; -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_acct.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_acct.cgi?" . $svcnum ); -} - diff --git a/htdocs/edit/process/svc_acct_pop.cgi b/htdocs/edit/process/svc_acct_pop.cgi deleted file mode 100755 index 763bca4a8..000000000 --- a/htdocs/edit/process/svc_acct_pop.cgi +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct_pop.cgi,v 1.6 1999-02-07 09:59:31 ivan Exp $ -# -# ivan@sisd.com 98-mar-8 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: svc_acct_pop.cgi,v $ -# Revision 1.6 1999-02-07 09:59:31 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.5 1999/01/19 05:13:59 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 22:48:00 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.3 1998/12/30 23:03:32 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.2 1998/12/17 08:40:28 ivan -# s/CGI::Request/CGI.pm/; etc -# - -use strict; -use vars qw( $cgi $popnum $old $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs fields); -use FS::svc_acct_pop; -use FS::CGI qw(popurl); - -$cgi = new CGI; # create form object - -&cgisuidsetup($cgi); - -$popnum = $cgi->param('popnum'); - -$old = qsearchs('svc_acct_pop',{'popnum'=>$popnum}) if $popnum; - -$new = new FS::svc_acct_pop ( { - map { - $_, scalar($cgi->param($_)); - } fields('svc_acct_pop') -} ); - -if ( $popnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $popnum=$new->getfield('popnum'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_acct_pop.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/svc_acct_pop.cgi"); -} - diff --git a/htdocs/edit/process/svc_acct_sm.cgi b/htdocs/edit/process/svc_acct_sm.cgi deleted file mode 100755 index 9c39bb8e5..000000000 --- a/htdocs/edit/process/svc_acct_sm.cgi +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct_sm.cgi,v 1.6 1999-02-28 00:03:46 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/svc_acct_sm.cgi -# -# lots of crufty stuff from svc_acct still in here, and modifications are (unelegantly) disabled. -# -# ivan@voicenet.com 97-jan-6 -# -# enabled modifications -# -# ivan@voicenet.com 97-may-7 -# -# fixed removal of cust_svc record on modifications! -# ivan@voicenet.com 97-jun-5 -# -# rewrite ivan@sisd.com 98-mar-15 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: svc_acct_sm.cgi,v $ -# Revision 1.6 1999-02-28 00:03:46 ivan -# removed misleading comments -# -# Revision 1.5 1999/02/07 09:59:32 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.4 1999/01/19 05:14:00 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1999/01/18 22:48:01 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.2 1998/12/17 08:40:29 ivan -# s/CGI::Request/CGI.pm/; etc -# - -use strict; -use vars qw( $cgi $svcnum $old $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearchs fields); -use FS::svc_acct_sm; -use FS::CGI qw(popurl); - -$cgi = new CGI; -cgisuidsetup($cgi); - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -$svcnum =$1; - -$old = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) if $svcnum; - -#unmunge domsvc and domuid -#$cgi->param('domsvc',(split(/:/, $cgi->param('domsvc') ))[0] ); -#$cgi->param('domuid',(split(/:/, $cgi->param('domuid') ))[0] ); - -$new = new FS::svc_acct_sm ( { - map { - ($_, scalar($cgi->param($_))); - #} qw(svcnum pkgnum svcpart domuser domuid domsvc) - } ( fields('svc_acct_sm'), qw( pkgnum svcpart ) ) -} ); - -if ( $svcnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $svcnum = $new->getfield('svcnum'); -} - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_acct_sm.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_acct_sm.cgi?$svcnum"); -} - diff --git a/htdocs/edit/process/svc_domain.cgi b/htdocs/edit/process/svc_domain.cgi deleted file mode 100755 index ad1892dd1..000000000 --- a/htdocs/edit/process/svc_domain.cgi +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_domain.cgi,v 1.7 2001-04-23 07:12:44 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/svc_domain.cgi -# -# lots of yucky stuff in this one... bleachlkjhui! -# -# ivan@voicenet.com 97-jan-6 -# -# kludged for new domain template 3.5 -# ivan@voicenet.com 97-jul-24 -# -# moved internic bits to svc_domain.pm ivan@sisd.com 98-mar-14 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: svc_domain.cgi,v $ -# Revision 1.7 2001-04-23 07:12:44 ivan -# better error message (if kludgy) for no referral -# remove outdated NSI foo from domain ordering. also, fuck NSI. -# -# Revision 1.6 1999/02/28 00:03:47 ivan -# removed misleading comments -# -# Revision 1.5 1999/02/07 09:59:33 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.4 1999/01/19 05:14:01 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1999/01/18 22:48:02 ivan -# s/create/new/g; and use fields('table_name') -# -# Revision 1.2 1998/12/17 08:40:30 ivan -# s/CGI::Request/CGI.pm/; etc -# - -use strict; -use vars qw( $cgi $svcnum $new $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearchs fields); -use FS::svc_domain; -use FS::CGI qw(popurl); - -#remove this to actually test the domains! -$FS::svc_domain::whois_hack = 1; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -$svcnum = $1; - -$new = new FS::svc_domain ( { - map { - $_, scalar($cgi->param($_)); - #} qw(svcnum pkgnum svcpart domain action purpose) - } ( fields('svc_domain'), qw( pkgnum svcpart action purpose ) ) -} ); - -if ($cgi->param('svcnum')) { - $error="Can't modify a domain!"; -} else { - $error=$new->insert; - $svcnum=$new->svcnum; -} - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_domain.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum"); -} - diff --git a/htdocs/edit/svc_acct.cgi b/htdocs/edit/svc_acct.cgi deleted file mode 100755 index 963bc1edf..000000000 --- a/htdocs/edit/svc_acct.cgi +++ /dev/null @@ -1,228 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct.cgi,v 1.10 1999-04-14 11:27:06 ivan Exp $ -# -# Usage: svc_acct.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} -# http://server.name/path/svc_acct.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} -# -# ivan@voicenet.com 96-dec-18 -# -# rewrite ivan@sisd.com 98-mar-8 -# -# Changes to allow page to work at a relative position in server -# Changed 'password' to '_password' because Pg6.3 reserves the password word -# bmccane@maxbaud.net 98-apr-3 -# -# use conf/shells and dbdef username length ivan@sisd.com 98-jul-13 -# -# $Log: svc_acct.cgi,v $ -# Revision 1.10 1999-04-14 11:27:06 ivan -# showpasswords config option to show passwords -# -# Revision 1.9 1999/02/28 00:03:37 ivan -# removed misleading comments -# -# Revision 1.8 1999/02/23 08:09:22 ivan -# beginnings of one-screen new customer entry and some other miscellania -# -# Revision 1.7 1999/02/07 09:59:22 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.6 1999/01/19 05:13:43 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:32 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1998/12/30 23:03:22 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.3 1998/12/17 06:17:08 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# - -use strict; -use vars qw( $conf $cgi @shells $action $svcnum $svc_acct $pkgnum $svcpart - $part_svc $svc $otaker $username $password $ulen $ulen2 $p1 - $popnum $uid $gid $finger $dir $shell $quota $slipip ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup getotaker); -use FS::CGI qw(header popurl); -use FS::Record qw(qsearch qsearchs fields); -use FS::svc_acct; -use FS::Conf; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$conf = new FS::Conf; -@shells = $conf->config('shells'); - -if ( $cgi->param('error') ) { - $svc_acct = new FS::svc_acct ( { - map { $_, scalar($cgi->param($_)) } fields('svc_acct') - } ); - $svcnum = $svc_acct->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; -} else { - my($query) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_acct=qsearchs('svc_acct',{'svcnum'=>$svcnum}) - or die "Unknown (svc_acct) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - } else { #adding - - $svc_acct = new FS::svc_acct({}); - - foreach $_ (split(/-/,$query)) { - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; - } - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - $svcnum=''; - - #set gecos - my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - if ($cust_pkg) { - my($cust_main)=qsearchs('cust_main',{'custnum'=> $cust_pkg->custnum } ); - $svc_acct->setfield('finger', - $cust_main->getfield('first') . " " . $cust_main->getfield('last') - ) ; - } - - #set fixed and default fields from part_svc - my($field); - foreach $field ( fields('svc_acct') ) { - if ( $part_svc->getfield('svc_acct__'. $field. '_flag') ne '' ) { - $svc_acct->setfield($field,$part_svc->getfield('svc_acct__'. $field) ); - } - } - - } -} -$action = $svcnum ? 'Edit' : 'Add'; - -$svc = $part_svc->getfield('svc'); - -$otaker = getotaker; - -$username = $svc_acct->username; -if ( $svc_acct->_password ) { - if ( $conf->exists('showpasswords') ) { - $password = $svc_acct->_password; - } else { - $password = "*HIDDEN*"; - } -} else { - $password = ''; -} - -$ulen = $svc_acct->dbdef_table->column('username')->length; -$ulen2 = $ulen+2; - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("$action $svc account"); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print < - - - -Username: - -
                  Password: - -(blank to generate) -END - -#pop -$popnum = $svc_acct->popnum || 0; -if ( $part_svc->svc_acct__popnum_flag eq "F" ) { - print qq!!; -} else { - print qq!
                  POP: "; -} - -($uid,$gid,$finger,$dir)=( - $svc_acct->uid, - $svc_acct->gid, - $svc_acct->finger, - $svc_acct->dir, -); - -print < - -
                  GECOS: - -END - -$shell = $svc_acct->shell; -if ( $part_svc->svc_acct__shell_flag eq "F" ) { - print qq!!; -} else { - print qq!
                  Shell: "; -} - -($quota,$slipip)=( - $svc_acct->quota, - $svc_acct->slipip, -); - -print qq!!; - -if ( $part_svc->svc_acct__slipip_flag eq "F" ) { - print qq!!; -} else { - print qq!
                  IP: !; -} - -#submit -print qq!

                  !; - -print < - - -END - - diff --git a/htdocs/edit/svc_acct_pop.cgi b/htdocs/edit/svc_acct_pop.cgi deleted file mode 100755 index 1797b2b8e..000000000 --- a/htdocs/edit/svc_acct_pop.cgi +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct_pop.cgi,v 1.9 2000-01-28 23:02:48 ivan Exp $ -# -# ivan@sisd.com 98-mar-8 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# lose background, FS::CGI ivan@sisd.com 98-sep-2 -# -# $Log: svc_acct_pop.cgi,v $ -# Revision 1.9 2000-01-28 23:02:48 ivan -# track full phone number -# -# Revision 1.8 1999/02/23 08:09:23 ivan -# beginnings of one-screen new customer entry and some other miscellania -# -# Revision 1.7 1999/02/07 09:59:23 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.6 1999/01/19 05:13:44 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:33 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1998/12/23 02:57:45 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.3 1998/12/17 06:17:10 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.2 1998/11/13 09:56:47 ivan -# change configuration file layout to support multiple distinct databases (with -# own set of config files, export, etc.) -# - -use strict; -use vars qw( $cgi $svc_acct_pop $action $query $hashref $p1 ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs fields); -use FS::CGI qw(header menubar popurl); -use FS::svc_acct_pop; -$cgi = new CGI; -&cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - $svc_acct_pop = new FS::svc_acct_pop ( { - map { $_, scalar($cgi->param($_)) } fields('svc_acct_pop') - } ); -} elsif ( $cgi->keywords ) { #editing - my($query)=$cgi->keywords; - $query =~ /^(\d+)$/; - $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1}); -} else { #adding - $svc_acct_pop = new FS::svc_acct_pop {}; -} -$action = $svc_acct_pop->popnum ? 'Edit' : 'Add'; -$hashref = $svc_acct_pop->hashref; - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("$action POP", menubar( - 'Main Menu' => popurl(2), - 'View all POPs' => popurl(2). "browse/svc_acct_pop.cgi", -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!!; - -#display - -print qq!!, - "POP #", $hashref->{popnum} ? $hashref->{popnum} : "(NEW)"; - -print < -City -State -Area Code -Exchange -Local - -END - -print qq!
                  !; - -print < - - -END - diff --git a/htdocs/edit/svc_acct_sm.cgi b/htdocs/edit/svc_acct_sm.cgi deleted file mode 100755 index cb7cbfae0..000000000 --- a/htdocs/edit/svc_acct_sm.cgi +++ /dev/null @@ -1,247 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct_sm.cgi,v 1.9 1999-02-28 00:03:38 ivan Exp $ -# -# Usage: svc_acct_sm.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} -# http://server.name/path/svc_acct_sm.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart} -# -# use {svcnum} for edit, pkgnum{pkgnum}-svcpart{svcpart} for add -# -# should error out in a more CGI-friendly way, and should have more error checking (sigh). -# -# ivan@voicenet.com 97-jan-5 -# -# added debugging code; fixed CPU-sucking problem with trying to edit an (unaudited) mail alias (no pkgnum) -# -# ivan@voicenet.com 97-may-7 -# -# fixed uid selection -# ivan@voicenet.com 97-jun-4 -# -# uid selection across _CUSTOMER_, not just _PACKAGE_ -# -# ( i need to be rewritten with fast searches) -# -# ivan@voicenet.com 97-oct-3 -# -# added fast searches in some of the places where it is sorely needed... -# I see DBI::mysql in your future... -# ivan@voicenet.com 97-oct-23 -# -# rewrite ivan@sisd.com 98-mar-15 -# -# /var/spool/freeside/conf/domain ivan@sisd.com 98-jul-26 -# -# $Log: svc_acct_sm.cgi,v $ -# Revision 1.9 1999-02-28 00:03:38 ivan -# removed misleading comments -# -# Revision 1.8 1999/02/07 09:59:24 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.7 1999/01/19 05:13:45 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.6 1999/01/18 09:41:34 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.5 1998/12/30 23:03:24 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.4 1998/12/23 02:58:45 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.3 1998/12/17 06:17:11 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.2 1998/12/16 05:19:15 ivan -# use FS::Conf -# - -use strict; -use vars qw( $conf $cgi $mydomain $action $svcnum $svc_acct_sm $pkgnum $svcpart - $part_svc $query %username %domain $p1 $domuser $domsvc $domuid ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl); -use FS::Record qw(qsearch qsearchs fields); -use FS::svc_acct_sm; -use FS::Conf; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$conf = new FS::Conf; -$mydomain = $conf->config('domain'); - -if ( $cgi->param('error') ) { - $svc_acct_sm = new FS::svc_acct_sm ( { - map { $_, scalar($cgi->param($_)) } fields('svc_acct_sm') - } ); - $svcnum = $svc_acct_sm->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; -} else { - my($query) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_acct_sm=qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) - or die "Unknown (svc_acct_sm) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - } else { #adding - - $svc_acct_sm = new FS::svc_acct_sm({}); - - foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; - } - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - $svcnum=''; - - #set fixed and default fields from part_svc - my($field); - foreach $field ( fields('svc_acct_sm') ) { - if ( $part_svc->getfield('svc_acct_sm__'. $field. '_flag') ne '' ) { - $svc_acct_sm->setfield($field,$part_svc->getfield('svc_acct_sm__'. $field) ); - } - } - - } -} -$action = $svc_acct_sm->svcnum ? 'Edit' : 'Add'; - -if ($pkgnum) { - - #find all possible uids (and usernames) - - my($u_part_svc,@u_acct_svcparts); - foreach $u_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_acct'}) ) { - push @u_acct_svcparts,$u_part_svc->getfield('svcpart'); - } - - my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - my($custnum)=$cust_pkg->getfield('custnum'); - my($i_cust_pkg); - foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) { - my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum'); - my($acct_svcpart); - foreach $acct_svcpart (@u_acct_svcparts) { #now find the corresponding - #record(s) in cust_svc ( for this - #pkgnum ! ) - my($i_cust_svc); - foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) { - my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$i_cust_svc->getfield('svcnum')}); - $username{$svc_acct->getfield('uid')}=$svc_acct->getfield('username'); - } - } - } - - #find all possible domains (and domsvc's) - - my($d_part_svc,@d_acct_svcparts); - foreach $d_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_domain'}) ) { - push @d_acct_svcparts,$d_part_svc->getfield('svcpart'); - } - - foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) { - my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum'); - my($acct_svcpart); - foreach $acct_svcpart (@d_acct_svcparts) { - my($i_cust_svc); - foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) { - my($svc_domain)=qsearch('svc_domain',{'svcnum'=>$i_cust_svc->getfield('svcnum')}); - $domain{$svc_domain->getfield('svcnum')}=$svc_domain->getfield('domain'); - } - } - } - -} elsif ( $action eq 'Edit' ) { - - my($svc_acct)=qsearchs('svc_acct',{'uid'=>$svc_acct_sm->domuid}); - $username{$svc_acct_sm->uid} = $svc_acct->username; - - my($svc_domain)=qsearchs('svc_domain',{'svcnum'=>$svc_acct_sm->domsvc}); - $domain{$svc_acct_sm->domsvc} = $svc_domain->domain; - -} else { - die "\$action eq Add, but \$pkgnum is null!\n"; -} - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("Mail Alias $action", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!!; - -#display - - #formatting - print "

                  ";
                  -
                  -#svcnum
                  -print qq!!;
                  -print qq!Service #!, $svcnum ? $svcnum : " (NEW)", "";
                  -
                  -#pkgnum
                  -print qq!!;
                  - 
                  -#svcpart
                  -print qq!!;
                  -
                  -($domuser,$domsvc,$domuid)=(
                  -  $svc_acct_sm->domuser,
                  -  $svc_acct_sm->domsvc,
                  -  $svc_acct_sm->domuid,
                  -);
                  -
                  -#domuser
                  -print qq!\n\nMail to  ( * for anything )!;
                  -
                  -#domsvc
                  -print qq! \@ ";
                  -
                  -#uid
                  -print qq!\nforwards to \@$mydomain mailbox.";
                  -
                  -	#formatting
                  -	print "
                  \n"; - -print qq!
                  !; - -print < - - -END - diff --git a/htdocs/edit/svc_domain.cgi b/htdocs/edit/svc_domain.cgi deleted file mode 100755 index 49be88073..000000000 --- a/htdocs/edit/svc_domain.cgi +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_domain.cgi,v 1.10 2001-04-23 07:12:44 ivan Exp $ -# -# Usage: svc_domain.cgi pkgnum{pkgnum}-svcpart{svcpart} -# http://server.name/path/svc_domain.cgi?pkgnum{pkgnum}-svcpart{svcpart} -# -# ivan@voicenet.com 97-jan-5 -> 97-jan-6 -# -# changes for domain template 3.5 -# ivan@voicenet.com 97-jul-24 -# -# rewrite ivan@sisd.com 98-mar-14 -# -# no GOV in instructions ivan@sisd.com 98-jul-17 -# -# $Log: svc_domain.cgi,v $ -# Revision 1.10 2001-04-23 07:12:44 ivan -# better error message (if kludgy) for no referral -# remove outdated NSI foo from domain ordering. also, fuck NSI. -# -# Revision 1.9 1999/02/28 00:03:39 ivan -# removed misleading comments -# -# Revision 1.8 1999/02/07 09:59:25 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.7 1999/01/19 05:13:46 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.6 1999/01/18 09:41:35 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.5 1998/12/30 23:03:25 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.4 1998/12/23 03:00:16 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.3 1998/12/17 06:17:12 ivan -# fix double // in relative URLs, s/CGI::Base/CGI/; -# -# Revision 1.2 1998/11/13 09:56:48 ivan -# change configuration file layout to support multiple distinct databases (with -# own set of config files, export, etc.) -# - -use strict; -use vars qw( $cgi $action $svcnum $svc_domain $pkgnum $svcpart $part_svc - $svc $otaker $domain $p1 $kludge_action $purpose ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup getotaker); -use FS::CGI qw(header popurl); -use FS::Record qw(qsearch qsearchs fields); -use FS::svc_domain; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -if ( $cgi->param('error') ) { - $svc_domain = new FS::svc_domain ( { - map { $_, scalar($cgi->param($_)) } fields('svc_domain') - } ); - $svcnum = $svc_domain->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - $kludge_action = $cgi->param('action'); - $purpose = $cgi->param('purpose'); - $part_svc = qsearchs('part_svc', { 'svcpart' => $svcpart } ); - die "No part_svc entry!" unless $part_svc; -} else { - $kludge_action = ''; - $purpose = ''; - my($query) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_domain=qsearchs('svc_domain',{'svcnum'=>$svcnum}) - or die "Unknown (svc_domain) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - } else { #adding - - $svc_domain = new FS::svc_domain({}); - - foreach $_ (split(/-/,$query)) { - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; - } - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - $svcnum=''; - - #set fixed and default fields from part_svc - my($field); - foreach $field ( fields('svc_domain') ) { - if ( $part_svc->getfield('svc_domain__'. $field. '_flag') ne '' ) { - $svc_domain->setfield($field,$part_svc->getfield('svc_domain__'. $field) ); - } - } - - } -} -$action = $svcnum ? 'Edit' : 'Add'; - -$svc = $part_svc->getfield('svc'); - -$otaker = getotaker; - -$domain = $svc_domain->domain; - -$p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("$action $svc", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print < - - - -END - -print qq!New!; -print qq!
                  Transfer!; - -print <Domain -
                  Purpose/Description: -

                  -
                    -
                  • COM is for commercial, for-profit organziations -
                  • ORG is for miscellaneous, usually, non-profit organizations -
                  • NET is for network infrastructure machines and organizations -
                  • EDU is for 4-year, degree granting institutions - -
                  -US state and local government agencies, schools, libraries, museums, and individuals should register under the US domain. See RFC 1480 for a complete description of the US domain -and registration procedures. - - - - -END - diff --git a/htdocs/images/mid-logo.png b/htdocs/images/mid-logo.png deleted file mode 100644 index d993419cc26eea306355c916673e1f9063b6bae4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9727 zcma*t5>wbh9xAWJETK;fu)h|UO`|HSU|d2S-PA3 z@jdrHaL;+2_k8BboS8Fo&dh@=T1!KT0Pigx8X6jb@&|dHr~NG&+A}H~jHeYbX3V#z zgB&fjj|w;d4;+9W4!H*a@Wc=Bv>^8*e?s>pjGWbvoHdM&&X0~RjE>chjx~(+3D1)_ zo+lz_KN(A3nf)Tib`bN>U& z1w(VeFfbSjerh$W`aiSPO|a^w*`_C5Pgc6RX1ksWo$Z3IK>ve)!d9R#1PrzUd+ID= z_CH6nD~Q>Zqm>oJ%2N?Xi2qz6j*bvVS4U5-{%=EFp-?C^G!zaF3IITnlcVV9P^_#d z9v+m42ufBKrJ{n;(Los*p{%S>Kp@J)1Lfz33JXKU#i3GDQMtJ&Fc?)`jcRH_b#?hte_AG)X@>@>c7*Y=Pe&SJuNa%1p`lA7h6wnOLrSIJ9}GRS7$p~UQT{a zZgnkYdNedzG-Y|2k3P8v0e3DN!>2BlxEx1Zmlu}$Wax!$)XBKNrESqOmg_!;(x4Ro#nH~ zMWN%>0ZpV7eV`7C=p^MfF)AM(B!6G>$gsh3K|>@3K}B6FKPU~Vm0KCs2-&%Xte4RcFo`dAO!f7uG}% zhorF3+Jl~@L%ASTIKT#h@NZiBm;m)NZe=i|$3FAJAiBfwEgU<92`*((ZJ|{gcJsE7 znz~pcu(gA46PFu+jOVTZ2#zs7Y*5|HKdxFTmh+7PK%ZZHg{!`!Bk==p=G11gjY*#3 zN40CsZIRdFb19P=0i$pCOREZaAd%6P#=+u+HG#pbqDHMeexFF%`~luOVbbM7A|Gc` zW2zF>aqm?k&)>&Q)jr~t%{&^+O%g-UUzJx+rz%vC`1Zz|YBLeK-Uq;?56o!c^*A22 z7!7!6JSPrh_bNT_>5*fEtp4!~wpz;QZ@2mBKTN?VXhppgaCb{dZGa@KqAj|w-eDR3Y*yo6nL4V7gY|L!;0dG!dc*z63E}YfM}~x zSF2fns*~HJIUh7MmGj+nqFa`vyBVSvAkZ6WOl5bkqF%?m@(}(-8i4gXrVx^^S_%7KGh-P&cmh;vPbn`D>6Y1V ztQBmzUU>=4IT7b;9--FtUJC z7(#0Hcb?5$f684D;Q;S-LAA5q=x`MX6ww@05m*ZMmp-#F9XR1(i)`R7)wJ3R&e+|m z#g;b;wULi#aJ^!Y*GkSgOojU-d}*QYCyoF8;We4I{%Hf|`*L@2HApDt_TcyYfM@bE zq%Sj5nyZBk!1>!g?-HBdW22^eh%IH)L#?PCJ6Ga#HPzWTqpZ(oJr`@Zlb8M@S+{T`iYUi##QFZdenGq8o90_Oltvu%in!w#TMtr-Hq{3` z`lhX4qF$v;=bZCWaq+_&jSw^rf8FmTyB%dZIuAUyh{%o9b7h3d!6>o#?Gu3vXs)Kadb%81YEB*$t zuBIG5Br+q>zp6-QytJmf;7(5E`?cF!b)+tK@(c8eW0f|^ZNKq1Ao?*Qx36vQ*{G2M(tFv9BR!4jex~w6`ZnzWA6U)wq0FljJxkpeO9oJ8#2LHR z@_AE2O{4JCL(LRO8oeMy?`eov%OD?@b1LN0Dop>X*}jHTFdScC0=|pR^kaJDgNwY} zsG{%l@qiKK57VztiPi3d-h-$Hi^^VgVz!y-B)D^gxTasDfR_Bt1_%rfO{$FRpUfD@ z<=={4IvhOjYPqz3Mb}ocR^xUd+R8N0{i+Vov}TUW;$U5aZ*etwUkuNUSH1hhoV~dc zAxiy#AhhO8p&J%-XIFYni)05pzsXj7B|B`*vMy-yu4ETDnP1 zaf|jPsN;n9ayyNQZ2OK(odXKk`l;eURAd4S$stG*4Qvy&zXMBH1R-i}zFV+c>Xc)V zxuW9*sq||F67Td?w}B2Pe(h&T<@yJCS(%&vzBH&{{Q5e_hzPy+oEP*L@!~b$0=9)t z)4v{`v%<#2AP|cG!8|7Ai^D>J$%Ds;d59zc`D3s7=$Ui;za6l`mvhobV2U1h?nEBa8F9*M-x{XK#@iBq?eYdt+_w)05HmoPchkPF@ zQ~c~siSg#X;0~boXb4ccoF;J*PX(b{mU){4mGzhN6K)3})&CMExM>yy^mXU&hz2n)h zf#03}z^h*2MoJ+^VrE&qQl^H0=$J)*RQ+4pLO zA;xb*c}-%;Hy5!WltAbaDzm#TqQ-fQ#?)21!&3C<-#FLp50(46D0wB5`&YE~C93bo zfF68%lFrmv5kPu3wnxFqR-d9>ma?#Z)mIYej^LXAmvw8l_)V;kI%CGY4@gH1?YG1EU$R$S2~AyBNIfq+-N!3!!80+n+DO{cE9%IEKMEv6s-A^ z1VW@}T56jr*ZmfyKsqYG&g&>wDrTSdt(OG`OvRn=q!}-}$VJ{{G&!sc#a}5ugvT8f zBN__D#9A-e+(SH$#&ECv7WdwPbGtdz%sziOU!b{)_l{b2)x5qdb{ppwEOtU0xp14zy^cUacBP#}N&S@R_cI<7#JfT=;R5mGErLD}l|CA)Nm!iCr@GRox z(m}U4QdmktqN{|9GvR?`wOG{UF3DIqQ!t9{f{WNEGP z)-PZsOP)h?(N$YiOYP)m7jy|V9ApmJ2F=+ zy%f~QDGY3rS5By-a;K#KL%VB$`Rt6`(>b7VvR6?yu;Q$OKA{kgHjXQcIecalN)=uoWIEI z2RUC6Dp4!W3G&e3TvBztYa))6HZcpK9aF#;IA#2;(G0`Cs2oU{-UH$j?wssf9Jy}! zE@6wL8L$2A>;ElMv?(o}6kV%Kee362_;`K)c~^6ZhPa49=a=1~w-nX>$2>B?)XFC` zTp+dgnp$4+kazn$P4ewPT(~n$Z-oN=Db}aqxv!S7?Yhd*pXV*>G&Pnjy631%otxeh zaVIzt!xhrw5fu+0L4{ieSy1m^1~Tr8Im+paH9xD9dv;gL0IBK?ub#AgW|wFaa(Xu& z#SSVg^{zY7iizjNN36j`#QKdtVl`Y=Ps)e*OC~5FSQ@057wNc|;{~mebv8rXO9P#5Jo6)Mn=6y^J3Eu1M*$6;^``bBC)(~YlM=c| zl*Sqia>@3Kp7>^?Or=AGJzac{kkz0Dez2U}!`M0g@|n;^pbf~XPx~m(NLR|cHT3XG z$j$ajqtxZkhWx|s@!07dhCBA={QTkaVw`sw*6=RGe7{Y*W$d*?_sFZOfOIF(<9asG z-m`DDFYTl@%7i>$!fCFS$`@-QJI8Ey?a8rgRF`zMP=_kZf!q3i-Pr;+5P_9EQT4V~ zEpPq?Pq{Jni$~XxQ>H|?{lW=6>$Yulh^9uv_VuVpd9Ki3ojHu@=IxXK@S$km8f;*9 zY)4enEdJ-s#B4e!t&sy%oZg#!Tc2^tdVlKaD^4PW_!HlBZl|_Jq_9#^I-GtR8tAJ^ zvLa+L_erWz_UeQ_iYl0Sf6?%*;rq!~o}tauwj!K)7TSIEJ}qEp#?Re`5C5R#y-pq5 z&TO7IcLi;WYSr%F!yAE3l#v^VY9l8lvxrYQ^p24Hh3P#rVxq(RyT-a!zbg)dNn_x$ zJ`wF9UqF+i=g%3hv-CTe{c`U(-;u9+uUCIiuWImCO9m27Z5ZEuCrvj5Ha~|OH}!0E z*{#Lj>Y`3(r4D_Lnz+&Zsn$NaypiejGM#lL8pPcUQtF=->)9{A@~F|B$Yb`zpgd7Z zk3C=#q#qGWOB=iE>Mka#;6!ac-^y7}Jc-fBrLJdjV#Wp!bljW;OY}FB_oC=v9IPS|@=gDz;bpwx$OEQcBn;EF}1|QT8eo@ zY7jc4XQM!(s^;#1j?#20qMlHbx>?k_ba>i`t#cSR;GVe-a7tvvQ?+R>H`70@<*jgc ze0{$$GS2k;3MjJ!kmU` znPni@6!~9PmrKvi`rM7RUwtJ~eoyy@g7;BmyV~?~s#+1?2G%~O&cm;j9Er|?RYm`-J{8t4bj?(xb}c-7vg&38bG-{ z`Aw1v2NQ$%ghxAroPHrD-TOg&pxj&3EF9Mx*d}!wq`F6X{E4R+u?|g4~f_v%<5Em%4Iv*5nA&Z7>eto*r@3TBjr%(SwBoYMU=E;*+CO;Lwc zJ#E#4F@sYC0Ry(UpP!T5q0Rc8-)kNSRy)8q5EJ>T@ul__0Yv&rJ(dg?i&@T#qCbf< z6yC$JW}lmJNaN6Mgn{E2TO#P~=0D2pbPtQ;8!VqU9F;jWY{%N@%p1g+{?X6Z$r@is zs7U1yeqS5o_B+pVQb}_h# zVB*v#Z+*4-#Yx~|{!Y}le~e_z592|~anCTo8w;v;0JP#@I2FHGHVoAMx$+mN`Vc6X zdPiQ{c-6r()$Z@$jl~$R@7|R@4izQ~Zq!6-HY_)Ka+lUfn!e59)sX$MtaS%OtLS8? zuC6lXYh1LstP%wB zcmA}P?sZ;m{?f*CyjZ7$>c~{1w^-&_w%6QK6IfwvK1|Z1GOTWG;ujHA)ToT^1aQ3o z{p+p%WF>;gX!jD6+rcgsD25d{UoQ@)y39|F*3eBhqXF>gNH}IALe5l1gg~{}jcVu( zs%OWyB)Znq_1V@3M!1M)9gp6Evd@L{spbDwfDn$qA_z8FIxr(JNG|j}1ZO><4ot(P z{vSwt5vJ%unVA))moG>fN(r8a4$wip0LFiP_DrFeLBR@EEs-W`mejzsD!CjP z#16aArVGW3v5pCBsH3ByWp2AVAH8~IEZShh?dh#E8Pui|U3==Xj>Qhihi|IRw&}Ab zcV51^82J0v-4Q+??+Fqan6|3@oSzf(olzVAu?4N~w>8|(c1t~F`p<|Gl)GEvtJ4U# z;H;Cez_7AHeN#TN?wWsfR4vDX<4gh| z(+P>@lFknS!pxd;Q8Won7O>TAy?%T4HbDIyms9CngQ?SI8p6e^!lp`)>4*wg{MQwtesln5HHqxZ!;!OP^vMZnA73b*%-UW+eXp{2=bgd7G|5)l z#9>NF_BbT0#Tea-1%zS7N(7K-wV2%=#*3~l3Xd&@s&i~BDTW%Zi+g1Ot%Y$~8%xU5 zAkcP2)0b@Xm$vWnmlD;wGY!F45fejvHuhAB$CMF9>Ppc{9jWS~!z;$d>ZA0tW_{F` zdJ){Vg}-1#e`#`$K0CmWAEoI>&6N~e=n=lXOpZFolI4k1$0fyc%oum`SxzsHV+ zg9Uk{T!p6+2FnW->^<>THWib} z=*v%&HhL+WmcK}9#IKSCXzUeF-b!@)ESESqA38(S{UQlB{iLp_R4Q|Lcr$91Xo<}< z8&!K!c!vw++G&sj(F6LO3snAltN|S^ypvXfHIbobIp2okUu&4c-iqJnTsw#31SfNS zHB$T>O~%doYjfY;xT-2i?8K_tg2yhb^l4~^3 zhS)WXF~z{fJsB!9F6MEG42&VOR89VfS+cqvi7(Lzb@)2pkpVm+7k zivJ?yhiqi^TNqxBs0Pue1`Jz^Bcv8b?p{_A){WP&Lxy5lqyB>9H`u zod&1b9)i(TiPIo zkD!)c@kBBzC)14^3TxJ}D_3|AE+^;R7GwV02xIwg%j`Vnk2_F+k8YeCQ;(W$$UgmHCw626-lqAVOlIXHa)%@?Gdz9Y|Q7))hzK> zPorv2spwd>Wv;ymthv-41YuI65A;#qJG&Ai1|e|o6dZcyqdbphg1uOz*rr1FmwE0uaON)X`6WQn{Lw!wT}ZXFc}1TO4|r4l6W_ zw;Av+oE)+r&p858OO6ejuEpHzCMusjn`6UpQl;$(X%-9T#tj<8J@bB`^ z;3iRLV!y_}i%L?_Ei+f;i~0O6sG|Pn8Co&e$4Ir}a3a*}Y^naa{}Nl%*s4^gM^utm z62`^lBKE_cVG=61-f7IMVO1?}VMMc{^U8Iv$x(P?E+_xMAjnrxG6bh*yR-M#=vGls zweI)UC@n=hwg)_eyg1*U*ZzycPI&L^qX5>wAL3)cOPW8XE9q|R z#Wp)n8C*3uLxA;^&22t4K2xI>r!X)JXSH&={ONEC%(mqPk7}xh*=(g z%?REtlmS4C^`vVXl#%&f#C`F$L7DXGYY5#KD~N+eQJ^VrbP5lVjL)XFaRSq0(L}(W0bn=E z7hK~swc?YE16MbB`kZX(0!fFOA<>~wv|l>*zi!@ZWNISa<@8d}7~ft9t2O>J45QVM zAZsg7D%JU0vlm4(#&EHt=netT(7pq#NA@?ixAlj+!y~l&GvzCW+fL_5b`shvXv9Cr zS25GAP94(&jLsdqT~UmZZ6*4T?Q_3dEn($sVB&EZIth9^K)qYeK00X~Wq5R62Q2NR zIfIu@Xp9teAA~7*s;5hQJ62u#?@h5gF>=&_w6#F!!=P#s(PmPX59ENz%CY`o}-C*xiXr2AEa(IG-vLP+;qL8J0| z%H@vwoX8hEK0)Nsw!FU?QaIlkTdtG?D}!Aegz;8%{Z;@LZ-Jm^*8jpZWW9(q^(6U1 z+KN|jCK*Ozw2ls|YQpIS2x?`Q?dR|S9Jcp6g^oPlaNLQ^B32^lUoFfiymV407IYBw z=k*@)l|~1yhmvUud1=i$|Jp^Zd+-kXY4EgCn-z&bPo@;oT;Vzzy7OVRL~)Gz%>e<9 zXFN-KSKGloVudFN-UMRg|Hq1?IhWNZu0(9(1$U7MG38N7`FZe;(Oo=OIwNGV&Yhbw z3VR3Zdz?QpY^@{xb2ml@+8p+=3Yqh)#~|N*?JM-jU54Pwx8xCPvRGkG`eQ~TrLoxv zmQW5McOu-_tstkFo3u&C;H05u4dd*Csd3~ItVZpwl&A*^85#bVsft__j|w0wpk-{a zH6WMDfZO9T2H)F`k4h#)^JKsUObny_FaMa^ydPt^5bFDXOxzHvJ)oZLTqZR*ZO8mK P>V>APpdnu)YZ3B4`{G>m diff --git a/htdocs/images/small-logo.png b/htdocs/images/small-logo.png deleted file mode 100644 index 406a3698028d2eb7a3414f70d2f6cb379395e3cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4781 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 Hu0mjf!7#Y^ diff --git a/htdocs/index.html b/htdocs/index.html deleted file mode 100755 index bee44a2f7..000000000 --- a/htdocs/index.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - Freeside Main Menu - - - - - -
                  -

                  - Silicon Interactive Software Design -

                  -
                  freeside main menu
                  -
                  - - Freeside home page - -
                  - Documentation - -

                  -
                  - - - diff --git a/htdocs/misc/bill.cgi b/htdocs/misc/bill.cgi deleted file mode 100755 index 52323ba59..000000000 --- a/htdocs/misc/bill.cgi +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: bill.cgi,v 1.5 1999-08-12 04:32:21 ivan Exp $ -# -# s/FS:Search/FS::Record/ and cgisuidsetup($cgi) ivan@sisd.com 98-mar-13 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: bill.cgi,v $ -# Revision 1.5 1999-08-12 04:32:21 ivan -# hidecancelledcustomers -# -# Revision 1.4 1999/01/19 05:14:02 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1998/12/23 03:01:13 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:12:41 ivan -# s/CGI::(Request|Base)/CGI.pm/; -# - -use strict; -use vars qw( $cgi $query $custnum $cust_main $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl eidiot); -use FS::Record qw(qsearchs); -use FS::cust_main; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -#untaint custnum -($query) = $cgi->keywords; -$query =~ /^(\d*)$/; -$custnum = $1; -$cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); -die "Can't find customer!\n" unless $cust_main; - -$error = $cust_main->bill( -# 'time'=>$time - ); -&eidiot($error) if $error; - -$error = $cust_main->collect( -# 'invoice-time'=>$time, -# 'batch_card'=> 'yes', - 'batch_card'=> 'no', - 'report_badcard'=> 'yes', - ); -&eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum"); - diff --git a/htdocs/misc/cancel-unaudited.cgi b/htdocs/misc/cancel-unaudited.cgi deleted file mode 100755 index 319ac5526..000000000 --- a/htdocs/misc/cancel-unaudited.cgi +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cancel-unaudited.cgi,v 1.8 2001-04-09 23:05:16 ivan Exp $ -# -# Usage: cancel-unaudited.cgi svcnum -# http://server.name/path/cancel-unaudited.cgi pkgnum -# -# ivan@voicenet.com 97-apr-23 -# -# rewrote for new API -# ivan@voicenet.com 97-jul-21 -# -# Search->Record, cgisuidsetup($cgi) ivan@sids.com 98-mar-19 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: cancel-unaudited.cgi,v $ -# Revision 1.8 2001-04-09 23:05:16 ivan -# Transactions Part I!!! -# -# Revision 1.7 2000/06/15 12:30:37 ivan -# bugfix from Jeff Finucane, thanks! -# -# Revision 1.6 1999/02/28 00:03:48 ivan -# removed misleading comments -# -# Revision 1.5 1999/02/07 09:59:34 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.4 1999/01/19 05:14:03 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1998/12/23 03:02:05 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:12:42 ivan -# s/CGI::(Request|Base)/CGI.pm/; -# - -use strict; -use vars qw( $cgi $query $svcnum $svc_acct $cust_svc $error $dbh ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl eidiot); -use FS::Record qw(qsearchs); -use FS::cust_svc; -use FS::svc_acct; - -$cgi = new CGI; -$dbh = &cgisuidsetup($cgi); - -#untaint svcnum -($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -$svcnum = $1; - -$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); -die "Unknown svcnum!" unless $svc_acct; - -$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -&eidiot(qq!This account has already been audited. Cancel the - package instead.!) - if $cust_svc->pkgnum ne '' && $cust_svc->pkgnum ne '0'; - -local $SIG{HUP} = 'IGNORE'; -local $SIG{INT} = 'IGNORE'; -local $SIG{QUIT} = 'IGNORE'; -local $SIG{TERM} = 'IGNORE'; -local $SIG{TSTP} = 'IGNORE'; - -local $FS::UID::AutoCommit = 0; - -$error = $svc_acct->cancel; -&myeidiot($error) if $error; -$error = $svc_acct->delete; -&myeidiot($error) if $error; - -$error = $cust_svc->delete; -&myeidiot($error) if $error; - -$dbh->commit or die $dbh->errstr; - -print $cgi->redirect(popurl(2)); - -sub myeidiot { - $dbh->rollback; - &eidiot(@_); -} - diff --git a/htdocs/misc/cancel_pkg.cgi b/htdocs/misc/cancel_pkg.cgi deleted file mode 100755 index 7bbcf6e7f..000000000 --- a/htdocs/misc/cancel_pkg.cgi +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cancel_pkg.cgi,v 1.6 1999-04-08 10:35:02 ivan Exp $ -# -# Usage: cancel_pkg.cgi pkgnum -# http://server.name/path/cancel_pkg.cgi pkgnum -# -# IT DOESN'T RUN THE APPROPRIATE PROGRAMS YET!!!! -# -# probably should generalize this to do cancels, suspensions, unsuspensions, etc. -# -# ivan@voicenet.com 97-jan-2 -# -# still kludgy, but now runs /dbin/cancel $pkgnum -# ivan@voicenet.com 97-feb-27 -# -# doesn't run if pkgnum doesn't match regex -# ivan@voicenet.com 97-mar-6 -# -# now redirects to enter comments -# ivan@voicenet.com 97-may-8 -# -# rewrote for new API -# ivan@voicenet.com 97-jul-21 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: cancel_pkg.cgi,v $ -# Revision 1.6 1999-04-08 10:35:02 ivan -# import necessary subroutines from FS::CGI -# -# Revision 1.5 1999/02/28 00:03:49 ivan -# removed misleading comments -# -# Revision 1.4 1999/01/19 05:14:04 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1998/12/23 03:02:54 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:12:43 ivan -# s/CGI::(Request|Base)/CGI.pm/; -# - -use strict; -use vars qw ( $cgi $query $pkgnum $cust_pkg $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(eidiot popurl); -use FS::Record qw(qsearchs); -use FS::CGI qw(popurl eidiot); -use FS::cust_pkg; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -#untaint pkgnum -($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal pkgnum"; -$pkgnum = $1; - -$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - -$error = $cust_pkg->cancel; -eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); - diff --git a/htdocs/misc/delete-customer.cgi b/htdocs/misc/delete-customer.cgi deleted file mode 100755 index 8addbd657..000000000 --- a/htdocs/misc/delete-customer.cgi +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: delete-customer.cgi,v 1.1 1999-04-15 16:44:36 ivan Exp $ -# -# $Log: delete-customer.cgi,v $ -# Revision 1.1 1999-04-15 16:44:36 ivan -# delete customers -# - -use strict; -use vars qw( $cgi $conf $query $custnum $new_custnum $cust_main ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl); -use FS::Record qw(qsearch qsearchs); -use FS::cust_main; - -$cgi = new CGI; -cgisuidsetup($cgi); - -$conf = new FS::Conf; -die "Customer deletions not enabled" unless $conf->exists('deletecustomers'); - -if ( $cgi->param('error') ) { - $custnum = $cgi->param('custnum'); - $new_custnum = $cgi->param('new_custnum'); -} else { - ($query) = $cgi->keywords; - $query =~ /^(\d+)$/ or die "Illegal query: $query"; - $custnum = $1; - $new_custnum = ''; -} -$cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } ) - or die "Customer not found: $custnum"; - -print $cgi->header ( '-expires' => 'now' ), header('Delete customer'); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print - qq!
                  !, - qq!!; - -if ( qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ) ) { - print "Move uncancelled packages to customer number ", - qq!

                  !; -} - -print <completely remove all traces of this customer record. -
                  Are you absolutely sure you want to delete this customer? -
                  - -END - diff --git a/htdocs/misc/expire_pkg.cgi b/htdocs/misc/expire_pkg.cgi deleted file mode 100755 index cf1f23153..000000000 --- a/htdocs/misc/expire_pkg.cgi +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: expire_pkg.cgi,v 1.4 1999-02-28 00:03:50 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/expire_pkg.cgi -# -# based on susp_pkg -# ivan@voicenet.com 97-jul-29 -# -# ivan@sisd.com 98-mar-17 FS::Search->FS::Record -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: expire_pkg.cgi,v $ -# Revision 1.4 1999-02-28 00:03:50 ivan -# removed misleading comments -# -# Revision 1.3 1999/01/19 05:14:05 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.2 1998/12/17 09:12:44 ivan -# s/CGI::(Request|Base)/CGI.pm/; -# - -use strict; -use vars qw ( $cgi $date $pkgnum $cust_pkg %hash $new $error ); -use Date::Parse; -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl eidiot); -use FS::Record qw(qsearchs); -use FS::cust_pkg; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -#untaint date & pkgnum - -if ( $cgi->param('date') ) { - str2time($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date"; - $date=$1; -} else { - $date=''; -} - -$cgi->param('pkgnum') =~ /^(\d+)$/ or die "Illegal pkgnum"; -$pkgnum = $1; - -$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -%hash = $cust_pkg->hash; -$hash{expire}=$date; -$new = new FS::cust_pkg ( \%hash ); -$error = $new->replace($cust_pkg); -&eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); - diff --git a/htdocs/misc/link.cgi b/htdocs/misc/link.cgi deleted file mode 100755 index eb1780711..000000000 --- a/htdocs/misc/link.cgi +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: link.cgi,v 1.7 1999-04-08 11:31:40 ivan Exp $ -# -# ivan@voicenet.com 97-feb-5 -# -# rewrite ivan@sisd.com 98-mar-17 -# -# can also link on some other fields now (about time) ivan@sisd.com 98-jun-24 -# -# $Log: link.cgi,v $ -# Revision 1.7 1999-04-08 11:31:40 ivan -# *** empty log message *** -# -# Revision 1.6 1999/02/28 00:03:51 ivan -# removed misleading comments -# -# Revision 1.5 1999/01/19 05:14:06 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:36 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/23 03:03:39 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:12:45 ivan -# s/CGI::(Request|Base)/CGI.pm/; -# - -use strict; -use vars qw ( %link_field $cgi $pkgnum $svcpart $query $part_svc $svc $svcdb - $link_field ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl header); -use FS::Record qw(qsearchs); - -%link_field = ( - 'svc_acct' => 'username', - 'svc_domain' => 'domain', - 'svc_acct_sm' => '', - 'svc_charge' => '', - 'svc_wo' => '', -); - -$cgi = new CGI; -cgisuidsetup($cgi); - -($query) = $cgi->keywords; -foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; -} - -$part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart}); -$svc = $part_svc->getfield('svc'); -$svcdb = $part_svc->getfield('svcdb'); -$link_field = $link_field{$svcdb}; - -print $cgi->header( '-expires' => 'now' ), header("Link to existing $svc"), - qq!
                  !; - -if ( $link_field ) { - print < - - $link_field of existing service: -END -} else { - print qq!Service # of existing service: !; -} - -print < - -

                  - - - -END - diff --git a/htdocs/misc/print-invoice.cgi b/htdocs/misc/print-invoice.cgi deleted file mode 100755 index 213f15406..000000000 --- a/htdocs/misc/print-invoice.cgi +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: print-invoice.cgi,v 1.4 1999-01-19 05:14:07 ivan Exp $ -# -# just a kludge for now, since this duplicates in a way it shouldn't stuff from -# Bill.pm (like $lpr) ivan@sisd.com 98-jun-16 -# -# $Log: print-invoice.cgi,v $ -# Revision 1.4 1999-01-19 05:14:07 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1998/12/23 03:04:24 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:12:47 ivan -# s/CGI::(Request|Base)/CGI.pm/; -# - -use strict; -use vars qw($conf $cgi $lpr $query $invnum $cust_bill $custnum ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl); -use FS::Record qw(qsearchs); -use FS::cust_bill; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$conf = new FS::Conf; -$lpr = $conf->config('lpr'); - -#untaint invnum -($query) = $cgi->keywords; -$query =~ /^(\d*)$/; -$invnum = $1; -$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -die "Can't find invoice!\n" unless $cust_bill; - - open(LPR,"|$lpr") or die "Can't open $lpr: $!"; - print LPR $cust_bill->print_text; #( date ) - close LPR - or die $! ? "Error closing $lpr: $!" - : "Exit status $? from $lpr"; - -$custnum = $cust_bill->getfield('custnum'); - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum#history"); - diff --git a/htdocs/misc/process/delete-customer.cgi b/htdocs/misc/process/delete-customer.cgi deleted file mode 100755 index 0a939c559..000000000 --- a/htdocs/misc/process/delete-customer.cgi +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: delete-customer.cgi,v 1.1 1999-04-15 16:44:36 ivan Exp $ -# -# $Log: delete-customer.cgi,v $ -# Revision 1.1 1999-04-15 16:44:36 ivan -# delete customers -# - -use strict; -use vars qw ( $cgi $conf $custnum $new_custnum $cust_main $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearchs); -use FS::CGI qw(popurl); -use FS::cust_main; - -$cgi = new CGI; -cgisuidsetup($cgi); - -$conf = new FS::Conf; -die "Customer deletions not enabled" unless $conf->exists('deletecustomers'); - -$cgi->param('custnum') =~ /^(\d+)$/; -$custnum = $1; -if ( $cgi->param('new_custnum') ) { - $cgi->param('new_custnum') =~ /^(\d+)$/ - or die "Illegal new customer number: ". $cgi->param('new_custnum'); - $new_custnum = $1; -} else { - $new_custnum = ''; -} -$cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } ) - or die "Customer not found: $custnum"; - -$error = $cust_main->delete($new_custnum); - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "delete-customer.cgi?". $cgi->query_string ); -} elsif ( $new_custnum ) { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$new_custnum"); -} else { - print $cgi->redirect(popurl(3)); -} diff --git a/htdocs/misc/process/link.cgi b/htdocs/misc/process/link.cgi deleted file mode 100755 index 7d6bd506f..000000000 --- a/htdocs/misc/process/link.cgi +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: link.cgi,v 1.6 2000-07-17 17:59:33 ivan Exp $ -# -# ivan@voicenet.com 97-feb-5 -# -# rewrite ivan@sisd.com 98-mar-18 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# can also link on some other fields now (about time) ivan@sisd.com 98-jun-24 -# -# $Log: link.cgi,v $ -# Revision 1.6 2000-07-17 17:59:33 ivan -# oops -# -# Revision 1.5 1999/04/15 14:09:17 ivan -# get rid of top-level my() variables -# -# Revision 1.4 1999/02/07 09:59:35 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.3 1999/01/19 05:14:10 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.2 1998/12/17 09:15:00 ivan -# s/CGI::Request/CGI.pm/; -# - -use strict; -use vars qw ( $cgi $old $new $error $pkgnum $svcpart $svcnum ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::CGI qw(popurl idiot eidiot); -use FS::UID qw(cgisuidsetup); -use FS::cust_svc; -use FS::Record qw(qsearchs); - -$cgi = new CGI; -cgisuidsetup($cgi); - -$cgi->param('pkgnum') =~ /^(\d+)$/; -$pkgnum = $1; -$cgi->param('svcpart') =~ /^(\d+)$/; -$svcpart = $1; -$cgi->param('svcnum') =~ /^(\d*)$/; -$svcnum = $1; - -unless ( $svcnum ) { - my($part_svc) = qsearchs('part_svc',{'svcpart'=>$svcpart}); - my($svcdb) = $part_svc->getfield('svcdb'); - $cgi->param('link_field') =~ /^(\w+)$/; my($link_field)=$1; - my($svc_acct)=qsearchs($svcdb,{$link_field => $cgi->param('link_value') }); - eidiot("$link_field not found!") unless $svc_acct; - $svcnum=$svc_acct->svcnum; -} - -$old = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -die "svcnum not found!" unless $old; -$new = new FS::cust_svc ({ - 'svcnum' => $svcnum, - 'pkgnum' => $pkgnum, - 'svcpart' => $svcpart, -}); - -$error = $new->replace($old); - -unless ($error) { - #no errors, so let's view this customer. - print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?$pkgnum"); -} else { - idiot($error); -} - diff --git a/htdocs/misc/susp_pkg.cgi b/htdocs/misc/susp_pkg.cgi deleted file mode 100755 index abe4f70b0..000000000 --- a/htdocs/misc/susp_pkg.cgi +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: susp_pkg.cgi,v 1.6 1999-04-08 10:35:02 ivan Exp $ -# -# Usage: susp_pkg.cgi pkgnum -# http://server.name/path/susp_pkg.cgi pkgnum -# -# probably should generalize this to do cancels, suspensions, unsuspensions, etc. -# -# ivan@voicenet.com 97-feb-27 -# -# now redirects to enter comments -# ivan@voicenet.com 97-may-8 -# -# rewrote for new API -# ivan@voicenet.com 97-jul-21 -# -# FS::Search -> FS::Record ivan@sisd.com 98-mar-17 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: susp_pkg.cgi,v $ -# Revision 1.6 1999-04-08 10:35:02 ivan -# import necessary subroutines from FS::CGI -# -# Revision 1.5 1999/02/28 00:03:52 ivan -# removed misleading comments -# -# Revision 1.4 1999/01/19 05:14:08 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1998/12/23 03:04:56 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:12:48 ivan -# s/CGI::(Request|Base)/CGI.pm/; -# - -use strict; -use vars qw( $cgi $query $pkgnum $cust_pkg $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearchs); -use FS::CGI qw(popurl eidiot); -use FS::cust_pkg; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -#untaint pkgnum -($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal pkgnum"; -$pkgnum = $1; - -$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - -$error = $cust_pkg->suspend; -&eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); - diff --git a/htdocs/misc/unsusp_pkg.cgi b/htdocs/misc/unsusp_pkg.cgi deleted file mode 100755 index 9e60064c3..000000000 --- a/htdocs/misc/unsusp_pkg.cgi +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: unsusp_pkg.cgi,v 1.5 1999-02-28 00:03:53 ivan Exp $ -# -# Usage: susp_pkg.cgi pkgnum -# http://server.name/path/susp_pkg.cgi pkgnum -# -# probably should generalize this to do cancels, suspensions, unsuspensions, etc. -# -# ivan@voicenet.com 97-feb-27 -# -# now redirects to enter comments -# ivan@voicenet.com 97-may-8 -# -# rewrote for new API -# ivan@voicenet.com 97-jul-21 -# -# FS::Search -> FS::Record ivan@sisd.com 98-mar-17 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: unsusp_pkg.cgi,v $ -# Revision 1.5 1999-02-28 00:03:53 ivan -# removed misleading comments -# -# Revision 1.4 1999/01/19 05:14:09 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1998/12/23 03:05:25 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:12:49 ivan -# s/CGI::(Request|Base)/CGI.pm/; -# - -use strict; -use vars qw( $cgi $query $pkgnum $cust_pkg $error ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl eidiot); -use FS::Record qw(qsearchs); -use FS::cust_pkg; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -#untaint pkgnum -($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal pkgnum"; -$pkgnum = $1; - -$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - -$error = $cust_pkg->unsuspend; -&eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); - diff --git a/htdocs/search/cust_bill.cgi b/htdocs/search/cust_bill.cgi deleted file mode 100755 index 0645d1cc0..000000000 --- a/htdocs/search/cust_bill.cgi +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_bill.cgi,v 1.6 2001-04-22 01:38:39 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/cust_bill.cgi -# -# ivan@voicenet.com 97-apr-4 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: cust_bill.cgi,v $ -# Revision 1.6 2001-04-22 01:38:39 ivan -# svc_domain needs to import dbh sub from Record -# view/cust_main.cgi needs to use ->owed method, not check (depriciated) owed field -# search/cust_bill.cgi redirect error when there's only one invoice -# -# Revision 1.5 2000/07/17 16:45:41 ivan -# first shot at invoice browsing and some other cleanups -# -# Revision 1.4 1999/02/28 00:03:54 ivan -# removed misleading comments -# -# Revision 1.3 1999/01/19 05:14:11 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.2 1998/12/17 09:41:07 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# - -use strict; -use vars qw ( $cgi $invnum $query $sortby @cust_bill ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use Date::Format; -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl header menubar eidiot table ); -use FS::Record qw(qsearch qsearchs); -use FS::cust_bill; -use FS::cust_main; - -$cgi = new CGI; -cgisuidsetup($cgi); - -if ( $cgi->keywords ) { - my($query) = $cgi->keywords; - if ( $query eq 'invnum' ) { - $sortby = \*invnum_sort; - @cust_bill = qsearch('cust_bill', {} ); - } elsif ( $query eq 'date' ) { - $sortby = \*date_sort; - @cust_bill = qsearch('cust_bill', {} ); - } elsif ( $query eq 'custnum' ) { - $sortby = \*custnum_sort; - @cust_bill = qsearch('cust_bill', {} ); - } elsif ( $query eq 'OPEN_invnum' ) { - $sortby = \*invnum_sort; - @cust_bill = grep $_->owed != 0, qsearch('cust_bill', {} ); - } elsif ( $query eq 'OPEN_date' ) { - $sortby = \*date_sort; - @cust_bill = grep $_->owed != 0, qsearch('cust_bill', {} ); - } elsif ( $query eq 'OPEN_custnum' ) { - $sortby = \*custnum_sort; - @cust_bill = grep $_->owed != 0, qsearch('cust_bill', {} ); - } elsif ( $query =~ /^OPEN(\d+)_invnum$/ ) { - my $open = $1 * 86400; - $sortby = \*invnum_sort; - @cust_bill = - grep $_->owed != 0 && $_->_date < time - $open, qsearch('cust_bill', {} ); - } elsif ( $query =~ /^OPEN(\d+)_date$/ ) { - my $open = $1 * 86400; - $sortby = \*date_sort; - @cust_bill = - grep $_->owed != 0 && $_->_date < time - $open, qsearch('cust_bill', {} ); - } elsif ( $query =~ /^OPEN(\d+)_custnum$/ ) { - my $open = $1 * 86400; - $sortby = \*custnum_sort; - @cust_bill = - grep $_->owed != 0 && $_->_date < time - $open, qsearch('cust_bill', {} ); - } else { - die "unknown query string $query"; - } -} else { - $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/; - $invnum = $2; - @cust_bill = qsearchs('cust_bill', { 'invnum' => $invnum } ); - $sortby = \*invnum_sort; -} - -if ( scalar(@cust_bill) == 1 ) { - my $invnum = $cust_bill[0]->invnum; - print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect -} elsif ( scalar(@cust_bill) == 0 ) { - eidiot("Invoice not found."); -} else { - my $total = scalar(@cust_bill); - print $cgi->header( '-expires' => 'now' ), - &header("Invoice Search Results", menubar( - 'Main Menu', popurl(2) - )), "$total matching invoices found
                  ", &table(), < - - Balance - Amount - Date - Contact name - Company - -END - - my(%saw, $cust_bill); - foreach $cust_bill ( - sort $sortby grep(!$saw{$_->invnum}++, @cust_bill) - ) { - my($invnum, $owed, $charged, $date ) = ( - $cust_bill->invnum, - $cust_bill->owed, - $cust_bill->charged, - $cust_bill->_date, - ); - my $pdate = time2str("%b %d %Y", $date); - - my $rowspan = 1; - - my $view = popurl(2). "view/cust_bill.cgi?$invnum"; - print < - $invnum - \$$owed - \$$charged - $pdate -END - my $custnum = $cust_bill->custnum; - my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); - if ( $cust_main ) { - my $cview = popurl(2). "view/cust_main.cgi?". $cust_main->custnum; - my ( $name, $company ) = ( - $cust_main->last. ', '. $cust_main->first, - $cust_main->company, - ); - print <$name - $company -END - } else { - print <WARNING: couldn't find cust_main.custnum $custnum (cust_bill.invnum $invnum) -END - } - - print ""; - } - - print < - - -END - -} - -# - -sub invnum_sort { - $a->invnum <=> $b->invnum; -} - -sub custnum_sort { - $a->custnum <=> $b->custnum || $a->invnum <=> $b->invnum; -} - -sub date_sort { - $a->_date <=> $b->_date || $a->invnum <=> $b->invnum; -} diff --git a/htdocs/search/cust_bill.html b/htdocs/search/cust_bill.html deleted file mode 100755 index 4adb40e4a..000000000 --- a/htdocs/search/cust_bill.html +++ /dev/null @@ -1,21 +0,0 @@ - - - Invoice Search - - -
                  -

                  Invoice Search

                  -
                  -
                  -
                  - Search for invoice #: - - -

                  - -

                  - -
                  - - - diff --git a/htdocs/search/cust_main-payinfo.html b/htdocs/search/cust_main-payinfo.html deleted file mode 100755 index 47bb83cbd..000000000 --- a/htdocs/search/cust_main-payinfo.html +++ /dev/null @@ -1,20 +0,0 @@ - - - Customer Search - - - - Customer Search - -
                  -
                  - Search for Credit card #: - - - -

                  - -

                  - - - diff --git a/htdocs/search/cust_main.cgi b/htdocs/search/cust_main.cgi deleted file mode 100755 index 1b4a5a54a..000000000 --- a/htdocs/search/cust_main.cgi +++ /dev/null @@ -1,311 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_main.cgi,v 1.17 2001-04-23 16:07:54 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/cust_main.cgi -# -# ivan@voicenet.com 96-dec-12 -# -# rewrite ivan@sisd.com 98-mar-4 -# -# now does browsing too ivan@sisd.com 98-mar-6 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# display total, use FS::CGI ivan@sisd.com 98-jul-17 -# -# $Log: cust_main.cgi,v $ -# Revision 1.17 2001-04-23 16:07:54 ivan -# fix -# Insecure dependency in eval while running with -T switch at /usr/local/lib/site_perl/FS/Record.pm line 202. -# -# Revision 1.16 2001/02/07 19:45:45 ivan -# tyop -# -# Revision 1.15 2000/07/17 16:45:41 ivan -# first shot at invoice browsing and some other cleanups -# -# Revision 1.14 1999/08/12 04:45:21 ivan -# typo - missed a paren -# -# Revision 1.13 1999/08/12 04:32:21 ivan -# hidecancelledcustomers -# -# Revision 1.12 1999/07/17 10:38:52 ivan -# scott nelson noticed this mod_perl-triggered bug and -# gave me a great bugreport at the last rhythmethod -# -# Revision 1.11 1999/04/09 04:22:34 ivan -# also table() -# -# Revision 1.10 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.9 1999/02/28 00:03:55 ivan -# removed misleading comments -# -# Revision 1.8 1999/02/07 09:59:36 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.7 1999/01/25 12:19:11 ivan -# yet more mod_perl stuff -# -# Revision 1.6 1999/01/19 05:14:12 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:37 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1998/12/30 00:57:50 ivan -# bug -# -# Revision 1.3 1998/12/17 09:41:08 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# -# Revision 1.2 1998/11/12 08:10:22 ivan -# CGI.pm instead of CGI-modules -# relative URLs using popurl -# got rid of lots of little tables -# s/agrep/String::Approx/; -# bubble up packages and services and link (slow) -# - -use strict; -#use vars qw( $conf %ncancelled_pkgs %all_pkgs $cgi @cust_main $sortby ); -use vars qw( $conf %all_pkgs $cgi @cust_main $sortby ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use IO::Handle; -use String::Approx qw(amatch); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header menubar eidiot popurl table); -use FS::cust_main; -use FS::cust_svc; - -$cgi = new CGI; -cgisuidsetup($cgi); - -$conf = new FS::Conf; - -if ( $cgi->keywords ) { - my($query)=$cgi->keywords; - if ( $query eq 'custnum' ) { - $sortby=\*custnum_sort; - @cust_main=qsearch('cust_main',{}); - } elsif ( $query eq 'last' ) { - $sortby=\*last_sort; - @cust_main=qsearch('cust_main',{}); - } elsif ( $query eq 'company' ) { - $sortby=\*company_sort; - @cust_main=qsearch('cust_main',{}); - } else { - die "unknown query string $query"; - } -} else { - @cust_main=(); - &cardsearch if ( $cgi->param('card_on') && $cgi->param('card') ); - &lastsearch if ( $cgi->param('last_on') && $cgi->param('last_text') ); - &companysearch if ( $cgi->param('company_on') && $cgi->param('company_text') ); -} - -@cust_main = grep { $_->ncancelled_pkgs || ! $_->all_pkgs } @cust_main - if $conf->exists('hidecancelledcustomers'); -if ( $conf->exists('hidecancelledpackages' ) ) { - %all_pkgs = map { $_->custnum => [ $_->ncancelled_pkgs ] } @cust_main; -} else { - %all_pkgs = map { $_->custnum => [ $_->all_pkgs ] } @cust_main; -} - -if ( scalar(@cust_main) == 1 ) { - print $cgi->redirect(popurl(2). "view/cust_main.cgi?". $cust_main[0]->custnum); - exit; -} elsif ( scalar(@cust_main) == 0 ) { - eidiot "No matching customers found!\n"; -} else { - - my($total)=scalar(@cust_main); - print $cgi->header( '-expires' => 'now' ), header("Customer Search Results",menubar( - 'Main Menu', popurl(2) - )), "$total matching customers found
                  ", &table(), < - - Contact name - Company - Packages - Services - -END - - my(%saw,$cust_main); - foreach $cust_main ( - sort $sortby grep(!$saw{$_->custnum}++, @cust_main) - ) { - my($custnum,$last,$first,$company)=( - $cust_main->custnum, - $cust_main->getfield('last'), - $cust_main->getfield('first'), - $cust_main->company, - ); - - my(@lol_cust_svc); - my($rowspan)=0;#scalar( @{$all_pkgs{$custnum}} ); - foreach ( @{$all_pkgs{$custnum}} ) { - my(@cust_svc) = qsearch( 'cust_svc', { 'pkgnum' => $_->pkgnum } ); - push @lol_cust_svc, \@cust_svc; - $rowspan += scalar(@cust_svc) || 1; - } - - #my($rowspan) = scalar(@{$all_pkgs{$custnum}}); - my($view) = popurl(2). "view/cust_main.cgi?$custnum"; - print < - $custnum - $last, $first - $company -END - - my($n1)=''; - foreach ( @{$all_pkgs{$custnum}} ) { - my($pkgnum) = ($_->pkgnum); - my($pkg) = $_->part_pkg->pkg; - my $comment = $_->part_pkg->comment; - my($pkgview) = popurl(2). "/view/cust_pkg.cgi?$pkgnum"; - #my(@cust_svc) = shift @lol_cust_svc; - my(@cust_svc) = qsearch( 'cust_svc', { 'pkgnum' => $_->pkgnum } ); - my($rowspan) = scalar(@cust_svc) || 1; - - print $n1, qq!$pkg - $comment!; - my($n2)=''; - foreach my $cust_svc ( @cust_svc ) { - my($label, $value, $svcdb) = $cust_svc->label; - my($svcnum) = $cust_svc->svcnum; - my($sview) = popurl(2). "/view"; - print $n2,qq!$label!, - qq!$value!; - $n2=""; - } - #print qq!\n!; - $n1=""; - } - print ""; - } - - print < - - -END - -} - -# - -sub last_sort { - $a->getfield('last') cmp $b->getfield('last'); -} - -sub company_sort { - return -1 if $a->company && ! $b->company; - return 1 if ! $a->company && $b->company; - $a->getfield('company') cmp $b->getfield('company'); -} - -sub custnum_sort { - $a->getfield('custnum') <=> $b->getfield('custnum'); -} - -sub cardsearch { - - my($card)=$cgi->param('card'); - $card =~ s/\D//g; - $card =~ /^(\d{13,16})$/ or eidiot "Illegal card number\n"; - my($payinfo)=$1; - - push @cust_main, qsearch('cust_main',{'payinfo'=>$payinfo, 'payby'=>'CARD'}); - -} - -sub lastsearch { - my(%last_type); - foreach ( $cgi->param('last_type') ) { - $last_type{$_}++; - } - - $cgi->param('last_text') =~ /^([\w \,\.\-\']*)$/ - or eidiot "Illegal last name"; - my($last)=$1; - - if ( $last_type{'Exact'} - && ! $last_type{'Fuzzy'} - # && ! $last_type{'Sound-alike'} - ) { - - push @cust_main, qsearch('cust_main',{'last'=>$last}); - - } else { - - my(%last); - - my(@all_last)=map $_->getfield('last'), qsearch('cust_main',{}); - if ($last_type{'Fuzzy'}) { - foreach ( amatch($last, [ qw(i) ], @all_last) ) { - $last{$_}++; - } - } - - #if ($last_type{'Sound-alike'}) { - #} - - foreach ( keys %last ) { - push @cust_main, qsearch('cust_main',{'last'=>$_}); - } - - } - $sortby=\*last_sort; -} - -sub companysearch { - - my(%company_type); - foreach ( $cgi->param('company_type') ) { - $company_type{$_}++ - }; - - $cgi->param('company_text') =~ /^([\w \,\.\-\']*)$/ - or eidiot "Illegal company"; - my($company)=$1; - - if ( $company_type{'Exact'} - && ! $company_type{'Fuzzy'} - # && ! $company_type{'Sound-alike'} - ) { - - push @cust_main, qsearch('cust_main',{'company'=>$company}); - - } else { - - my(%company); - my(@all_company)=map $_->company, qsearch('cust_main',{}); - - if ($company_type{'Fuzzy'}) { - foreach ( amatch($company, [ qw(i) ], @all_company ) ) { - $company{$_}++; - } - } - - #if ($company_type{'Sound-alike'}) { - #} - - foreach ( keys %company ) { - push @cust_main, qsearch('cust_main',{'company'=>$_}); - } - - } - $sortby=\*company_sort; - -} diff --git a/htdocs/search/cust_main.html b/htdocs/search/cust_main.html deleted file mode 100755 index 3184698b4..000000000 --- a/htdocs/search/cust_main.html +++ /dev/null @@ -1,36 +0,0 @@ - - - Customer Search - - - - Customer Search - -
                  -
                  - Search for last name: - - using search method: - -

                  Search for company: - - using search methods: - -

                  Note: Fuzzy searching can take a while. Please be patient. - -

                  - -
                  Explanation of search methods: -
                    -
                  • Fuzzy - Searches for matches that are close to your text. -
                  • Exact - Finds exact matches only, but much faster than the other search methods. -
                  - - - diff --git a/htdocs/search/cust_pkg.cgi b/htdocs/search/cust_pkg.cgi deleted file mode 100755 index b6439d654..000000000 --- a/htdocs/search/cust_pkg.cgi +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_pkg.cgi,v 1.11 2000-07-17 16:45:41 ivan Exp $ -# -# based on search/svc_acct.cgi ivan@sisd.com 98-jul-17 -# -# $Log: cust_pkg.cgi,v $ -# Revision 1.11 2000-07-17 16:45:41 ivan -# first shot at invoice browsing and some other cleanups -# -# Revision 1.10 2000/07/17 12:49:29 ivan -# better error message if a package isn't linked to a customer (that shouldn't happen) -# -# Revision 1.9 1999/07/17 10:38:52 ivan -# scott nelson noticed this mod_perl-triggered bug and -# gave me a great bugreport at the last rhythmethod -# -# Revision 1.8 1999/02/09 09:22:57 ivan -# visual and bugfixes -# -# Revision 1.7 1999/02/07 09:59:37 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.6 1999/01/19 05:14:13 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:38 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1999/01/18 09:22:33 ivan -# changes to track email addresses for email invoicing -# -# Revision 1.3 1998/12/23 03:05:59 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:41:09 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# - -use strict; -use vars qw ( $cgi @cust_pkg $sortby $query ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header eidiot popurl); -use FS::cust_pkg; -use FS::pkg_svc; -use FS::cust_svc; -use FS::cust_main; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -($query) = $cgi->keywords; -#this tree is a little bit redundant -if ( $query eq 'pkgnum' ) { - $sortby=\*pkgnum_sort; - @cust_pkg=qsearch('cust_pkg',{}); -} elsif ( $query eq 'APKG_pkgnum' ) { - $sortby=\*pkgnum_sort; - @cust_pkg=(); - #perhaps this should go in cust_pkg as a qsearch-like constructor? - my($cust_pkg); - foreach $cust_pkg (qsearch('cust_pkg',{})) { - my($flag)=0; - my($pkg_svc); - PKG_SVC: - foreach $pkg_svc (qsearch('pkg_svc',{ 'pkgpart' => $cust_pkg->pkgpart })) { - if ( $pkg_svc->quantity - > scalar(qsearch('cust_svc',{ - 'pkgnum' => $cust_pkg->pkgnum, - 'svcpart' => $pkg_svc->svcpart, - })) - ) - { - $flag=1; - last PKG_SVC; - } - } - push @cust_pkg, $cust_pkg if $flag; - } -} else { - die "Empty QUERY_STRING!"; -} - -if ( scalar(@cust_pkg) == 1 ) { - my($pkgnum)=$cust_pkg[0]->pkgnum; - print $cgi->redirect(popurl(2). "view/cust_pkg.cgi?$pkgnum"); - exit; -} elsif ( scalar(@cust_pkg) == 0 ) { #error - eidiot("No packages found"); -} else { - my($total)=scalar(@cust_pkg); - print $cgi->header( '-expires' => 'now' ), header('Package Search Results',''), < - - Package # - Customer # - Contact name - Company - -END - - my(%saw,$cust_pkg); - foreach $cust_pkg ( - sort $sortby grep(!$saw{$_->pkgnum}++, @cust_pkg) - ) { - my($cust_main)=qsearchs('cust_main',{'custnum'=>$cust_pkg->custnum}); - my($pkgnum,$custnum,$name,$company)=( - $cust_pkg->pkgnum, - $cust_pkg->custnum, - $cust_main ? $cust_main->last. ', '. $cust_main->first : '', - $cust_main ? $cust_main->company : '', - ); - my $p = popurl(2); - print < - $pkgnum -END - if ( $cust_main ) { - print <$custnum - $name - $company - -END - } else { - print <WARNING: couldn't find cust_main.custnum $custnum (cust_pkg.pkgnum $pkgnum) - -END - } - } - - print < - - -END - exit; - -} - -sub pkgnum_sort { - $a->getfield('pkgnum') <=> $b->getfield('pkgnum'); -} - diff --git a/htdocs/search/svc_acct.cgi b/htdocs/search/svc_acct.cgi deleted file mode 100755 index 850865789..000000000 --- a/htdocs/search/svc_acct.cgi +++ /dev/null @@ -1,207 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct.cgi,v 1.11 1999-04-14 11:25:33 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/svc_acct.cgi -# -# Note: Should be run setuid freeside as user nobody. -# -# loosely (sp?) based on search/cust_main.cgi -# -# ivan@voicenet.com 96-jan-3 -> 96-jan-4 -# -# rewrite (now does browsing too) ivan@sisd.com 98-mar-9 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# show unlinked accounts ivan@sisd.com 98-jun-22 -# -# use FS::CGI, show total ivan@sisd.com 98-jul-17 -# -# give service and customer info too ivan@sisd.com 98-aug-16 -# -# $Log: svc_acct.cgi,v $ -# Revision 1.11 1999-04-14 11:25:33 ivan -# *** empty log message *** -# -# Revision 1.10 1999/04/14 11:20:21 ivan -# visual fix -# -# Revision 1.9 1999/04/10 01:53:18 ivan -# oops, search usernames limited to 8 chars -# -# Revision 1.8 1999/04/09 23:43:29 ivan -# just in case -# -# Revision 1.7 1999/02/07 09:59:38 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.6 1999/01/19 05:14:14 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:39 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1999/01/18 09:22:34 ivan -# changes to track email addresses for email invoicing -# -# Revision 1.3 1998/12/23 03:06:28 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:41:10 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# - -use strict; -use vars qw( $cgi @svc_acct $sortby $query ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header eidiot popurl table); -use FS::svc_acct; -use FS::cust_main; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -($query)=$cgi->keywords; -$query ||= ''; #to avoid use of unitialized value errors -#this tree is a little bit redundant -if ( $query eq 'svcnum' ) { - $sortby=\*svcnum_sort; - @svc_acct=qsearch('svc_acct',{}); -} elsif ( $query eq 'username' ) { - $sortby=\*username_sort; - @svc_acct=qsearch('svc_acct',{}); -} elsif ( $query eq 'uid' ) { - $sortby=\*uid_sort; - @svc_acct=grep $_->uid ne '', qsearch('svc_acct',{}); -} elsif ( $query eq 'UN_svcnum' ) { - $sortby=\*svcnum_sort; - @svc_acct = grep qsearchs('cust_svc',{ - 'svcnum' => $_->svcnum, - 'pkgnum' => '', - }), qsearch('svc_acct',{}); -} elsif ( $query eq 'UN_username' ) { - $sortby=\*username_sort; - @svc_acct = grep qsearchs('cust_svc',{ - 'svcnum' => $_->svcnum, - 'pkgnum' => '', - }), qsearch('svc_acct',{}); -} elsif ( $query eq 'UN_uid' ) { - $sortby=\*uid_sort; - @svc_acct = grep qsearchs('cust_svc',{ - 'svcnum' => $_->svcnum, - 'pkgnum' => '', - }), qsearch('svc_acct',{}); -} else { - $sortby=\*uid_sort; - &usernamesearch; -} - -if ( scalar(@svc_acct) == 1 ) { - my($svcnum)=$svc_acct[0]->svcnum; - print $cgi->redirect(popurl(2). "view/svc_acct.cgi?$svcnum"); #redirect - exit; -} elsif ( scalar(@svc_acct) == 0 ) { #error - eidiot("Account not found"); -} else { - my($total)=scalar(@svc_acct); - print $cgi->header( '-expires' => 'now' ), - header("Account Search Results",''), - "$total matching accounts found", - &table(), < - Service # - Username - UID - Service - Customer # - Contact name - Company - -END - - my(%saw,$svc_acct); - my $p = popurl(2); - foreach $svc_acct ( - sort $sortby grep(!$saw{$_->svcnum}++, @svc_acct) - ) { - my $cust_svc = qsearchs('cust_svc', { 'svcnum' => $svc_acct->svcnum }) - or die "No cust_svc record for svcnum ". $svc_acct->svcnum; - my $part_svc = qsearchs('part_svc', { 'svcpart' => $cust_svc->svcpart }) - or die "No part_svc record for svcpart ". $cust_svc->svcpart; - my($cust_pkg,$cust_main); - if ( $cust_svc->pkgnum ) { - $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_svc->pkgnum }) - or die "No cust_pkg record for pkgnum ". $cust_svc->pkgnum; - $cust_main = qsearchs('cust_main', { 'custnum' => $cust_pkg->custnum }) - or die "No cust_main record for custnum ". $cust_pkg->custnum; - } - my($svcnum,$username,$uid,$svc,$custnum,$last,$first,$company)=( - $svc_acct->svcnum, - $svc_acct->getfield('username'), - $svc_acct->getfield('uid'), - $part_svc->svc, - $cust_svc->pkgnum ? $cust_main->custnum : '', - $cust_svc->pkgnum ? $cust_main->getfield('last') : '', - $cust_svc->pkgnum ? $cust_main->getfield('first') : '', - $cust_svc->pkgnum ? $cust_main->company : '', - ); - my($pcustnum) = $custnum - ? "$custnum" - : "(unlinked)" - ; - my($pname) = $custnum ? "$last, $first" : ''; - my $pcompany = $custnum ? "$company" : ''; - print < - $svcnum - $username - $uid - $svc - $pcustnum - $pname - $pcompany - -END - - } - - print < - - - -END - exit; - -} - -sub svcnum_sort { - $a->getfield('svcnum') <=> $b->getfield('svcnum'); -} - -sub username_sort { - $a->getfield('username') cmp $b->getfield('username'); -} - -sub uid_sort { - $a->getfield('uid') <=> $b->getfield('uid'); -} - -sub usernamesearch { - - $cgi->param('username') =~ /^([\w\d\-]+)$/; #untaint username_text - my($username)=$1; - - @svc_acct=qsearch('svc_acct',{'username'=>$username}); - -} - - diff --git a/htdocs/search/svc_acct.html b/htdocs/search/svc_acct.html deleted file mode 100755 index 91291be99..000000000 --- a/htdocs/search/svc_acct.html +++ /dev/null @@ -1,21 +0,0 @@ - - - Account Search - - -
                  -

                  Account Search

                  -
                  -
                  -
                  - Search for username: - - -

                  - -

                  - -
                  - - - diff --git a/htdocs/search/svc_acct_sm.cgi b/htdocs/search/svc_acct_sm.cgi deleted file mode 100755 index ddf2a1f23..000000000 --- a/htdocs/search/svc_acct_sm.cgi +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct_sm.cgi,v 1.10 1999-07-20 06:03:36 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/svc_domain.cgi -# -# ivan@voicenet.com 96-mar-5 -# -# need to look at table in results to make it more readable -# -# ivan@voicenet.com -# -# rewrite ivan@sisd.com 98-mar-15 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: svc_acct_sm.cgi,v $ -# Revision 1.10 1999-07-20 06:03:36 ivan -# s/CGI::Request/CGI/; (how'd i miss that before?) -# -# Revision 1.9 1999/04/09 04:22:34 ivan -# also table() -# -# Revision 1.8 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.7 1999/02/28 00:03:56 ivan -# removed misleading comments -# -# Revision 1.6 1999/02/09 09:22:58 ivan -# visual and bugfixes -# -# Revision 1.5 1999/01/19 05:14:16 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.4 1999/01/18 09:41:40 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.3 1998/12/17 09:41:11 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# - -use strict; -use vars qw( $conf $cgi $mydomain $domuser $svc_domain $domsvc @svc_acct_sm ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl idiot header table); -use FS::Record qw(qsearch qsearchs); -use FS::Conf; -use FS::svc_domain; -use FS::svc_acct_sm; -use FS::svc_acct; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$conf = new FS::Conf; -$mydomain = $conf->config('domain'); - -$cgi->param('domuser') =~ /^([a-z0-9_\-]{0,32})$/; -$domuser = $1; - -$cgi->param('domain') =~ /^([\w\-\.]+)$/ or die "Illegal domain"; -$svc_domain = qsearchs('svc_domain',{'domain'=>$1}) - or die "Unknown domain"; -$domsvc = $svc_domain->svcnum; - -if ($domuser) { - @svc_acct_sm=qsearch('svc_acct_sm',{ - 'domuser' => $domuser, - 'domsvc' => $domsvc, - }); -} else { - @svc_acct_sm=qsearch('svc_acct_sm',{'domsvc' => $domsvc}); -} - -if ( scalar(@svc_acct_sm) == 1 ) { - my($svcnum)=$svc_acct_sm[0]->svcnum; - print $cgi->redirect(popurl(2). "view/svc_acct_sm.cgi?$svcnum"); -} elsif ( scalar(@svc_acct_sm) > 1 ) { - print $cgi->header( '-expires' => 'now' ), - header('Mail Alias Search Results'), - &table(), < - Mail to
                  (click to view mail alias) - Forwards to
                  (click to view account) - -END - - my($svc_acct_sm); - foreach $svc_acct_sm (@svc_acct_sm) { - my($svcnum,$domuser,$domuid,$domsvc)=( - $svc_acct_sm->svcnum, - $svc_acct_sm->domuser, - $svc_acct_sm->domuid, - $svc_acct_sm->domsvc, - ); - - my $svc_domain = qsearchs( 'svc_domain', { 'svcnum' => $domsvc } ); - if ( $svc_domain ) { - my $domain = $svc_domain->domain; - - print qq!!, - #print '', ( ($domuser eq '*') ? "(anything)" : $domuser ); - ( ($domuser eq '*') ? "(anything)" : $domuser ), - qq!\@$domain !, - ; - } else { - my $warning = "couldn't find svc_domain.svcnum $svcnum ( svc_acct_sm.svcnum $svcnum"; - warn $warning; - print "WARNING: $warning"; - } - - my $svc_acct = qsearchs( 'svc_acct', { 'uid' => $domuid } ); - if ( $svc_acct ) { - my $username = $svc_acct->username; - my $svc_acct_svcnum =$svc_acct->svcnum; - print qq!$username\@$mydomain!, - qq!! - ; - } else { - my $warning = "couldn't find svc_acct.uid $domuid (svc_acct_sm.svcnum $svcnum)!"; - warn $warning; - print "WARNING: $warning"; - } - - } - - print ''; - -} else { #error - idiot("Mail Alias not found"); -} - diff --git a/htdocs/search/svc_acct_sm.html b/htdocs/search/svc_acct_sm.html deleted file mode 100755 index 0719856db..000000000 --- a/htdocs/search/svc_acct_sm.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Mail Alias Search - - -
                  -

                  Mail Alias Search

                  -
                  -
                  -
                  - Search for mail alias: - (opt.) @ - (req.) - -

                  - -

                  - -
                  - - - - diff --git a/htdocs/search/svc_domain.cgi b/htdocs/search/svc_domain.cgi deleted file mode 100755 index f1d4ae461..000000000 --- a/htdocs/search/svc_domain.cgi +++ /dev/null @@ -1,210 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_domain.cgi,v 1.11 2000-03-03 18:22:44 ivan Exp $ -# -# Usage: post form to: -# http://server.name/path/svc_domain.cgi -# -# ivan@voicenet.com 97-mar-5 -# -# rewrite ivan@sisd.com 98-mar-14 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# display total, use FS::CGI now does browsing too ivan@sisd.com 98-jul-17 -# -# $Log: svc_domain.cgi,v $ -# Revision 1.11 2000-03-03 18:22:44 ivan -# changes from 1.2.3 release, fixes from webdemo -# -# Revision 1.10 1999/07/17 10:38:52 ivan -# scott nelson noticed this mod_perl-triggered bug and -# gave me a great bugreport at the last rhythmethod -# -# Revision 1.9 1999/04/15 13:39:16 ivan -# $cgi->header( '-expires' => 'now' ) -# -# Revision 1.8 1999/02/28 00:03:57 ivan -# removed misleading comments -# -# Revision 1.7 1999/02/23 08:09:24 ivan -# beginnings of one-screen new customer entry and some other miscellania -# -# Revision 1.6 1999/02/09 09:22:59 ivan -# visual and bugfixes -# -# Revision 1.5 1999/02/07 09:59:39 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.4 1999/01/19 05:14:17 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.3 1998/12/23 03:06:50 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:41:12 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# - -use strict; -use vars qw ( $cgi @svc_domain $sortby $query $conf $mydomain ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::CGI qw(header eidiot popurl); -use FS::svc_domain; -use FS::cust_svc; -use FS::svc_acct_sm; -use FS::svc_acct; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$conf = new FS::Conf; -$mydomain = $conf->config('domain'); - -($query)=$cgi->keywords; -$query ||= ''; #to avoid use of unitialized value errors -if ( $query eq 'svcnum' ) { - $sortby=\*svcnum_sort; - @svc_domain=qsearch('svc_domain',{}); -} elsif ( $query eq 'domain' ) { - $sortby=\*domain_sort; - @svc_domain=qsearch('svc_domain',{}); -} elsif ( $query eq 'UN_svcnum' ) { - $sortby=\*svcnum_sort; - @svc_domain = grep qsearchs('cust_svc',{ - 'svcnum' => $_->svcnum, - 'pkgnum' => '', - }), qsearch('svc_domain',{}); -} elsif ( $query eq 'UN_domain' ) { - $sortby=\*domain_sort; - @svc_domain = grep qsearchs('cust_svc',{ - 'svcnum' => $_->svcnum, - 'pkgnum' => '', - }), qsearch('svc_domain',{}); -} else { - $cgi->param('domain') =~ /^([\w\-\.]+)$/; - my($domain)=$1; - #push @svc_domain, qsearchs('svc_domain',{'domain'=>$domain}); - @svc_domain = qsearchs('svc_domain',{'domain'=>$domain}); -} - -if ( scalar(@svc_domain) == 1 ) { - print $cgi->redirect(popurl(2). "view/svc_domain.cgi?". $svc_domain[0]->svcnum); - exit; -} elsif ( scalar(@svc_domain) == 0 ) { - eidiot "No matching domains found!\n"; -} else { - - my($total)=scalar(@svc_domain); - print $cgi->header( '-expires' => 'now' ), - header("Domain Search Results",''), < - - Service # - Domain - Mail to
                  (click to view mail alias) - Forwards to
                  (click to view account) - -END - - my(%saw,$svc_domain); - my $p = popurl(2); - foreach $svc_domain ( - sort $sortby grep(!$saw{$_->svcnum}++, @svc_domain) - ) { - my($svcnum,$domain)=( - $svc_domain->svcnum, - $svc_domain->domain, - ); - #my($malias); - #if ( qsearch('svc_acct_sm',{'domsvc'=>$svcnum}) ) { - # $malias=( - # qq|
                  |. - # qq||. - # qq||. - # qq||. - # qq|
                  | - # ); - #} else { - # $malias=''; - #} - - my @svc_acct_sm=qsearch('svc_acct_sm',{'domsvc' => $svcnum}); - my $rowspan = scalar(@svc_acct_sm) || 1; - - print < - $svcnum - $domain -END - - my $n1 = ''; - # false laziness: this was stolen from search/svc_acct_sm.cgi. but the - # web interface in general needs to be rewritten in a mucho cleaner way - my($svc_acct_sm); - foreach $svc_acct_sm (@svc_acct_sm) { - my($svcnum,$domuser,$domuid,$domsvc)=( - $svc_acct_sm->svcnum, - $svc_acct_sm->domuser, - $svc_acct_sm->domuid, - $svc_acct_sm->domsvc, - ); - #my $svc_domain = qsearchs( 'svc_domain', { 'svcnum' => $domsvc } ); - #if ( $svc_domain ) { - # my $domain = $svc_domain->domain; - - print qq!$n1!, - #print '', ( ($domuser eq '*') ? "(anything)" : $domuser ); - ( ($domuser eq '*') ? "(anything)" : $domuser ), - qq!\@$domain !, - ; - #} else { - # my $warning = "couldn't find svc_domain.svcnum $svcnum ( svc_acct_sm.svcnum $svcnum"; - # warn $warning; - # print "$n1WARNING: $warning"; - #} - - my $svc_acct = qsearchs( 'svc_acct', { 'uid' => $domuid } ); - if ( $svc_acct ) { - my $username = $svc_acct->username; - my $svc_acct_svcnum =$svc_acct->svcnum; - print qq!$username\@$mydomain!, - qq!! - ; - } else { - my $warning = "couldn't find svc_acct.uid $domuid (svc_acct_sm.svcnum $svcnum)!"; - warn $warning; - print "WARNING: $warning"; - } - $n1 = ""; - } - #end of false laziness - print ""; - - } - - print < - - -END - -} - -sub svcnum_sort { - $a->getfield('svcnum') <=> $b->getfield('svcnum'); -} - -sub domain_sort { - $a->getfield('domain') cmp $b->getfield('doimain'); -} - - diff --git a/htdocs/search/svc_domain.html b/htdocs/search/svc_domain.html deleted file mode 100755 index 533743ba2..000000000 --- a/htdocs/search/svc_domain.html +++ /dev/null @@ -1,22 +0,0 @@ - - - Domain Search - - -
                  -

                  Domain Search

                  -
                  -
                  -
                  - Search for domain: - - -

                  - -

                  - -
                  - - - - diff --git a/htdocs/view/cust_bill.cgi b/htdocs/view/cust_bill.cgi deleted file mode 100755 index 93a6f7a29..000000000 --- a/htdocs/view/cust_bill.cgi +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_bill.cgi,v 1.8 1999-02-28 00:03:58 ivan Exp $ -# -# this is a quick & ugly hack which does little more than add some formatting to the ascii output from /dbin/print-invoice -# -# ivan@voicenet.com 96-dec-05 -# -# added navigation bar -# ivan@voicenet.com 97-jan-30 -# -# now uses Invoice.pm -# ivan@voicenet.com 97-jun-30 -# -# what to do if cust_bill search errors? -# ivan@voicenet.com 97-jul-7 -# -# s/FS::Search/FS::Record/; $cgisuidsetup($cgi); ivan@sisd.com 98-mar-14 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# also print 'printed' field ivan@sisd.com 98-jul-10 -# -# $Log: cust_bill.cgi,v $ -# Revision 1.8 1999-02-28 00:03:58 ivan -# removed misleading comments -# -# Revision 1.7 1999/01/25 12:26:03 ivan -# yet more mod_perl stuff -# -# Revision 1.6 1999/01/19 05:14:18 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:42 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1998/12/30 23:03:33 ivan -# bugfixes; fields isn't exported by derived classes -# -# Revision 1.3 1998/12/23 03:07:49 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.2 1998/12/17 09:57:20 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# - -use strict; -use vars qw ( $cgi $query $invnum $cust_bill $custnum $printed $p ); -use IO::File; -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl menubar); -use FS::Record qw(qsearchs); -use FS::cust_bill; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -#untaint invnum -($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -$invnum = $1; - -$cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -die "Invoice #$invnum not found!" unless $cust_bill; -$custnum = $cust_bill->getfield('custnum'); - -$printed = $cust_bill->printed; - -$p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header('Invoice View', menubar( - "Main Menu" => $p, - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", -)), <Enter payments (check/cash) against this invoice -
                  Reprint this invoice -

                  (Printed $printed times) -
                  -END
                  -
                  -print $cust_bill->print_text;
                  -
                  -	#formatting
                  -	print <
                  -  
                  -
                  -END
                  -
                  diff --git a/htdocs/view/cust_main.cgi b/htdocs/view/cust_main.cgi
                  deleted file mode 100755
                  index 7c96ddffa..000000000
                  --- a/htdocs/view/cust_main.cgi
                  +++ /dev/null
                  @@ -1,437 +0,0 @@
                  -#!/usr/bin/perl -Tw
                  -#
                  -# $Id: cust_main.cgi,v 1.20 2001-06-03 11:40:48 ivan Exp $
                  -#
                  -# Usage: cust_main.cgi custnum
                  -#        http://server.name/path/cust_main.cgi?custnum
                  -#
                  -# the payment history section could use some work, see below
                  -# 
                  -# ivan@voicenet.com 96-nov-29 -> 96-dec-11
                  -#
                  -# added navigation bar (go to main menu ;)
                  -# ivan@voicenet.com 97-jan-30
                  -#
                  -# changes to the way credits/payments are applied (the links are here).
                  -# ivan@voicenet.com 97-apr-21
                  -#
                  -# added debugging code to diagnose CPU sucking problem.
                  -# ivan@voicenet.com 97-may-19
                  -#
                  -# CPU sucking problem was in comment code?  fixed?
                  -# ivan@voicenet.com 97-may-22
                  -#
                  -# rewrote for new API
                  -# ivan@voicenet.com 97-jul-22
                  -#
                  -# Changes to allow page to work at a relative position in server
                  -# Changed 'day' to 'daytime' because Pg6.3 reserves the day word
                  -#       bmccane@maxbaud.net     98-apr-3
                  -#
                  -# lose background, FS::CGI ivan@sisd.com 98-sep-2
                  -#
                  -# $Log: cust_main.cgi,v $
                  -# Revision 1.20  2001-06-03 11:40:48  ivan
                  -# inline doc clarification
                  -#
                  -# Revision 1.19  2001/04/22 01:38:39  ivan
                  -# svc_domain needs to import dbh sub from Record
                  -# view/cust_main.cgi needs to use ->owed method, not check (depriciated) owed field
                  -# search/cust_bill.cgi redirect error when there's only one invoice
                  -#
                  -# Revision 1.18  1999/08/12 04:16:01  ivan
                  -# hidecancelledpackages config option
                  -#
                  -# Revision 1.17  1999/04/15 16:44:36  ivan
                  -# delete customers
                  -#
                  -# Revision 1.16  1999/04/09 04:22:34  ivan
                  -# also table()
                  -#
                  -# Revision 1.15  1999/04/09 03:52:55  ivan
                  -# explicit & for table/itable/ntable
                  -#
                  -# Revision 1.14  1999/04/08 04:04:37  ivan
                  -# eliminate double // in links
                  -#
                  -# Revision 1.13  1999/02/28 00:04:00  ivan
                  -# removed misleading comments
                  -#
                  -# Revision 1.12  1999/02/07 09:59:40  ivan
                  -# more mod_perl fixes, and bugfixes Peter Wemm sent via email
                  -#
                  -# Revision 1.11  1999/01/25 12:26:04  ivan
                  -# yet more mod_perl stuff
                  -#
                  -# Revision 1.10  1999/01/19 05:14:19  ivan
                  -# for mod_perl: no more top-level my() variables; use vars instead
                  -# also the last s/create/new/;
                  -#
                  -# Revision 1.9  1999/01/18 09:41:43  ivan
                  -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl
                  -# (good idea anyway)
                  -#
                  -# Revision 1.8  1999/01/18 09:22:35  ivan
                  -# changes to track email addresses for email invoicing
                  -#
                  -# Revision 1.7  1998/12/30 23:03:34  ivan
                  -# bugfixes; fields isn't exported by derived classes
                  -#
                  -# Revision 1.6  1998/12/23 02:42:33  ivan
                  -# remove double '/' in link urls
                  -#
                  -# Revision 1.5  1998/12/23 02:36:28  ivan
                  -# use FS::cust_refund; to eliminate warning
                  -#
                  -# Revision 1.4  1998/12/17 09:57:21  ivan
                  -# s/CGI::(Base|Request)/CGI.pm/;
                  -#
                  -# Revision 1.3  1998/11/15 13:14:20  ivan
                  -# first pass as per-customer custom pricing
                  -#
                  -# Revision 1.2  1998/11/13 11:28:08  ivan
                  -# s/CGI-modules/CGI.pm/;, relative URL's with popurl
                  -#
                  -
                  -use strict;
                  -use vars qw ( $cgi $query $custnum $cust_main $hashref $agent $referral 
                  -              @packages $package @history @bills $bill @credits $credit
                  -              $balance $item @agents @referrals @invoicing_list $n1 $conf ); 
                  -use CGI;
                  -use CGI::Carp qw(fatalsToBrowser);
                  -use Date::Format;
                  -use FS::UID qw(cgisuidsetup);
                  -use FS::Record qw(qsearchs qsearch);
                  -use FS::CGI qw(header menubar popurl table itable ntable);
                  -use FS::cust_credit;
                  -use FS::cust_pay;
                  -use FS::cust_bill;
                  -use FS::part_pkg;
                  -use FS::cust_pkg;
                  -use FS::part_referral;
                  -use FS::agent;
                  -use FS::cust_main;
                  -use FS::cust_refund;
                  -
                  -$cgi = new CGI;
                  -&cgisuidsetup($cgi);
                  -
                  -$conf = new FS::Conf;
                  -
                  -print $cgi->header( '-expires' => 'now' ), header("Customer View", menubar(
                  -  'Main Menu' => popurl(2)
                  -));
                  -
                  -die "No customer specified (bad URL)!" unless $cgi->keywords;
                  -($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
                  -$query =~ /^(\d+)$/;
                  -$custnum = $1;
                  -$cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
                  -die "Customer not found!" unless $cust_main;
                  -$hashref = $cust_main->hashref;
                  -
                  -print &itable(), '';
                  -
                  -print qq!Edit this customer!;
                  -print qq! |  Delete this customer!
                  -  if $conf->exists('deletecustomers');
                  -print &ntable("#c0c0c0"), "", &ntable("#c0c0c0",2),
                  -      'Customer number',
                  -      $custnum, '',
                  -;
                  -
                  -@agents = qsearch( 'agent', {} );
                  -unless ( scalar(@agents) == 1 ) {
                  -  $agent = qsearchs('agent',{
                  -    'agentnum' => $cust_main->agentnum
                  -  } );
                  -  print 'Agent',
                  -        $agent->agentnum, ": ", $agent->agent, '';
                  -}
                  -@referrals = qsearch( 'part_referral', {} );
                  -unless ( scalar(@referrals) == 1 ) {
                  -  my $referral = qsearchs('part_referral', {
                  -    'refnum' => $cust_main->refnum
                  -  } );
                  -  print 'Referral',
                  -        $referral->refnum, ": ", $referral->referral, '';
                  -}
                  -print 'Order taker',
                  -  $cust_main->otaker, '';
                  -
                  -print '';
                  -
                  -print '';
                  -
                  -print "Contact information", &ntable("#c0c0c0"), "",
                  -      &ntable("#c0c0c0",2),
                  -  'Contact name
                  (last, first)', - '', - $cust_main->last, ', ', $cust_main->first, - 'SS#', - $cust_main->ss || ' ', '', - 'Company', - $cust_main->company, - '', - 'Address', - $cust_main->address1, - '', -; -print ' ', - $cust_main->address2, '' - if $cust_main->address2; -print 'City', - $cust_main->city, - 'State', - $cust_main->state, - 'Zip', - $cust_main->zip, '', - 'Country', - $cust_main->country, - '', -; -print 'Day Phone', - $cust_main->daytime || ' ', '', - 'Night Phone', - $cust_main->night || ' ', '', - 'Fax', - $cust_main->fax || ' ', '', - '', "" -; - -print ''; - -@invoicing_list = $cust_main->invoicing_list; -print "Billing information (", - qq!!, "Bill now)", - &ntable("#c0c0c0"), "", &ntable("#c0c0c0",2), - 'Tax exempt', - $cust_main->tax ? 'yes' : 'no', - '', - 'Postal invoices', - ( grep { $_ eq 'POST' } @invoicing_list ) ? 'yes' : 'no', - '', - 'Email invoices', - join(', ', grep { $_ ne 'POST' } @invoicing_list ) || 'no', - '', - 'Billing type', -; - -if ( $cust_main->payby eq 'CARD' ) { - print 'Credit card', - 'Card number', - $cust_main->payinfo, '', - 'Expiration', - $cust_main->paydate, '', - 'Name on card', - $cust_main->payname, '' - ; -} elsif ( $cust_main->payby eq 'BILL' ) { - print 'Billing'; - print 'P.O. ', - $cust_main->payinfo, '', - if $cust_main->payinfo; - print 'Expiration', - $cust_main->paydate, '', - 'Attention', - $cust_main->payname, '', - ; -} elsif ( $cust_main->payby eq 'COMP' ) { - print 'Complimentary', - 'Authorized by', - $cust_main->payinfo, '', - 'Expiration', - $cust_main->paydate, '', - ; -} - -print ""; - -print qq!

                  Packages !, -# qq!
                  Click on package number to view/edit package.!, - qq!( Order and cancel packages (preserves services) )!, -; - -#display packages - -#formatting -print qq!!, &table(), "\n", - qq!Package!, - qq!DatesServices\n!, - qq!Setup!, - qq!Next bill!, - qq!Susp.Expire!, - qq!!, - qq!Cancel!, - qq!\n!; - -#get package info -if ( $conf->exists('hidecancelledpackages') ) { - @packages = $cust_main->ncancelled_pkgs; -} else { - @packages = $cust_main->all_pkgs; -} - -$n1 = ''; -foreach $package (@packages) { - my $pkgnum = $package->pkgnum; - my $pkg = $package->part_pkg->pkg; - my $comment = $package->part_pkg->comment; - my $pkgview = popurl(2). "view/cust_pkg.cgi?$pkgnum"; - my @cust_svc = qsearch( 'cust_svc', { 'pkgnum' => $pkgnum } ); - my $rowspan = scalar(@cust_svc) || 1; - - my $button_cgi = new CGI; - $button_cgi->param('clone', $package->part_pkg->pkgpart); - $button_cgi->param('pkgnum', $package->pkgnum); - my $button_url = popurl(2). "edit/part_pkg.cgi?". $button_cgi->query_string; - - #print $n1, qq!$pkgnum!, - print $n1, qq!$pkgnum!, - qq!!, - #qq!$pkg - $comment!, - qq!$pkg - $comment!, - qq! ( Edit | Customize pricing )!, - ; - for ( qw( setup bill susp expire cancel ) ) { - print "", ( $package->getfield($_) - ? time2str("%D", $package->getfield($_) ) - : ' ' - ), '', - ; - } - - my $n2 = ''; - foreach my $cust_svc ( @cust_svc ) { - my($label, $value, $svcdb) = $cust_svc->label; - my($svcnum) = $cust_svc->svcnum; - my($sview) = popurl(2). "view"; - print $n2,qq!$label!, - qq!$value!; - $n2=""; - } - $n1=""; -} -print ""; - -#formatting -print ""; - -#formatting -print qq!

                  Payment History!, - qq!!, - qq! ( Click on invoice to view invoice/enter payment. | !, - qq!!, - qq!Post credit / refund )!; - -#get payment history -# -# major problem: this whole thing is way too sloppy. -# minor problem: the description lines need better formatting. - -@history = (); #needed for mod_perl :) - -@bills = qsearch('cust_bill',{'custnum'=>$custnum}); -foreach $bill (@bills) { - my($bref)=$bill->hashref; - push @history, - $bref->{_date} . qq!\tInvoice #! . $bref->{invnum} . - qq! (Balance \$! . $bill->owed . qq!)\t! . - $bref->{charged} . qq!\t\t\t!; - - my(@payments)=qsearch('cust_pay',{'invnum'=> $bref->{invnum} } ); - my($payment); - foreach $payment (@payments) { - my($date,$invnum,$payby,$payinfo,$paid)=($payment->getfield('_date'), - $payment->getfield('invnum'), - $payment->getfield('payby'), - $payment->getfield('payinfo'), - $payment->getfield('paid'), - ); - push @history, - "$date\tPayment, Invoice #$invnum ($payby $payinfo)\t\t$paid\t\t"; - } -} - -@credits = qsearch('cust_credit',{'custnum'=>$custnum}); -foreach $credit (@credits) { - my($cref)=$credit->hashref; - push @history, - $cref->{_date} . "\tCredit #" . $cref->{crednum} . ", (Balance \$" . - $cref->{credited} . ") by " . $cref->{otaker} . " - " . - $cref->{reason} . "\t\t\t" . $cref->{amount} . "\t"; - - my(@refunds)=qsearch('cust_refund',{'crednum'=> $cref->{crednum} } ); - my($refund); - foreach $refund (@refunds) { - my($rref)=$refund->hashref; - push @history, - $rref->{_date} . "\tRefund, Credit #" . $rref->{crednum} . " (" . - $rref->{payby} . " " . $rref->{payinfo} . ") by " . - $rref->{otaker} . " - ". $rref->{reason} . "\t\t\t\t" . - $rref->{refund}; - } -} - - #formatting - print &table(), < - Date - Description - Charge - Payment - In-house
                  Credit
                  - Refund - Balance - -END - -#display payment history - -$balance = 0; -foreach $item (sort keyfield_numerically @history) { - my($date,$desc,$charge,$payment,$credit,$refund)=split(/\t/,$item); - $charge ||= 0; - $payment ||= 0; - $credit ||= 0; - $refund ||= 0; - $balance += $charge - $payment; - $balance -= $credit - $refund; - - print "",time2str("%D",$date),"", - "$desc", - "", - ( $charge ? "\$".sprintf("%.2f",$charge) : '' ), - "", - "", - ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ), - "", - "", - ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ), - "", - "", - ( $refund ? "\$".sprintf("%.2f",$refund) : '' ), - "", - "\$" . sprintf("%.2f",$balance), - "", - "\n"; -} - -#formatting -print ""; - -#end - -#formatting -print < - -END - -#subroutiens -sub keyfield_numerically { (split(/\t/,$a))[0] <=> (split(/\t/,$b))[0] ; } - diff --git a/htdocs/view/cust_pkg.cgi b/htdocs/view/cust_pkg.cgi deleted file mode 100755 index 0054ee0fa..000000000 --- a/htdocs/view/cust_pkg.cgi +++ /dev/null @@ -1,206 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: cust_pkg.cgi,v 1.11 1999-04-09 04:22:34 ivan Exp $ -# -# Usage: cust_pkg.cgi pkgnum -# http://server.name/path/cust_pkg.cgi?pkgnum -# -# ivan@voicenet.com 96-dec-15 -# -# services section needs to be cleaned up, needs to display extraneous -# entries in cust_pkg! -# ivan@voicenet.com 96-dec-31 -# -# added navigation bar -# ivan@voicenet.com 97-jan-30 -# -# changed and fixed up suspension and cancel stuff, now you can't add -# services to a cancelled package -# ivan@voicenet.com 97-feb-27 -# -# rewrote for new API, still needs to be cleaned up! -# ivan@voicenet.com 97-jul-29 -# -# no FS::Search ivan@sisd.com 98-mar-7 -# -# $Log: cust_pkg.cgi,v $ -# Revision 1.11 1999-04-09 04:22:34 ivan -# also table() -# -# Revision 1.10 1999/04/09 03:52:55 ivan -# explicit & for table/itable/ntable -# -# Revision 1.9 1999/04/08 12:00:19 ivan -# aesthetic update -# -# Revision 1.8 1999/02/28 00:04:01 ivan -# removed misleading comments -# -# Revision 1.7 1999/01/19 05:14:20 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.6 1999/01/18 09:41:44 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.5 1998/12/23 03:11:40 ivan -# *** empty log message *** -# -# Revision 1.3 1998/12/17 09:57:22 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# -# Revision 1.2 1998/11/13 09:56:49 ivan -# change configuration file layout to support multiple distinct databases (with -# own set of config files, export, etc.) -# - -use strict; -use vars qw ( $cgi %uiview %uiadd $part_svc $query $pkgnum $cust_pkg $part_pkg - $custnum $susp $cancel $expire $pkg $comment $setup $bill - $otaker ); -use Date::Format; -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(popurl header menubar ntable table); -use FS::Record qw(qsearch qsearchs); -use FS::part_svc; -use FS::cust_pkg; -use FS::part_pkg; -use FS::pkg_svc; -use FS::cust_svc; - -$cgi = new CGI; -cgisuidsetup($cgi); - -foreach $part_svc ( qsearch('part_svc',{}) ) { - $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi"; - $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi"; -} - -($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -$pkgnum = $1; - -#get package record -$cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -die "No package!" unless $cust_pkg; -$part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); - -$custnum = $cust_pkg->getfield('custnum'); -print $cgi->header( '-expires' => 'now' ), header('Package View', menubar( - "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum", - 'Main Menu' => popurl(2) -)); - -#print info -($susp,$cancel,$expire)=( - $cust_pkg->getfield('susp'), - $cust_pkg->getfield('cancel'), - $cust_pkg->getfield('expire'), -); -($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); -($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); -$otaker = $cust_pkg->getfield('otaker'); - -print "Package information"; -print ' (unsuspend)' if ( $susp && ! $cancel ); -print ' (suspend)' unless ( $susp || $cancel ); -print ' (cancel)' unless $cancel; - -print &ntable("#c0c0c0"), '', &ntable("#c0c0c0",2), - 'Package number', - $pkgnum, '', - 'Package', - $pkg, '', - 'Comment', - $comment, '', - 'Setup date', - ( $setup ? time2str("%D",$setup) : "(Not setup)" ), '', - 'Next bill date', - ( $bill ? time2str("%D",$bill) : " " ), '', -; -print 'Suspension date', - time2str("%D",$susp), '' if $susp; -print 'Expiration date', - time2str("%D",$expire), '' if $expire; -print 'Cancellation date', - time2str("%D",$cancel), '' if $cancel; -print 'Order taker', - $otaker, '', - '' -; - -# print < -# -#Expire (date): -# -#END - -unless ($cancel) { - - #services - print '
                  Service Information', &table(); - - #list of services this pkgpart includes - my $pkg_svc; - my %pkg_svc = (); - foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $cust_pkg->pkgpart }) ) { - $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity; - } - - #list of records from cust_svc - my $svcpart; - foreach $svcpart (sort {$a <=> $b} keys %pkg_svc) { - - my($svc)=qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc'); - - my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum, - 'svcpart'=>$svcpart, - }); - - my($enum); - for $enum ( 1 .. $pkg_svc{$svcpart} ) { - - my($cust_svc); - if ( $cust_svc=shift @cust_svc ) { - my($svcnum)=$cust_svc->svcnum; - my($label, $value, $svcdb) = $cust_svc->label; - print <(View) $svc: $value -END - } else { - print < - - (Add) $svc - or - (Link to existing) $svc - - -END - } - - } - warn "WARNING: Leftover services pkgnum $pkgnum!" if @cust_svc;; - } - - print "", - "Choose (View) to view or edit an existing service
                  ", - "Choose (Add) to setup a new service
                  ", - "Choose (Link to existing) to link to a legacy (pre-Freeside) service", - "
                  " - ; -} - -#formatting -print < - -END - diff --git a/htdocs/view/svc_acct.cgi b/htdocs/view/svc_acct.cgi deleted file mode 100755 index 40e3c2d15..000000000 --- a/htdocs/view/svc_acct.cgi +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct.cgi,v 1.12 2001-01-31 07:21:00 ivan Exp $ -# -# Usage: svc_acct.cgi svcnum -# http://server.name/path/svc_acct.cgi?svcnum -# -# ivan@voicenet.com 96-dec-17 -# -# added link to send info -# ivan@voicenet.com 97-jan-4 -# -# added navigation bar and ability to change username, etc. -# ivan@voicenet.com 97-jan-30 -# -# activate 800 service -# ivan@voicenet.com 97-feb-10 -# -# modified navbar code (should be a subroutine?), added link to cancel account (only if not audited) -# ivan@voicenet.com 97-apr-16 -# -# INCOMPLETELY rewrote some things for new API -# ivan@voicenet.com 97-jul-29 -# -# FS::Search became FS::Record, use strict, etc. ivan@sisd.com 98-mar-9 -# -# Changes to allow page to work at a relative position in server -# Changed 'password' to '_password' because Pg6.3 reserves the password word -# bmccane@maxbaud.net 98-apr-3 -# -# /var/spool/freeside/conf/domain ivan@sisd.com 98-jul-17 -# -# displays arbitrary radius attributes ivan@sisd.com 98-aug-16 -# -# $Log: svc_acct.cgi,v $ -# Revision 1.12 2001-01-31 07:21:00 ivan -# fix tyops -# -# Revision 1.11 2000/12/03 20:25:20 ivan -# session monitor updates -# -# Revision 1.10 1999/04/14 11:27:06 ivan -# showpasswords config option to show passwords -# -# Revision 1.9 1999/04/08 12:00:19 ivan -# aesthetic update -# -# Revision 1.8 1999/02/28 00:04:02 ivan -# removed misleading comments -# -# Revision 1.7 1999/01/19 05:14:21 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.6 1999/01/18 09:41:45 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.5 1999/01/18 09:22:36 ivan -# changes to track email addresses for email invoicing -# -# Revision 1.4 1998/12/23 03:09:19 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.3 1998/12/17 09:57:23 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# -# Revision 1.2 1998/12/16 05:24:29 ivan -# use FS::Conf; -# - -use strict; -use vars qw( $conf $cgi $mydomain $query $svcnum $svc_acct $cust_svc $pkgnum - $cust_pkg $custnum $part_svc $p $svc_acct_pop $password ); -use CGI; -use CGI::Carp qw( fatalsToBrowser ); -use FS::UID qw( cgisuidsetup ); -use FS::CGI qw( header popurl menubar); -use FS::Record qw( qsearchs fields ); -use FS::Conf; -use FS::svc_acct; -use FS::cust_svc; -use FS::cust_pkg; -use FS::part_svc; -use FS::svc_acct_pop; - -$cgi = new CGI; -&cgisuidsetup($cgi); - -$conf = new FS::Conf; -$mydomain = $conf->config('domain'); - -($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -$svcnum = $1; -$svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); -die "Unknown svcnum" unless $svc_acct; - -$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -$pkgnum = $cust_svc->getfield('pkgnum'); -if ($pkgnum) { - $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - $custnum=$cust_pkg->getfield('custnum'); -} else { - $cust_pkg = ''; - $custnum = ''; -} - -$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); -die "Unknown svcpart" unless $part_svc; - -$p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header('Account View', menubar( - ( ( $pkgnum || $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Cancel this (unaudited) account" => - "${p}misc/cancel-unaudited.cgi?$svcnum" ) - ), - "Main menu" => $p, -)); - -#print qq!
                  Send account information!; - -print qq!Edit this information!, - "
                  Service #$svcnum", - "
                  Service: ", $part_svc->svc, "", - "

                  Username: ", $svc_acct->username, "" -; - -print "
                  Password: "; -$password = $svc_acct->_password; -if ( $password =~ /^\*\w+\* (.*)$/ ) { - $password = $1; - print "(login disabled) "; -} -if ( $conf->exists('showpasswords') ) { - print "$password"; -} else { - print "(hidden)"; -} -$password = ''; - -$svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum}); -print "
                  POP: ", $svc_acct_pop->city, ", ", $svc_acct_pop->state, - " (", $svc_acct_pop->ac, ")/", $svc_acct_pop->exch, "" - if $svc_acct_pop; - -if ($svc_acct->uid ne '') { - print "

                  Uid: ", $svc_acct->uid, "", - "
                  Gid: ", $svc_acct->gid, "", - "
                  Finger name: ", $svc_acct->finger, "", - "
                  Home directory: ", $svc_acct->dir, "", - "
                  Shell: ", $svc_acct->shell, "", - "
                  Quota: ", $svc_acct->quota, " (unimplemented)" - ; -} else { - print "

                  (No shell account)"; -} - -if ($svc_acct->slipip) { - print "

                  IP address: ", ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' ) ? "(Dynamic)" : $svc_acct->slipip ,""; - my($attribute); - foreach $attribute ( grep /^radius_/, fields('svc_acct') ) { - #warn $attribute; - $attribute =~ /^radius_(.*)$/; - my($pattribute) = ($1); - $pattribute =~ s/_/-/g; - print "
                  Radius $pattribute: ". $svc_acct->getfield($attribute), ""; - } -} else { - print "

                  (No SLIP/PPP account)"; -} - -print ""; - diff --git a/htdocs/view/svc_acct_sm.cgi b/htdocs/view/svc_acct_sm.cgi deleted file mode 100755 index 072c94d44..000000000 --- a/htdocs/view/svc_acct_sm.cgi +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct_sm.cgi,v 1.11 2000-07-17 10:58:42 ivan Exp $ -# -# Usage: svc_acct_sm.cgi svcnum -# http://server.name/path/svc_acct_sm.cgi?svcnum -# -# based on view/svc_acct.cgi -# -# ivan@voicenet.com 97-jan-5 -# -# added navigation bar -# ivan@voicenet.com 97-jan-30 -# -# rewrite ivan@sisd.com 98-mar-15 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# /var/spool/freeside/conf/domain ivan@sisd.com 98-jul-17 -# -# $Log: svc_acct_sm.cgi,v $ -# Revision 1.11 2000-07-17 10:58:42 ivan -# better error messages if svc_acct or svc_domain records are missing -# -# Revision 1.10 1999/04/08 12:00:19 ivan -# aesthetic update -# -# Revision 1.9 1999/02/28 00:04:03 ivan -# removed misleading comments -# -# Revision 1.8 1999/02/09 09:23:00 ivan -# visual and bugfixes -# -# Revision 1.7 1999/02/07 09:59:42 ivan -# more mod_perl fixes, and bugfixes Peter Wemm sent via email -# -# Revision 1.6 1999/01/19 05:14:22 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:46 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1998/12/23 03:09:52 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.3 1998/12/17 09:57:24 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# -# Revision 1.2 1998/12/16 05:24:30 ivan -# use FS::Conf; -# - -use strict; -use vars qw($conf $cgi $mydomain $query $svcnum $svc_acct_sm $cust_svc - $pkgnum $cust_pkg $custnum $part_svc $p $domsvc $domuid $domuser - $svc $svc_domain $domain $svc_acct $username ); -use CGI; -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header popurl menubar ); -use FS::Record qw(qsearchs); -use FS::Conf; -use FS::svc_acct_sm; -use FS::cust_svc; -use FS::cust_pkg; -use FS::part_svc; -use FS::svc_domain; -use FS::svc_acct; - -$cgi = new CGI; -cgisuidsetup($cgi); - -$conf = new FS::Conf; -$mydomain = $conf->config('domain'); - -($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -$svcnum = $1; -$svc_acct_sm = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}); -die "Unknown svcnum" unless $svc_acct_sm; - -$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -$pkgnum = $cust_svc->getfield('pkgnum'); -if ($pkgnum) { - $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - $custnum=$cust_pkg->getfield('custnum'); -} else { - $cust_pkg = ''; - $custnum = ''; -} - -$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ) - or die "Unkonwn svcpart"; - -$p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header('Mail Alias View', menubar( - ( ( $pkgnum || $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Cancel this (unaudited) account" => - "${p}misc/cancel-unaudited.cgi?$svcnum" ) - ), - "Main menu" => $p, -)); - -($domsvc,$domuid,$domuser) = ( - $svc_acct_sm->domsvc, - $svc_acct_sm->domuid, - $svc_acct_sm->domuser, -); -$svc = $part_svc->svc; -$svc_domain = qsearchs('svc_domain',{'svcnum'=>$domsvc}) - or die "Corrupted database: no svc_domain.svcnum matching domsvc $domsvc"; -$domain = $svc_domain->domain; -$svc_acct = qsearchs('svc_acct',{'uid'=>$domuid}) - or die "Corrupted database: no svc_acct.uid matching domuid $domuid"; -$username = $svc_acct->username; - -print qq!Edit this information!, - "
                  Service #$svcnum", - "
                  Service: $svc", - qq!
                  Mail to !, ( ($domuser eq '*') ? "(anything)" : $domuser ) , qq!\@$domain forwards to $username\@$mydomain mailbox.!, - '' -; - diff --git a/htdocs/view/svc_domain.cgi b/htdocs/view/svc_domain.cgi deleted file mode 100755 index 85c854ee0..000000000 --- a/htdocs/view/svc_domain.cgi +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_domain.cgi,v 1.11 2000-12-03 15:14:00 ivan Exp $ -# -# Usage: svc_domain svcnum -# http://server.name/path/svc_domain.cgi?svcnum -# -# ivan@voicenet.com 97-jan-6 -# -# rewrite ivan@sisd.com 98-mar-14 -# -# Changes to allow page to work at a relative position in server -# bmccane@maxbaud.net 98-apr-3 -# -# $Log: svc_domain.cgi,v $ -# Revision 1.11 2000-12-03 15:14:00 ivan -# bugfixes from Jeff Finucane , thanks! -# -# Revision 1.10 1999/08/27 22:18:44 ivan -# point to patrick instead of internic! -# -# Revision 1.9 1999/04/08 12:00:19 ivan -# aesthetic update -# -# Revision 1.8 1999/02/28 00:04:04 ivan -# removed misleading comments -# -# Revision 1.7 1999/02/23 08:09:25 ivan -# beginnings of one-screen new customer entry and some other miscellania -# -# Revision 1.6 1999/01/19 05:14:23 ivan -# for mod_perl: no more top-level my() variables; use vars instead -# also the last s/create/new/; -# -# Revision 1.5 1999/01/18 09:41:47 ivan -# all $cgi->header calls now include ( '-expires' => 'now' ) for mod_perl -# (good idea anyway) -# -# Revision 1.4 1998/12/23 03:10:19 ivan -# $cgi->keywords instead of $cgi->query_string -# -# Revision 1.3 1998/12/17 09:57:25 ivan -# s/CGI::(Base|Request)/CGI.pm/; -# -# Revision 1.2 1998/11/13 09:56:50 ivan -# change configuration file layout to support multiple distinct databases (with -# own set of config files, export, etc.) -# - -use strict; -use vars qw( $cgi $query $svcnum $svc_domain $domain $cust_svc $pkgnum - $cust_pkg $custnum $part_svc $p ); -use CGI; -use FS::UID qw(cgisuidsetup); -use FS::CGI qw(header menubar popurl menubar); -use FS::Record qw(qsearchs); -use FS::svc_domain; -use FS::cust_svc; -use FS::cust_pkg; -use FS::part_svc; - -$cgi = new CGI; -cgisuidsetup($cgi); - -($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -$svcnum = $1; -$svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum}); -die "Unknown svcnum" unless $svc_domain; - -$cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -$pkgnum = $cust_svc->getfield('pkgnum'); -if ($pkgnum) { - $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - $custnum=$cust_pkg->getfield('custnum'); -} else { - $cust_pkg = ''; - $custnum = ''; -} - -$part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); -die "Unkonwn svcpart" unless $part_svc; - -$domain = $svc_domain->domain; - -$p = popurl(2); -print $cgi->header( '-expires' => 'now' ), header('Domain View', menubar( - ( ( $pkgnum || $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Cancel this (unaudited) account" => - "${p}misc/cancel-unaudited.cgi?$svcnum" ) - ), - "Main menu" => $p, -)), - "Service #$svcnum", - "
                  Service: ", $part_svc->svc, "", - "
                  Domain name: $domain.", - qq!

                  View whois information.!, - '', -; -- 2.11.0