summaryrefslogtreecommitdiff
path: root/htdocs/docs
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/docs')
-rwxr-xr-xhtdocs/docs/CGI-modules-2.76-patch.txt23
-rw-r--r--htdocs/docs/admin.html53
-rw-r--r--htdocs/docs/billing.html53
-rw-r--r--htdocs/docs/config.html104
-rw-r--r--htdocs/docs/export.html32
-rw-r--r--htdocs/docs/index.html18
-rw-r--r--htdocs/docs/install.html96
-rw-r--r--htdocs/docs/legacy.html4
-rw-r--r--htdocs/docs/man/Bill.txt29
-rw-r--r--htdocs/docs/man/CGI.txt47
-rw-r--r--htdocs/docs/man/Conf.txt47
-rw-r--r--htdocs/docs/man/FS.html138
-rw-r--r--htdocs/docs/man/FS/Bill.html32
-rw-r--r--htdocs/docs/man/FS/CGI.html95
-rw-r--r--htdocs/docs/man/FS/CGIwrapper.html16
-rw-r--r--htdocs/docs/man/FS/Conf.html81
-rw-r--r--htdocs/docs/man/FS/Invoice.html32
-rw-r--r--htdocs/docs/man/FS/Record.html342
-rw-r--r--htdocs/docs/man/FS/SSH.html104
-rw-r--r--htdocs/docs/man/FS/SessionClient.html97
-rw-r--r--htdocs/docs/man/FS/SignupClient.html125
-rw-r--r--htdocs/docs/man/FS/UI/Base.html100
-rw-r--r--htdocs/docs/man/FS/UI/CGI.html94
-rw-r--r--htdocs/docs/man/FS/UI/Gtk.html91
-rw-r--r--htdocs/docs/man/FS/UI/agent.html16
-rw-r--r--htdocs/docs/man/FS/UID.html142
-rw-r--r--htdocs/docs/man/FS/agent.html121
-rw-r--r--htdocs/docs/man/FS/agent_type.html126
-rw-r--r--htdocs/docs/man/FS/cust_bill.html161
-rw-r--r--htdocs/docs/man/FS/cust_bill_pkg.html112
-rw-r--r--htdocs/docs/man/FS/cust_credit.html118
-rw-r--r--htdocs/docs/man/FS/cust_main.html252
-rw-r--r--htdocs/docs/man/FS/cust_main_county.html106
-rw-r--r--htdocs/docs/man/FS/cust_main_invoice.html111
-rw-r--r--htdocs/docs/man/FS/cust_pay.html108
-rw-r--r--htdocs/docs/man/FS/cust_pay_batch.html132
-rw-r--r--htdocs/docs/man/FS/cust_pkg.html205
-rw-r--r--htdocs/docs/man/FS/cust_refund.html108
-rw-r--r--htdocs/docs/man/FS/cust_svc.html118
-rw-r--r--htdocs/docs/man/FS/dbdef.html97
-rw-r--r--htdocs/docs/man/FS/dbdef_colgroup.html86
-rw-r--r--htdocs/docs/man/FS/dbdef_column.html118
-rw-r--r--htdocs/docs/man/FS/dbdef_index.html58
-rw-r--r--htdocs/docs/man/FS/dbdef_table.html144
-rw-r--r--htdocs/docs/man/FS/dbdef_unique.html58
-rw-r--r--htdocs/docs/man/FS/domain_record.html122
-rw-r--r--htdocs/docs/man/FS/nas.html117
-rw-r--r--htdocs/docs/man/FS/part_pkg.html138
-rw-r--r--htdocs/docs/man/FS/part_referral.html100
-rw-r--r--htdocs/docs/man/FS/part_svc.html110
-rw-r--r--htdocs/docs/man/FS/pkg_svc.html115
-rw-r--r--htdocs/docs/man/FS/port.html120
-rw-r--r--htdocs/docs/man/FS/prepay_credit.html118
-rw-r--r--htdocs/docs/man/FS/session.html129
-rw-r--r--htdocs/docs/man/FS/svc_Common.html94
-rw-r--r--htdocs/docs/man/FS/svc_acct.html219
-rw-r--r--htdocs/docs/man/FS/svc_acct_pop.html107
-rw-r--r--htdocs/docs/man/FS/svc_acct_sm.html141
-rw-r--r--htdocs/docs/man/FS/svc_domain.html162
-rw-r--r--htdocs/docs/man/FS/svc_www.html150
-rw-r--r--htdocs/docs/man/FS/type_pkgs.html100
-rw-r--r--htdocs/docs/man/Invoice.txt23
-rw-r--r--htdocs/docs/man/Record.txt332
-rw-r--r--htdocs/docs/man/SSH.txt63
-rw-r--r--htdocs/docs/man/UID.txt79
-rw-r--r--htdocs/docs/man/agent.txt65
-rw-r--r--htdocs/docs/man/agent_type.txt72
-rw-r--r--htdocs/docs/man/cust_bill.txt140
-rw-r--r--htdocs/docs/man/cust_bill_pkg.txt72
-rw-r--r--htdocs/docs/man/cust_credit.txt75
-rw-r--r--htdocs/docs/man/cust_main.txt200
-rw-r--r--htdocs/docs/man/cust_main_county.txt67
-rw-r--r--htdocs/docs/man/cust_pay.txt66
-rw-r--r--htdocs/docs/man/cust_pkg.txt150
-rw-r--r--htdocs/docs/man/cust_refund.txt66
-rw-r--r--htdocs/docs/man/cust_svc.txt72
-rw-r--r--htdocs/docs/man/dbdef.txt80
-rw-r--r--htdocs/docs/man/dbdef_colgroup.txt51
-rw-r--r--htdocs/docs/man/dbdef_column.txt69
-rw-r--r--htdocs/docs/man/dbdef_index.txt27
-rw-r--r--htdocs/docs/man/dbdef_table.txt94
-rw-r--r--htdocs/docs/man/dbdef_unique.txt27
-rw-r--r--htdocs/docs/man/index.html48
-rw-r--r--htdocs/docs/man/part_pkg.txt73
-rw-r--r--htdocs/docs/man/part_referral.txt63
-rw-r--r--htdocs/docs/man/part_svc.txt69
-rw-r--r--htdocs/docs/man/pkg_svc.txt61
-rw-r--r--htdocs/docs/man/svc_acct.txt168
-rw-r--r--htdocs/docs/man/svc_acct_pop.txt65
-rw-r--r--htdocs/docs/man/svc_acct_sm.txt121
-rw-r--r--htdocs/docs/man/svc_domain.txt131
-rw-r--r--htdocs/docs/man/type_pkgs.txt55
-rw-r--r--htdocs/docs/overview.diabin0 -> 2800 bytes
-rw-r--r--htdocs/docs/overview.pngbin0 -> 13064 bytes
-rwxr-xr-xhtdocs/docs/postgresql.html23
-rw-r--r--htdocs/docs/schema.html77
-rw-r--r--htdocs/docs/session.html54
-rw-r--r--htdocs/docs/signup.html57
-rw-r--r--htdocs/docs/trouble.html21
-rw-r--r--htdocs/docs/upgrade2.html4
-rw-r--r--htdocs/docs/upgrade3.html40
-rw-r--r--htdocs/docs/upgrade4.html27
-rw-r--r--htdocs/docs/upgrade5.html34
-rw-r--r--htdocs/docs/upgrade6.html66
-rw-r--r--htdocs/docs/upgrade7.html24
105 files changed, 6558 insertions, 3005 deletions
diff --git a/htdocs/docs/CGI-modules-2.76-patch.txt b/htdocs/docs/CGI-modules-2.76-patch.txt
deleted file mode 100755
index 55b50bbbe..000000000
--- a/htdocs/docs/CGI-modules-2.76-patch.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-ivan@rootwood:~/src/CGI-modules-2.76/CGI$ diff -c Base.pm Base.pm.orig
-*** Base.pm Sat Jul 18 00:33:21 1998
---- Base.pm.orig Sat Jul 18 00:06:12 1998
-***************
-*** 938,945 ****
- my $orig_uri = $self->get_uri;
- $self->log("Redirecting $CGI::Base::REQUEST_METHOD $orig_uri to $to_uri")
- if $Debug;
-! my $msg = ($perm) ? StatusHdr(301,"Moved Permanently")
-! : StatusHdr(302,"Moved Temporarily");
- my $hdrs = SendHeaders($msg, LocationHdr($to_uri));
- $self->log($hdrs);
- }
---- 938,945 ----
- my $orig_uri = $self->get_uri;
- $self->log("Redirecting $CGI::Base::REQUEST_METHOD $orig_uri to $to_uri")
- if $Debug;
-! my $msg = ($perm) ? ServerHdr(301,"Moved Permanently")
-! : ServerHdr(302,"Moved Temporarily");
- my $hdrs = SendHeaders($msg, LocationHdr($to_uri));
- $self->log($hdrs);
- }
-
diff --git a/htdocs/docs/admin.html b/htdocs/docs/admin.html
index 8adddbe92..be53c0950 100644
--- a/htdocs/docs/admin.html
+++ b/htdocs/docs/admin.html
@@ -4,3 +4,56 @@
<body>
<h1>Administration</h1>
</body>
+<ul>
+ <li>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.
+
+ <li>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.
+
+ <li>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.
+
+ <li>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.
+
+ <li>After creating a new agent type, you must create an agent, and
+ assign the the agent type you just created to it.
+
+ <li>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.
+
+ <li>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.
+
+ <li>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.
+
+ <li>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.
+</ul>
+</body>
+</html>
diff --git a/htdocs/docs/billing.html b/htdocs/docs/billing.html
index 02bfbd783..ecb5e1799 100644
--- a/htdocs/docs/billing.html
+++ b/htdocs/docs/billing.html
@@ -3,19 +3,37 @@
</head>
<body>
<h1>Billing</h1>
- The bin/bill script can be run daily to bill all customers. Usage: bill [ -c [ i ] ] [ -d <i>date</i> ] [ -b ]
<ul>
- <li>-c: Turn on collecting (you probably want this).
- <li>-i: Real-time billing (as opposed to bacth billing). Only relevant for credit cards. Not available without modifying site_perl/Bill.pm
- <li>-d: Pretend it is <i>date</i> (parsed by Date::Parse)
- <li>-b: N/A
- </ul>
- Printing should be configured on your freeside machine to print invoices.
- <br><br>Batch credit card processing
- <ul>
- <li>After this script is run, a credit card batch will be in the <a href="schema.html#cust_pay_batch">cust_pay_batch</a> table. Export this table to your credit card batching.
- <li>When your batch completes, erase the cust_pay_batch records in that batch and add any necessary paymants to the <a href="schema.html#cust_pay">cust_pay</a> table. Example code to add payments is:
- <pre>use FS::cust_pay;
+ <li>To enable billing, you <b>must</b> create an <a href="config.html#invoice_template">invoice_template</a> configuration file. An example file is available in the <i>conf/</i> directory of the distribution. You also need to create an <a href="config.html#lpr">lpr</a> configuration file to enable postal invoices.
+ <ul>
+ <li>Optional: Invoice template customization
+ <ul>
+ <li>See the <a href="http://search.cpan.org/doc/MJD/Text-Template-1.23/Template.pm">Text::Template</a> documentation for details on the substitution language.
+ <li>You <b>must</b> 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.
+ <li>In addition, the following variables are available:
+ <ul>
+ <li>$invnum - invoice number
+ <li>$date - as a UNIX timestamp (see <a href="http://search.cpan.org/doc/GBARR/TimeDate-1.09/lib/Date/Format.pm">Date::Format</a> for conversion functions).
+ <li>$page - current page
+ <li>$total_pages - total pages
+ <li>@address - A six-element array containing the customer name, company, and address.
+ <li>$overdue - true if this invoice is overdue
+ </ul>
+ </ul>
+ </ul>
+ <li>You can bill individual customers by clicking on the <i>Bill now</i> link on the main customer view.
+ <li> The <b>freeside-bill</b> script can be run daily to bill all customers. Usage:<pre>freeside-bill [ -c [ i ] ] [ -d <i>date</i> ] [ -b ] <i>user</i></pre>
+ <ul>
+ <li>-c: Turn on collecting (you probably want this).
+ <li>-i: Real-time billing (as opposed to bacth billing). Only relevant for credit cards.
+ <li>-d: Pretend it is <i>date</i> (parsed by <a href="http://search.cpan.org/doc/GBARR/TimeDate-1.09/lib/Date/Parse.pm">Date::Parse</a>)
+ <li>-b: N/A
+ </ul>
+ <br><br>Batch credit card processing
+ <ul>
+ <li>After this script is run, a credit card batch will be in the <a href="schema.html#cust_pay_batch">cust_pay_batch</a> table. Export this table to your credit card batching.
+ <li>When your batch completes, erase the cust_pay_batch records in that batch and add any necessary paymants to the <a href="schema.html#cust_pay">cust_pay</a> table. Example code to add payments is:
+ <pre>use FS::cust_pay;
# loop over all records in batch
@@ -35,6 +53,15 @@ if ( $error ) {
# end loop
</pre>
-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.
+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.<br><br>
+ <li>The <b>freeside-print-batch</b> script can print or email pending credit card batches for manual entry. Usage: freeside-print-batch [-v] [-p] [-e] [-a] [-d] <i>user</i>
+ <ul>
+ <li>-v: Verbose - Prints records to STDOUT.
+ <li>-p: Print to printer lpr as found in the conf directory.
+ <li>-e: Email output to user found in the Conf email file.
+ <li>-a: Automatically pays all records in cust_pay_batch. Use -d with this option usually.
+ <li>-d: Delete - Pays account and deletes record from cust_pay_batch.
+ </ul>
+ </ul>
</ul>
</body>
diff --git a/htdocs/docs/config.html b/htdocs/docs/config.html
index 9b8002601..49be7200b 100644
--- a/htdocs/docs/config.html
+++ b/htdocs/docs/config.html
@@ -3,20 +3,69 @@
</head>
<body>
<h1>Configuration files</h1>
-Configuration files and directories are located in `/var/spool/freeside/conf'.
<ul>
- <li>address - Your company name and address, four lines.
- <li>bsdshellmachines - Your BSD flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd' and `/etc/master.passwd'.
- <li>cybercash2 - <a href="http://www.cybercash.com/cybercash/services/cashreg214.html">CyberCash v2</a> support, four lines: paymentserverhost, paymentserverport, paymentserversecret, and transaction type (`mauthonly' or `mauthcapture'). CCLib.pm is required.
+ <li>Create the <b>/usr/local/etc/freeside</b> directory to hold your configuration.
+ <li>Setting up <a href="http://www.apache.org/docs/misc/FAQ.html#user-authentication">Apache user authetication</a> is mandatory.
+ <li>Create the <b>/usr/local/etc/freeside/mapsecrets</b> file, which maps Apache users to a secrets file which contains a DBI data source, username and password. Every
+line in <b>/usr/local/etc/freeside/mapsecrets</b> should contain a username and
+filename, separated by whitespace. Note that these are not local usernames -
+they are passed from Apache. <a href="http://www.apache.org/docs/misc/FAQ.html#user-authentication">
+Apache user authetication</a> is mandatory. For example, if you had the Apache users admin,
+john, and sam,
+you mapsecrets file might look like:
+<pre>
+admin secretfile
+john secretfile
+sam secretfile
+</pre>
+ <li>Next, the filename(s) referenced in <b>/usr/local/etc/freeside/mapsecrets</b> file should be created in the <b>/usr/local/etc/freeside/</b> directory. Each file contains three lines: <a href="http://search.cpan.org/doc/TIMB/DBI-1.15/DBI.pm">DBI data source</a> (for example,
+ <tt>DBI:mysql:freeside</tt> or <tt>DBI:Pg:host=localhost;dbname=freeside</tt>), database username, and database password.
+ These files should not be world readable. See the <a href="http://search.cpan.org/doc/TIMB/DBI-1.15/DBI.pm">DBI manpage</a> and the <a href="http://search.cpan.org/search?mode=module&query=DBD">manpage for your DBD</a> for the exact syntax of a DBI data source. In a normal installation such as the example above, a single file <b>/usr/local/etc/freeside/secretfile</b> would be created - for example:
+<pre>
+DBI:Pg:host=localhost;dbname=freeside
+dbusername
+dbpassword
+</pre>
+</ul>
+All further configuration files and directories are located in
+<tt>/usr/local/etc/freeside/conf.<i>datasource</i></tt>, for example,
+<tt>/usr/local/etc/freeside/conf.DBI:Pg:host=localhost;dbname=freeside</tt> (remember to backslash-escape the ; character when creating directories in the shell: <tt>mkdir&nbsp;/usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=freeside</tt>).
+<ul>
+ <li><a name="address">address</a> - This configuration file is no longer used. See <a href="#invoice_template">invoice_template</a> instead.
+ <li><a name="apacheroot">apacheroot</a> - The directory containing Apache virtual hosts
+ <li><a name="apachemachine">apachemachine</a> - 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.
+ <li><a name="apachemachines">apachemachines</a> - Your Apache machines, one per line. This enables export of `/etc/apache/vhosts.conf', which can be included in your Apache configuration via the <a href="http://www.apache.org/docs/mod/core.html#include">Include</a> directive.
+ <li><a name="autocapnames">autocapnames</a> - The presence of this file will cause Freeside to use Javascript in /htdocs/edit/cust_main.cgi to automatically capitalize the first and last names of customers.
+ <li><a name="bindprimary">bindprimary</a> - Your BIND primary nameserver. This enables export of /var/named/named.conf and zone files into /var/named
+ <li><a name="bindsecondaries">bindsecondaries</a> - Your BIND secondary nameservers, one per line. This enables export of /var/named/named.conf
+ <li><a name="bsdshellmachines">bsdshellmachines</a> - Your BSD flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd' and `/etc/master.passwd'.
+ <li><a name="countrydefault">countrydefault</a> - Default two-letter country code (if not supplied, the default is `US')
+ <li><a name="cybercash2">cybercash2</a> - <a href="http://www.cybercash.com/cybercash/services/cashreg214.html">CyberCash v2</a> support, four lines: paymentserverhost, paymentserverport, paymentserversecret, and transaction type (`mauthonly' or `mauthcapture'). CCLib.pm is required.
<li>cybercash3.2 - <a href="http://www.cybercash.com/cybercash/services/technology.html">CyberCash v3.2</a> 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.
- <li>domain - Your domain name.
- <li>erpcdmachines - Your ERPCD authenticaion machines, one per line. This enables export of `/usr/annex/acp_passwd' and `/usr/annex/acp_dialup'.
- <li>home - For new users, prefixed to usrename to create a directory name. Should have a leading but not a trailing slash.
- <li>lpr - Print command for paper invoices, for example `lpr -h'.
- <li>nismachines - Your NIS master (not slave master) machines, one per line. This enables export of `/etc/global/passwd' and `/etc/global/shadow'.
- <li>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'.
- <li>radiusmachines - Your RADIUS authentication machines, one per line. This enables export of `/etc/raddb/users'.
- <li>registries - Directory which contains domain registry information. Each registry is a directory.
+ <li><a name="deletecustomers">deletecustomers</a> - 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.
+ <li><a name="domain">domain</a> - Your domain name.
+ <li><a name="editreferrals">editreferrals</a> - The existance of this file will allow you to change the referral of existing customers.
+ <li><a name="erpcdmachines">erpcdmachines</a> - Your ERPCD authenticaion machines, one per line. This enables export of `/usr/annex/acp_passwd' and `/usr/annex/acp_dialup'.
+ <li><a name="hidecancelledpackages">hidecancelledpackages</a> - The existance of this file will prevent cancelled packages from showing up in listings (though they will still be in the database)
+ <li><a name="hidecancelledcustomers">hidecancelledcustomers</a> - 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)
+ <li><a name="home">home</a> - For new users, prefixed to usrename to create a directory name. Should have a leading but not a trailing slash.
+ <li><a name="icradiusmachines">icradiusmachines</a> - Your <a href="ftp://ftp.cheapnet.net/pub/icradius">ICRADIUS</a> 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: "<CODE>radius.isp.tld&nbsp;radius_db&nbsp;radius_user&nbsp;passw0rd</CODE>". Note that to use ICRADIUS export you need to be using MySQL.
+ <li><a name="icradius_mysqldest">icradius_mysqldest</a> - Destination directory for the MySQL databases, on the ICRADIUS machines. Defaults to "/usr/local/var/".
+ <li><a name="icradius_mysqlsource">icradius_mysqlsource</a> - Source directory for for the MySQL radcheck table files, on the Freeside machine. Defaults to "/usr/local/var/freeside".
+ <li><a name="icradius_secrets">icradius_secrets</a> - 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 <a href="#icradius_mysqlsource">icradius_mysqlsource</a> directory. Three lines: DBI data source, username and password. This file should not be world readable.
+ <li><a name="invoice_from">invoice_from</a> - Return address on email invoices.
+ <li><a name="invoice_template">invoice_template</a> - Required template file for invoices. See the <a href="billing.html">section on billing</a> for details.
+ <li><a name="lpr">lpr</a> - Print command for paper invoices, for example `lpr -h'.
+ <li><a name="maildisablecatchall">maildisablecatchall</a> - The existance of this file will disable the requirement that each virtual domain have a catch-all mailbox.
+ <li><a name="money_char">money_char</a> - Currency symbol - defaults to `$'.
+ <li><a name="mxmachines">mxmachines</a> - MX entries for new domains, weight and machine, one per line, with trailing `.'
+ <li><a name="nsmachines">nsmachines</a> - NS nameservers for new domains, one per line, with trailing `.'
+ <li><a name="nismachines">nismachines</a> - Your NIS master (not slave master) machines, one per line. This enables export of `/etc/global/passwd' and `/etc/global/shadow'.
+ <li><a name="passwordmin">passwordmin</a> - Minimum password length (default 6);
+ <li><a name="qmailmachines">qmailmachines</a> - 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'.
+ <li><a name="radiusmachines">radiusmachines</a> - Your RADIUS authentication machines, one per line. This enables export of `/etc/raddb/users'.
+ <li><a name="referraldefault">referraldefault</a> - Default referral, specified by refnum.
+ <li><a name="registries">registries</a> - Directory which contains domain registry information. Each registry is a directory.
<ul>
<li>registries/internic - Currently the only supported registry
<ul>
@@ -27,12 +76,31 @@ Configuration files and directories are located in `/var/spool/freeside/conf'.
<li>registries/internic/to - Email address to which InterNIC domain registrations are sent.
</ul>
</ul>
- <li>secrets - Three lines: Database engine datasource (for example, `DBI:mysql:freeside' or `DBI:Pg:dbname=freeside'), username, and password. This file should not be world readable.
- <li>sendmailmachines - Your sendmail machines, one per line. This enables export of `/etc/virtusertable' and `/etc/sendmail.cw'.
- <li>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.
- <li>shellmachines - Your Linux and System V flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd' and `/etc/shadow' files.
- <li>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.
- <li>smtpmachine - SMTP relay for Freeside's outgoing mail.
+ <li><a name="sendmailconfigpath">sendmailconfigpath</a> - Sendmail configuration file path - defaults to `/etc'. Many newer distributions use `/etc/mail'.
+ <li><a name="sendmailmachines">sendmailmachines</a> - Your sendmail machines, one per line. This enables export of `/etc/virtusertable' and `/etc/sendmail.cw'.
+ <li><a name="sendmailrestart">sendmailrestart</a> - If defined, the command which is run on sendmail machines after files are copied.
+ <li><a name="session-start">session-start</a> - 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: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, 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.
+ <li><a name="session-stop">session-stop</a> - 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: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, 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.
+ <li><a name="shellmachine">shellmachine</a> - 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.
+ <li>shellmachine-useradd - The command(s) to run on shellmachine when an account is created. If this file does not exist, <code>useradd -d $dir -m -s $shell -u $uid $username</code> is the default. If the file exists but is empty, <code>cp -pr /etc/skel $dir; chown -R $uid.$gid $dir</code> is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$username</code>, <code>$uid</code>, <code>$gid</code>, <code>$dir</code>, and <code>$shell</code>.
+ <li>shellmachine-userdel - The command(s) to run on shellmachine when an account is deleted. If this file does not exist, <code>userdel $username</code> is the default. If the file exists but is empty, <code>rm -rf $dir</code> is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$username</code> and <code>$dir</code>.
+ <li>shellmachine-usermod - The command(s) to run on shellmachine when an account is modified. If this file does not exist or is empty, <code>[ -d $old_dir ] &amp;&amp; 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 )</code> is the default. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$old_dir</code>, <code>$new_dir</code>, <code>$uid</code> and <code>$gid</code>.
+ <li><a name="shellmachines">shellmachines</a> - Your Linux and System V flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd' and `/etc/shadow' files.
+ <li><a name="shells">shells</a> - 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.
+ <li><a name="showpasswords">showpasswords</a> - The existance of this file will allow unencrypted user passwords to be displayed.
+ <li><a name="smtpmachine">smtpmachine</a> - SMTP relay for Freeside's outgoing mail.
+ <li><a name="soadefaultttl">soadefaultttl</a> - SOA default TTL for new domains.
+ <li><a name="soaemail">soaemail</a> - SOA email for new domains, in BIND form (`.' instead of `@'), with trailing `.'
+ <li><a name="soaexpire">soaexpire</a> - SOA expire for new domains
+ <li><a name="soamachine">soamachine</a> - SOA machine for new domains, with trailing `.'
+ <li><a name="soarefresh">soarefresh</a> - SOA refresh for new domains
+ <li><a name="soaretry">soaretry</a> - SOA retry for new domains
+ <li><a name="statedefault">statedefault</a> - Default state or province (if not supplied, the default is `CA')
+ <li><a name="textradiusprepend">textradiusprepend</a> - 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, '.
+ <li><a name="usernamemin">usernamemin</a> - Minimum username length (default 2);
+ <li><a name="usernamemax">usernamemax</a> - Maximum username length (default is the size of the SQL column, probably specified when fs-setup was run)
+ <li><a name="usernamemax">username-letter</a> - The existance of this file will turn on the requirement that usernames contain at least one letter.
+ <li><a name="usernamemax">username-letterfirst</a> - The existance of this file will turn on the requirement that usernames start with a letter.
</ul>
</body>
diff --git a/htdocs/docs/export.html b/htdocs/docs/export.html
index f760b97dd..d92eec346 100644
--- a/htdocs/docs/export.html
+++ b/htdocs/docs/export.html
@@ -4,29 +4,31 @@
<body>
<h1>File exporting</h1>
<ul>
- <li>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 `/var/spool/freeside/export' directory. Using the appropriate <a href="config.html">configuration files</a>, you can export these files to your remote machines unattended; see below.
+ <li>bin/svc_acct.export will create UNIX <b>passwd</b>, <b>shadow</b> and <b>master.passwd</b> files, ERPCD <b>acp_passwd</b> and <b>acp_dialup</b> files and a RADIUS <b>users</b> file in the <b>/usr/local/etc/freeside/export.<i>datasrc</i></b> directory. Some RADIUS servers (such as <a href="http://www.open.com.au/radiator/">Radiator</a> and <a href="ftp://ftp.cheapnet.net/pub/icradius/">ICRADIUS</a>) 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 <a href="config.html">configuration files</a>, you can export these files to your remote machines unattended:
<ul>
- <li>shellmachines - passwd and shadow are copied to the remote machine as /etc/passwd.new and /etc/shadow.net and then moved to /etc/passwd and /etc/shadow if no errors occur.
- <li>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.
- <li>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.
- <li>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.
- <li>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.
+ <li>shellmachines - <b>passwd</b> and <b>shadow</b> are copied to the remote machine as <b>/etc/passwd.new</b> and <b>/etc/shadow.new</b> and then moved to <b>/etc/passwd</b> and <b>/etc/shadow</b> if no errors occur.
+ <li>bsdshellmachines - <b>passwd</b> and <b>master.passwd</b> are copied to the remote machine as <b>/etc/passwd.new</b> and <b>/etc/master.passwd.new</b> and moved to <b>/etc/passwd</b> and <b>/etc/master.passwd</b> if no errors occur.
+ <li>nismachines - <b>passwd</b> and <b>shadow</b> are copied to the <b>/etc/global</b> directory on the remote machine. If no errors occur, the command <b>( cd /var/yp; make; )</b> is executed on the remote machine.
+ <li>erpcdmachines - <b>acp_passwd</b> and <b>acp_dialup</b> are copied to the <b>/usr/annex</b> directory on the remote machine. If no errors occur, the command <b>( kill -USR1 `cat /usr/annex/erpcd.pid` )</b> is executed on the remote machine.
+ <li>radiusmachines - <b>users</b> is copied to the <b>/etc/raddb</b> directory on the remote machine. If no errors occur, the command <b>( builddbm )</b> is executed on the remote machine.
+ <li>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 <a href="config.html#icradius_mysqlsource">icradius_mysqlsource</a> and/or <a href="config.html#icradius_mysqldest">icradius_mysqldest</a> configuration files. Currently you need to be running MySQL for your Freeside database to use this feature.
</ul>
<li>site_perl/svc_acct.pm - If a shellmachine is defined, users can be created, modified and deleted remotely; see below.
<ul>
- <li>The command `useradd -d <i>homedir</i> -s <i>shell</i> -u <i>uid</i> <i>username</i>' is executed when a user is added.
- <li>The command `userdel <i>username</i>' is executed with a user is deleted.
- <li>If a user's home directory changes, the command `[ -d <i>old_homedir</i> &amp;&amp; ( chmod u+t <i>old_homedir</i>; umask 022; mkdir <i>new_homedir</i>; cd <i>old_homedir</i>; find . -depth -print | cpio -pdm <i>new_homedir</i>; chmod u-t <i>new_homedir</i>; chown -R <i>uid</i>.<i>gid</i> <i>new_homedir</i>; rm -rf <i>old_homedir</i> )' is executed.
+ <li>Account creation - If the <b>username</b>, <b>uid</b> and <b>dir</b> fields are defined for a new user, the command(s) specified in the <a href="config.html#shellmachine-useradd">shellmachine-useradd</a> configuration file are executed on shellmachine via ssh. If this file does not exist, <code>useradd -d $dir -m -s $shell -u $uid $username</code> is the default. If the file exists but is empty, <code>cp -pr /etc/skel $dir; chown -R $uid.$gid $dir</code> is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$username</code>, <code>$uid</code>, <code>$gid</code>, <code>$dir</code>, and <code>$shell</code>.
+ <li>Account deletion - The command(s) specified in the <a href="config.html#shellmachine-userdel">shellmachine-userdel</a> configuration file are executed on shellmachine via ssh. If this file does not exist, <code>userdel $username</code> is the default. If the file exists but is empty, <code>rm -rf $dir</code> is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$username</code> and <code>$dir</code>.
+ <li>Account modification - If a user's home directory changes, the command(s) specified in the <a href="config.html#shellmachine-usermod">shellmachine-usermod</a> configuration file are execute on shellmachine via ssh. If this file does not exist or is empty, <code>[ -d $old_dir ] &amp;&amp; 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 )</code> is the default. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: <code>$old_dir</code>, <code>$new_dir</code>, <code>$uid</code> and <code>$gid</code>.
</ul>
- <li>bin/svc_acct_sm.export will create <a href="http://www.qmail.org">Qmail</a> `rcpthosts', `recipientmap' and `virtualdomains' files and <a href="http://www.sendmail.org">Sendmail</a> `virtusertable' and `sendmail.cw' files in the `/var/spool/freeside/export' directory. Using the appropriate <a href="config.html">configuration files</a>, you can export these files to your remote machines unattemded; see below.
+ <li>bin/svc_acct_sm.export will create <a href="http://www.qmail.org">Qmail</a> <b>rcpthosts</b>, <b>recipientmap</b> and <b>virtualdomains</b> files and <a href="http://www.sendmail.org">Sendmail</a> <b>virtusertable</b> and <b>sendmail.cw</b> files in the <b>/usr/local/etc/freeside/export.<i>datasrc</i></b> directory. Using the appropriate <a href="config.html">configuration files</a>, you can export these files to your remote machines unattemded:
<ul>
- <li>qmailmachines - recipientmap, virtualdomains and rcpthosts are copied to the `/var/qmail/control' directory on the remote machine. Note: If you <a href="legacy.html#svc_acct_sm">imported</a> qmail configuration files, run the generated `/var/spool/freeside/export/virtualdomains.FIX' on a machine with your user home directories before exporting qmail configuration files.
- <li>shellmachine - The command `[ -e <i>homedir</i>/.qmail-default ] || { touch <i>homedir</i>/.qmail-default; chown <i>uid</i>.<i>gid</i> <i>homedir</i>/.qmail-default; }' will be run on this machine for users in the virtualdomains file.
- <li>sendmailmachines - sendmail.cw and virtusertable are copied to the remote machine as /etc/sendmail.cw.new and /etc/virtusertable.new and moved to /etc/sendmail.cw and /etc/virtusertable if no errors occur.
+ <li>qmailmachines - <b>recipientmap</b>, <b>virtualdomains</b> and <b>rcpthosts</b> are copied to the <b>/var/qmail/control</b> directory on the remote machine. Note: If you <a href="legacy.html#svc_acct_sm">imported</a> qmail configuration files, run the generated <b>/usr/local/etc/freeside/export.<i>datasrc</i>/virtualdomains.FIX</b> on a machine with your user home directories before exporting qmail configuration files.
+ <li>shellmachine - The command <b>[ -e <i>homedir</i>/.qmail-default ] || { touch <i>homedir</i>/.qmail-default; chown <i>uid</i>.<i>gid</i> <i>homedir</i>/.qmail-default; }</b> will be run on this machine for users in the virtualdomains file.
+ <li>sendmailmachines - <b>sendmail.cw</b> and <b>virtusertable</b> are copied to the remote machine as <b>/etc/sendmail.cw.new</b> and <b>/etc/virtusertable.new</b>. If no errors occur, they are moved to <b>/etc/sendmail.cw</b> and <b>/etc/virtusertable</b> and the command specified in the <a href="config.html#sendmailrestart">sendmailrestart</a> configuration file is executed. (The path can be changed from the default <b>/etc</b> with the <a href="config.html#sendmailconfigpath">sendmailconfigpath</a> configuration file.)
</ul>
- <li>site_perl/svc_acct_sm.pm - If the qmailmachines configuration file exists and a shellmachine is defined, user `.qmail-' files can be updated.
+ <li>site_perl/svc_acct_sm.pm - If the qmailmachines configuration file exists and a shellmachine is defined, user <b>.qmail-</b> files can be updated.
<ul>
- <li>The command `[ -e <i>homedir</i>/.qmail-<i>domain</i>-default ] || { touch <i>homedir</i>/.qmail-<i>domain</i>-default; chown <i>uid</i>.<i>gid</i> <i>homedir</i>/.qmail-<i>domain</i>-default; }' is run.
+ <li>The command <b>[ -e <i>homedir</i>/.qmail-<i>domain</i>-default ] || { touch <i>homedir</i>/.qmail-<i>domain</i>-default; chown <i>uid</i>.<i>gid</i> <i>homedir</i>/.qmail-<i>domain</i>-default; }</b> is run.
</ul>
</ul>
<br><a name=ssh>Unattended remote login</a> - 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. <b>Do not use this feature unless you understand what you are doing!</b>
diff --git a/htdocs/docs/index.html b/htdocs/docs/index.html
index 20051ca4d..83e3b3e02 100644
--- a/htdocs/docs/index.html
+++ b/htdocs/docs/index.html
@@ -1,23 +1,31 @@
<head>
<title>Documentation</title>
</head>
-<body>
+<body bgcolor="#ffffff">
<h1>Documentation</h1>
+<img src="overview.png">
<ul>
<li><a href="install.html">New Installation</a>
<li><a href="upgrade.html">Upgrading from 1.0.x to 1.1.x</a>
- <li><a href="upgrade2.html">Upgrading from 1.1.x to 1.1.3</a>
+ <li><a href="upgrade2.html">Upgrading from 1.1.x to 1.1.4</a>
+ <li><a href="upgrade3.html">Upgrading from 1.1.x to 1.2.x</a>
+ <li><a href="upgrade4.html">Upgrading from 1.2.x to 1.2.2</a>
+ <li><a href="upgrade5.html">Upgrading from 1.2.2 to 1.2.3</a>
+ <li><a href="upgrade6.html">Upgrading from 1.2.3 to 1.3.0</a>
+ <li><a href="upgrade7.html">Upgrading from 1.3.0 to 1.3.1</a>
<li><a href="config.html">Configuration files</a>
-<!--
<li><a href="admin.html">Administration</a>
-!-->
+<!--
<li><a href="../index.html#admin">Administration</a>
+!-->
<li><a href="legacy.html">Importing legacy data</a>
<li><a href="export.html">File exporting and remote setup</a>
<li><a href="passwd.html">fs_passwd</a>
+ <li><a href="signup.html">Signup server</a>
+ <li><a href="session.html">Session monitor</a>
<li><a href="billing.html">Billing</a>
<li><a href="trouble.html">Troubleshooting</a>
<li><a href="schema.html">Schema reference</a>
- <li><a href="man/">Perl API</a>
+ <li><a href="man/FS.html">Perl API</a>
</ul>
</body>
diff --git a/htdocs/docs/install.html b/htdocs/docs/install.html
index c4784ebf6..8fadc1088 100644
--- a/htdocs/docs/install.html
+++ b/htdocs/docs/install.html
@@ -6,51 +6,81 @@
Before installing, you need:
<ul>
<li>A web server, such as <a href="http://www.apache-ssl.org">Apache-SSL</a> or <a href="http://www.apache.org">Apache</a>
- <li><a href="ftp://ftp.cs.hut.fi/pub/ssh/">SSH</a>
- <li>agrep from the <a href="http://glimpse.cs.arizona.edu">Glimpse</a> distribution, if you want fuzzy searching capability
- <li><a href="http://www.perl.com/CPANl/doc/relinfo/INSTALL.html">Perl</a> (at least 5.004_04)
- <li>A database engine supported by Perl's <a href="http://www.hermetica.com/technologia/DBI/">DBI</a>, such as <a href="http://www.tcx.se/">MySQL</a> or <a href="http://www.postgresql.org/">PostgreSQL</a>
- <li>Perl modules
+ <li><a href="http://www.openssh.com//">SSH</a>
+ <li><a href="http://www.perl.com/">Perl</a> Don't enable experimental features like threads or the PerlIO abstraction layer.
+ <li>A <b>transactional</b> database engine supported by Perl's <a href="http://www.hermetica.com/technologia/DBI/">DBI</a>. <a href="http://www.postgresql.org/">PostgreSQL</a> is recommended. (see the <a href="postgresql.html">PostgreSQL notes</a>) <b>MySQL's default <a href="http://www.mysql.com/doc/M/y/MyISAM.html">MyISAM</a> and <a href="http://www.mysql.com/doc/I/S/ISAM.html">ISAM</a> table types are not supported</b>. If you really want to use MySQL, you need to use one of the new <a href="http://www.mysql.com/doc/T/a/Table_types.html">transaction-safe table types</a> such as <a href="http://www.mysql.com/doc/B/D/BDB.html">BDB</a>.
+ <li>Perl modules (<a href="http://theoryx5.uwinnipeg.ca/CPAN/perl/CPAN.html">CPAN</a> will query, download and build perl modules automatically)
<ul>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/MIME/">MIME-Base64</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/Data">Data-Dumper</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/MD5">MD5</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/Net">libnet</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/LWP/">libwww-perl</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/CGI/">CGI-modules</a> (<b>NOT</b> CGI.pm) with this <a href="CGI-modules-2.76-patch.txt">patch</a> applied
- <li><a href="http://www.perl.com/CPAN/modules/by-module/Business/">Business-CreditCard</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/Data/">Data-ShowTable</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/Mail/">MailTools</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/Time/">TimeDate</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/Date/">DateManip</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/File/">File-CounterFile</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/FreezeThaw/">FreezeThaw</a>
- <li><a href="http://www.perl.com/CPAN/modules/by-module/DBI/">DBI
- <li><a href="http://www.perl.com/CPAN/modules/by-module/DBD/">DBD for your database engine</a>
+ <li><a href="http://search.cpan.org/search?dist=Array-PrintCols">Array-PrintCols</a>
+ <li><a href="http://search.cpan.org/search?dist=Term-Query">Term-Query</a> (make test broken; install manually)
+ <li><a href="http://search.cpan.org/search?dist=MIME-Base64">MIME-Base64</a>
+ <li><a href="http://search.cpan.org/search?dist=Digest-MD5">Digest-MD5</a>
+ <li><a href="http://search.cpan.org/search?dist=URI">URI</a>
+ <li><a href="http://search.cpan.org/search?dist=HTML-Tagset">HTML-Tagset</a>
+ <li><a href="http://search.cpan.org/search?dist=HTML-Parser">HTML-Parser</a>
+ <li><a href="http://search.cpan.org/search?dist=libnet">libnet</a>
+ <li><a href="http://search.cpan.org/search?dist=Locale-Codes">Locale-Codes</a>
+ <li><a href="http://search.cpan.org/search?dist=Net-Whois">Net-Whois</a>
+ <li><a href="http://search.cpan.org/search?dist=libwww-perl">libwww-perl</a>
+ <li><a href="http://search.cpan.org/search?dist=Business-CreditCard">Business-CreditCard</a>
+ <li><a href="http://search.cpan.org/search?dist=Data-ShowTable">Data-ShowTable</a>
+ <li><a href="http://search.cpan.org/search?dist=MailTools">MailTools</a>
+ <li><a href="http://search.cpan.org/search?dist=TimeDate">TimeDate</a>
+ <li><a href="http://search.cpan.org/search?dist=DateManip">DateManip</a>
+ <li><a href="http://search.cpan.org/search?dist=File-CounterFile">File-CounterFile</a>
+ <li><a href="http://search.cpan.org/search?dist=FreezeThaw">FreezeThaw</a>
+ <li><a href="http://search.cpan.org/search?dist=String-Approx">String-Approx</a>
+ <li><a href="http://search.cpan.org/search?dist=Text-Template">Text-Template</a>
+ <li><a href="http://search.cpan.org/search?dist=DBI">DBI</a>
+ <li><a href="http://search.cpan.org/search?mode=module&query=DBD">DBD for your database engine</a>
+ <li><a href="http://search.cpan.org/search?dist=DBIx-DBSchema">DBIx-DBSchema</a>
+ <li><a href="http://search.cpan.org/search?dist=Net-SSH">Net-SSH</a>
+ <li><a href="http://search.cpan.org/search?dist=String-ShellQuote">String-ShellQuote</a>
+ <li><a href="http://search.cpan.org/search?dist=Net-SCP">Net-SCP</a>
</ul>
</ul>
Install the Freeside distribution:
<ul>
<li>Add the user `freeside' to your system.
- <li>Add the freeside database to your database engine. (with <a href="http://www.mysql.com/Manual_chapter/manual_Syntax.html#Create database">MySQL</a>) (with <a href="http://www.postgresql.org/docs/admin/manage-ag.htm#AEN854">PostgreSQL</a>)
- <li>Allow the freeside user full access to the freeside database. (with <a href="http://www.mysql.com/Manual_chapter/manual_Privilege_system.html#Privilege system">MySQL</a>) (with <a href="http://www.postgresql.org/docs/admin/newuser.htm">PostgreSQL</a>)
+ <li>Allow the freeside user full access to the freeside database.
+ <ul>
+ <li> with <a href="http://www.mysql.com/Manual_chapter/manual_Privilege_system.html#Privilege_system">MySQL</a>:<pre>$ mysqladmin -u root password '<i>set_a_root_database_password</i>'
+$ mysql -u root -p
+mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY '<i>set_a_freeside_database_password</i>';</pre>
+ <li> with <a href="http://postgresql.readysetnet.com/users-lounge/docs/7.1/postgres/user-manag.html#DATABASE-USERS">PostgreSQL</a>
+ </ul>
+ <li>Add the freeside database to your database engine. (with <a href="http://www.mysql.com/Manual_chapter/manual_Reference.html#CREATE_DATABASE">MySQL</a>) (with <a href="http://postgresql.readysetnet.com/users-lounge/docs/7.1/postgres/managing-databases.html#MANAGE-AG-CREATEDB">PostgreSQL</a>)
<li>Unpack the tarball: <pre>gunzip -c fs-x.y.z.tar.gz | tar xvf -</pre>
- <li>Copy or link fs-x.y.z/site_perl to FS in your site_perl directory. (try `<code>perl -V</code>' if unsure) <pre>mkdir /usr/local/lib/site_perl/FS
-cp fs-x.y.z/site_perl/* /usr/local/lib/site_perl/FS</pre> or <pre>ln -s /full/path/to/fs-x.y.z/site_perl /usr/local/lib/site_perl/FS</pre>
+ <li>Build and install the Perl libraries:
+ <pre>
+$ cd FS/
+$ perl Makefile.PL
+$ make
+$ su
+# make install UNINST=1</pre>
<li>Copy or link fs-x.y.z/htdocs to your web server's document space. <pre>mkdir /usr/local/apache/htdocs/freeside
cp -r fs-x.y.z/htdocs/* /usr/local/apache/htdocs/freeside</pre> or <pre>ln -s /full/path/to/fs-x.y.z/htdocs /usr/local/apache/htdocs/freeside</pre>
- <li>Restrict access to this web interface. (with <a href="http://www.apache.org/docs/misc/FAQ.html#user-authentication">Apache</a>)
+ <li>Restrict access to this web interface. (with <a href="http://httpd.apache.org/docs/misc/FAQ.html#user-authentication">Apache</a>)
<li>Enable CGI execution for files with the `.cgi' extension. (with <a href="http://www.apache.org/docs/mod/mod_mime.html#addhandler">Apache</a>)
- <li>Set ownership and permissions for the web interface. Your system should support secure setuid scripts or Perl's emulation, see <a href="http://www.perl.com/CPAN-local/doc/manual/html/pod/perlsec.html#Security_Bugs">perlsec: Security Bugs</a> for information and workarounds.
+ <li>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.
+ <ul>
+ <li>Use Perl's setuid emulation: see the <a href="http://www.perl.com/CPAN-local/doc/manual/html/pod/perlsec.html#Security_Bugs">Security Bugs</a> section of the <a href="http://www.perl.com/CPAN-local/doc/manual/html/pod/perlsec.html">perlsec</a> manpage.
<pre>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</pre>
-<li>Create the base Freeside directory `/var/spool/freeside', and the subdirectories `conf', `counters', and `export'. <pre>mkdir /var/spool/freeside
-mkdir /var/spool/freeside/conf
-mkdir /var/spool/freeside/counters
-mkdir /var/spool/freeside/export
-chown -R freeside /var/spool/freeside</pre>
- <li>Create the necessary <a href="config.html">configuration files</a>.
- <li>Run bin/fs-setup to create the database tables.
+ <li>Use Apache's <a href="http://www.apache.org/docs/suexec.html">suEXEC</a>.
+<pre>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</pre>
+ <li>Use <a href="http://perl.apache.org/">mod_perl</a>. 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 <a href="http://www.perl.com/CPAN/modules/by-module/CGI">CPAN</a>. Apache 1.3.6 is also highly recommended because of signal handling problems in earlier versions.)
+<pre>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</pre>
+ </ul>
+<li>Create the necessary <a href="config.html">configuration files</a>.
+<li>Create the `/usr/local/etc/freeside/counters.<i>datasrc</i>', and
+ `/usr/local/etc/freeside/export.<i>datasrc</i>' directories for each <i>datasrc</i> (owned by the freeside user).
+ <li>As the freeside user, run bin/fs-setup to create the database tables.
+ <li>Now proceed to the initial <a href="admin.html">administration</a> of your installation.
</ul>
</body>
diff --git a/htdocs/docs/legacy.html b/htdocs/docs/legacy.html
index 40e09cb3c..3ab21dab2 100644
--- a/htdocs/docs/legacy.html
+++ b/htdocs/docs/legacy.html
@@ -4,7 +4,7 @@
<body>
<h1>Importing legacy data</h1>
<ul>
- <li><a name="svc_acct">bin/svc_acct.import</a> - Import `passwd', ( `shadow' or `master.passwd' ) and RADIUS `users'. Before running bin/svc_acct.import, you need <a href="http://rootwood.sisd.com/freeside/browse/part_svc.cgi">services</a> (with table svc_acct) as follows:
+ <li><a name="svc_acct">bin/svc_acct.import</a> - Import `passwd', ( `shadow' or `master.passwd' ) and RADIUS `users'. Before running bin/svc_acct.import, you need <a href="../browse/part_svc.cgi">services</a> (with table svc_acct) as follows:
<ul>
<li>Most accounts probably have entries in passwd and users (with Port-Limit nonexistant or 1)
<li>Some accounts have entries in passwd and users, but with Port-Limit 2 (or more)
@@ -13,7 +13,7 @@
<li>POP mail accounts have entries in passwd only, and have a particular shell.
<li>Everything else in passwd is a shell account.
</ul>
- <li><a name="svc_acct_sm">bin/svc_acct_sm.import</a> - Import qmail ( `virtualdomains' and `rcpthosts' ), or sendmail ( `virtusertable' and `sendmail.cw' ) files. Before running bin/svc_acct_sm.import, you need <a href="http://rootwood.sisd.com/freeside/browse/part_svc.cgi">services</a> as follows:
+ <li><a name="svc_acct_sm">bin/svc_acct_sm.import</a> - Import qmail ( `virtualdomains' and `rcpthosts' ), or sendmail ( `virtusertable' and `sendmail.cw' ) files. Before running bin/svc_acct_sm.import, you need <a href="../browse/part_svc.cgi">services</a> as follows:
<ul>
<li>Domain (table svc_acct)
<li>Mail alias (table svc_acct_sm)
diff --git a/htdocs/docs/man/Bill.txt b/htdocs/docs/man/Bill.txt
deleted file mode 100644
index 545dd1a4c..000000000
--- a/htdocs/docs/man/Bill.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-NAME
- FS::Bill - Legacy stub
-
-SYNOPSIS
- The functionality of FS::Bill has been integrated into
- FS::cust_main.
-
-HISTORY
- ivan@voicenet.com 97-jul-24 - 25 - 28
-
- use Safe; evaluate all fees with perl (still on TODO list until
- I write some examples & test opmask to see if we can read db)
- %hash=$obj->hash later ivan@sisd.com 98-mar-13
-
- packages with no next bill date start at $time not time, this
- should eliminate the last of the problems with billing at a past
- date also rewrite the invoice priting logic not to print
- invoices for things that haven't happended yet and update
- $cust_bill->printed when we print so PAST DUE notices work, and
- s/date/_date/ ivan@sisd.com 98-jun-4
-
- more logic for past due stuff - packages with no next bill date
- start at $cust_pkg->setup || $time ivan@sisd.com 98-jul-13
-
- moved a few things in collection logic; negative charges should
- work ivan@sisd.com 98-aug-6
-
- pod, moved everything to FS::cust_main ivan@sisd.com 98-sep-19
-
diff --git a/htdocs/docs/man/CGI.txt b/htdocs/docs/man/CGI.txt
deleted file mode 100644
index 54f9b8a6a..000000000
--- a/htdocs/docs/man/CGI.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-NAME
- FS::CGI - Subroutines for the web interface
-
-SYNOPSIS
- use FS::CGI qw(header menubar idiot eidiot);
-
- print header( 'Title', '' );
- print header( 'Title', menubar('item', 'URL', ... ) );
-
- idiot "error message";
- eidiot "error message";
-
-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
- Sends headers and an HTML error message.
-
- eidiot ERROR
- Sends headers and an HTML error message, then exits.
-
-BUGS
- Not OO.
-
- Not complete.
-
- Uses CGI-modules instead of CGI.pm
-
-SEE ALSO
- the CGI::Base manpage
-
-HISTORY
- subroutines for the HTML/CGI GUI, not properly OO. :(
-
- ivan@sisd.com 98-apr-16 ivan@sisd.com 98-jun-22
-
- lose the background, eidiot ivan@sisd.com 98-sep-2
-
- pod ivan@sisd.com 98-sep-12
-
diff --git a/htdocs/docs/man/Conf.txt b/htdocs/docs/man/Conf.txt
deleted file mode 100644
index c46c9ee6a..000000000
--- a/htdocs/docs/man/Conf.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-NAME
- FS::Conf - Read access to Freeside configuration values
-
-SYNOPSIS
- use FS::Conf;
-
- $conf = new FS::Conf;
- $conf = new FS::Conf "/non/standard/config/directory";
-
- $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. Optionally, a non-default
- directory may be specified.
-
- 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
- The option to specify a non-default directory should probably be
- removed.
-
- Write access (with locking) should be implemented.
-
-SEE ALSO
- config.html from the base documentation contains a list of
- configuration files.
-
-HISTORY
- Ivan Kohler <ivan@sisd.com> 98-sep-6
-
diff --git a/htdocs/docs/man/FS.html b/htdocs/docs/man/FS.html
new file mode 100644
index 000000000..3d07462af
--- /dev/null
+++ b/htdocs/docs/man/FS.html
@@ -0,0 +1,138 @@
+<HTML>
+<HEAD>
+<TITLE>FS - Freeside Perl modules</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <UL>
+
+ <LI><A HREF="#utility classes">Utility classes</A></LI>
+ <LI><A HREF="#database record classes">Database record classes</A></LI>
+ <LI><A HREF="#user interface classes (under development; not yet usable)">User Interface classes (under development; not yet usable)</A></LI>
+ <LI><A HREF="#notes">Notes</A></LI>
+ </UL>
+
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#support">SUPPORT</A></LI>
+ <LI><A HREF="#author">AUTHOR</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS - Freeside Perl modules</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<P>FS is the unofficial (i.e. non-CPAN) prefix for the Perl module portion of the
+Freeside ISP billing software. This includes:</P>
+<P>
+<H2><A NAME="utility classes">Utility classes</A></H2>
+<P><A HREF="././FS/Conf.html">the FS::Conf manpage</A> - Freeside configuration values</P>
+<P><A HREF="././FS/UID.html">the FS::UID manpage</A> - User class (not yet OO)</P>
+<P><A HREF="././FS/CGI.html">the FS::CGI manpage</A> - Non OO-subroutines for the web interface. This is
+depriciated. Future development will be focused on the FS::UI user-interface
+classes (see below).</P>
+<P>
+<H2><A NAME="database record classes">Database record classes</A></H2>
+<P><A HREF="././FS/Record.html">the FS::Record manpage</A> - Database record base class</P>
+<P><A HREF="././FS/svc_acct_pop.html">the FS::svc_acct_pop manpage</A> - POP (Point of Presence, not Post
+Office Protocol) class</P>
+<P><A HREF="././FS/part_referral.html">the FS::part_referral manpage</A> - Referral class</P>
+<P><A HREF="././FS/cust_main_county.html">the FS::cust_main_county manpage</A> - Locale (tax rate) class</P>
+<P><A HREF="././FS/svc_Common.html">the FS::svc_Common manpage</A> - Service base class</P>
+<P><A HREF="././FS/svc_acct.html">the FS::svc_acct manpage</A> - Account (shell, RADIUS, POP3) class</P>
+<P><A HREF="././FS/svc_domain.html">the FS::svc_domain manpage</A> - Domain class</P>
+<P><A HREF="././FS/domain_record.html">the FS::domain_record manpage</A> - DNS zone entries</P>
+<P><A HREF="././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A> - Vitual mail alias class</P>
+<P><A HREF="././FS/svc_www.html">the FS::svc_www manpage</A> - Web virtual host class.</P>
+<P><A HREF="././FS/part_svc.html">the FS::part_svc manpage</A> - Service definition class</P>
+<P><A HREF="././FS/part_pkg.html">the FS::part_pkg manpage</A> - Package (billing item) definition class</P>
+<P><A HREF="././FS/pkg_svc.html">the FS::pkg_svc manpage</A> - Class linking package (billing item)
+definitions (see <A HREF="././FS/part_pkg.html">the FS::part_pkg manpage</A>) with service definitions
+(see <A HREF="././FS/part_svc.html">the FS::part_svc manpage</A>)</P>
+<P><A HREF="././FS/agent.html">the FS::agent manpage</A> - Agent (reseller) class</P>
+<P><A HREF="././FS/agent_type.html">the FS::agent_type manpage</A> - Agent type class</P>
+<P><A HREF="././FS/type_pkgs.html">the FS::type_pkgs manpage</A> - Class linking agent types (see
+<A HREF="././FS/agent_type.html">the FS::agent_type manpage</A>) with package (billing item) definitions
+(see <A HREF="././FS/part_pkg.html">the FS::part_pkg manpage</A>)</P>
+<P><A HREF="././FS/cust_svc.html">the FS::cust_svc manpage</A> - Service class</P>
+<P><A HREF="././FS/cust_pkg.html">the FS::cust_pkg manpage</A> - Package (billing item) class</P>
+<P><A HREF="././FS/cust_main.html">the FS::cust_main manpage</A> - Customer class</P>
+<P><A HREF="././FS/cust_main_invoice.html">the FS::cust_main_invoice manpage</A> - Invoice destination
+class</P>
+<P><A HREF="././FS/cust_bill.html">the FS::cust_bill manpage</A> - Invoice class</P>
+<P><A HREF="././FS/cust_bill_pkg.html">the FS::cust_bill_pkg manpage</A> - Invoice line item class</P>
+<P><A HREF="././FS/cust_pay.html">the FS::cust_pay manpage</A> - Payment class</P>
+<P><A HREF="././FS/cust_credit.html">the FS::cust_credit manpage</A> - Credit class</P>
+<P><A HREF="././FS/cust_refund.html">the FS::cust_refund manpage</A> - Refund class</P>
+<P><A HREF="././FS/cust_pay_batch.html">the FS::cust_pay_batch manpage</A> - Credit card transaction queue class</P>
+<P><A HREF="././FS/prepay_credit.html">the FS::prepay_credit manpage</A> - Prepaid ``calling card'' credit class.</P>
+<P><A HREF="././FS/nas.html">the FS::nas manpage</A> - Network Access Server class</P>
+<P><A HREF="././FS/port.html">the FS::port manpage</A> - NAS port class</P>
+<P><A HREF="././FS/session.html">the FS::session manpage</A> - User login session class</P>
+<P>
+<H2><A NAME="user interface classes (under development; not yet usable)">User Interface classes (under development; not yet usable)</A></H2>
+<P><A HREF="././FS/UI/Base.html">the FS::UI::Base manpage</A> - User-interface base class</P>
+<P><A HREF="././FS/UI/Gtk.html">the FS::UI::Gtk manpage</A> - Gtk user-interface class</P>
+<P><A HREF="././FS/UI/CGI.html">the FS::UI::CGI manpage</A> - CGI (HTML) user-interface class</P>
+<P><A HREF="././FS/UI/agent.html">the FS::UI::agent manpage</A> - agent table user-interface class</P>
+<P>
+<H2><A NAME="notes">Notes</A></H2>
+<P>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.''</P>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>Freeside is a billing and administration package for Internet Service
+Providers.</P>
+<P>The Freeside home page is at &lt;http://www.sisd.com/freeside&gt;.</P>
+<P>The main documentation is in htdocs/docs.</P>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: FS.html,v 1.3 2001-04-23 12:40:30 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="support">SUPPORT</A></H1>
+<P>A mailing list for users and developers is available. Send a blank message to
+&lt;<A HREF="mailto:ivan-freeside-subscribe@sisd.com">ivan-freeside-subscribe@sisd.com</A>&gt; to subscribe.</P>
+<P>Commercial support is available; see
+&lt;http://www.sisd.com/freeside/commercial.html&gt;.</P>
+<P>
+<HR>
+<H1><A NAME="author">AUTHOR</A></H1>
+<P>Primarily Ivan Kohler &lt;<A HREF="mailto:ivan@sisd.com">ivan@sisd.com</A>&gt;, with help from many kind folks.</P>
+<P>See the CREDITS file in the Freeside distribution for a (hopefully) complete
+list and the individal files for details.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P>perl(1), main Freeside documentation in htdocs/docs/</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>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.</P>
+<P>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...</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/Bill.html b/htdocs/docs/man/FS/Bill.html
new file mode 100644
index 000000000..cf996ae80
--- /dev/null
+++ b/htdocs/docs/man/FS/Bill.html
@@ -0,0 +1,32 @@
+<HTML>
+<HEAD>
+<TITLE>FS::Bill - Legacy stub</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::Bill - Legacy stub
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+The functionality of FS::Bill has been integrated into FS::cust_main.
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/CGI.html b/htdocs/docs/man/FS/CGI.html
new file mode 100644
index 000000000..05f7823b4
--- /dev/null
+++ b/htdocs/docs/man/FS/CGI.html
@@ -0,0 +1,95 @@
+<HTML>
+<HEAD>
+<TITLE>FS::CGI - Subroutines for the web interface</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#subroutines">SUBROUTINES</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::CGI - Subroutines for the web interface</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::CGI qw(header menubar idiot eidiot popurl);</PRE>
+<PRE>
+ print header( 'Title', '' );
+ print header( 'Title', menubar('item', 'URL', ... ) );</PRE>
+<PRE>
+ idiot &quot;error message&quot;;
+ eidiot &quot;error message&quot;;</PRE>
+<PRE>
+ $url = popurl; #returns current url
+ $url = popurl(3); #three levels up</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>Provides a few common subroutines for the web interface.</P>
+<P>
+<HR>
+<H1><A NAME="subroutines">SUBROUTINES</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_header">header TITLE, MENUBAR</A></STRONG><BR>
+<DD>
+Returns an HTML header.
+<P></P>
+<DT><STRONG><A NAME="item_menubar_ITEM%2C_URL%2C_%2E%2E%2E">menubar ITEM, URL, ...</A></STRONG><BR>
+<DD>
+Returns an HTML menubar.
+<P></P>
+<DT><STRONG><A NAME="item_idiot">idiot ERROR</A></STRONG><BR>
+<DD>
+This is depriciated. Don't use it.
+<P>Sends headers and an HTML error message.</P>
+<P></P>
+<DT><STRONG><A NAME="item_eidiot">eidiot ERROR</A></STRONG><BR>
+<DD>
+This is depriciated. Don't use it.
+<P>Sends headers and an HTML error message, then exits.</P>
+<P></P>
+<DT><STRONG><A NAME="item_popurl">popurl LEVEL</A></STRONG><BR>
+<DD>
+Returns current URL with LEVEL levels of path removed from the end (default 0).
+<P></P>
+<DT><STRONG><A NAME="item_table">table</A></STRONG><BR>
+<DD>
+Returns HTML tag for beginning a table.
+<P></P>
+<DT><STRONG><A NAME="item_itable">itable</A></STRONG><BR>
+<DD>
+Returns HTML tag for beginning an (invisible) table.
+<P></P>
+<DT><STRONG><A NAME="item_ntable">ntable</A></STRONG><BR>
+<DD>
+This is getting silly.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>Not OO.</P>
+<P>Not complete.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/CGI.html">the CGI manpage</A>, <A HREF="../CGI/Base.html">the CGI::Base manpage</A></P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/CGIwrapper.html b/htdocs/docs/man/FS/CGIwrapper.html
new file mode 100644
index 000000000..bab5e7f37
--- /dev/null
+++ b/htdocs/docs/man/FS/CGIwrapper.html
@@ -0,0 +1,16 @@
+<HTML>
+<HEAD>
+<TITLE>./FS/FS/CGIwrapper.pm</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+<!-- INDEX END -->
+
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/Conf.html b/htdocs/docs/man/FS/Conf.html
new file mode 100644
index 000000000..7b1613efd
--- /dev/null
+++ b/htdocs/docs/man/FS/Conf.html
@@ -0,0 +1,81 @@
+<HTML>
+<HEAD>
+<TITLE>FS::Conf - Read access to Freeside configuration values</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::Conf - Read access to Freeside configuration values</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::Conf;</PRE>
+<PRE>
+ $conf = new FS::Conf &quot;/config/directory&quot;;</PRE>
+<PRE>
+ $FS::Conf::default_dir = &quot;/config/directory&quot;;
+ $conf = new FS::Conf;</PRE>
+<PRE>
+ $dir = $conf-&gt;dir;</PRE>
+<PRE>
+ $value = $conf-&gt;config('key');
+ @list = $conf-&gt;config('key');
+ $bool = $conf-&gt;exists('key');</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>Read access to Freeside configuration values. Keys currently map to filenames,
+but this may change in the future.</P>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new_%5B_DIRECTORY_%5D">new [ DIRECTORY ]</A></STRONG><BR>
+<DD>
+Create a new configuration object. A directory arguement is required if
+$FS::Conf::default_dir has not been set.
+<P></P>
+<DT><STRONG><A NAME="item_dir">dir</A></STRONG><BR>
+<DD>
+Returns the directory.
+<P></P>
+<DT><STRONG><A NAME="item_config">config</A></STRONG><BR>
+<DD>
+Returns the configuration value or values (depending on context) for key.
+<P></P>
+<DT><STRONG><A NAME="item_exists">exists</A></STRONG><BR>
+<DD>
+Returns true if the specified key exists, even if the corresponding value
+is undefined.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>Write access (with locking) should be implemented.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P>config.html from the base documentation contains a list of configuration files.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/Invoice.html b/htdocs/docs/man/FS/Invoice.html
new file mode 100644
index 000000000..cc837be2e
--- /dev/null
+++ b/htdocs/docs/man/FS/Invoice.html
@@ -0,0 +1,32 @@
+<HTML>
+<HEAD>
+<TITLE>FS::Invoice - Legacy stub</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::Invoice - Legacy stub
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+The functionality of FS::Invoice has been integrated in FS::cust_bill.
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/Record.html b/htdocs/docs/man/FS/Record.html
new file mode 100644
index 000000000..cc3d37795
--- /dev/null
+++ b/htdocs/docs/man/FS/Record.html
@@ -0,0 +1,342 @@
+<HTML>
+<HEAD>
+<TITLE>FS::Record - Database record objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#constructors">CONSTRUCTORS</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#subroutines">SUBROUTINES</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::Record - Database record objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::Record;
+ use FS::Record qw(dbh fields qsearch qsearchs dbdef);</PRE>
+<PRE>
+ $record = new FS::Record 'table', \%hash;
+ $record = new FS::Record 'table', { 'column' =&gt; 'value', ... };</PRE>
+<PRE>
+ $record = qsearchs FS::Record 'table', \%hash;
+ $record = qsearchs FS::Record 'table', { 'column' =&gt; 'value', ... };
+ @records = qsearch FS::Record 'table', \%hash;
+ @records = qsearch FS::Record 'table', { 'column' =&gt; 'value', ... };</PRE>
+<PRE>
+ $table = $record-&gt;table;
+ $dbdef_table = $record-&gt;dbdef_table;</PRE>
+<PRE>
+ $value = $record-&gt;get('column');
+ $value = $record-&gt;getfield('column');
+ $value = $record-&gt;column;</PRE>
+<PRE>
+ $record-&gt;set( 'column' =&gt; 'value' );
+ $record-&gt;setfield( 'column' =&gt; 'value' );
+ $record-&gt;column('value');</PRE>
+<PRE>
+ %hash = $record-&gt;hash;</PRE>
+<PRE>
+ $hashref = $record-&gt;hashref;</PRE>
+<PRE>
+ $error = $record-&gt;insert;
+ #$error = $record-&gt;add; #depriciated</PRE>
+<PRE>
+ $error = $record-&gt;delete;
+ #$error = $record-&gt;del; #depriciated</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);
+ #$error = $new_record-&gt;rep($old_record); #depriciated</PRE>
+<PRE>
+ $value = $record-&gt;unique('column');</PRE>
+<PRE>
+ $value = $record-&gt;ut_float('column');
+ $value = $record-&gt;ut_number('column');
+ $value = $record-&gt;ut_numbern('column');
+ $value = $record-&gt;ut_money('column');
+ $value = $record-&gt;ut_text('column');
+ $value = $record-&gt;ut_textn('column');
+ $value = $record-&gt;ut_alpha('column');
+ $value = $record-&gt;ut_alphan('column');
+ $value = $record-&gt;ut_phonen('column');
+ $value = $record-&gt;ut_anythingn('column');</PRE>
+<PRE>
+ $dbdef = reload_dbdef;
+ $dbdef = reload_dbdef &quot;/non/standard/filename&quot;;
+ $dbdef = dbdef;</PRE>
+<PRE>
+ $quoted_value = _quote($value,'table','field');</PRE>
+<PRE>
+ #depriciated
+ $fields = hfields('table');
+ if ( $fields-&gt;{Field} ) { # etc.</PRE>
+<PRE>
+ @fields = fields 'table'; #as a subroutine
+ @fields = $record-&gt;fields; #as a method call</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>(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.</P>
+<P>
+<HR>
+<H1><A NAME="constructors">CONSTRUCTORS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new_%5B_TABLE%2C_%5D_HASHREF">new [ TABLE, ] HASHREF</A></STRONG><BR>
+<DD>
+Creates a new record. It doesn't store it in the database, though. See
+<A HREF="#insert">insert</A> for that.
+<P>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 <EM>hash</EM>
+method.</P>
+<P>TABLE can only be omitted when a dervived class overrides the table method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_qsearch_TABLE%2C_HASHREF%2C_SELECT%2C_EXTRA_SQL">qsearch TABLE, HASHREF, SELECT, EXTRA_SQL</A></STRONG><BR>
+<DD>
+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.
+<P>###oops, argh, FS::Record::new only lets us create database fields.
+#Normal behaviour if SELECT is not specified is `*', as in
+#<CODE>SELECT * FROM table WHERE ...</CODE>. 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.</P>
+<P></P>
+<DT><STRONG><A NAME="item_qsearchs">qsearchs TABLE, HASHREF</A></STRONG><BR>
+<DD>
+Same as qsearch, except that if more than one record matches, it <STRONG>carp</STRONG>s but
+returns the first. If this happens, you either made a logic error in asking
+for a single item, or your data is corrupted.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_table">table</A></STRONG><BR>
+<DD>
+Returns the table name.
+<P></P>
+<DT><STRONG><A NAME="item_dbdef_table">dbdef_table</A></STRONG><BR>
+<DD>
+Returns the FS::dbdef_table object for the table.
+<P></P>
+<DT><STRONG><A NAME="item_get%2C_getfield_COLUMN">get, getfield COLUMN</A></STRONG><BR>
+<DD>
+Returns the value of the column/field/key COLUMN.
+<P></P>
+<DT><STRONG><A NAME="item_set%2C_setfield_COLUMN%2C_VALUE">set, setfield COLUMN, VALUE</A></STRONG><BR>
+<DD>
+Sets the value of the column/field/key COLUMN to VALUE. Returns VALUE.
+<P></P>
+<DT><STRONG><A NAME="item_AUTLOADED_METHODS">AUTLOADED METHODS</A></STRONG><BR>
+<DD>
+$record-&gt;column is a synonym for $record-&gt;get('column');
+<P>$record-&gt;<CODE>column('value')</CODE> is a synonym for $record-&gt;set('column','value');</P>
+<P></P>
+<DT><STRONG><A NAME="item_hash">hash</A></STRONG><BR>
+<DD>
+Returns a list of the column/value pairs, usually for assigning to a new hash.
+<P>To make a distinct duplicate of an FS::Record object, you can do:</P>
+<PRE>
+ $new = new FS::Record ( $old-&gt;table, { $old-&gt;hash } );</PRE>
+<P></P>
+<DT><STRONG><A NAME="item_hashref">hashref</A></STRONG><BR>
+<DD>
+Returns a reference to the column/value hash.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Inserts this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_add">add</A></STRONG><BR>
+<DD>
+Depriciated (use insert instead).
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_del">del</A></STRONG><BR>
+<DD>
+Depriciated (use delete instead).
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replace the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_rep">rep</A></STRONG><BR>
+<DD>
+Depriciated (use replace instead).
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+Not yet implemented, croaks. Derived classes should provide a check method.
+<P></P>
+<DT><STRONG><A NAME="item_unique">unique COLUMN</A></STRONG><BR>
+<DD>
+Replaces COLUMN in record with a unique number. Called by the <STRONG>add</STRONG> method
+on primary keys and single-field unique columns (see <A HREF="../DBIx/DBSchema/Table.html">the DBIx::DBSchema::Table manpage</A>).
+Returns the new value.
+<P></P>
+<DT><STRONG><A NAME="item_ut_float_COLUMN">ut_float COLUMN</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_ut_number_COLUMN">ut_number COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint simple numeric data (whole numbers). May not be null. If there
+is an error, returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_ut_numbern_COLUMN">ut_numbern COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint simple numeric data (whole numbers). May be null. If there is
+an error, returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_ut_money_COLUMN">ut_money COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint monetary numbers. May be negative. Set to 0 if null. If there
+is an error, returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_ut_text_COLUMN">ut_text COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint text. Alphanumerics, spaces, and the following punctuation
+symbols are currently permitted: ! @ # $ % &amp; ( ) - + ; : ' `` , . ? /
+May not be null. If there is an error, returns the error, otherwise returns
+false.
+<P></P>
+<DT><STRONG><A NAME="item_ut_textn_COLUMN">ut_textn COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint text. Alphanumerics, spaces, and the following punctuation
+symbols are currently permitted: ! @ # $ % &amp; ( ) - + ; : ' `` , . ? /
+May be null. If there is an error, returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_ut_alpha_COLUMN">ut_alpha COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint alphanumeric strings (no spaces). May not be null. If there is
+an error, returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG>ut_alpha COLUMN</STRONG><BR>
+<DD>
+Check/untaint alphanumeric strings (no spaces). May be null. If there is an
+error, returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_ut_phonen_COLUMN_%5B_COUNTRY_%5D">ut_phonen COLUMN [ COUNTRY ]</A></STRONG><BR>
+<DD>
+Check/untaint phone numbers. May be null. If there is an error, returns
+the error, otherwise returns false.
+<P>Takes an optional two-letter ISO country code; without it or with unsupported
+countries, ut_phonen simply calls ut_alphan.</P>
+<P></P>
+<DT><STRONG><A NAME="item_ut_ip_COLUMN">ut_ip COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint ip addresses. IPv4 only for now.
+<P></P>
+<DT><STRONG><A NAME="item_ut_ipn_COLUMN">ut_ipn COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint ip addresses. IPv4 only for now. May be null.
+<P></P>
+<DT><STRONG><A NAME="item_ut_domain_COLUMN">ut_domain COLUMN</A></STRONG><BR>
+<DD>
+Check/untaint host and domain names.
+<P></P>
+<DT><STRONG><A NAME="item_ut_anything_COLUMN">ut_anything COLUMN</A></STRONG><BR>
+<DD>
+Untaints arbitrary data. Be careful.
+<P></P>
+<DT><STRONG><A NAME="item_fields_%5B_TABLE_%5D">fields [ TABLE ]</A></STRONG><BR>
+<DD>
+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 <A HREF="../DBIx/DBSchema/Table.html">the DBIx::DBSchema::Table manpage</A>).
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="subroutines">SUBROUTINES</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_reload_dbdef"><CODE>reload_dbdef([FILENAME])</CODE></A></STRONG><BR>
+<DD>
+Load a database definition (see <A HREF="../DBIx/DBSchema.html">the DBIx::DBSchema manpage</A>), optionally from a
+non-default filename. This command is executed at startup unless
+<EM>$FS::Record::setup_hack</EM> is true. Returns a DBIx::DBSchema object.
+<P></P>
+<DT><STRONG><A NAME="item_dbdef">dbdef</A></STRONG><BR>
+<DD>
+Returns the current database definition. See <A HREF="../FS/dbdef.html">the FS::dbdef manpage</A>.
+<P></P>
+<DT><STRONG><A NAME="item__quote_VALUE%2C_TABLE%2C_COLUMN">_quote VALUE, TABLE, COLUMN</A></STRONG><BR>
+<DD>
+This is an internal function used to construct SQL statements. It returns
+VALUE DBI-quoted (see <EM>DBI/``quote''</EM>) unless VALUE is a number and the column
+type (see <A HREF="../FS/dbdef_column.html">the FS::dbdef_column manpage</A>) does not end in `char' or `binary'.
+<P></P>
+<DT><STRONG><A NAME="item_hfields">hfields TABLE</A></STRONG><BR>
+<DD>
+This is depriciated. Don't use it.
+<P>It returns a hash-type list with the fields of this record's table set true.</P>
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: Record.html,v 1.3 2001-04-23 12:40:30 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>This module should probably be renamed, since much of the functionality is
+of general use. It is not completely unlike Adapter::DBI (see below).</P>
+<P>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.)</P>
+<P>The whole fields / hfields mess should be removed.</P>
+<P>The various WHERE clauses should be subroutined.</P>
+<P>table string should be depriciated in favor of FS::dbdef_table.</P>
+<P>No doubt we could benefit from a Tied hash. Documenting how exists / defined
+true maps to the database (and WHERE clauses) would also help.</P>
+<P>The ut_ methods should ask the dbdef for a default length.</P>
+<P>ut_sqltype (like ut_varchar) should all be defined</P>
+<P>A fallback check method should be provided which uses the dbdef.</P>
+<P>The ut_money method assumes money has two decimal digits.</P>
+<P>The Pg money kludge in the new method only strips `$'.</P>
+<P>The ut_phonen method assumes US-style phone numbers.</P>
+<P>The _quote function should probably use ut_float instead of a regex.</P>
+<P>All the subroutines probably should be methods, here or elsewhere.</P>
+<P>Probably should borrow/use some dbdef methods where appropriate (like sub
+fields)</P>
+<P>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)</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF="../DBIx/DBSchema.html">the DBIx::DBSchema manpage</A>, <A HREF=".././FS/UID.html">the FS::UID manpage</A>, <EM>DBI</EM></P>
+<P>Adapter::DBI from Ch. 11 of Advanced Perl Programming by Sriram Srinivasan.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/SSH.html b/htdocs/docs/man/FS/SSH.html
new file mode 100644
index 000000000..4368b8c11
--- /dev/null
+++ b/htdocs/docs/man/FS/SSH.html
@@ -0,0 +1,104 @@
+<HTML>
+<HEAD>
+<TITLE>FS::SSH - Subroutines to call ssh and scp</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
+ <LI><A HREF="#SUBROUTINES">SUBROUTINES</A>
+ <LI><A HREF="#BUGS">BUGS</A>
+ <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::SSH - Subroutines to call ssh and scp
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+<PRE> use FS::SSH qw(ssh scp issh iscp sshopen2 sshopen3);
+</PRE>
+<P>
+<PRE> ssh($host, $command);
+</PRE>
+<P>
+<PRE> issh($host, $command);
+</PRE>
+<P>
+<PRE> scp($source, $destination);
+</PRE>
+<P>
+<PRE> iscp($source, $destination);
+</PRE>
+<P>
+<PRE> sshopen2($host, $reader, $writer, $command);
+</PRE>
+<P>
+<PRE> sshopen3($host, $reader, $writer, $error, $command);
+</PRE>
+<P>
+<HR>
+<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
+<P>
+<PRE> Simple wrappers around ssh and scp commands.
+</PRE>
+<P>
+<HR>
+<H1><A NAME="SUBROUTINES">SUBROUTINES</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_ssh">ssh HOST, COMMAND</A></STRONG><DD>
+<P>
+Calls ssh in batch mode.
+
+<DT><STRONG><A NAME="item_issh">issh HOST, COMMAND</A></STRONG><DD>
+<P>
+Prints the ssh command to be executed, waits for the user to confirm, and
+(optionally) executes the command.
+
+<DT><STRONG><A NAME="item_scp">scp SOURCE, DESTINATION</A></STRONG><DD>
+<P>
+Calls scp in batch mode.
+
+<DT><STRONG><A NAME="item_iscp">iscp SOURCE, DESTINATION</A></STRONG><DD>
+<P>
+Prints the scp command to be executed, waits for the user to confirm, and
+(optionally) executes the command.
+
+<DT><STRONG><A NAME="item_sshopen2">sshopen2 HOST, READER, WRITER, COMMAND</A></STRONG><DD>
+<P>
+Connects the supplied filehandles to the ssh process (in batch mode).
+
+<DT><STRONG><A NAME="item_sshopen3">sshopen3 HOST, WRITER, READER, ERROR, COMMAND</A></STRONG><DD>
+<P>
+Connects the supplied filehandles to the ssh process (in batch mode).
+
+<H1><A NAME="BUGS">BUGS</A></H1>
+<P>
+Not OO.
+
+<P>
+scp stuff should transparantly use rsync-over-ssh instead.
+
+<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
+<P>
+<EM>ssh</EM>, <EM>scp</EM>, <A HREF="../IPC/Open2.html">IPC::Open2</A>, <A HREF="../IPC/Open3.html">IPC::Open3</A>
+
+
+
+</DL>
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/SessionClient.html b/htdocs/docs/man/FS/SessionClient.html
new file mode 100644
index 000000000..5f180eee4
--- /dev/null
+++ b/htdocs/docs/man/FS/SessionClient.html
@@ -0,0 +1,97 @@
+<HTML>
+<HEAD>
+<TITLE>FS::SessionClient - Freeside session client API</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#subroutines">SUBROUTINES</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::SessionClient - Freeside session client API</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::SessionClient qw( login portnum logout );</PRE>
+<PRE>
+ $error = login ( {
+ 'username' =&gt; $username,
+ 'password' =&gt; $password,
+ 'login' =&gt; $timestamp,
+ 'portnum' =&gt; $portnum,
+ } );</PRE>
+<PRE>
+ $portnum = portnum( { 'ip' =&gt; $ip } ) or die &quot;unknown ip!&quot;
+ $portnum = portnum( { 'nasnum' =&gt; $nasnum, 'nasport' =&gt; $nasport } )
+ or die &quot;unknown nasnum/nasport&quot;;</PRE>
+<PRE>
+ $error = logout ( {
+ 'username' =&gt; $username,
+ 'password' =&gt; $password,
+ 'logout' =&gt; $timestamp,
+ 'portnum' =&gt; $portnum,
+ } );</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>This modules provides an API for a remote session application.</P>
+<P>It needs to be run as the freeside user. Because of this, the program which
+calls these subroutines should be written very carefully.</P>
+<P>
+<HR>
+<H1><A NAME="subroutines">SUBROUTINES</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_login">login HASHREF</A></STRONG><BR>
+<DD>
+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.
+<P>Returns a scalar error message, or the empty string for success.</P>
+<P></P>
+<DT><STRONG><A NAME="item_portnum">portnum</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_logout">logout HASHREF</A></STRONG><BR>
+<DD>
+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.
+<P>Returns a scalar error message, or the empty string for success.</P>
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: SessionClient.html,v 1.1 2001-04-25 01:06:09 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><EM>fs_sessiond</EM></P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/SignupClient.html b/htdocs/docs/man/FS/SignupClient.html
new file mode 100644
index 000000000..0c621edcb
--- /dev/null
+++ b/htdocs/docs/man/FS/SignupClient.html
@@ -0,0 +1,125 @@
+<HTML>
+<HEAD>
+<TITLE>FS::SignupClient - Freeside signup client API</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
+ <LI><A HREF="#SUBROUTINES">SUBROUTINES</A>
+ <LI><A HREF="#VERSION">VERSION</A>
+ <LI><A HREF="#BUGS">BUGS</A>
+ <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::SignupClient - Freeside signup client API
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+<PRE> use FS::SignupClient qw( signup_info new_customer );
+</PRE>
+<P>
+<PRE> ( $locales, $packages, $pops ) = signup_info;
+</PRE>
+<P>
+<PRE> $error = new_customer ( {
+ 'first' =&gt; $first,
+ 'last' =&gt; $last,
+ 'ss' =&gt; $ss,
+ 'comapny' =&gt; $company,
+ 'address1' =&gt; $address1,
+ 'address2' =&gt; $address2,
+ 'city' =&gt; $city,
+ 'county' =&gt; $county,
+ 'state' =&gt; $state,
+ 'zip' =&gt; $zip,
+ 'country' =&gt; $country,
+ 'daytime' =&gt; $daytime,
+ 'night' =&gt; $night,
+ 'fax' =&gt; $fax,
+ 'payby' =&gt; $payby,
+ 'payinfo' =&gt; $payinfo,
+ 'paydate' =&gt; $paydate,
+ 'payname' =&gt; $payname,
+ 'invoicing_list' =&gt; $invoicing_list,
+ 'pkgpart' =&gt; $pkgpart,
+ 'username' =&gt; $username,
+ '_password' =&gt; $password,
+ 'popnum' =&gt; $popnum,
+ } );
+</PRE>
+<P>
+<HR>
+<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
+<P>
+This module provides an API for a remote signup server.
+
+<P>
+It needs to be run as the freeside user. Because of this, the program which
+calls these subroutines should be written very carefully.
+
+<P>
+<HR>
+<H1><A NAME="SUBROUTINES">SUBROUTINES</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_signup_info">signup_info</A></STRONG><DD>
+<P>
+Returns three array references of hash references.
+
+<P>
+The first set of hash references is of allowable locales. Each hash
+reference has the following keys: taxnum state county country
+
+<P>
+The second set of hash references is of allowable packages. Each hash
+reference has the following keys: pkgpart pkg
+
+<P>
+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
+
+<DT><STRONG><A NAME="item_new_customer">new_customer HASHREF</A></STRONG><DD>
+<P>
+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
+
+<P>
+Returns a scalar error message, or the empty string for success.
+
+</DL>
+<P>
+<HR>
+<H1><A NAME="VERSION">VERSION</A></H1>
+<P>
+$Id: SignupClient.html,v 1.1 2001-04-23 12:41:57 ivan Exp $
+
+<P>
+<HR>
+<H1><A NAME="BUGS">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
+<P>
+<EM>fs_signupd</EM>, <A HREF="./htdocs/docs/man/FS/SignupServer.html">FS::SignupServer</A>, <A HREF="./htdocs/docs/man/FS/cust_main.html">FS::cust_main</A>
+
+
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/UI/Base.html b/htdocs/docs/man/FS/UI/Base.html
new file mode 100644
index 000000000..96c60847d
--- /dev/null
+++ b/htdocs/docs/man/FS/UI/Base.html
@@ -0,0 +1,100 @@
+<HTML>
+<HEAD>
+<TITLE>FS::UI::Base - Base class for all user-interface objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+ <LI><A HREF="#history">HISTORY</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::UI::Base - Base class for all user-interface objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::UI::SomeInterface;
+ use FS::UI::some_table;</PRE>
+<PRE>
+ $interface = new FS::UI::some_table;</PRE>
+<PRE>
+ $error = $interface-&gt;browse;
+ $error = $interface-&gt;search;
+ $error = $interface-&gt;view;
+ $error = $interface-&gt;edit;
+ $error = $interface-&gt;process;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<PRE>
+ package FS::UI::table_name;
+ use vars qw ( @ISA );
+ use FS::UI::Base;
+ @ISA = qw( FS::UI::Base );
+ sub db_table { 'table_name'; }</PRE>
+<P>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.</P>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_browse">browse</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_title">title</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_addwidget">addwidget</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: Base.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>This documentation is incomplete.</P>
+<P>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.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF="../.././FS/UI/Gtk.html">the FS::UI::Gtk manpage</A>, <A HREF="../.././FS/UI/CGI.html">the FS::UI::CGI manpage</A></P>
+<P>
+<HR>
+<H1><A NAME="history">HISTORY</A></H1>
+<P>$Log: Base.html,v $
+<P>Revision 1.3 2001-04-23 12:40:31 ivan
+<P>documentation and webdemo updates
+<P>
+Revision 1.1 1999/08/04 09:03:53 ivan
+initial checkin of module files for proper perl installation</P>
+<P>Revision 1.1 1999/01/20 09:30:36 ivan
+skeletal cross-UI UI code.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/UI/CGI.html b/htdocs/docs/man/FS/UI/CGI.html
new file mode 100644
index 000000000..49991f1aa
--- /dev/null
+++ b/htdocs/docs/man/FS/UI/CGI.html
@@ -0,0 +1,94 @@
+<HTML>
+<HEAD>
+<TITLE>FS::UI::CGI - Base class for CGI user-interface objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+ <LI><A HREF="#history">HISTORY</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::UI::CGI - Base class for CGI user-interface objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::UI::CGI;
+ use FS::UI::some_table;</PRE>
+<PRE>
+ $interface = new FS::UI::some_table;</PRE>
+<PRE>
+ $error = $interface-&gt;browse;
+ $error = $interface-&gt;search;
+ $error = $interface-&gt;view;
+ $error = $interface-&gt;edit;
+ $error = $interface-&gt;process;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::UI::CGI object represents a CGI interface object.</P>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item__header">_header</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item__footer">_footer</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_interface">interface</A></STRONG><BR>
+<DD>
+Returns the string `CGI'. Useful for the author of a table-specific UI class
+to conditionally specify certain behaviour.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: CGI.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>This documentation is incomplete.</P>
+<P>In _Tableborder, headers should be links that sort on their fields.</P>
+<P>_Link uses a constant $BASE_URL</P>
+<P>_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)</P>
+<P>Still some small bits of widget code same as FS::UI::Gtk.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF="../.././FS/UI/Base.html">the FS::UI::Base manpage</A></P>
+<P>
+<HR>
+<H1><A NAME="history">HISTORY</A></H1>
+<P>$Log: CGI.html,v $
+<P>Revision 1.3 2001-04-23 12:40:31 ivan
+<P>documentation and webdemo updates
+<P>
+Revision 1.1 1999/08/04 09:03:53 ivan
+initial checkin of module files for proper perl installation</P>
+<P>Revision 1.1 1999/01/20 09:30:36 ivan
+skeletal cross-UI UI code.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/UI/Gtk.html b/htdocs/docs/man/FS/UI/Gtk.html
new file mode 100644
index 000000000..24d620087
--- /dev/null
+++ b/htdocs/docs/man/FS/UI/Gtk.html
@@ -0,0 +1,91 @@
+<HTML>
+<HEAD>
+<TITLE>FS::UI::Gtk - Base class for Gtk user-interface objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+ <LI><A HREF="#history">HISTORY</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::UI::Gtk - Base class for Gtk user-interface objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::UI::Gtk;
+ use FS::UI::some_table;</PRE>
+<PRE>
+ $interface = new FS::UI::some_table;</PRE>
+<PRE>
+ $error = $interface-&gt;browse;
+ $error = $interface-&gt;search;
+ $error = $interface-&gt;view;
+ $error = $interface-&gt;edit;
+ $error = $interface-&gt;process;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::UI::Gtk object represents a Gtk user interface object.</P>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_interface">interface</A></STRONG><BR>
+<DD>
+Returns the string `Gtk'. Useful for the author of a table-specific UI class
+to conditionally specify certain behaviour.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: Gtk.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>This documentation is incomplete.</P>
+<P>_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.</P>
+<P>There should be a persistant, per-(freeside)-user store for window positions
+and sizes and sort fields etc (see <A HREF="../.././FS/UI/CGI.html#bugs">BUGS in the FS::UI::CGI manpage</A>.</P>
+<P>Still some small bits of widget code same as FS::UI::CGI.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF="../.././FS/UI/Base.html">the FS::UI::Base manpage</A></P>
+<P>
+<HR>
+<H1><A NAME="history">HISTORY</A></H1>
+<P>$Log: Gtk.html,v $
+<P>Revision 1.3 2001-04-23 12:40:31 ivan
+<P>documentation and webdemo updates
+<P>
+Revision 1.1 1999/08/04 09:03:53 ivan
+initial checkin of module files for proper perl installation</P>
+<P>Revision 1.1 1999/01/20 09:30:36 ivan
+skeletal cross-UI UI code.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/UI/agent.html b/htdocs/docs/man/FS/UI/agent.html
new file mode 100644
index 000000000..8608e4ef4
--- /dev/null
+++ b/htdocs/docs/man/FS/UI/agent.html
@@ -0,0 +1,16 @@
+<HTML>
+<HEAD>
+<TITLE>./FS/FS/UI/agent.pm</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+<!-- INDEX END -->
+
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/UID.html b/htdocs/docs/man/FS/UID.html
new file mode 100644
index 000000000..9c4da492b
--- /dev/null
+++ b/htdocs/docs/man/FS/UID.html
@@ -0,0 +1,142 @@
+<HTML>
+<HEAD>
+<TITLE>FS::UID - Subroutines for database login and assorted other stuff</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#subroutines">SUBROUTINES</A></LI>
+ <LI><A HREF="#callbacks">CALLBACKS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::UID - Subroutines for database login and assorted other stuff</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::UID qw(adminsuidsetup cgisuidsetup dbh datasrc getotaker
+ checkeuid checkruid swapuid);</PRE>
+<PRE>
+ adminsuidsetup $user;</PRE>
+<PRE>
+ $cgi = new CGI;
+ $dbh = cgisuidsetup($cgi);</PRE>
+<PRE>
+ $dbh = dbh;</PRE>
+<PRE>
+ $datasrc = datasrc;</PRE>
+<PRE>
+ $driver_name = driver_name;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>Provides a hodgepodge of subroutines.</P>
+<P>
+<HR>
+<H1><A NAME="subroutines">SUBROUTINES</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_adminsuidsetup">adminsuidsetup USER</A></STRONG><BR>
+<DD>
+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).
+<P></P>
+<DT><STRONG><A NAME="item_cgisuidsetup_CGI_object">cgisuidsetup CGI_object</A></STRONG><BR>
+<DD>
+Takes a single argument, which is a CGI (see <A HREF=".././FS/CGI.html">the CGI manpage</A>) or Apache (see <EM>Apache</EM>)
+object (CGI::Base is depriciated). Runs cgisetotaker and then adminsuidsetup.
+<P></P>
+<DT><STRONG><A NAME="item_cgi">cgi</A></STRONG><BR>
+<DD>
+Returns the CGI (see <A HREF=".././FS/CGI.html">the CGI manpage</A>) object.
+<P></P>
+<DT><STRONG><A NAME="item_dbh">dbh</A></STRONG><BR>
+<DD>
+Returns the DBI database handle.
+<P></P>
+<DT><STRONG><A NAME="item_datasrc">datasrc</A></STRONG><BR>
+<DD>
+Returns the DBI data source.
+<P></P>
+<DT><STRONG><A NAME="item_driver_name">driver_name</A></STRONG><BR>
+<DD>
+Returns just the driver name portion of the DBI data source.
+<P></P>
+<DT><STRONG><A NAME="item_getotaker">getotaker</A></STRONG><BR>
+<DD>
+Returns the current Freeside user.
+<P></P>
+<DT><STRONG><A NAME="item_cgisetotaker">cgisetotaker</A></STRONG><BR>
+<DD>
+Sets and returns the CGI REMOTE_USER. $cgi should be defined as a CGI.pm
+object (see <A HREF=".././FS/CGI.html">the CGI manpage</A>) or an Apache object (see <EM>Apache</EM>). Support for CGI::Base
+and derived classes is depriciated.
+<P></P>
+<DT><STRONG><A NAME="item_checkeuid">checkeuid</A></STRONG><BR>
+<DD>
+Returns true if effective UID is that of the freeside user.
+<P></P>
+<DT><STRONG><A NAME="item_checkruid">checkruid</A></STRONG><BR>
+<DD>
+Returns true if the real UID is that of the freeside user.
+<P></P>
+<DT><STRONG><A NAME="item_swapuid">swapuid</A></STRONG><BR>
+<DD>
+Swaps real and effective UIDs.
+<P></P>
+<DT><STRONG><A NAME="item_getsecrets_%5B_USER_%5D">getsecrets [ USER ]</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="callbacks">CALLBACKS</A></H1>
+<P>Warning: this interface is likely to change in future releases.</P>
+<P>A package can install a callback to be run in adminsuidsetup by putting a
+coderef into the hash %FS::UID::callback :</P>
+<PRE>
+ $coderef = sub { warn &quot;Hi, I'm returning your call!&quot; };
+ $FS::UID::callback{'Package::Name'};</PRE>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: UID.html,v 1.3 2001-04-23 12:40:30 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>Too many package-global variables.</P>
+<P>Not OO.</P>
+<P>No capabilities yet. When mod_perl and Authen::DBI are implemented,
+cgisuidsetup will go away as well.</P>
+<P>Goes through contortions to support non-OO syntax with multiple datasrc's.</P>
+<P>Callbacks are inelegant.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/CGI.html">the CGI manpage</A>, <EM>DBI</EM>, config.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/agent.html b/htdocs/docs/man/FS/agent.html
new file mode 100644
index 000000000..39d89a770
--- /dev/null
+++ b/htdocs/docs/man/FS/agent.html
@@ -0,0 +1,121 @@
+<HTML>
+<HEAD>
+<TITLE>FS::agent - Object methods for agent records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::agent - Object methods for agent records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::agent;</PRE>
+<PRE>
+ $record = new FS::agent \%hash;
+ $record = new FS::agent { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $agent_type = $record-&gt;agent_type;</PRE>
+<PRE>
+ $hashref = $record-&gt;pkgpart_hashref;
+ #may purchase $pkgpart if $hashref-&gt;{$pkgpart};</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">agemtnum - primary key (assigned automatically for new agents)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_agent_%2D_Text_name_of_this_agent">agent - Text name of this agent</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_typenum_%2D_Agent_type%2E_See_FS%3A%3Aagent_type">typenum - Agent type. See <A HREF=".././FS/agent_type.html">the FS::agent_type manpage</A></A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_prog_%2D_For_future_use%2E">prog - For future use.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_freq_%2D_For_future_use%2E">freq - For future use.</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new agent. To add the agent to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this agent to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_agent_type">agent_type</A></STRONG><BR>
+<DD>
+Returns the FS::agent_type object (see <A HREF=".././FS/agent_type.html">the FS::agent_type manpage</A>) for this agent.
+<P></P>
+<DT><STRONG><A NAME="item_pkgpart_hashref">pkgpart_hashref</A></STRONG><BR>
+<DD>
+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
+<A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: agent.html,v 1.3 2001-04-23 12:40:30 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/agent_type.html">the FS::agent_type manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>,
+schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/agent_type.html b/htdocs/docs/man/FS/agent_type.html
new file mode 100644
index 000000000..b34940752
--- /dev/null
+++ b/htdocs/docs/man/FS/agent_type.html
@@ -0,0 +1,126 @@
+<HTML>
+<HEAD>
+<TITLE>FS::agent_type - Object methods for agent_type records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::agent_type - Object methods for agent_type records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::agent_type;</PRE>
+<PRE>
+ $record = new FS::agent_type \%hash;
+ $record = new FS::agent_type { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $hashref = $record-&gt;pkgpart_hashref;
+ #may purchase $pkgpart if $hashref-&gt;{$pkgpart};</PRE>
+<PRE>
+ @type_pkgs = $record-&gt;type_pkgs;</PRE>
+<PRE>
+ @pkgparts = $record-&gt;pkgpart;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::agent_type object represents an agent type. Every agent (see
+<A HREF=".././FS/agent.html">the FS::agent manpage</A>) has an agent type. Agent types define which packages (see
+<A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>) may be purchased by customers (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>), via
+FS::type_pkgs records (see <A HREF=".././FS/type_pkgs.html">the FS::type_pkgs manpage</A>). FS::agent_type inherits from
+FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">typenum - primary key (assigned automatically for new agent types)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_atype_%2D_Text_name_of_this_agent_type">atype - Text name of this agent type</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new agent type. To add the agent type to the database, see
+<A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this agent type to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_pkgpart_hashref">pkgpart_hashref</A></STRONG><BR>
+<DD>
+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
+<A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>.
+<P></P>
+<DT><STRONG><A NAME="item_type_pkgs">type_pkgs</A></STRONG><BR>
+<DD>
+Returns all FS::type_pkgs objects (see <A HREF=".././FS/type_pkgs.html">the FS::type_pkgs manpage</A>) for this agent type.
+<P></P>
+<DT><STRONG><A NAME="item_pkgpart">pkgpart</A></STRONG><BR>
+<DD>
+Returns the pkgpart of all package definitions (see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>) for this
+agent type.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: agent_type.html,v 1.3 2001-04-23 12:40:30 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/agent.html">the FS::agent manpage</A>, <A HREF=".././FS/type_pkgs.html">the FS::type_pkgs manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>,
+<A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_bill.html b/htdocs/docs/man/FS/cust_bill.html
new file mode 100644
index 000000000..a59542c76
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_bill.html
@@ -0,0 +1,161 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_bill - Object methods for cust_bill records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_bill - Object methods for cust_bill records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_bill;</PRE>
+<PRE>
+ $record = new FS::cust_bill \%hash;
+ $record = new FS::cust_bill { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ ( $total_previous_balance, @previous_cust_bill ) = $record-&gt;previous;</PRE>
+<PRE>
+ @cust_bill_pkg_objects = $cust_bill-&gt;cust_bill_pkg;</PRE>
+<PRE>
+ ( $total_previous_credits, @previous_cust_credit ) = $record-&gt;cust_credit;</PRE>
+<PRE>
+ @cust_pay_objects = $cust_bill-&gt;cust_pay;</PRE>
+<PRE>
+ @lines = $cust_bill-&gt;print_text;
+ @lines = $cust_bill-&gt;print_text $time;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::cust_bill object represents an invoice; a declaration that a customer
+owes you money. The specific charges are itemized as <STRONG>cust_bill_pkg</STRONG> records
+(see <A HREF=".././FS/cust_bill_pkg.html">the FS::cust_bill_pkg manpage</A>). FS::cust_bill inherits from FS::Record. The
+following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">invnum - primary key (assigned automatically for new invoices)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_customer">custnum - customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item__date_%2D_specified_as_a_UNIX_timestamp%3B_see_per">_date - specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>. Also see
+<A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_charged_%2D_amount_of_this_invoice">charged - amount of this invoice</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_automatically">printed - how many times this invoice has been printed automatically
+(see <A HREF=".././FS/cust_main.html#collect">collect in the FS::cust_main manpage</A>).</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new invoice. To add the invoice to the database, see <A HREF="#insert">insert</A>.
+Invoices are normally created by calling the bill method of a customer object
+(see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this invoice to the database (``Posts'' the invoice). If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Currently unimplemented. I don't remove invoices because there would then be
+no record you ever posted this invoice (which is bad, no?)
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P>Only printed may be changed. printed is normally updated by calling the
+collect method of a customer object (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_previous">previous</A></STRONG><BR>
+<DD>
+Returns a list consisting of the total previous balance for this customer,
+followed by the previous outstanding invoices (as FS::cust_bill objects also).
+<P></P>
+<DT><STRONG><A NAME="item_cust_bill_pkg">cust_bill_pkg</A></STRONG><BR>
+<DD>
+Returns the line items (see <A HREF=".././FS/cust_bill_pkg.html">the FS::cust_bill_pkg manpage</A>) for this invoice.
+<P></P>
+<DT><STRONG><A NAME="item_cust_credit">cust_credit</A></STRONG><BR>
+<DD>
+Returns a list consisting of the total previous credited (see
+<A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) for this customer, followed by the previous outstanding
+credits (FS::cust_credit objects).
+<P></P>
+<DT><STRONG><A NAME="item_cust_pay">cust_pay</A></STRONG><BR>
+<DD>
+Returns all payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>) for this invoice.
+<P></P>
+<DT><STRONG><A NAME="item_owed">owed</A></STRONG><BR>
+<DD>
+Returns the amount owed (still outstanding) on this invoice, which is charged
+minus all payments (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_print_text_%5BTIME%5D%3B">print_text [TIME];</A></STRONG><BR>
+<DD>
+Returns an text invoice, as a list of lines.
+<P>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 <EM>perlfunc/``time''</EM>. Also see
+<A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</P>
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_bill.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The delete method.</P>
+<P>print_text formatting (and some logic :/) is in source, but needs to be
+slurped in from a file. Also number of lines ($=).</P>
+<P>missing print_ps for a nice postscript copy (maybe HylaFAX-cover-page-style
+or something similar so the look can be completely customized?)</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>, <A HREF=".././FS/cust_bill_pkg.html">the FS::cust_bill_pkg manpage</A>,
+<A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_bill_pkg.html b/htdocs/docs/man/FS/cust_bill_pkg.html
new file mode 100644
index 000000000..2cdd8952e
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_bill_pkg.html
@@ -0,0 +1,112 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_bill_pkg - Object methods for cust_bill_pkg records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_bill_pkg - Object methods for cust_bill_pkg records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_bill_pkg;</PRE>
+<PRE>
+ $record = new FS::cust_bill_pkg \%hash;
+ $record = new FS::cust_bill_pkg { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_invoice">invnum - invoice (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_package">pkgnum - package (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) or 0 for the special virtual sales tax package</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_setup_%2D_setup_fee">setup - setup fee</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_recur_%2D_recurring_fee">recur - recurring fee</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_sdate_%2D_starting_date_of_recurring_fee">sdate - starting date of recurring fee</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_edate_%2D_ending_date_of_recurring_fee">edate - ending date of recurring fee</A></STRONG><BR>
+<DD>
+</DL>
+<P>sdate and edate are specified as UNIX timestamps; see <EM>perlfunc/``time''</EM>. Also
+see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</P>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new line item. To add the line item to the database, see
+<A HREF="#insert">insert</A>. Line items are normally created by calling the bill method of a
+customer object (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this line item to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Currently unimplemented. I don't remove line items because there would then be
+no record the items ever existed (which is bad, no?)
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Currently unimplemented. This would be even more of an accounting nightmare
+than deleteing the items. Just don't do it.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_bill_pkg.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, schema.html
+from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_credit.html b/htdocs/docs/man/FS/cust_credit.html
new file mode 100644
index 000000000..f08424561
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_credit.html
@@ -0,0 +1,118 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_credit - Object methods for cust_credit records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_credit - Object methods for cust_credit records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_credit;</PRE>
+<PRE>
+ $record = new FS::cust_credit \%hash;
+ $record = new FS::cust_credit { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::cust_credit object represents a credit; the equivalent of a negative
+<STRONG>cust_bill</STRONG> record (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>). FS::cust_credit inherits from
+FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">crednum - primary key (assigned automatically for new credits)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_customer">custnum - customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_amount_%2D_amount_of_the_credit">amount - amount of the credit</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item__date_%2D_specified_as_a_UNIX_timestamp%3B_see_per">_date - specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>. Also see
+<A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_taker">otaker - order taker (assigned automatically, see <A HREF=".././FS/UID.html">the FS::UID manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_reason_%2D_text">reason - text</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new credit. To add the credit to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this credit to the database (``Posts'' the credit). If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Currently unimplemented.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Credits may not be modified; there would then be no record the credit was ever
+posted.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_cust_refund">cust_refund</A></STRONG><BR>
+<DD>
+Returns all refunds (see <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>) for this credit.
+<P></P>
+<DT><STRONG><A NAME="item_credited">credited</A></STRONG><BR>
+<DD>
+Returns the amount of this credit that is still outstanding; which is
+amount minus all refunds (see <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>).
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_credit.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The delete method.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_refund.html">the FS::cust_refund manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, schema.html from the base
+documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_main.html b/htdocs/docs/man/FS/cust_main.html
new file mode 100644
index 000000000..c5df1da12
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_main.html
@@ -0,0 +1,252 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_main - Object methods for cust_main records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_main - Object methods for cust_main records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_main;</PRE>
+<PRE>
+ $record = new FS::cust_main \%hash;
+ $record = new FS::cust_main { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ @cust_pkg = $record-&gt;all_pkgs;</PRE>
+<PRE>
+ @cust_pkg = $record-&gt;ncancelled_pkgs;</PRE>
+<PRE>
+ $error = $record-&gt;bill;
+ $error = $record-&gt;bill %options;
+ $error = $record-&gt;bill 'time' =&gt; $time;</PRE>
+<PRE>
+ $error = $record-&gt;collect;
+ $error = $record-&gt;collect %options;
+ $error = $record-&gt;collect 'invoice_time' =&gt; $time,
+ 'batch_card' =&gt; 'yes',
+ 'report_badcard' =&gt; 'yes',
+ ;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::cust_main object represents a customer. FS::cust_main inherits from
+FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">custnum - primary key (assigned automatically for new customers)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_agent">agentnum - agent (see <A HREF=".././FS/agent.html">the FS::agent manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_referral">refnum - referral (see <A HREF=".././FS/part_referral.html">the FS::part_referral manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_first_%2D_name">first - name</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_last_%2D_name">last - name</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_number">ss - social security number (optional)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_company_%2D_%28optional%29">company - (optional)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_address1">address1</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_address2_%2D_%28optional%29">address2 - (optional)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_city">city</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_county_%2D_%28optional%2C_see_FS%3A%3Acust_main_co">county - (optional, see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_state_%2D_%28see_FS%3A%3Acust_main_county%29">state - (see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_zip">zip</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_country_%2D_%28see_FS%3A%3Acust_main_county%29">country - (see <A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_phone">daytime - phone (optional)</A></STRONG><BR>
+<DD>
+<DT><STRONG>night - phone (optional)</STRONG><BR>
+<DD>
+<DT><STRONG>fax - phone (optional)</STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_payby_%2D_%60CARD%27_%28credit_cards%29%2C_%60BILL">payby - `CARD' (credit cards), `BILL' (billing), `COMP' (free), or `PREPAY' (special billing type: applies a credit - see <A HREF=".././FS/prepay_credit.html">the FS::prepay_credit manpage</A> and sets billing type to BILL)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_issuer">payinfo - card number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) or prepayment identifier (see <A HREF=".././FS/prepay_credit.html">the FS::prepay_credit manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_paydate_%2D_expiration_date%2C_mm%2Fyyyy%2C_m%2Fyy">paydate - expiration date, mm/yyyy, m/yyyy, mm/yy or m/yy</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_payname_%2D_name_on_card_or_billing_name">payname - name on card or billing name</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_tax_%2D_tax_exempt%2C_empty_or_%60Y%27">tax - tax exempt, empty or `Y'</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_taker">otaker - order taker (assigned automatically, see <A HREF=".././FS/UID.html">the FS::UID manpage</A>)</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new customer. To add the customer to the database, see <A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this customer to the database. If there is an error, returns the error,
+otherwise returns false.
+<P>There is a special insert mode in which you pass a data structure to the insert
+method containing FS::cust_pkg and FS::svc_<EM>tablename</EM> 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:</P>
+<PRE>
+ use Tie::RefHash;
+ tie %hash, 'Tie::RefHash'; #this part is important
+ %hash = {
+ $cust_pkg =&gt; [ $svc_acct ],
+ };
+ $cust_main-&gt;insert( \%hash );</PRE>
+<P></P>
+<DT><STRONG><A NAME="item_delete_NEW_CUSTNUM">delete NEW_CUSTNUM</A></STRONG><BR>
+<DD>
+This deletes the customer. If there is an error, returns the error, otherwise
+returns false.
+<P>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 <A HREF=".././FS/cust_pkg.html#cancel">cancel in the FS::cust_pkg manpage</A>).</P>
+<P>If the customer has any packages, you need to pass a new (valid) customer
+number for those packages to be transferred to.</P>
+<P>You can't delete a customer with invoices (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>),
+or credits (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_all_pkgs">all_pkgs</A></STRONG><BR>
+<DD>
+Returns all packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer.
+<P></P>
+<DT><STRONG><A NAME="item_ncancelled_pkgs">ncancelled_pkgs</A></STRONG><BR>
+<DD>
+Returns all non-cancelled packages (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) for this customer.
+<P></P>
+<DT><STRONG><A NAME="item_bill">bill OPTIONS</A></STRONG><BR>
+<DD>
+Generates invoices (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>) for this customer. Usually used in
+conjunction with the collect method.
+<P>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
+<EM>perlfunc/``time''</EM>). Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion
+functions.</P>
+<P>If there is an error, returns the error, otherwise returns false.</P>
+<P></P>
+<DT><STRONG><A NAME="item_collect">collect OPTIONS</A></STRONG><BR>
+<DD>
+(Attempt to) collect money for this customer's outstanding invoices (see
+<A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>). Usually used after the bill method.
+<P>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').</P>
+<P>If there is an error, returns the error, otherwise returns false.</P>
+<P>Currently available options are:</P>
+<P>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 <EM>perlfunc/``time''</EM>). Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A>
+for conversion functions.</P>
+<P>batch_card - Set this true to batch cards (see <A HREF=".././FS/cust_pay_batch.html">the cust_pay_batch manpage</A>). By
+default, cards are processed immediately, which will generate an error if
+CyberCash is not installed.</P>
+<P>report_badcard - Set this true if you want bad card transactions to
+return an error. By default, they don't.</P>
+<P></P>
+<DT><STRONG><A NAME="item_total_owed">total_owed</A></STRONG><BR>
+<DD>
+Returns the total owed for this customer on all invoices
+(see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_total_credited">total_credited</A></STRONG><BR>
+<DD>
+Returns the total credits (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>) for this customer.
+<P></P>
+<DT><STRONG><A NAME="item_balance">balance</A></STRONG><BR>
+<DD>
+Returns the balance for this customer (total owed minus total credited).
+<P></P>
+<DT><STRONG><A NAME="item_invoicing_list_%5B_ARRAYREF_%5D">invoicing_list [ ARRAYREF ]</A></STRONG><BR>
+<DD>
+If an arguement is given, sets these email addresses as invoice recipients
+(see <A HREF=".././FS/cust_main_invoice.html">the FS::cust_main_invoice manpage</A>). Errors are not fatal and are not reported
+(except as warnings), so use check_invoicing_list first.
+<P>Returns a list of email addresses (with svcnum entries expanded).</P>
+<P>Note: You can clear the invoicing list by passing an empty ARRAYREF. You can
+check it without disturbing anything by passing nothing.</P>
+<P>This interface may change in the future.</P>
+<P></P>
+<DT><STRONG><A NAME="item_check_invoicing_list_ARRAYREF">check_invoicing_list ARRAYREF</A></STRONG><BR>
+<DD>
+Checks these arguements as valid input for the invoicing_list method. If there
+is an error, returns the error, otherwise returns false.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_main.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The delete method.</P>
+<P>The delete method should possibly take an FS::cust_main object reference
+instead of a scalar customer number.</P>
+<P>Bill and collect options should probably be passed as references instead of a
+list.</P>
+<P>CyberCash v2 forces us to define some variables in package main.</P>
+<P>There should probably be a configuration file with a list of allowed credit
+card types.</P>
+<P>CyberCash is the only processor.</P>
+<P>No multiple currency support (probably a larger project than just this module).</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>
+<A HREF=".././FS/cust_pay_batch.html">the FS::cust_pay_batch manpage</A>, <A HREF=".././FS/agent.html">the FS::agent manpage</A>, <A HREF=".././FS/part_referral.html">the FS::part_referral manpage</A>,
+<A HREF=".././FS/cust_main_county.html">the FS::cust_main_county manpage</A>, <A HREF=".././FS/cust_main_invoice.html">the FS::cust_main_invoice manpage</A>,
+<A HREF=".././FS/UID.html">the FS::UID manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_main_county.html b/htdocs/docs/man/FS/cust_main_county.html
new file mode 100644
index 000000000..575eaedca
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_main_county.html
@@ -0,0 +1,106 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_main_county - Object methods for cust_main_county objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_main_county - Object methods for cust_main_county objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_main_county;</PRE>
+<PRE>
+ $record = new FS::cust_main_county \%hash;
+ $record = new FS::cust_main_county { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">taxnum - primary key (assigned automatically for new tax rates)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_state">state</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_county">county</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_country">country</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_tax_%2D_percentage">tax - percentage</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new tax rate. To add the tax rate to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this tax rate to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Deletes this tax rate from the database. If there is an error, returns the
+error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_main_county.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, schema.html from the base
+documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_main_invoice.html b/htdocs/docs/man/FS/cust_main_invoice.html
new file mode 100644
index 000000000..7a3719711
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_main_invoice.html
@@ -0,0 +1,111 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_main_invoice - Object methods for cust_main_invoice records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_main_invoice - Object methods for cust_main_invoice records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_main_invoice;</PRE>
+<PRE>
+ $record = new FS::cust_main_invoice \%hash;
+ $record = new FS::cust_main_invoice { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $email_address = $record-&gt;address;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::cust_main_invoice object represents an invoice destination. FS::cust_main_invoice inherits from
+FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_destnum_%2D_primary_key">destnum - primary key</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_customer">custnum - customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_svcnum">dest - Invoice destination: If numeric, a svcnum (see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>), if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist)</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new invoice destination. To add the invoice destination to the database, see <A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_checkdest">checkdest</A></STRONG><BR>
+<DD>
+Checks the dest field only.
+<P></P>
+<DT><STRONG><A NAME="item_address">address</A></STRONG><BR>
+<DD>
+Returns the literal email address for this record (or `POST').
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_main_invoice.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A></P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_pay.html b/htdocs/docs/man/FS/cust_pay.html
new file mode 100644
index 000000000..dc7b54c8d
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_pay.html
@@ -0,0 +1,108 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_pay - Object methods for cust_pay objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_pay - Object methods for cust_pay objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_pay;</PRE>
+<PRE>
+ $record = new FS::cust_pay \%hash;
+ $record = new FS::cust_pay { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">paynum - primary key (assigned automatically for new payments)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_Invoice">invnum - Invoice (see <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_paid_%2D_Amount_of_this_payment">paid - Amount of this payment</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item__date_%2D_specified_as_a_UNIX_timestamp%3B_see_per">_date - specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>. Also see
+<A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_payby_%2D_%60CARD%27_%28credit_cards%29%2C_%60BILL">payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_issuer">payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_paybatch_%2D_text_field_for_tracking_card_processi">paybatch - text field for tracking card processing</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new payment. To add the payment to the databse, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this payment to the databse, and updates the invoice (see
+<A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Currently unimplemented (accounting reasons).
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Currently unimplemented (accounting reasons).
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_pay.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>Delete and replace methods.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_bill.html">the FS::cust_bill manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_pay_batch.html b/htdocs/docs/man/FS/cust_pay_batch.html
new file mode 100644
index 000000000..b7637bc6d
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_pay_batch.html
@@ -0,0 +1,132 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_pay_batch - Object methods for batch cards</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_pay_batch - Object methods for batch cards</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_pay_batch;</PRE>
+<PRE>
+ $record = new FS::cust_pay_batch \%hash;
+ $record = new FS::cust_pay_batch { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_trancode_%2D_77_for_charges">trancode - 77 for charges</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_cardnum">cardnum</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_exp_%2D_card_expiration">exp - card expiration</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_amount">amount</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_invnum_%2D_invoice">invnum - invoice</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_custnum_%2D_customer">custnum - customer</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_payname_%2D_name_on_card">payname - name on card</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_first_%2D_name">first - name</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_last_%2D_name">last - name</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_address1">address1</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_address2">address2</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_city">city</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_state">state</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_zip">zip</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_country">country</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new record. To add the record to the database, see <A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+#inactive
+#
+#Replaces the OLD_RECORD with this one in the database. If there is an error,
+#returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_pay_batch.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>There should probably be a configuration file with a list of allowed credit
+card types.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/Record.html">the FS::Record manpage</A></P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_pkg.html b/htdocs/docs/man/FS/cust_pkg.html
new file mode 100644
index 000000000..19c8ff842
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_pkg.html
@@ -0,0 +1,205 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_pkg - Object methods for cust_pkg objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#subroutines">SUBROUTINES</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_pkg - Object methods for cust_pkg objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_pkg;</PRE>
+<PRE>
+ $record = new FS::cust_pkg \%hash;
+ $record = new FS::cust_pkg { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $error = $record-&gt;cancel;</PRE>
+<PRE>
+ $error = $record-&gt;suspend;</PRE>
+<PRE>
+ $error = $record-&gt;unsuspend;</PRE>
+<PRE>
+ $part_pkg = $record-&gt;part_pkg;</PRE>
+<PRE>
+ @labels = $record-&gt;labels;</PRE>
+<PRE>
+ $error = FS::cust_pkg::order( $custnum, \@pkgparts );
+ $error = FS::cust_pkg::order( $custnum, \@pkgparts, \@remove_pkgnums ] );</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::cust_pkg object represents a customer billing item. FS::cust_pkg
+inherits from FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">pkgnum - primary key (assigned automatically for new billing items)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_Customer">custnum - Customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_definition">pkgpart - Billing item definition (see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_setup_%2D_date">setup - date</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_bill_%2D_date">bill - date</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_susp_%2D_date">susp - date</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_expire_%2D_date">expire - date</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_cancel_%2D_date">cancel - date</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_taker">otaker - order taker (assigned automatically if null, see <A HREF=".././FS/UID.html">the FS::UID manpage</A>)</A></STRONG><BR>
+<DD>
+</DL>
+<P>Note: setup, bill, susp, expire and cancel are specified as UNIX timestamps;
+see <EM>perlfunc/``time''</EM>. Also see <A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for
+conversion functions.</P>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Create a new billing item. To add the item to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this billing item to the database (``Orders'' the item). If there is an
+error, returns the error, otherwise returns false.
+<P>sub insert {
+ my $self = shift;</P>
+<PRE>
+ # custnum might not have have been defined in sub check (for one-shot new
+ # customers), so check it here instead</PRE>
+<PRE>
+ my $error = $self-&gt;ut_number('custnum');
+ return $error if $error</PRE>
+<PRE>
+ return &quot;Unknown customer&quot;
+ unless qsearchs( 'cust_main', { 'custnum' =&gt; $self-&gt;custnum } );</PRE>
+<PRE>
+ $self-&gt;SUPER::insert;</PRE>
+<P>}</P>
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P>Currently, custnum, setup, bill, susp, expire, and cancel may be changed.</P>
+<P>Changing pkgpart may have disasterous effects. See the order subroutine.</P>
+<P>setup and bill are normally updated by calling the bill method of a customer
+object (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>).</P>
+<P>suspend is normally updated by the suspend and unsuspend methods.</P>
+<P>cancel is normally updated by the cancel method (and also the order subroutine
+in some cases).</P>
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
+<DD>
+Cancels and removes all services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A> and <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>)
+in this package, then cancels the package itself (sets the cancel field to
+now).
+<P>If there is an error, returns the error, otherwise returns false.</P>
+<P></P>
+<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
+<DD>
+Suspends all services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A> and <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>) in this
+package, then suspends the package itself (sets the susp field to now).
+<P>If there is an error, returns the error, otherwise returns false.</P>
+<P></P>
+<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
+<DD>
+Unsuspends all services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A> and <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>) in this
+package, then unsuspends the package itself (clears the susp field).
+<P>If there is an error, returns the error, otherwise returns false.</P>
+<P></P>
+<DT><STRONG><A NAME="item_part_pkg">part_pkg</A></STRONG><BR>
+<DD>
+Returns the definition for this billing item, as an FS::part_pkg object (see
+<A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_labels">labels</A></STRONG><BR>
+<DD>
+Returns a list of lists, calling the label method for all services
+(see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) of this billing item.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="subroutines">SUBROUTINES</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_order_CUSTNUM%2C_PKGPARTS_ARYREF%2C_%5B_REMOVE_PKG">order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF ]</A></STRONG><BR>
+<DD>
+CUSTNUM is a customer (see <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>)
+<P>PKGPARTS is a list of pkgparts specifying the the billing item definitions (see
+<A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>) to order for this customer. Duplicates are of course
+permitted.</P>
+<P>REMOVE_PKGNUMS is an optional list of pkgnums specifying the billing items to
+remove for this customer. The services (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) are moved to the
+new billing items. An error is returned if this is not possible (see
+<A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>).</P>
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_pkg.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>sub order is not OO. Perhaps it should be moved to FS::cust_main and made so?</P>
+<P>In sub order, the @pkgparts array (passed by reference) is clobbered.</P>
+<P>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.</P>
+<P>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.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>
+, <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>, schema.html from the base documentation</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_refund.html b/htdocs/docs/man/FS/cust_refund.html
new file mode 100644
index 000000000..8162c0b78
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_refund.html
@@ -0,0 +1,108 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_refund - Object method for cust_refund objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_refund - Object method for cust_refund objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_refund;</PRE>
+<PRE>
+ $record = new FS::cust_refund \%hash;
+ $record = new FS::cust_refund { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::cust_refund represents a refund: the transfer of money to a customer;
+equivalent to a negative payment (see <A HREF=".././FS/cust_pay.html">the FS::cust_pay manpage</A>). FS::cust_refund
+inherits from FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">refundnum - primary key (assigned automatically for new refunds)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_Credit">crednum - Credit (see <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_refund_%2D_Amount_of_the_refund">refund - Amount of the refund</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item__date_%2D_specified_as_a_UNIX_timestamp%3B_see_per">_date - specified as a UNIX timestamp; see <EM>perlfunc/``time''</EM>. Also see
+<A HREF="../Time/Local.html">the Time::Local manpage</A> and <A HREF="../Date/Parse.html">the Date::Parse manpage</A> for conversion functions.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_payby_%2D_%60CARD%27_%28credit_cards%29%2C_%60BILL">payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_issuer">payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_taker">otaker - order taker (assigned automatically, see <A HREF=".././FS/UID.html">the FS::UID manpage</A>)</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new refund. To add the refund to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this refund to the database, and updates the credit (see
+<A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Currently unimplemented (accounting reasons).
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Currently unimplemented (accounting reasons).
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_refund.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>Delete and replace methods.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_credit.html">the FS::cust_credit manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/cust_svc.html b/htdocs/docs/man/FS/cust_svc.html
new file mode 100644
index 000000000..19416d5b7
--- /dev/null
+++ b/htdocs/docs/man/FS/cust_svc.html
@@ -0,0 +1,118 @@
+<HTML>
+<HEAD>
+<TITLE>FS::cust_svc - Object method for cust_svc objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::cust_svc - Object method for cust_svc objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::cust_svc;</PRE>
+<PRE>
+ $record = new FS::cust_svc \%hash
+ $record = new FS::cust_svc { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ ($label, $value) = $record-&gt;label;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::cust_svc represents a service. FS::cust_svc inherits from FS::Record.
+The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatically for new services)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_Package">pkgnum - Package (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_definition">svcpart - Service definition (see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>)</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new service. To add the refund to the database, see <A HREF="#insert">insert</A>.
+Services are normally created by creating FS::svc_ objects (see
+<A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, and <A HREF=".././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A>, among others).
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this service to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Deletes this service from the database. If there is an error, returns the
+error, otherwise returns false.
+<P>Called by the cancel method of the package (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_label">label</A></STRONG><BR>
+<DD>
+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
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: cust_svc.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>Behaviour of changing the svcpart of cust_svc records is undefined and should
+possibly be prohibited, and pkg_svc records are not checked.</P>
+<P>pkg_svc records are not checked in general (here).</P>
+<P>Deleting this record doesn't check or delete the svc_* record associated
+with this record.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>,
+schema.html from the base documentation</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/dbdef.html b/htdocs/docs/man/FS/dbdef.html
new file mode 100644
index 000000000..a986ad95b
--- /dev/null
+++ b/htdocs/docs/man/FS/dbdef.html
@@ -0,0 +1,97 @@
+<HTML>
+<HEAD>
+<TITLE>FS::dbdef - Database objects</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
+ <LI><A HREF="#METHODS">METHODS</A>
+ <LI><A HREF="#BUGS">BUGS</A>
+ <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::dbdef - Database objects
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+<PRE> use FS::dbdef;
+</PRE>
+<P>
+<PRE> $dbdef = new FS::dbdef (@dbdef_table_objects);
+ $dbdef = load FS::dbdef &quot;filename&quot;;
+</PRE>
+<P>
+<PRE> $dbdef-&gt;save(&quot;filename&quot;);
+</PRE>
+<P>
+<PRE> $dbdef-&gt;addtable($dbdef_table_object);
+</PRE>
+<P>
+<PRE> @table_names = $dbdef-&gt;tables;
+</PRE>
+<P>
+<PRE> $FS_dbdef_table_object = $dbdef-&gt;table;
+</PRE>
+<P>
+<HR>
+<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
+<P>
+FS::dbdef objects are collections of FS::dbdef_table objects and represnt a
+database (a collection of tables).
+
+<P>
+<HR>
+<H1><A NAME="METHODS">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new TABLE, TABLE, ...</A></STRONG><DD>
+<P>
+Creates a new FS::dbdef object
+
+<DT><STRONG><A NAME="item_load">load FILENAME</A></STRONG><DD>
+<P>
+Loads an FS::dbdef object from a file.
+
+<DT><STRONG><A NAME="item_save">save FILENAME</A></STRONG><DD>
+<P>
+Saves an FS::dbdef object to a file.
+
+<DT><STRONG><A NAME="item_addtable">addtable TABLE</A></STRONG><DD>
+<P>
+Adds this FS::dbdef_table object.
+
+<DT><STRONG><A NAME="item_tables">tables</A></STRONG><DD>
+<P>
+Returns the names of all tables.
+
+<DT><STRONG><A NAME="item_table">table TABLENAME</A></STRONG><DD>
+<P>
+Returns the named FS::dbdef_table object.
+
+<H1><A NAME="BUGS">BUGS</A></H1>
+<P>
+Each FS::dbdef object should have a name which corresponds to its name
+within the SQL database engine.
+
+<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
+<P>
+<A HREF="../FS/dbdef_table.html">FS::dbdef_table</A>, <A HREF="../FS/Record.html">FS::Record</A>,
+
+</DL>
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/dbdef_colgroup.html b/htdocs/docs/man/FS/dbdef_colgroup.html
new file mode 100644
index 000000000..8b9e12baf
--- /dev/null
+++ b/htdocs/docs/man/FS/dbdef_colgroup.html
@@ -0,0 +1,86 @@
+<HTML>
+<HEAD>
+<TITLE>FS::dbdef_colgroup - Column group objects</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
+ <LI><A HREF="#METHODS">METHODS</A>
+ <LI><A HREF="#BUGS">BUGS</A>
+ <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::dbdef_colgroup - Column group objects
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+<PRE> use FS::dbdef_colgroup;
+</PRE>
+<P>
+<PRE> $colgroup = new FS::dbdef_colgroup ( $lol );
+ $colgroup = new FS::dbdef_colgroup (
+ [
+ [ 'single_column' ],
+ [ 'multiple_columns', 'another_column', ],
+ ]
+ );
+</PRE>
+<P>
+<PRE> @sql_lists = $colgroup-&gt;sql_list;
+</PRE>
+<P>
+<PRE> @singles = $colgroup-&gt;singles;
+</PRE>
+<P>
+<HR>
+<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
+<P>
+FS::dbdef_colgroup objects represent sets of sets of columns.
+
+<P>
+<HR>
+<H1><A NAME="METHODS">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new</A></STRONG><DD>
+<P>
+Creates a new FS::dbdef_colgroup object.
+
+<DT><STRONG><A NAME="item_sql_list">sql_list</A></STRONG><DD>
+<P>
+Returns a flat list of comma-separated values, for SQL statements.
+
+<DT><STRONG><A NAME="item_singles">singles</A></STRONG><DD>
+<P>
+Returns a flat list of all single item lists.
+
+</DL>
+<P>
+<HR>
+<H1><A NAME="BUGS">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
+<P>
+<A HREF="../FS/dbdef_table.html">FS::dbdef_table</A>, <A HREF="../FS/dbdef_unique.html">FS::dbdef_unique</A>, <A HREF="../FS/dbdef_index.html">FS::dbdef_index</A>,
+<A HREF="../FS/dbdef_column.html">FS::dbdef_column</A>, <A HREF="../FS/dbdef.html">FS::dbdef</A>, <EM>perldsc</EM>
+
+
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/dbdef_column.html b/htdocs/docs/man/FS/dbdef_column.html
new file mode 100644
index 000000000..6a5ebc3c1
--- /dev/null
+++ b/htdocs/docs/man/FS/dbdef_column.html
@@ -0,0 +1,118 @@
+<HTML>
+<HEAD>
+<TITLE>FS::dbdef_column - Column object</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
+ <LI><A HREF="#METHODS">METHODS</A>
+ <LI><A HREF="#BUGS">BUGS</A>
+ <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+ <LI><A HREF="#VERSION">VERSION</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::dbdef_column - Column object
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+<PRE> use FS::dbdef_column;
+</PRE>
+<P>
+<PRE> $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 );
+</PRE>
+<P>
+<PRE> $name = $column_object-&gt;name;
+ $column_object-&gt;name ( 'name' );
+</PRE>
+<P>
+<PRE> $name = $column_object-&gt;type;
+ $column_object-&gt;name ( 'sql_type' );
+</PRE>
+<P>
+<PRE> $name = $column_object-&gt;null;
+ $column_object-&gt;name ( 'NOT NULL' );
+</PRE>
+<P>
+<PRE> $name = $column_object-&gt;length;
+ $column_object-&gt;name ( $length );
+</PRE>
+<P>
+<PRE> $sql_line = $column-&gt;line;
+ $sql_line = $column-&gt;line $datasrc;
+</PRE>
+<P>
+<HR>
+<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
+<P>
+FS::dbdef::column objects represend columns in tables (see <A HREF="../FS/dbdef_table.html">FS::dbdef_table</A>).
+
+<P>
+<HR>
+<H1><A NAME="METHODS">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new</A></STRONG><DD>
+<P>
+Creates a new FS::dbdef_column object.
+
+<DT><STRONG><A NAME="item_name">name</A></STRONG><DD>
+<P>
+Returns or sets the column name.
+
+<DT><STRONG><A NAME="item_type">type</A></STRONG><DD>
+<P>
+Returns or sets the column type.
+
+<DT><STRONG><A NAME="item_null">null</A></STRONG><DD>
+<P>
+Returns or sets the column null flag.
+
+<DT><STRONG>type</STRONG><DD>
+<P>
+Returns or sets the column length.
+
+<DT><STRONG><A NAME="item_line">line [ $datasrc ]</A></STRONG><DD>
+<P>
+Returns an SQL column definition.
+
+<P>
+If passed a DBI <CODE>$datasrc</CODE> specifying <A HREF="../DBD/mysql.html">DBD::mysql</A> or <A HREF="../DBD/Pg.html">DBD::Pg</A>, will use engine-specific syntax.
+
+</DL>
+<P>
+<HR>
+<H1><A NAME="BUGS">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
+<P>
+<A HREF="../FS/dbdef_table.html">FS::dbdef_table</A>, <A HREF="../FS/dbdef.html">FS::dbdef</A>, <EM>DBI</EM>
+
+
+
+<P>
+<HR>
+<H1><A NAME="VERSION">VERSION</A></H1>
+<P>
+$Id: dbdef_column.html,v 1.2 2000-03-03 18:22:43 ivan Exp $
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/dbdef_index.html b/htdocs/docs/man/FS/dbdef_index.html
new file mode 100644
index 000000000..9d0d12a76
--- /dev/null
+++ b/htdocs/docs/man/FS/dbdef_index.html
@@ -0,0 +1,58 @@
+<HTML>
+<HEAD>
+<TITLE>FS::dbdef_unique.pm - Index object</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
+ <LI><A HREF="#BUGS">BUGS</A>
+ <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::dbdef_unique.pm - Index object
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+<PRE> use FS::dbdef_index;
+</PRE>
+<P>
+<PRE> # see FS::dbdef_colgroup methods
+</PRE>
+<P>
+<HR>
+<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
+<P>
+FS::dbdef_unique objects represent the (non-unique) indices of a table (<A HREF="../FS/dbdef_table.html">FS::dbdef_table</A>). FS::dbdef_unique inherits from FS::dbdef_colgroup.
+
+<P>
+<HR>
+<H1><A NAME="BUGS">BUGS</A></H1>
+<P>
+Is this empty subclass needed?
+
+<P>
+<HR>
+<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
+<P>
+<A HREF="../FS/dbdef_colgroup.html">FS::dbdef_colgroup</A>, <A HREF="../FS/dbdef_record.html">FS::dbdef_record</A>, <A HREF="../FS/Record.html">FS::Record</A>
+
+
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/dbdef_table.html b/htdocs/docs/man/FS/dbdef_table.html
new file mode 100644
index 000000000..a2442729f
--- /dev/null
+++ b/htdocs/docs/man/FS/dbdef_table.html
@@ -0,0 +1,144 @@
+<HTML>
+<HEAD>
+<TITLE>FS::dbdef_table - Table objects</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
+ <LI><A HREF="#METHODS">METHODS</A>
+ <LI><A HREF="#BUGS">BUGS</A>
+ <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+ <LI><A HREF="#VERSION">VERSION</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::dbdef_table - Table objects
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+<PRE> use FS::dbdef_table;
+</PRE>
+<P>
+<PRE> $dbdef_table = new FS::dbdef_table (
+ &quot;table_name&quot;,
+ &quot;primary_key&quot;,
+ $FS_dbdef_unique_object,
+ $FS_dbdef_index_object,
+ @FS_dbdef_column_objects,
+ );
+</PRE>
+<P>
+<PRE> $dbdef_table-&gt;addcolumn ( $FS_dbdef_column_object );
+</PRE>
+<P>
+<PRE> $table_name = $dbdef_table-&gt;name;
+ $dbdef_table-&gt;name (&quot;table_name&quot;);
+</PRE>
+<P>
+<PRE> $table_name = $dbdef_table-&gt;primary_keye;
+ $dbdef_table-&gt;primary_key (&quot;primary_key&quot;);
+</PRE>
+<P>
+<PRE> $FS_dbdef_unique_object = $dbdef_table-&gt;unique;
+ $dbdef_table-&gt;unique ( $FS_dbdef_unique_object );
+</PRE>
+<P>
+<PRE> $FS_dbdef_index_object = $dbdef_table-&gt;index;
+ $dbdef_table-&gt;index ( $FS_dbdef_index_object );
+</PRE>
+<P>
+<PRE> @column_names = $dbdef-&gt;columns;
+</PRE>
+<P>
+<PRE> $FS_dbdef_column_object = $dbdef-&gt;column;
+</PRE>
+<P>
+<PRE> @sql_statements = $dbdef-&gt;sql_create_table;
+ @sql_statements = $dbdef-&gt;sql_create_table $datasrc;
+</PRE>
+<P>
+<HR>
+<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
+<P>
+FS::dbdef_table objects represent a single database table.
+
+<P>
+<HR>
+<H1><A NAME="METHODS">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new</A></STRONG><DD>
+<P>
+Creates a new FS::dbdef_table object.
+
+<DT><STRONG><A NAME="item_addcolumn">addcolumn</A></STRONG><DD>
+<P>
+Adds this FS::dbdef_column object.
+
+<DT><STRONG><A NAME="item_name">name</A></STRONG><DD>
+<P>
+Returns or sets the table name.
+
+<DT><STRONG><A NAME="item_primary_key">primary_key</A></STRONG><DD>
+<P>
+Returns or sets the primary key.
+
+<DT><STRONG><A NAME="item_unique">unique</A></STRONG><DD>
+<P>
+Returns or sets the FS::dbdef_unique object.
+
+<DT><STRONG><A NAME="item_index">index</A></STRONG><DD>
+<P>
+Returns or sets the FS::dbdef_index object.
+
+<DT><STRONG><A NAME="item_columns">columns</A></STRONG><DD>
+<P>
+Returns a list consisting of the names of all columns.
+
+<DT><STRONG><A NAME="item_column">column &quot;column&quot;</A></STRONG><DD>
+<P>
+Returns the column object (see <A HREF="../FS/dbdef_column.html">FS::dbdef_column</A>) for ``column''.
+
+<DT><STRONG><A NAME="item_sql_create_table">sql_create_table [ $datasrc ]</A></STRONG><DD>
+<P>
+Returns an array of SQL statments to create this table.
+
+<P>
+If passed a DBI <CODE>$datasrc</CODE> specifying <A HREF="../DBD/mysql.html">DBD::mysql</A>, will use MySQL-specific syntax. Non-standard syntax for other engines (if
+applicable) may also be supported in the future.
+
+</DL>
+<P>
+<HR>
+<H1><A NAME="BUGS">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
+<P>
+<A HREF="../FS/dbdef.html">FS::dbdef</A>, <A HREF="../FS/dbdef_unique.html">FS::dbdef_unique</A>, <A HREF="../FS/dbdef_index.html">FS::dbdef_index</A>, <A HREF="../FS/dbdef_unique.html">FS::dbdef_unique</A>,
+<EM>DBI</EM>
+
+
+
+<P>
+<HR>
+<H1><A NAME="VERSION">VERSION</A></H1>
+<P>
+$Id: dbdef_table.html,v 1.2 2000-03-03 18:22:43 ivan Exp $
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/dbdef_unique.html b/htdocs/docs/man/FS/dbdef_unique.html
new file mode 100644
index 000000000..201f3aa61
--- /dev/null
+++ b/htdocs/docs/man/FS/dbdef_unique.html
@@ -0,0 +1,58 @@
+<HTML>
+<HEAD>
+<TITLE>FS::dbdef_unique.pm - Unique object</TITLE>
+<LINK REV="made" HREF="mailto:none">
+</HEAD>
+
+<BODY>
+
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#NAME">NAME</A>
+ <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
+ <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
+ <LI><A HREF="#BUGS">BUGS</A>
+ <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="NAME">NAME</A></H1>
+<P>
+FS::dbdef_unique.pm - Unique object
+
+<P>
+<HR>
+<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
+<P>
+<PRE> use FS::dbdef_unique;
+</PRE>
+<P>
+<PRE> # see FS::dbdef_colgroup methods
+</PRE>
+<P>
+<HR>
+<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
+<P>
+FS::dbdef_unique objects represent the unique indices of a database table (<A HREF="../FS/dbdef_table.html">FS::dbdef_table</A>). FS::dbdef_unique inherits from FS::dbdef_colgroup.
+
+<P>
+<HR>
+<H1><A NAME="BUGS">BUGS</A></H1>
+<P>
+Is this empty subclass needed?
+
+<P>
+<HR>
+<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
+<P>
+<A HREF="../FS/dbdef_colgroup.html">FS::dbdef_colgroup</A>, <A HREF="../FS/dbdef_record.html">FS::dbdef_record</A>, <A HREF="../FS/Record.html">FS::Record</A>
+
+
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/domain_record.html b/htdocs/docs/man/FS/domain_record.html
new file mode 100644
index 000000000..78601b4d0
--- /dev/null
+++ b/htdocs/docs/man/FS/domain_record.html
@@ -0,0 +1,122 @@
+<HTML>
+<HEAD>
+<TITLE>FS::domain_record - Object methods for domain_record records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+ <LI><A HREF="#history">HISTORY</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::domain_record - Object methods for domain_record records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::domain_record;</PRE>
+<PRE>
+ $record = new FS::domain_record \%hash;
+ $record = new FS::domain_record { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_recnum_%2D_primary_key">recnum - primary key</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_Domain">svcnum - Domain (see <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>) of this entry</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_partial">reczone - partial (or full) zone for this entry</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_recaf_%2D_address_family_for_this_entry%2C_current">recaf - address family for this entry, currently only `IN' is recognized.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_entry">rectype - record type for this entry (A, MX, etc.)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_recdata_%2D_data_for_this_entry">recdata - data for this entry</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new entry. To add the example to the database, see <A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: domain_record.html,v 1.1 2001-04-23 12:41:57 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>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. :)</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>
+<P>
+<HR>
+<H1><A NAME="history">HISTORY</A></H1>
+<P>$Log: domain_record.html,v $
+<P>Revision 1.1 2001-04-23 12:41:57 ivan
+<P>new API documentation
+<P>
+Revision 1.1 2000/02/03 05:16:52 ivan
+beginning of DNS and Apache support</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/nas.html b/htdocs/docs/man/FS/nas.html
new file mode 100644
index 000000000..db704c777
--- /dev/null
+++ b/htdocs/docs/man/FS/nas.html
@@ -0,0 +1,117 @@
+<HTML>
+<HEAD>
+<TITLE>FS::nas - Object methods for nas records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::nas - Object methods for nas records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::nas;</PRE>
+<PRE>
+ $record = new FS::nas \%hash;
+ $record = new FS::nas {
+ 'nasnum' =&gt; 1,
+ 'nasip' =&gt; '10.4.20.23',
+ 'nasfqdn' =&gt; 'box1.brc.nv.us.example.net',
+ };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $error = $record-&gt;heartbeat($timestamp);</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_nasnum_%2D_primary_key">nasnum - primary key</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_nas_%2D_NAS_name">nas - NAS name</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_nasip_%2D_NAS_ip_address">nasip - NAS ip address</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_nasfqdn_%2D_NAS_fully%2Dqualified_domain_name">nasfqdn - NAS fully-qualified domain name</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_state">last - timestamp indicating the last instant the NAS was in a known
+ state (used by the session monitoring).</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new NAS. To add the NAS to the database, see <A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_heartbeat">heartbeat TIMESTAMP</A></STRONG><BR>
+<DD>
+Updates the timestamp for this nas
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: nas.html,v 1.1 2001-04-23 12:41:57 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/part_pkg.html b/htdocs/docs/man/FS/part_pkg.html
new file mode 100644
index 000000000..4bf46742e
--- /dev/null
+++ b/htdocs/docs/man/FS/part_pkg.html
@@ -0,0 +1,138 @@
+<HTML>
+<HEAD>
+<TITLE>FS::part_pkg - Object methods for part_pkg objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::part_pkg - Object methods for part_pkg objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::part_pkg;</PRE>
+<PRE>
+ $record = new FS::part_pkg \%hash
+ $record = new FS::part_pkg { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $custom_record = $template_record-&gt;clone;</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ @pkg_svc = $record-&gt;pkg_svc;</PRE>
+<PRE>
+ $svcnum = $record-&gt;svcpart;
+ $svcnum = $record-&gt;svcpart( 'svc_acct' );</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::part_pkg object represents a billing item definition. FS::part_pkg
+inherits from FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">pkgpart - primary key (assigned automatically for new billing item definitions)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_definition">pkg - Text name of this billing item definition (customer-viewable)</A></STRONG><BR>
+<DD>
+<DT><STRONG>comment - Text name of this billing item definition (non-customer-viewable)</STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_setup_%2D_Setup_fee">setup - Setup fee</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_freq_%2D_Frequency_of_recurring_fee">freq - Frequency of recurring fee</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_recur_%2D_Recurring_fee">recur - Recurring fee</A></STRONG><BR>
+<DD>
+</DL>
+<P>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.</P>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new billing item definition. To add the billing item definition to
+the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_clone">clone</A></STRONG><BR>
+<DD>
+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
+<A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this billing item definition to the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Currently unimplemented.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_pkg_svc">pkg_svc</A></STRONG><BR>
+<DD>
+Returns all FS::pkg_svc objects (see <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>) for this package
+definition (with non-zero quantity).
+<P></P>
+<DT><STRONG><A NAME="item_svcpart_%5B_SVCDB_%5D">svcpart [ SVCDB ]</A></STRONG><BR>
+<DD>
+Returns the svcpart of a single service definition (see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>)
+associated with this billing item definition (see <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>). 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,
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: part_pkg.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The delete method is unimplemented.</P>
+<P>setup and recur semantics are not yet defined (and are implemented in
+FS::cust_bill. hmm.).</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF=".././FS/type_pkgs.html">the FS::type_pkgs manpage</A>, <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>, <EM>Safe</EM>.
+schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/part_referral.html b/htdocs/docs/man/FS/part_referral.html
new file mode 100644
index 000000000..61f49de04
--- /dev/null
+++ b/htdocs/docs/man/FS/part_referral.html
@@ -0,0 +1,100 @@
+<HTML>
+<HEAD>
+<TITLE>FS::part_referral - Object methods for part_referral objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::part_referral - Object methods for part_referral objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::part_referral;</PRE>
+<PRE>
+ $record = new FS::part_referral \%hash
+ $record = new FS::part_referral { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">refnum - primary key (assigned automatically for new referrals)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_referral_%2D_Text_name_of_this_referral">referral - Text name of this referral</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new referral. To add the referral to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this referral to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Currently unimplemented.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: part_referral.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The delete method is unimplemented.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_main.html">the FS::cust_main manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/part_svc.html b/htdocs/docs/man/FS/part_svc.html
new file mode 100644
index 000000000..d5a521f5c
--- /dev/null
+++ b/htdocs/docs/man/FS/part_svc.html
@@ -0,0 +1,110 @@
+<HTML>
+<HEAD>
+<TITLE>FS::part_svc - Object methods for part_svc objects</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::part_svc - Object methods for part_svc objects</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::part_svc;</PRE>
+<PRE>
+ $record = new FS::part_referral \%hash
+ $record = new FS::part_referral { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::part_svc represents a service definition. FS::part_svc inherits from
+FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">svcpart - primary key (assigned automatically for new service definitions)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_svc_%2D_text_name_of_this_service_definition">svc - text name of this service definition</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_svcdb_%2D_table_used_for_this_service%2E_See_FS%3A">svcdb - table used for this service. See <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>,
+<A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, and <A HREF=".././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A>, among others.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_svcdb__field_%2D_Default_or_fixed_value_for_field_"><EM>svcdb</EM>__<EM>field</EM> - Default or fixed value for <EM>field</EM> in <EM>svcdb</EM>.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_svcdb__field_flag_%2D_defines_svcdb__field_action%"><EM>svcdb</EM>__<EM>field</EM>_flag - defines <EM>svcdb</EM>__<EM>field</EM> action: null, `D' for default, or `F' for fixed</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new service definition. To add the service definition to the
+database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this service definition to the database. If there is an error, returns
+the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Currently unimplemented.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: part_svc.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>Delete is unimplemented.</P>
+<P>The list of svc_* tables is hardcoded. When svc_acct_pop is renamed, this
+should be fixed.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>, <A HREF=".././FS/pkg_svc.html">the FS::pkg_svc manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>,
+<A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_acct_sm.html">the FS::svc_acct_sm manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, schema.html from the
+base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/pkg_svc.html b/htdocs/docs/man/FS/pkg_svc.html
new file mode 100644
index 000000000..31592d4bd
--- /dev/null
+++ b/htdocs/docs/man/FS/pkg_svc.html
@@ -0,0 +1,115 @@
+<HTML>
+<HEAD>
+<TITLE>FS::pkg_svc - Object methods for pkg_svc records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::pkg_svc - Object methods for pkg_svc records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::pkg_svc;</PRE>
+<PRE>
+ $record = new FS::pkg_svc \%hash;
+ $record = new FS::pkg_svc { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $part_pkg = $record-&gt;part_pkg;</PRE>
+<PRE>
+ $part_svc = $record-&gt;part_svc;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::pkg_svc record links a billing item definition (see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>) to
+a service definition (see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>). FS::pkg_svc inherits from
+FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_definition">pkgpart - Billing item definition (see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG>svcpart - Service definition (see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>)</STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_quantity_%2D_Quantity_of_this_service_definition_t">quantity - Quantity of this service definition that this billing item
+definition includes</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Create a new record. To add the record to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Deletes this record from the database. If there is an error, returns the
+error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_part_pkg">part_pkg</A></STRONG><BR>
+<DD>
+Returns the FS::part_pkg object (see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_part_svc">part_svc</A></STRONG><BR>
+<DD>
+Returns the FS::part_svc object (see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>).
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: pkg_svc.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, schema.html from the base
+documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/port.html b/htdocs/docs/man/FS/port.html
new file mode 100644
index 000000000..b747f0ca3
--- /dev/null
+++ b/htdocs/docs/man/FS/port.html
@@ -0,0 +1,120 @@
+<HTML>
+<HEAD>
+<TITLE>FS::port - Object methods for port records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::port - Object methods for port records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::port;</PRE>
+<PRE>
+ $record = new FS::port \%hash;
+ $record = new FS::port { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $session = $port-&gt;session;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::port object represents an individual port on a NAS. FS::port inherits
+from FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_portnum_%2D_primary_key">portnum - primary key</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_ip_%2D_IP_address_of_this_port">ip - IP address of this port</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_nasport_%2D_port_number_on_the_NAS">nasport - port number on the NAS</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_nasnum_%2D_NAS_this_port_is_on_%2D_see_FS%3A%3Anas">nasnum - NAS this port is on - see <A HREF=".././FS/nas.html">the FS::nas manpage</A></A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new port. To add the example to the database, see <A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_session">session</A></STRONG><BR>
+<DD>
+Returns the currently open session on this port, or if no session is currently
+open, the most recent session. See <A HREF=".././FS/session.html">the FS::session manpage</A>.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: port.html,v 1.1 2001-04-23 12:41:57 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The author forgot to customize this manpage.</P>
+<P>The session method won't deal well if you have multiple open sessions on a
+port, for example if your RADIUS server drops <STRONG>stop</STRONG> 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.</P>
+<P>If you think the above refers multiple user logins you need to read the
+manpages again.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/prepay_credit.html b/htdocs/docs/man/FS/prepay_credit.html
new file mode 100644
index 000000000..699b1c16f
--- /dev/null
+++ b/htdocs/docs/man/FS/prepay_credit.html
@@ -0,0 +1,118 @@
+<HTML>
+<HEAD>
+<TITLE>FS::prepay_credit - Object methods for prepay_credit records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+ <LI><A HREF="#history">HISTORY</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::prepay_credit - Object methods for prepay_credit records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::prepay_credit;</PRE>
+<PRE>
+ $record = new FS::prepay_credit \%hash;
+ $record = new FS::prepay_credit {
+ 'identifier' =&gt; '4198123455512121'
+ 'amount' =&gt; '19.95',
+ };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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:</P>
+<DL>
+<DT><STRONG><A NAME="item_field_%2D_description">field - description</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_identifier_%2D_identifier_entered_by_the_user_to_r">identifier - identifier entered by the user to receive the credit</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_amount_%2D_amount_of_the_credit">amount - amount of the credit</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new pre-paid credit. To add the example to the database, see
+<A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: prepay_credit.html,v 1.1 2001-04-23 12:41:57 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>
+<P>
+<HR>
+<H1><A NAME="history">HISTORY</A></H1>
+<P>$Log: prepay_credit.html,v $
+<P>Revision 1.1 2001-04-23 12:41:57 ivan
+<P>new API documentation
+<P>
+Revision 1.2 2000/02/02 20:22:18 ivan
+bugfix prepayment in signup server</P>
+<P>Revision 1.1 2000/01/31 05:22:23 ivan
+prepaid ``internet cards''</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/session.html b/htdocs/docs/man/FS/session.html
new file mode 100644
index 000000000..c714337be
--- /dev/null
+++ b/htdocs/docs/man/FS/session.html
@@ -0,0 +1,129 @@
+<HTML>
+<HEAD>
+<TITLE>FS::session - Object methods for session records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::session - Object methods for session records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::session;</PRE>
+<PRE>
+ $record = new FS::session \%hash;
+ $record = new FS::session {
+ 'portnum' =&gt; 1,
+ 'svcnum' =&gt; 2,
+ 'login' =&gt; $timestamp,
+ 'logout' =&gt; $timestamp,
+ };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $error = $record-&gt;nas_heartbeat($timestamp);</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::session object represents an user login session. FS::session inherits
+from FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_sessionnum_%2D_primary_key">sessionnum - primary key</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_portnum_%2D_NAS_port_for_this_session_%2D_see_FS%3">portnum - NAS port for this session - see <A HREF=".././FS/port.html">the FS::port manpage</A></A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_svcnum_%2D_User_for_this_session_%2D_see_FS%3A%3As">svcnum - User for this session - see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A></A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_login_%2D_timestamp_indicating_the_beginning_of_th">login - timestamp indicating the beginning of this user session.</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_logout_%2D_timestamp_indicating_the_end_of_this_us">logout - timestamp indicating the end of this user session. May be null,
+ which indicates a currently open session.</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new session. To add the session to the database, see <A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P>
+<DT><STRONG><A NAME="item_nas_heartbeat">nas_heartbeat</A></STRONG><BR>
+<DD>
+Heartbeats the nas associated with this session (see <A HREF=".././FS/nas.html">the FS::nas manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_svc_acct">svc_acct</A></STRONG><BR>
+<DD>
+Returns the svc_acct record associated with this session (see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>).
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: session.html,v 1.1 2001-04-23 12:41:57 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>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*</P>
+<P>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).</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/svc_Common.html b/htdocs/docs/man/FS/svc_Common.html
new file mode 100644
index 000000000..7ce9ff36a
--- /dev/null
+++ b/htdocs/docs/man/FS/svc_Common.html
@@ -0,0 +1,94 @@
+<HTML>
+<HEAD>
+<TITLE>FS::svc_Common - Object method for all svc_ records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::svc_Common - Object method for all svc_ records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<P>use FS::svc_Common;</P>
+<P>@ISA = qw( FS::svc_Common );</P>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>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.</P>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P>The additional fields pkgnum and svcpart (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) should be
+defined. An FS::cust_svc record will be created and inserted.</P>
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Deletes this account from the database. If there is an error, returns the
+error, otherwise returns false.
+<P>The corresponding FS::cust_svc record will be deleted as well.</P>
+<P></P>
+<DT><STRONG><A NAME="item_setfixed">setfixed</A></STRONG><BR>
+<DD>
+Sets any fixed fields for this service (see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>). If there is an
+error, returns the error, otherwise returns the FS::part_svc object (use <CODE>ref()</CODE>
+to test the return). Usually called by the check method.
+<P></P>
+<DT><STRONG><A NAME="item_setdefault">setdefault</A></STRONG><BR>
+<DD>
+Sets all fields to their defaults (see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>), overriding their
+current values. If there is an error, returns the error, otherwise returns
+the FS::part_svc object (use <CODE>ref()</CODE> to test the return).
+<P></P>
+<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
+<DD>
+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 <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: svc_Common.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The setfixed method return value.</P>
+<P>The new method should set defaults from part_svc (like the check method
+sets fixed values)?</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, schema.html
+from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/svc_acct.html b/htdocs/docs/man/FS/svc_acct.html
new file mode 100644
index 000000000..524fe3324
--- /dev/null
+++ b/htdocs/docs/man/FS/svc_acct.html
@@ -0,0 +1,219 @@
+<HTML>
+<HEAD>
+<TITLE>FS::svc_acct - Object methods for svc_acct records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::svc_acct - Object methods for svc_acct records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::svc_acct;</PRE>
+<PRE>
+ $record = new FS::svc_acct \%hash;
+ $record = new FS::svc_acct { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $error = $record-&gt;suspend;</PRE>
+<PRE>
+ $error = $record-&gt;unsuspend;</PRE>
+<PRE>
+ $error = $record-&gt;cancel;</PRE>
+<PRE>
+ %hash = $record-&gt;radius;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::svc_acct object represents an account. FS::svc_acct inherits from
+FS::svc_Common. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatcially for new accounts)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_username">username</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item__password_%2D_generated_if_blank">_password - generated if blank</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_presence">popnum - Point of presence (see <A HREF=".././FS/svc_acct_pop.html">the FS::svc_acct_pop manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_uid">uid</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_gid">gid</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_finger_%2D_GECOS">finger - GECOS</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_blank">dir - set automatically if blank (and uid is not)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_shell">shell</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_quota_%2D_%28unimplementd%29">quota - (unimplementd)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_slipip_%2D_IP_address">slipip - IP address</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_radius_Radius_Attribute_%2D_Radius%2DAttribute">radius_<EM>Radius_Attribute</EM> - <EM>Radius-Attribute</EM></A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new account. To add the account to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this account to the database. If there is an error, returns the error,
+otherwise returns false.
+<P>The additional fields pkgnum and svcpart (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) should be
+defined. An FS::cust_svc record will be created and inserted.</P>
+<P>If the configuration value (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) shellmachine exists, and the
+username, uid, and dir fields are defined, the <CODE>command(s)</CODE> 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,</P>
+<PRE>
+ useradd -d $dir -m -s $shell -u $uid $username</PRE>
+<P>is the default. If the shellmachine-useradd configuration file exists but
+it empty,</P>
+<PRE>
+ cp -pr /etc/skel $dir; chown -R $uid.$gid $dir</PRE>
+<P>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.</P>
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Deletes this account from the database. If there is an error, returns the
+error, otherwise returns false.
+<P>The corresponding FS::cust_svc record will be deleted as well.</P>
+<P>If the configuration value (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) shellmachine exists, the
+<CODE>command(s)</CODE> 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,</P>
+<PRE>
+ userdel $username</PRE>
+<P>is the default. If the shellmachine-userdel configuration file exists but
+is empty,</P>
+<PRE>
+ rm -rf $dir</PRE>
+<P>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.</P>
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P>If the configuration value (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) shellmachine exists, and the
+dir field has changed, the <CODE>command(s)</CODE> 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, :</P>
+<PRE>
+ [ -d $old_dir ] &amp;&amp; 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
+ )</PRE>
+<P>is executed on shellmachine via ssh. This behaviour can be surpressed by
+setting $FS::svc_acct::nossh_hack true.</P>
+<P></P>
+<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
+<DD>
+Suspends this account by prefixing *SUSPENDED* to the password. If there is an
+error, returns the error, otherwise returns false.
+<P>Called by the suspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
+<DD>
+Unsuspends this account by removing *SUSPENDED* from the password. If there is
+an error, returns the error, otherwise returns false.
+<P>Called by the unsuspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
+<DD>
+Just returns false (no error) for now.
+<P>Called by the cancel method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P>Sets any fixed values; see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>.</P>
+<P></P>
+<DT><STRONG><A NAME="item_radius">radius</A></STRONG><BR>
+<DD>
+Depriciated, use radius_reply instead.
+<P></P>
+<DT><STRONG><A NAME="item_radius_reply">radius_reply</A></STRONG><BR>
+<DD>
+Returns key/value pairs, suitable for assigning to a hash, for any RADIUS
+reply attributes of this record.
+<P>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.</P>
+<P></P>
+<DT><STRONG><A NAME="item_radius_check">radius_check</A></STRONG><BR>
+<DD>
+Returns key/value pairs, suitable for assigning to a hash, for any RADIUS
+check attributes of this record.
+<P>Accessing RADIUS attributes directly is not supported and will break in the
+future.</P>
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: svc_acct.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The bits which ssh should fork before doing so (or maybe queue jobs for a
+daemon).</P>
+<P>The $recref stuff in sub check should be cleaned up.</P>
+<P>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.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/svc_Common.html">the FS::svc_Common manpage</A>, <A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>,
+<A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF="../Net/SSH.html">the Net::SSH manpage</A>, <EM>ssh</EM>, <A HREF=".././FS/svc_acct_pop.html">the FS::svc_acct_pop manpage</A>,
+schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/svc_acct_pop.html b/htdocs/docs/man/FS/svc_acct_pop.html
new file mode 100644
index 000000000..e8c6f35d5
--- /dev/null
+++ b/htdocs/docs/man/FS/svc_acct_pop.html
@@ -0,0 +1,107 @@
+<HTML>
+<HEAD>
+<TITLE>FS::svc_acct_pop - Object methods for svc_acct_pop records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::svc_acct_pop - Object methods for svc_acct_pop records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::svc_acct_pop;</PRE>
+<PRE>
+ $record = new FS::svc_acct_pop \%hash;
+ $record = new FS::svc_acct_pop { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::svc_acct object represents an point of presence. FS::svc_acct_pop
+inherits from FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">popnum - primary key (assigned automatically for new accounts)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_city">city</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_state">state</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_ac_%2D_area_code">ac - area code</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_exch_%2D_exchange">exch - exchange</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_loc_%2D_rest_of_number">loc - rest of number</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new point of presence (if only it were that easy!). To add the
+point of presence to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this point of presence to the database. If there is an error, returns the
+error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Removes this point of presence from the database.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: svc_acct_pop.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>It should be renamed to part_pop.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/svc_acct.html">the svc_acct manpage</A>, schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/svc_acct_sm.html b/htdocs/docs/man/FS/svc_acct_sm.html
new file mode 100644
index 000000000..1f513536d
--- /dev/null
+++ b/htdocs/docs/man/FS/svc_acct_sm.html
@@ -0,0 +1,141 @@
+<HTML>
+<HEAD>
+<TITLE>FS::svc_acct_sm - Object methods for svc_acct_sm records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::svc_acct_sm - Object methods for svc_acct_sm records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::svc_acct_sm;</PRE>
+<PRE>
+ $record = new FS::svc_acct_sm \%hash;
+ $record = new FS::svc_acct_sm { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $error = $record-&gt;suspend;</PRE>
+<PRE>
+ $error = $record-&gt;unsuspend;</PRE>
+<PRE>
+ $error = $record-&gt;cancel;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::svc_acct object represents a virtual mail alias. FS::svc_acct inherits
+from FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatcially for new accounts)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_domain">domsvc - svcnum of the virtual domain (see <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_account">domuid - uid of the target account (see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_domuser_%2D_virtual_username">domuser - virtual username</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new virtual mail alias. To add the virtual mail alias to the
+database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this virtual mail alias to the database. If there is an error, returns
+the error, otherwise returns false.
+<P>The additional fields pkgnum and svcpart (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) should be
+defined. An FS::cust_svc record will be created and inserted.</P>
+<P>If the configuration values (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) shellmachine and qmailmachines
+exist, and domuser is `*' (meaning a catch-all mailbox), the command:</P>
+<PRE>
+ [ -e $dir/.qmail-$qdomain-default ] || {
+ touch $dir/.qmail-$qdomain-default;
+ chown $uid:$gid $dir/.qmail-$qdomain-default;
+ }</PRE>
+<P>is executed on shellmachine via ssh (see <EM>dot-qmail/``EXTENSION ADDRESSES''</EM>).
+This behaviour can be surpressed by setting $FS::svc_acct_sm::nossh_hack true.</P>
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Deletes this virtual mail alias from the database. If there is an error,
+returns the error, otherwise returns false.
+<P>The corresponding FS::cust_svc record will be deleted as well.</P>
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
+<DD>
+Just returns false (no error) for now.
+<P>Called by the suspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
+<DD>
+Just returns false (no error) for now.
+<P>Called by the unsuspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
+<DD>
+Just returns false (no error) for now.
+<P>Called by the cancel method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P>Sets any fixed values; see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>.</P>
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: svc_acct_sm.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>The remote commands should be configurable.</P>
+<P>The $recref stuff in sub check should be cleaned up.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>, <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>,
+<A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>, <A HREF=".././FS/svc_domain.html">the FS::svc_domain manpage</A>, <A HREF="../Net/SSH.html">the Net::SSH manpage</A>, <EM>ssh</EM>, <EM>dot-qmail</EM>,
+schema.html from the base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/svc_domain.html b/htdocs/docs/man/FS/svc_domain.html
new file mode 100644
index 000000000..5c75ab221
--- /dev/null
+++ b/htdocs/docs/man/FS/svc_domain.html
@@ -0,0 +1,162 @@
+<HTML>
+<HEAD>
+<TITLE>FS::svc_domain - Object methods for svc_domain records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::svc_domain - Object methods for svc_domain records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::svc_domain;</PRE>
+<PRE>
+ $record = new FS::svc_domain \%hash;
+ $record = new FS::svc_domain { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $error = $record-&gt;suspend;</PRE>
+<PRE>
+ $error = $record-&gt;unsuspend;</PRE>
+<PRE>
+ $error = $record-&gt;cancel;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::svc_domain object represents a domain. FS::svc_domain inherits from
+FS::svc_Common. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_key">svcnum - primary key (assigned automatically for new accounts)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_domain">domain</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new domain. To add the domain to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this domain to the database. If there is an error, returns the error,
+otherwise returns false.
+<P>The additional fields <EM>pkgnum</EM> and <EM>svcpart</EM> (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) should be
+defined. An FS::cust_svc record will be created and inserted.</P>
+<P>The additional field <EM>action</EM> should be set to <EM>N</EM> for new domains or <EM>M</EM>
+for transfers.</P>
+<P>A registration or transfer email will be submitted unless
+$FS::svc_domain::whois_hack is true.</P>
+<P>The additional field <EM>email</EM> can be used to manually set the admin contact
+email address on this email. Otherwise, the svc_acct records for this package
+(see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>) are searched. If there is exactly one svc_acct record
+in the same package, it is automatically used. Otherwise an error is returned.</P>
+<P>If any <EM>soamachine</EM> configuration file exists, an SOA record is added to
+the domain_record table (see &lt;FS::domain_record&gt;).</P>
+<P>If any machines are defined in the <EM>nsmachines</EM> configuration file, NS
+records are added to the domain_record table (see <A HREF=".././FS/domain_record.html">the FS::domain_record manpage</A>).</P>
+<P>If any machines are defined in the <EM>mxmachines</EM> configuration file, MX
+records are added to the domain_record table (see <A HREF=".././FS/domain_record.html">the FS::domain_record manpage</A>).</P>
+<P>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.</P>
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Deletes this domain from the database. If there is an error, returns the
+error, otherwise returns false.
+<P>The corresponding FS::cust_svc record will be deleted as well.</P>
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
+<DD>
+Just returns false (no error) for now.
+<P>Called by the suspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
+<DD>
+Just returns false (no error) for now.
+<P>Called by the unsuspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
+<DD>
+Just returns false (no error) for now.
+<P>Called by the cancel method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).</P>
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P>Sets any fixed values; see <A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>.</P>
+<P></P>
+<DT><STRONG><A NAME="item_whois">whois</A></STRONG><BR>
+<DD>
+Returns the Net::Whois::Domain object (see <A HREF="../Net/Whois.html">the Net::Whois manpage</A>) for this domain, or
+undef if the domain is not found in whois.
+<P>(If $FS::svc_domain::whois_hack is true, returns that in all cases instead.)</P>
+<P></P>
+<DT><STRONG><A NAME="item__whois">_whois</A></STRONG><BR>
+<DD>
+Depriciated.
+<P></P>
+<DT><STRONG><A NAME="item_submit_internic">submit_internic</A></STRONG><BR>
+<DD>
+Submits a registration email for this domain.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: svc_domain.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>All BIND/DNS fields should be included (and exported).</P>
+<P>Delete doesn't send a registration template.</P>
+<P>All registries should be supported.</P>
+<P>Should change action to a real field.</P>
+<P>The $recref stuff in sub check should be cleaned up.</P>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/svc_Common.html">the FS::svc_Common manpage</A>, <A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>,
+<A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, <A HREF="../Net/Whois.html">the Net::Whois manpage</A>, <EM>ssh</EM>,
+<EM>dot-qmail</EM>, schema.html from the base documentation, config.html from the
+base documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/svc_www.html b/htdocs/docs/man/FS/svc_www.html
new file mode 100644
index 000000000..8f3a99a64
--- /dev/null
+++ b/htdocs/docs/man/FS/svc_www.html
@@ -0,0 +1,150 @@
+<HTML>
+<HEAD>
+<TITLE>FS::svc_www - Object methods for svc_www records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+ <LI><A HREF="#history">HISTORY</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::svc_www - Object methods for svc_www records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::svc_www;</PRE>
+<PRE>
+ $record = new FS::svc_www \%hash;
+ $record = new FS::svc_www { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<PRE>
+ $error = $record-&gt;suspend;</PRE>
+<PRE>
+ $error = $record-&gt;unsuspend;</PRE>
+<PRE>
+ $error = $record-&gt;cancel;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::svc_www object represents an web virtual host. FS::svc_www inherits
+from FS::svc_Common. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_svcnum_%2D_primary_key">svcnum - primary key</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_recnum_%2D_DNS_%60A%27_record_corresponding_to_thi">recnum - DNS `A' record corresponding to this web virtual host. (see <A HREF=".././FS/domain_record.html">the FS::domain_record manpage</A>)</A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_account">usersvc - account (see <A HREF=".././FS/svc_acct.html">the FS::svc_acct manpage</A>) corresponding to this web virtual host.</A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Creates a new web virtual host. To add the record to the database, see
+<A HREF="#insert">insert</A>.
+<P>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 <EM>hash</EM> method.</P>
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P>The additional fields pkgnum and svcpart (see <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>) should be
+defined. An FS::cust_svc record will be created and inserted.</P>
+<P>If the configuration values (see <A HREF=".././FS/Conf.html">the FS::Conf manpage</A>) <EM>apachemachine</EM>, and
+<EM>apacheroot</EM> exist, the command:</P>
+<PRE>
+ mkdir $apacheroot/$zone;
+ chown $username $apacheroot/$zone;
+ ln -s $apacheroot/$zone $homedir/$zone</PRE>
+<P><EM>$zone</EM> is the DNS A record pointed to by <EM>recnum</EM>
+<EM>$username</EM> is the username pointed to by <EM>usersvc</EM>
+<EM>$homedir</EM> is that user's home directory</P>
+<P>is executed on <EM>apachemachine</EM> via ssh. This behaviour can be surpressed by
+setting $FS::svc_www::nossh_hack true.</P>
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Delete this record from the database.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_suspend">suspend</A></STRONG><BR>
+<DD>
+Called by the suspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_unsuspend">unsuspend</A></STRONG><BR>
+<DD>
+Called by the unsuspend method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_cancel">cancel</A></STRONG><BR>
+<DD>
+Called by the cancel method of FS::cust_pkg (see <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>).
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: svc_www.html,v 1.1 2001-04-23 12:41:57 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/svc_Common.html">the FS::svc_Common manpage</A>, <A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/domain_record.html">the FS::domain_record manpage</A>, <A HREF=".././FS/cust_svc.html">the FS::cust_svc manpage</A>,
+<A HREF=".././FS/part_svc.html">the FS::part_svc manpage</A>, <A HREF=".././FS/cust_pkg.html">the FS::cust_pkg manpage</A>, schema.html from the base documentation.</P>
+<P>
+<HR>
+<H1><A NAME="history">HISTORY</A></H1>
+<P>$Log: svc_www.html,v $
+<P>Revision 1.1 2001-04-23 12:41:57 ivan
+<P>new API documentation
+<P>
+Revision 1.4 2001/04/22 01:56:15 ivan
+get rid of FS::SSH.pm (became Net::SSH and Net::SCP on CPAN)</P>
+<P>Revision 1.3 2000/11/22 23:30:51 ivan
+tyop</P>
+<P>Revision 1.2 2000/03/01 08:13:59 ivan
+compilation bugfixes</P>
+<P>Revision 1.1 2000/02/03 05:16:52 ivan
+beginning of DNS and Apache support</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/FS/type_pkgs.html b/htdocs/docs/man/FS/type_pkgs.html
new file mode 100644
index 000000000..30b052b81
--- /dev/null
+++ b/htdocs/docs/man/FS/type_pkgs.html
@@ -0,0 +1,100 @@
+<HTML>
+<HEAD>
+<TITLE>FS::type_pkgs - Object methods for type_pkgs records</TITLE>
+<LINK REV="made" HREF="mailto:perl@packages.debian.org">
+</HEAD>
+
+<BODY>
+
+<A NAME="__index__"></A>
+<!-- INDEX BEGIN -->
+
+<UL>
+
+ <LI><A HREF="#name">NAME</A></LI>
+ <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
+ <LI><A HREF="#description">DESCRIPTION</A></LI>
+ <LI><A HREF="#methods">METHODS</A></LI>
+ <LI><A HREF="#version">VERSION</A></LI>
+ <LI><A HREF="#bugs">BUGS</A></LI>
+ <LI><A HREF="#see also">SEE ALSO</A></LI>
+</UL>
+<!-- INDEX END -->
+
+<HR>
+<P>
+<H1><A NAME="name">NAME</A></H1>
+<P>FS::type_pkgs - Object methods for type_pkgs records</P>
+<P>
+<HR>
+<H1><A NAME="synopsis">SYNOPSIS</A></H1>
+<PRE>
+ use FS::type_pkgs;</PRE>
+<PRE>
+ $record = new FS::type_pkgs \%hash;
+ $record = new FS::type_pkgs { 'column' =&gt; 'value' };</PRE>
+<PRE>
+ $error = $record-&gt;insert;</PRE>
+<PRE>
+ $error = $new_record-&gt;replace($old_record);</PRE>
+<PRE>
+ $error = $record-&gt;delete;</PRE>
+<PRE>
+ $error = $record-&gt;check;</PRE>
+<P>
+<HR>
+<H1><A NAME="description">DESCRIPTION</A></H1>
+<P>An FS::type_pkgs record links an agent type (see <A HREF=".././FS/agent_type.html">the FS::agent_type manpage</A>) to a
+billing item definition (see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A>). FS::type_pkgs inherits from
+FS::Record. The following fields are currently supported:</P>
+<DL>
+<DT><STRONG><A NAME="item_typenum_%2D_Agent_type%2C_see_FS%3A%3Aagent_type">typenum - Agent type, see <A HREF=".././FS/agent_type.html">the FS::agent_type manpage</A></A></STRONG><BR>
+<DD>
+<DT><STRONG><A NAME="item_pkgpart_%2D_Billing_item_definition%2C_see_FS%3A%3">pkgpart - Billing item definition, see <A HREF=".././FS/part_pkg.html">the FS::part_pkg manpage</A></A></STRONG><BR>
+<DD>
+</DL>
+<P>
+<HR>
+<H1><A NAME="methods">METHODS</A></H1>
+<DL>
+<DT><STRONG><A NAME="item_new">new HASHREF</A></STRONG><BR>
+<DD>
+Create a new record. To add the record to the database, see <A HREF="#insert">insert</A>.
+<P></P>
+<DT><STRONG><A NAME="item_insert">insert</A></STRONG><BR>
+<DD>
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
+<DD>
+Deletes this record from the database. If there is an error, returns the
+error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_replace_OLD_RECORD">replace OLD_RECORD</A></STRONG><BR>
+<DD>
+Replaces OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+<P></P>
+<DT><STRONG><A NAME="item_check">check</A></STRONG><BR>
+<DD>
+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.
+<P></P></DL>
+<P>
+<HR>
+<H1><A NAME="version">VERSION</A></H1>
+<P>$Id: type_pkgs.html,v 1.3 2001-04-23 12:40:31 ivan Exp $</P>
+<P>
+<HR>
+<H1><A NAME="bugs">BUGS</A></H1>
+<P>
+<HR>
+<H1><A NAME="see also">SEE ALSO</A></H1>
+<P><A HREF=".././FS/Record.html">the FS::Record manpage</A>, <A HREF=".././FS/agent_type.html">the FS::agent_type manpage</A>, <A HREF="../FS/part_pkgs.html">the FS::part_pkgs manpage</A>, schema.html from the base
+documentation.</P>
+
+</BODY>
+
+</HTML>
diff --git a/htdocs/docs/man/Invoice.txt b/htdocs/docs/man/Invoice.txt
deleted file mode 100644
index 17953d51d..000000000
--- a/htdocs/docs/man/Invoice.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-NAME
- FS::Invoice - Legacy stub
-
-SYNOPSIS
- The functioanlity of FS::invoice has been integrated in
- FS::cust_bill.
-
-HISTORY
- ivan@voicenet.com 97-jun-25 - 27
-
- maybe should be changed to be OO-functions on $cust_bill
- objects? (instead of passing invnum, ugh).
-
- ISA cust_bill and return inovice instead of passing filehandle
- ivan@sisd.com 98-mar-13 (add postscript output!)
-
- close our kid when we're done ivan@sisd.com 98-jun-4
-
- separated code which shuffled data from code which formatted.
- (so i could) fixed past due notices showing up when balance due
- =< 0 return address comes from /var/spool/freeside/conf/address
- ivan@sisd.com 98-jul-2
-
diff --git a/htdocs/docs/man/Record.txt b/htdocs/docs/man/Record.txt
deleted file mode 100644
index 0accb65d1..000000000
--- a/htdocs/docs/man/Record.txt
+++ /dev/null
@@ -1,332 +0,0 @@
-NAME
- FS::Record - Database record objects
-
-SYNOPSIS
- use FS::Record;
- use FS::Record qw(dbh fields hfields 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->add;
-
- $error = $record->del;
-
- $error = $new_record->rep($old_record);
-
- $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';
-
-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.
-
-METHODS
- new TABLE, HASHREF
- Creates a new record. It doesn't store it in the database,
- though. See the section on "add" 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.
-
- qsearch TABLE, HASHREF
- Searches the database for all records matching (at least)
- the key/value pairs in HASHREF. Returns all the records
- found as FS::Record objects.
-
- qsearchs TABLE, HASHREF
- Searches the database for a record matching (at least) the
- key/value pairs in HASHREF, and returns the record found as
- an FS::Record object. 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.
-
- 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.
-
- add Adds this record to the database. If there is an error, returns
- the error, otherwise returns false.
-
- del Delete this record from the database. If there is an error,
- returns the error, otherwise returns false.
-
- rep OLD_RECORD
- Replace the OLD_RECORD with this one in the database. If
- there is an error, returns the error, otherwise returns
- false.
-
- 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 FS::dbdef_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
- Check/untaint phone numbers. May be null. If there is an
- error, returns the error, otherwise returns false.
-
- ut_anything COLUMN
- Untaints arbitrary data. Be careful.
-
-SUBROUTINES
- reload_dbdef([FILENAME])
- Load a database definition (see the FS::dbdef manpage),
- optionally from a non-default filename. This command is
- executed at startup unless *$FS::Record::setup_hack* is
- true. Returns a FS::dbdef 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 the section
- on "quote" in the DBI manpage) unless VALUE is a number
- and the column type (see the 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.
-
- fields TABLE
- This returns a list of the columns in this record's
- table (See the dbdef_table manpage).
-
-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 with 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.
-
-SEE ALSO
- the FS::dbdef manpage, the FS::UID manpage, the DBI manpage
-
- Adapter::DBI from Ch. 11 of Advanced Perl Programming by
- Sriram Srinivasan.
-
-HISTORY
- ivan@voicenet.com 97-jun-2 - 9, 19, 25, 27, 30
-
- DBI version ivan@sisd.com 97-nov-8 - 12
-
- cleaned up, added autoloaded $self->any_field calls, moved
- DBI login stuff to FS::UID ivan@sisd.com 97-nov-21-23
-
- since AUTO_INCREMENT is MySQL specific, use my own unique
- number generator (again) ivan@sisd.com 97-dec-4
-
- untaint $user in unique (web demo hack...bah) make unique
- skip multiple-field unique's from dbdef ivan@sisd.com 97-
- dec-11
-
- merge with FS::Search, which after all was just alternate
- constructors for FS::Record objects. Makes lots of things
- cleaner. :) ivan@sisd.com 97-dec-13
-
- use FS::dbdef::primary key in replace searches, hopefully
- for all practical purposes the string/number problem in SQL
- statements should be gone? (SQL bites) ivan@sisd.com 98-jan-
- 20
-
- Put all SQL statments in $statment before we $sth=$dbh-
- >prepare( them, for debugging reasons (warn $statement)
- ivan@sisd.com 98-feb-19
-
- (sigh)... use dbdef type (char, etc.) instead of a regex to
- decide what to quote in _quote (more sillines...) SQL bites.
- ivan@sisd.com 98-feb-20
-
- more friendly error messages ivan@sisd.com 98-mar-13
-
- Added import of datasrc from FS::UID to allow Pg6.3 to work
- Added code to right-trim strings read from Pg6.3 databases
- Modified 'add' to only insert fields that actually have data
- Added ut_float to handle floating point numbers (for sales
- tax). Pg6.3 does not have a "SHOW FIELDS" statement, so I
- faked it 8). bmccane@maxbaud.net 98-apr-3
-
- commented out Pg wrapper around `` Modified 'add' to only
- insert fields that actually have data '' ivan@sisd.com 98-
- apr-16
-
- dbdef usage changes ivan@sisd.com 98-jun-1
-
- sub fields now asks dbdef, not database ivan@sisd.com 98-
- jun-2
-
- added debugging method ->_dump ivan@sisd.com 98-jun-16
-
- use FS::dbdef::primary key in delete searches as well as
- replace searches (SQL still bites) ivan@sisd.com 98-jun-22
-
- sub dbdef_table ivan@sisd.com 98-jun-28
-
- removed Pg wrapper around `` Modified 'add' to only insert
- fields that actually have data '' ivan@sisd.com 98-jul-14
-
- sub fields croaks on errors ivan@sisd.com 98-jul-17
-
- $rc eq '0E0' doesn't mean we couldn't delete for all rdbmss
- ivan@sisd.com 98-jul-18
-
- commented out code to right-trim strings read from Pg6.3
- databases; ChopBlanks is in UID.pm ivan@sisd.com 98-aug-16
-
- added code (with Pg wrapper) to deal with Pg money fields
- ivan@sisd.com 98-aug-18
-
- added pod documentation ivan@sisd.com 98-sep-6
-
diff --git a/htdocs/docs/man/SSH.txt b/htdocs/docs/man/SSH.txt
deleted file mode 100644
index b6d205b55..000000000
--- a/htdocs/docs/man/SSH.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-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
- the ssh manpage, the scp manpage, the IPC::Open2 manpage,
- the IPC::Open3 manpage
-
-HISTORY
- ivan@voicenet.com 97-jul-17
-
- added sshopen2 and sshopen3 ivan@sisd.com 98-mar-9
-
- added iscp ivan@sisd.com 98-jul-25 now iscp asks y/n, issh
- and took out path ivan@sisd.com 98-jul-30
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/UID.txt b/htdocs/docs/man/UID.txt
deleted file mode 100644
index bf9f6b4bd..000000000
--- a/htdocs/docs/man/UID.txt
+++ /dev/null
@@ -1,79 +0,0 @@
-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;
-
- $cgi = new CGI::Base;
- $cgi->get;
- $dbh = cgisuidsetup($cgi);
-
- $dbh = dbh;
-
- $datasrc = datasrc;
-
-DESCRIPTION
- Provides a hodgepodge of subroutines.
-
-SUBROUTINES
- adminsuidsetup
- 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. Returns the DBI
- database handle (usually you don't need this).
-
- dbh Returns the DBI database handle.
-
- datasrc
- Returns the DBI data source.
-
- getotaker
- Returns the current Freeside user. Currently that means the
- CGI REMOTE_USER, or 'freeside'.
-
- 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.
-
-BUGS
- Not OO.
-
- No capabilities yet. When mod_perl and Authen::DBI are
- implemented, cgisuidsetup will go away as well.
-
-SEE ALSO
- the FS::Record manpage, the CGI::Base manpage, the DBI manpage
-
-HISTORY
- ivan@voicenet.com 97-jun-4 - 9 untaint otaker ivan@voicenet.com
- 97-jul-7
-
- generalize and auto-get uid (getotaker still needs to be db'ed)
- ivan@sisd.com 97-nov-10
-
- &cgisuidsetup logs into database. other cleaning. ivan@sisd.com
- 97-nov-22,23
-
- &adminsuidsetup logs into database with otaker='freeside' (for
- automated tasks like billing) ivan@sisd.com 97-dec-13
-
- added sub datasrc for fs-setup ivan@sisd.com 98-feb-21
-
- datasrc, user and pass now come from conf/secrets ivan@sisd.com
- 98-jun-28
-
- added ChopBlanks to DBI call (see man DBI) ivan@sisd.com 98-aug-
- 16
-
- pod, use FS::Conf, implemented cgisuidsetup as adminsuidsetup,
- inlined suidsetup ivan@sisd.com 98-sep-12
-
diff --git a/htdocs/docs/man/agent.txt b/htdocs/docs/man/agent.txt
deleted file mode 100644
index b0317f6f7..000000000
--- a/htdocs/docs/man/agent.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-NAME
- FS::agent - Object methods for agent records
-
-SYNOPSIS
- use FS::agent;
-
- $record = create FS::agent \%hash;
- $record = create FS::agent { 'column' => 'value' };
-
- $error = $record->insert;
-
- $error = $new_record->replace($old_record);
-
- $error = $record->delete;
-
- $error = $record->check;
-
-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
- create HASHREF
- Creates a new agent. To add the agent to the database, see
- the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
-SEE ALSO
- the FS::Record manpage, the FS::agent_type manpage, the
- FS::cust_main manpage, schema.html from the base documentation.
-
-HISTORY
- Class dealing with agent (resellers)
-
- ivan@sisd.com 97-nov-13, 97-dec-10
-
- pod, added check in ->delete ivan@sisd.com 98-sep-22
-
diff --git a/htdocs/docs/man/agent_type.txt b/htdocs/docs/man/agent_type.txt
deleted file mode 100644
index ea1edec0c..000000000
--- a/htdocs/docs/man/agent_type.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-NAME
- FS::agent_type - Object methods for agent_type records
-
-SYNOPSIS
- use FS::agent_type;
-
- $record = create FS::agent_type \%hash;
- $record = create FS::agent_type { 'column' => 'value' };
-
- $error = $record->insert;
-
- $error = $new_record->replace($old_record);
-
- $error = $record->delete;
-
- $error = $record->check;
-
-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
- create HASHREF
- Creates a new agent type. To add the agent type to the
- database, see the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
-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.
-
-HISTORY
- Class for the different sets of allowable packages you can
- assign to an agent.
-
- ivan@sisd.com 97-nov-13
-
- ut_ FS::Record methods ivan@sisd.com 97-dec-10
-
- Changed 'type' to 'atype' because Pg6.3 reserves the type word
- bmccane@maxbaud.net 98-apr-3
-
- pod, added check in delete ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/cust_bill.txt b/htdocs/docs/man/cust_bill.txt
deleted file mode 100644
index 9762dd3ca..000000000
--- a/htdocs/docs/man/cust_bill.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-NAME
- FS::cust_bill - Object methods for cust_bill records
-
-SYNOPSIS
- use FS::cust_bill;
-
- $record = create FS::cust_bill \%hash;
- $record = create 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. 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 the section on "time" in the perlfunc manpage. Also see
- the Time::Local manpage and the Date::Parse manpage for conversion functions.
- charged - amount of this invoice
- owed - amount still outstanding on this invoice, which is charged minus
- all payments (see the FS::cust_pay manpage).
- printed - how many times this invoice has been printed automatically
- (see the section on "collect" in the FS::cust_main manpage).
-METHODS
- create HASHREF
- Creates a new invoice. To add the invoice to the database,
- see the section on "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.
-
- When adding new invoices, owed must be charged (or null, in
- which case it is automatically set to charged).
-
- 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 owed and printed may be changed. Owed is normally
- updated by creating and inserting a payment (see the
- FS::cust_pay manpage). 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.
-
- print_text [TIME];
- Returns an ASCII 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 the section on "time" in the perlfunc
- manpage. Also see the Time::Local manpage and the
- Date::Parse manpage for conversion functions.
-
-BUGS
- The delete method.
-
- It doesn't properly override FS::Record yet.
-
- print_text formatting (and some logic :/) is in source as a
- format declaration, which needs to be slurped in from a file.
- the fork is rather kludgy as well. It could be cleaned with
- swrite from man perlform, and the picture could be put in a
- /var/spool/freeside/conf 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?)
-
- There is an off-by-one error in print_text which causes a visual
- error: "Page 1 of 2" printed on some single-page invoices?
-
-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.
-
-HISTORY
- ivan@voicenet.com 97-jul-1
-
- small fix for new API ivan@sisd.com 98-mar-14
-
- charges can be negative ivan@sisd.com 98-jul-13
-
- pod, ingegrate with FS::Invoice ivan@sisd.com 98-sep-20
-
diff --git a/htdocs/docs/man/cust_bill_pkg.txt b/htdocs/docs/man/cust_bill_pkg.txt
deleted file mode 100644
index 1ca4b8cca..000000000
--- a/htdocs/docs/man/cust_bill_pkg.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-NAME
- FS::cust_bill_pkg - Object methods for cust_bill_pkg records
-
-SYNOPSIS
- use FS::cust_bill_pkg;
-
- $record = create FS::cust_bill_pkg \%hash;
- $record = create 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)
- 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 the
- section on "time" in the perlfunc manpage. Also see the
- Time::Local manpage and the Date::Parse manpage for conversion
- functions.
-
-METHODS
- create HASHREF
- Creates a new line item. To add the line item to the
- database, see the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
-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.
-
-HISTORY
- ivan@sisd.com 98-mar-13
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/cust_credit.txt b/htdocs/docs/man/cust_credit.txt
deleted file mode 100644
index 84591ee81..000000000
--- a/htdocs/docs/man/cust_credit.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-NAME
- FS::cust_credit - Object methods for cust_credit records
-
-SYNOPSIS
- use FS::cust_credit;
-
- $record = create FS::cust_credit \%hash;
- $record = create 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. 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
- credited - how much of this credit that is still outstanding, which is
- amount minus all refunds (see the FS::cust_refund manpage).
- _date - specified as a UNIX timestamp; see the section on "time" in the perlfunc manpage. 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
- create HASHREF
- Creates a new credit. To add the credit to the database, see
- the section on "insert".
-
- insert
- Adds this credit to the database ("Posts" the credit). If
- there is an error, returns the error, otherwise returns
- false.
-
- When adding new invoices, credited must be amount (or null,
- in which case it is automatically set to amount).
-
- delete
- Currently unimplemented.
-
- 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 credited may be changed. Credited is normally updated
- by creating and inserting a refund (see the FS::cust_refund
- manpage).
-
- 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.
-
-BUGS
- The delete method.
-
- It doesn't properly override FS::Record yet.
-
-SEE ALSO
- the FS::Record manpage, the FS::cust_refund manpage, the
- FS::cust_bill manpage, schema.html from the base documentation.
-
-HISTORY
- ivan@sisd.com 98-mar-17
-
- pod, otaker from FS::UID ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/cust_main.txt b/htdocs/docs/man/cust_main.txt
deleted file mode 100644
index df7848744..000000000
--- a/htdocs/docs/man/cust_main.txt
+++ /dev/null
@@ -1,200 +0,0 @@
-NAME
- FS::cust_main - Object methods for cust_main records
-
-SYNOPSIS
- use FS::cust_main;
-
- $record = create FS::cust_main \%hash;
- $record = create 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)
- payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free)
- payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username)
- 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
- create HASHREF
- Creates a new customer. To add the customer to the database,
- see the section on "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.
-
- delete
- Currently unimplemented. Maybe cancel all of this customer's
- packages (cust_pkg)?
-
- I don't remove the customer record in the database because
- there would then be no record the customer ever existed
- (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.
-
- 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 the section on "time" in the perlfunc
- manpage). 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 the section on
- "time" in the perlfunc manpage). 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).
-
-BUGS
- The delete method.
-
- It doesn't properly override FS::Record yet.
-
- hfields should be removed.
-
- 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.
-
-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::UID manpage, schema.html from the base documentation.
-
-HISTORY
- ivan@voicenet.com 97-jul-28
-
- Changed to standard Business::CreditCard no more TableUtil
- EXPORT_OK FS::Record's hfields removed unique calls and locking
- (not needed here now) wrapped the (now) optional fields in if
- statements in sub check (notyetdone!) ivan@sisd.com 97-nov-12
-
- updated paydate with SQL-type date info ivan@sisd.com 98-mar-5
-
- Added export of datasrc from UID.pm for Pg6.3 changed 'day' to
- 'daytime' because Pg6.3 reserves the day word
- bmccane@maxbaud.net 98-apr-3
-
- in ->create, s/svc_acct/cust_main/, now it should actually
- eliminate the warnings it was meant to ivan@sisd.com 98-jul-16
-
- don't require a phone number and allow '/' in company names
- ivan@sisd.com 98-jul-18
-
- use ut_ and rewrite &check, &*_pkgs ivan@sisd.com 98-sep-5
-
- pod, merge with FS::Bill (about time!), total_owed,
- total_credited and balance methods, cleaned collect method,
- source modifications no longer necessary to enable cybercash,
- cybercash v3 support, don't need to import
- FS::UID::{datasrc,checkruid} ivan@sisd.com 98-sep-19-21
-
diff --git a/htdocs/docs/man/cust_main_county.txt b/htdocs/docs/man/cust_main_county.txt
deleted file mode 100644
index 8e99397cc..000000000
--- a/htdocs/docs/man/cust_main_county.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-NAME
- FS::cust_main_county - Object methods for cust_main_county
- objects
-
-SYNOPSIS
- use FS::cust_main_county;
-
- $record = create FS::cust_main_county \%hash;
- $record = create 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
- tax - percentage
-METHODS
- create HASHREF
- Creates a new tax rate. To add the tax rate to the database,
- see the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- A country field (and possibly a currency field) should be added.
-
-SEE ALSO
- the FS::Record manpage, the FS::cust_main manpage, the
- FS::cust_bill manpage, schema.html from the base documentation.
-
-HISTORY
- ivan@voicenet.com 97-dec-16
-
- Changed check for 'tax' to use the new ut_float subroutine
- bmccane@maxbaud.net 98-apr-3
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/cust_pay.txt b/htdocs/docs/man/cust_pay.txt
deleted file mode 100644
index 9f28d0822..000000000
--- a/htdocs/docs/man/cust_pay.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-NAME
- FS::cust_pay - Object methods for cust_pay objects
-
-SYNOPSIS
- use FS::cust_pay;
-
- $record = create FS::cust_pay \%hash;
- $record = create 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. 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 the section on "time" in the perlfunc manpage. 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
- create HASHREF
- Creates a new payment. To add the payment to the databse,
- see the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- Delete and replace methods.
-
-SEE ALSO
- the FS::Record manpage, the FS::cust_bill manpage, schema.html
- from the base documentation.
-
-HISTORY
- ivan@voicenet.com 97-jul-1 - 25 - 29
-
- new api ivan@sisd.com 98-mar-13
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/cust_pkg.txt b/htdocs/docs/man/cust_pkg.txt
deleted file mode 100644
index 5409083d8..000000000
--- a/htdocs/docs/man/cust_pkg.txt
+++ /dev/null
@@ -1,150 +0,0 @@
-NAME
- FS::cust_pkg - Object methods for cust_pkg objects
-
-SYNOPSIS
- use FS::cust_pkg;
-
- $record = create FS::cust_pkg \%hash;
- $record = create 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;
-
- $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 the section on "time" in the perlfunc manpage.
- Also see the Time::Local manpage and the Date::Parse manpage for
- conversion functions.
-
-METHODS
- create HASHREF
- Create a new billing item. To add the item to the database,
- see the section on "insert".
-
- insert
- Adds this billing item to the database ("Orders" the item).
- If there is an error, returns the error, otherwise returns
- false.
-
- 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.
-
- sub delete { return "Can't delete cust_pkg records!"; }
-
- 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.
-
- pkgpart may not be changed, but 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.
-
-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).
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- 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.
-
-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
-
-HISTORY
- ivan@voicenet.com 97-jul-1 - 21
-
- fixed for new agent->agent_type->type_pkgs in &order
- ivan@sisd.com 98-mar-7
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/cust_refund.txt b/htdocs/docs/man/cust_refund.txt
deleted file mode 100644
index 392a0b57a..000000000
--- a/htdocs/docs/man/cust_refund.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-NAME
- FS::cust_refund - Object method for cust_refund objects
-
-SYNOPSIS
- use FS::cust_refund;
-
- $record = create FS::cust_refund \%hash;
- $record = create 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. 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 the section on "time" in the perlfunc manpage. 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
- create HASHREF
- Creates a new refund. To add the refund to the database, see
- the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- Delete and replace methods.
-
-SEE ALSO
- the FS::Record manpage, the FS::cust_credit manpage, schema.html
- from the base documentation.
-
-HISTORY
- ivan@sisd.com 98-mar-18
-
- ->create had wrong tablename ivan@sisd.com 98-jun-16 (finish
- me!)
-
- pod and finish up ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/cust_svc.txt b/htdocs/docs/man/cust_svc.txt
deleted file mode 100644
index d863ea852..000000000
--- a/htdocs/docs/man/cust_svc.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-NAME
- FS::cust_svc - Object method for cust_svc objects
-
-SYNOPSIS
- use FS::cust_svc;
-
- $record = create FS::cust_svc \%hash
- $record = create FS::cust_svc { 'column' => 'value' };
-
- $error = $record->insert;
-
- $error = $new_record->replace($old_record);
-
- $error = $record->delete;
-
- $error = $record->check;
-
-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
- create HASHREF
- Creates a new service. To add the refund to the database,
- see the section on "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.
-
-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 checket in general (here).
-
-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
-
-HISTORY
- ivan@voicenet.com 97-jul-10,14
-
- no TableUtil, no FS::Lock ivan@sisd.com 98-mar-7
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/dbdef.txt b/htdocs/docs/man/dbdef.txt
deleted file mode 100644
index 6f1215a84..000000000
--- a/htdocs/docs/man/dbdef.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-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
- the FS::dbdef_table manpage, the FS::Record manpage,
-
-HISTORY
- beginning of abstraction into a class (not really)
-
- ivan@sisd.com 97-dec-4
-
- added primary_key ivan@sisd.com 98-jan-20
-
- added datatype (very kludgy and needs to be cleaned)
- ivan@sisd.com 98-feb-21
-
- perltrap (sigh) masked by mysql 3.20->3,21 ivan@sisd.com 98-
- mar-2
-
- Change 'type' to 'atype' in agent_type Changed attributes to
- special words which are changed in fs-setup ie. double(10,2)
- <=> MONEYTYPE Changed order of some of the field definitions
- because Pg6.3 is picky Changed 'day' to 'daytime' in
- cust_main Changed type of tax from tinyint to real Change
- 'password' to '_password' in svc_acct Pg6.3 does not allow
- 'field char(x) NULL' bmccane@maxbaud.net 98-apr-3
-
- rewrite: now properly OO. See also
- FS::dbdef_{table,column,unique,index}
-
- ivan@sisd.com 98-apr-17
-
- gained some extra functions ivan@sisd.com 98-may-11
-
- now knows how to Freeze and Thaw itself ivan@sisd.com 98-
- jun-2
-
- pod ivan@sisd.com 98-sep-23
-
diff --git a/htdocs/docs/man/dbdef_colgroup.txt b/htdocs/docs/man/dbdef_colgroup.txt
deleted file mode 100644
index a7eebc6c7..000000000
--- a/htdocs/docs/man/dbdef_colgroup.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-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
- the FS::dbdef_table manpage, the FS::dbdef_unique manpage, the
- FS::dbdef_index manpage, the FS::dbdef_column manpage, the
- FS::dbdef manpage, the perldsc manpage
-
-HISTORY
- class for dealing with groups of groups of columns (used as a
- base class by FS::dbdef_{unique,index} )
-
- ivan@sisd.com 98-apr-19
-
- added singles, fixed sql_list to skip empty lists ivan@sisd.com
- 98-jun-2
-
- untaint things we're returning in sub singels ivan@sisd.com 98-
- jun-4
-
- pod ivan@sisd.com 98-sep-24
-
diff --git a/htdocs/docs/man/dbdef_column.txt b/htdocs/docs/man/dbdef_column.txt
deleted file mode 100644
index 93e239517..000000000
--- a/htdocs/docs/man/dbdef_column.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-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 the
- FS::dbdef_table manpage).
-
-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 the DBD::mysql manpage,
- will use MySQL-specific syntax. Non-standard syntax for
- other engines (if applicable) may also be supported in the
- future.
-
-BUGS
-SEE ALSO
- the FS::dbdef_table manpage, the FS::dbdef manpage, the DBI
- manpage
-
-HISTORY
- class for dealing with column definitions
-
- ivan@sisd.com 98-apr-17
-
- now methods can be used to get or set data ivan@sisd.com 98-may-
- 11
-
- mySQL-specific hack for null (what should be default?)
- ivan@sisd.com 98-jun-2
-
diff --git a/htdocs/docs/man/dbdef_index.txt b/htdocs/docs/man/dbdef_index.txt
deleted file mode 100644
index 8cf339b84..000000000
--- a/htdocs/docs/man/dbdef_index.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-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 (the FS::dbdef_table manpage). FS::dbdef_unique inherits
- from FS::dbdef_colgroup.
-
-BUGS
- Is this empty subclass needed?
-
-SEE ALSO
- the FS::dbdef_colgroup manpage, the FS::dbdef_record manpage,
- the FS::Record manpage
-
-HISTORY
- class for dealing with index definitions
-
- ivan@sisd.com 98-apr-19
-
- pod ivan@sisd.com 98-sep-24
-
diff --git a/htdocs/docs/man/dbdef_table.txt b/htdocs/docs/man/dbdef_table.txt
deleted file mode 100644
index 25e010d8b..000000000
--- a/htdocs/docs/man/dbdef_table.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-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 the FS::dbdef_column manpage)
- for "column".
-
- sql_create_table [ $datasrc ]
- Returns an array of SQL statments to create this table.
-
- If passed a DBI $datasrc specifying the DBD::mysql manpage,
- will use MySQL-specific syntax. Non-standard syntax for
- other engines (if applicable) may also be supported in the
- future.
-
-BUGS
-SEE ALSO
- the FS::dbdef manpage, the FS::dbdef_unique manpage, the
- FS::dbdef_index manpage, the FS::dbdef_unique manpage, the DBI
- manpage
-
-HISTORY
- class for dealing with table definitions
-
- ivan@sisd.com 98-apr-18
-
- gained extra functions (should %columns be an IxHash?)
- ivan@sisd.com 98-may-11
-
- sql_create_table returns a list of statments, not just one, and
- now it does indices (plus mysql hack) ivan@sisd.com 98-jun-2
-
- untaint primary_key... hmm. is this a hack around a bigger
- problem? looks like, did the same thing singles in colgroup!
- ivan@sisd.com 98-jun-4
-
- pod ivan@sisd.com 98-sep-24
-
diff --git a/htdocs/docs/man/dbdef_unique.txt b/htdocs/docs/man/dbdef_unique.txt
deleted file mode 100644
index 0e4f0150b..000000000
--- a/htdocs/docs/man/dbdef_unique.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-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 (the FS::dbdef_table manpage). FS::dbdef_unique
- inherits from FS::dbdef_colgroup.
-
-BUGS
- Is this empty subclass needed?
-
-SEE ALSO
- the FS::dbdef_colgroup manpage, the FS::dbdef_record manpage,
- the FS::Record manpage
-
-HISTORY
- class for dealing with unique definitions
-
- ivan@sisd.com 98-apr-19
-
- pod ivan@sisd.com 98-sep-24
-
diff --git a/htdocs/docs/man/index.html b/htdocs/docs/man/index.html
deleted file mode 100644
index 4f33dd485..000000000
--- a/htdocs/docs/man/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<head>
- <title>Perl API</title>
-</head>
-<body>
- <h1>Perl API</h1>
- <ul>
-<li><a href="agent.txt">FS::agent</a>
-<li><a href="agent_type.txt">FS::agent_type</a>
-<li><a href="cust_bill.txt">FS::cust_bill</a>
-<li><a href="cust_bill_pkg.txt">FS::cust_bill_pkg</a>
-<li><a href="cust_credit.txt">FS::cust_credit</a>
-<li><a href="cust_main.txt">FS::cust_main</a>
-<li><a href="cust_main_county.txt">FS::cust_main_county</a>
-<li><a href="cust_pay.txt">FS::cust_pay</a>
-<li><a href="cust_pkg.txt">FS::cust_pkg</a>
-<li><a href="cust_refund.txt">FS::cust_refund</a>
-<li><a href="cust_svc.txt">FS::cust_svc</a>
-<li><a href="part_pkg.txt">FS::part_pkg</a>
-<li><a href="part_referral.txt">FS::part_referral</a>
-<li><a href="part_svc.txt">FS::part_svc</a>
-<li><a href="pkg_svc.txt">FS::pkg_svc</a>
-<li><a href="svc_acct.txt">FS::svc_acct</a>
-<li><a href="svc_acct_pop.txt">FS::svc_acct_pop</a>
-<li><a href="svc_acct_sm.txt">FS::svc_acct_sm</a>
-<li><a href="svc_domain.txt">FS::svc_domain</a>
-<li><a href="type_pkgs.txt">FS::type_pkgs</a>
-</ul>
-<br>
-<ul>
-<li><a href="Bill.txt">FS::Bill</a>
-<li><a href="CGI.txt">FS::CGI</a>
-<li><a href="Conf.txt">FS::Conf</a>
-<li><a href="Invoice.txt">FS::Invoice</a>
-<li><a href="Record.txt">FS::Record</a>
-<li><a href="SSH.txt">FS::SSH</a>
-<li><a href="UID.txt">FS::UID</a>
-</ul>
-<br>
-<ul>
-<li><a href="dbdef.txt">FS::dbdef</a>
-<li><a href="dbdef_colgroup.txt">FS::dbdef_colgroup</a>
-<li><a href="dbdef_column.txt">FS::dbdef_column</a>
-<li><a href="dbdef_index.txt">FS::dbdef_index</a>
-<li><a href="dbdef_table.txt">FS::dbdef_table</a>
-<li><a href="dbdef_unique.txt">FS::dbdef_unique</a>
-
-<ul>
-</body>
diff --git a/htdocs/docs/man/part_pkg.txt b/htdocs/docs/man/part_pkg.txt
deleted file mode 100644
index dc1bce423..000000000
--- a/htdocs/docs/man/part_pkg.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-NAME
- FS::part_pkg - Object methods for part_pkg objects
-
-SYNOPSIS
- use FS::part_pkg;
-
- $record = create FS::part_pkg \%hash
- $record = create FS::part_pkg { 'column' => 'value' };
-
- $error = $record->insert;
-
- $error = $new_record->replace($old_record);
-
- $error = $record->delete;
-
- $error = $record->check;
-
-DESCRIPTION
- An FS::part_pkg 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
- create HASHREF
- Creates a new billing item definition. To add the billing
- item definition to the database, see the section on
- "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- 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, the Safe
- manpage. schema.html from the base documentation.
-
-HISTORY
- ivan@sisd.com 97-dec-5
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/part_referral.txt b/htdocs/docs/man/part_referral.txt
deleted file mode 100644
index 534996323..000000000
--- a/htdocs/docs/man/part_referral.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-NAME
- FS::part_referral - Object methods for part_referral objects
-
-SYNOPSIS
- use FS::part_referral;
-
- $record = create FS::part_referral \%hash
- $record = create 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
- create HASHREF
- Creates a new referral. To add the referral to the database,
- see the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- The delete method is unimplemented.
-
-SEE ALSO
- the FS::Record manpage, the FS::cust_main manpage, schema.html
- from the base documentation.
-
-HISTORY
- Class dealing with referrals
-
- ivan@sisd.com 98-feb-23
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/part_svc.txt b/htdocs/docs/man/part_svc.txt
deleted file mode 100644
index 680944e2f..000000000
--- a/htdocs/docs/man/part_svc.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-NAME
- FS::part_svc - Object methods for part_svc objects
-
-SYNOPSIS
- use FS::part_svc;
-
- $record = create FS::part_referral \%hash
- $record = create 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
- create HASHREF
- Creates a new service definition. To add the service
- definition to the database, see the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- Delete is unimplemented.
-
-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.
-
-HISTORY
- ivan@sisd.com 97-nov-14
-
- data checking/untainting calls into FS::Record added
- ivan@sisd.com 97-dec-6
-
- pod ivan@sisd.com 98-sep-21
-
diff --git a/htdocs/docs/man/pkg_svc.txt b/htdocs/docs/man/pkg_svc.txt
deleted file mode 100644
index bde0043f1..000000000
--- a/htdocs/docs/man/pkg_svc.txt
+++ /dev/null
@@ -1,61 +0,0 @@
-NAME
- FS::pkg_svc - Object methods for pkg_svc records
-
-SYNOPSIS
- use FS::pkg_svc;
-
- $record = create FS::pkg_svc \%hash;
- $record = create FS::pkg_svc { 'column' => 'value' };
-
- $error = $record->insert;
-
- $error = $new_record->replace($old_record);
-
- $error = $record->delete;
-
- $error = $record->check;
-
-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
- create HASHREF
- Create a new record. To add the record to the database, see
- the section on "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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
-SEE ALSO
- the FS::Record manpage, the FS::part_pkg manpage, the
- FS::part_svc manpage, schema.html from the base documentation.
-
-HISTORY
- ivan@voicenet.com 97-jul-1 added hfields ivan@sisd.com 97-nov-13
-
- pod ivan@sisd.com 98-sep-22
-
diff --git a/htdocs/docs/man/svc_acct.txt b/htdocs/docs/man/svc_acct.txt
deleted file mode 100644
index 1c9caf5fb..000000000
--- a/htdocs/docs/man/svc_acct.txt
+++ /dev/null
@@ -1,168 +0,0 @@
-NAME
- FS::svc_acct - Object methods for svc_acct records
-
-SYNOPSIS
- use FS::svc_acct;
-
- $record = create FS::svc_acct \%hash;
- $record = create 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;
-
-DESCRIPTION
- An FS::svc_acct object represents an account. FS::svc_acct
- inherits from FS::Record. 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
- create HASHREF
- Creates a new account. To add the account to the database,
- see the section on "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
-
- useradd -d $dir -m -s $shell -u $uid $username
-
- is executed on shellmachine via ssh. This behaviour can be
- surpressed by setting $FS::svc_acct::nossh_hack true.
-
- 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:
-
- userdel $username
-
- is executed on shellmachine via ssh. This behaviour can be
- surpressed by setting $FS::svc_acct::nossh_hack true.
-
- 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:
-
- [ -d $old_dir ] && (
- chmod u+t $old_dir;
- umask 022;
- 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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- The remote commands should be configurable.
-
- The create method should set defaults from part_svc (like the
- check method sets fixed values).
-
-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::SSH manpage, the ssh manpage, the FS::svc_acct_pop manpage,
- schema.html from the base documentation.
-
-HISTORY
- ivan@voicenet.com 97-jul-16 - 21
-
- rewrite (among other things, now know about part_svc)
- ivan@sisd.com 98-mar-8
-
- Changed 'password' to '_password' because Pg6.3 reserves the
- password word bmccane@maxbaud.net 98-apr-3
-
- username length and shell no longer hardcoded ivan@sisd.com 98-
- jun-28
-
- eww but needed: ignore uid duplicates for 'fax' and 'hylafax'
- ivan@sisd.com 98-jun-29
-
- $nossh_hack ivan@sisd.com 98-jul-13
-
- protections against UID/GID of 0 for incorrectly-setup RDBMSs
- (also in bin/svc_acct.export) ivan@sisd.com 98-jul-13
-
- arbitrary radius attributes ivan@sisd.com 98-aug-13
-
- /var/spool/freeside/conf/shellmachine ivan@sisd.com 98-aug-13
-
- pod and FS::conf ivan@sisd.com 98-sep-22
-
diff --git a/htdocs/docs/man/svc_acct_pop.txt b/htdocs/docs/man/svc_acct_pop.txt
deleted file mode 100644
index ac0965413..000000000
--- a/htdocs/docs/man/svc_acct_pop.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-NAME
- FS::svc_acct_pop - Object methods for svc_acct_pop records
-
-SYNOPSIS
- use FS::svc_acct_pop;
-
- $record = create FS::svc_acct_pop \%hash;
- $record = create 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
-METHODS
- create HASHREF
- Creates a new point of presence (if only it were that
- easy!). To add the point of presence to the database, see
- the section on "insert".
-
- insert
- Adds this point of presence to the databaes. 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 point of
- presence. If there is an error, returns the error, otherwise
- returns false. Called by the insert and replace methods.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- It should be renamed to part_pop.
-
-SEE ALSO
- the FS::Record manpage, the svc_acct manpage, schema.html from
- the base documentation.
-
-HISTORY
- Class dealing with pops
-
- ivan@sisd.com 98-mar-8
-
- pod ivan@sisd.com 98-sep-23
-
diff --git a/htdocs/docs/man/svc_acct_sm.txt b/htdocs/docs/man/svc_acct_sm.txt
deleted file mode 100644
index e9940af9a..000000000
--- a/htdocs/docs/man/svc_acct_sm.txt
+++ /dev/null
@@ -1,121 +0,0 @@
-NAME
- FS::svc_acct_sm - Object methods for svc_acct_sm records
-
-SYNOPSIS
- use FS::svc_acct_sm;
-
- $record = create FS::svc_acct_sm \%hash;
- $record = create 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
- create HASHREF
- Creates a new virtual mail alias. To add the virtual mail
- alias to the database, see the section on "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 the section on
- "EXTENSION ADDRESSES" in the dot-qmail manpage). 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.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- The remote commands should be configurable.
-
-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 FS::SSH
- manpage, the ssh manpage, the dot-qmail manpage, schema.html
- from the base documentation.
-
-HISTORY
- ivan@voicenet.com 97-jul-16 - 21
-
- rewrite ivan@sisd.com 98-mar-10
-
- s/qsearchs/qsearch/ to eliminate warning ivan@sisd.com 98-apr-19
-
- uses conf/shellmachine and has an nossh_hack ivan@sisd.com 98-
- jul-14
-
- s/\./:/g in .qmail-domain:com ivan@sisd.com 98-aug-13
-
- pod, FS::Conf, moved .qmail file from check to insert 98-sep-23
-
diff --git a/htdocs/docs/man/svc_domain.txt b/htdocs/docs/man/svc_domain.txt
deleted file mode 100644
index 03d3dbc27..000000000
--- a/htdocs/docs/man/svc_domain.txt
+++ /dev/null
@@ -1,131 +0,0 @@
-NAME
- FS::svc_domain - Object methods for svc_domain records
-
-SYNOPSIS
- use FS::svc_domain;
-
- $record = create FS::svc_domain \%hash;
- $record = create 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::Record. The following fields are currently
- supported:
-
- svcnum - primary key (assigned automatically for new accounts)
- domain
-METHODS
- create HASHREF
- Creates a new domain. To add the domain to the database, see
- the section on "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.
-
- 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
- Executes the command:
-
- whois do $domain
-
- and returns the output.
-
- (Always returns *No match for domian "$domain".* if
- $FS::svc_domain::whois_hack is set true.)
-
- submit_internic
- Submits a registration email for this domain.
-
-BUGS
- It doesn't properly override FS::Record yet.
-
- All BIND/DNS fields should be included (and exported).
-
- All registries should be supported.
-
- Not all configuration access is through FS::Conf!
-
- Should change action to a real field.
-
-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::SSH manpage, the ssh manpage, the dot-qmail manpage,
- schema.html from the base documentation, config.html from the
- base documentation.
-
-HISTORY
- ivan@voicenet.com 97-jul-21
-
- rewrite ivan@sisd.com 98-mar-10
-
- add internic bits ivan@sisd.com 98-mar-14
-
- Changed 'day' to 'daytime' because Pg6.3 reserves the day word
- bmccane@maxbaud.net 98-apr-3
-
- /var/spool/freeside/conf/registries/internic/, Mail::Internet,
- etc. ivan@sisd.com 98-jul-17-19
-
- pod, some FS::Conf (not complete) ivan@sisd.com 98-sep-23
-
diff --git a/htdocs/docs/man/type_pkgs.txt b/htdocs/docs/man/type_pkgs.txt
deleted file mode 100644
index 9822b4802..000000000
--- a/htdocs/docs/man/type_pkgs.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-NAME
- FS::type_pkgs - Object methods for type_pkgs records
-
-SYNOPSIS
- use FS::type_pkgs;
-
- $record = create FS::type_pkgs \%hash;
- $record = create 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
- create HASHREF
- Create a new record. To add the record to the database, see
- the section on "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.
-
-HISTORY
- Defines the relation between agent types and pkgparts (Which
- pkgparts can the different [types of] agents sell?)
-
- ivan@sisd.com 97-nov-13
-
- change to ut_ FS::Record, fixed bugs ivan@sisd.com 97-dec-10
-
diff --git a/htdocs/docs/overview.dia b/htdocs/docs/overview.dia
new file mode 100644
index 000000000..a0e34c30e
--- /dev/null
+++ b/htdocs/docs/overview.dia
Binary files differ
diff --git a/htdocs/docs/overview.png b/htdocs/docs/overview.png
new file mode 100644
index 000000000..bf2dbc26c
--- /dev/null
+++ b/htdocs/docs/overview.png
Binary files differ
diff --git a/htdocs/docs/postgresql.html b/htdocs/docs/postgresql.html
new file mode 100755
index 000000000..151081176
--- /dev/null
+++ b/htdocs/docs/postgresql.html
@@ -0,0 +1,23 @@
+<head>
+ <title>PostgreSQL notes</title>
+</head>
+<body>
+ <h1>PostgreSQL notes</h1>
+<p>
+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.
+</p>
+Future versions of Freeside will keep all column names under 31 characters to
+avoid this problem.
+</p>
+<p>
+( 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 <a href="mailto:ivan@sisd.com">&lt;ivan@sisd.com</a>&gt; )
+</p>
+</body>
+
diff --git a/htdocs/docs/schema.html b/htdocs/docs/schema.html
index 5a296ec83..c06373b6b 100644
--- a/htdocs/docs/schema.html
+++ b/htdocs/docs/schema.html
@@ -17,30 +17,28 @@
<li>typenum - primary key
<li>atype - name of this agent type
</ul>
- <li><a name="cust_bill">cust_bill</a> - Invoices
+ <li><a name="cust_bill">cust_bill</a> - Invoices. Declarations that a customer owes you money. The specific charges are itemized in <a href="#cust_billl_pkg">cust_bill_pkg</a>.
<ul>
<li>invnum - primary key
<li>custnum - <a href="#cust_main">customer</a>
<li>_date
<li>charged - amount of this invoice
- <li>owed - amount still outstanding on this invoice
<li>printed - how many times this invoice has been printed automatically
</ul>
<li><a name="cust_bill_pkg">cust_bill_pkg</a> - Invoice line items
<ul>
<li>invnum - (multiple) key
- <li>pkgnum - <a href="#cust_pkg">package</a>
+ <li>pkgnum - <a href="#cust_pkg">package</a> or 0 for the special virtual sales tax package
<li>setup - setup fee
<li>recur - recurring fee
<li>sdate - starting date
<li>edate - ending date
</ul>
- <li><a name="cust_credit">cust_credit</a> - Credits
+ <li><a name="cust_credit">cust_credit</a> - Credits. The equivalent of a negative <a href="#cust_bill">cust_bill</a> record.
<ul>
<li>crednum - primary key
<li>custnum - <a href="#cust_main">customer</a>
<li>amount - amount credited
- <li>credited - amount still outstanding (not yet refunded) on this credit
<li>_date
<li>otaker - order taker
<li>reason
@@ -50,7 +48,9 @@
<li>custnum - primary key
<li>agentnum - <a href="#agent">agent</a>
<li>refnum - <a href="#part_referral">referral</a>
+ <li>titlenum - <a href="#part_title">title</a>
<li>first - name
+ <li>middle - name
<li>last - name
<li>ss - social security number
<li>company
@@ -63,6 +63,7 @@
<li>country
<li>daytime - phone
<li>night - phone
+ <li>fax - phone
<li>payby - CARD, BILL, or COMP
<li>payinfo - card number, P.O.#, or comp issuer
<li>paydate - expiration date
@@ -70,14 +71,21 @@
<li>tax - tax exempt, Y or null
<li>otaker - order taker
</ul>
+ <li><a name="cust_main_invoice">cust_main_invoice</a> - Invoice destinations for email invoices
+ <ul>
+ <li>destnum - primary key
+ <li>custnum - <a href="#cust_main">customer</a>
+ <li>dest - Invoice destination: If numeric, a <a href="#svc_acct">svcnum</a>, if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist)
+ </ul>
<li><a name="cust_main_county">cust_main_county</a> - Tax rates
<ul>
<li>taxnum - primary key
<li>state
<li>county
+ <li>country
<li>tax - % rate
</ul>
- <li><a name="cust_pay">cust_pay</a> - Payments
+ <li><a name="cust_pay">cust_pay</a> - Payments. Money being transferred from a customer.
<ul>
<li>paynum - primary key
<li>invnum - <a href="#cust_bill">invoice</a>
@@ -117,7 +125,7 @@
<li>cancel - (past) cancellation date
<li>otaker - order taker
</ul>
- <li><a name="cust_refund">cust_refund</a> - Refunds
+ <li><a name="cust_refund">cust_refund</a> - Refunds. The transfer of money to a customer; equivalent to a negative <a href="#cust_pay">cust_pay</a> record.
<ul>
<li>refundnum - primary key
<li>crednum - <a href="#cust_credit">credit</a>
@@ -133,6 +141,14 @@
<li>pkgnum - <a href="#cust_pkg">package</a>
<li>svcpart - <a href="#part_svc">Service definition</a>
</ul>
+ <li><a name="nas">nas</a> - Network Access Server (terminal server)
+ <ul>
+ <li>nasnum - primary key
+ <li>nas - NAS name
+ <li>nasip - NAS ip address
+ <li>nasfqdn - NAS fully-qualified domain name
+ <li>last - timestamp indicating the last instant the NAS was in a known state (used by the session monitoring).
+ </ul>
<li><a name="part_pkg">part_pkg</a> - Package definitions
<ul>
<li>pkgpart - primary key
@@ -144,8 +160,8 @@
</ul>
<li><a name="part_referral">part_referral</a> - Referral listing
<ul>
- <li>refnum</li> - primary key
- <li>referral</li> - referral
+ <li>refnum - primary key
+ <li>referral - referral
</ul>
<li><a name="part_svc">part_svc</a> - Service definitions
<ul>
@@ -155,12 +171,39 @@
<li><i>table</i>__<i>field</i> - Default or fixed value for <i>field</i> in <i>table</i>
<li><i>table</i>__<i>field</i>_flag - null, D or F
</ul>
+ <li><a name="part_title">part_title</a> - Personal titles
+ <ul>
+ <li>titlenum - primary key
+ <li>title - personal title (`Dr.' or `Mr.')
+ </ul>
<li><a name="pkg_svc">pkg_svc</a>
<ul>
<li>pkgpart - <a href="#part_pkg">Package definition</a>
<li>svcpart - <a href="#part_svc">Service definition</a>
<li>quantity - quantity of this service that this package includes
</ul>
+ <li><a name="port">port</a> - individual port on a <a href="#nas">nas</a>
+ <ul>
+ <li>portnum - primary key
+ <li>ip - IP address of this port
+ <li>nasport - port number on the NAS
+ <li>nasnum - <a href="#nas">NAS</a>
+ </ul>
+ <li><a name="prepay_credit">prepay_credit</a>
+ <ul>
+ <li>prepaynum - primary key
+ <li>identifier - text or numeric string used to receive this credit
+ <li>amount - amount of credit
+ </ul>
+ <li><a name="session">session</a>
+ <ul>
+ <li>sessionnum - primary key
+ <li>portnum - <a href="#port">Port</a>
+ <li>svcnum - <a href="#svc_acct">Account</a>
+ <li>login - timestamp indicating the beginning of this user session.
+ <li>logout - timestamp indicating the end of this user session. May be null, which indicates a currently open session.
+ </ul>
+
<li><a name="svc_acct">svc_acct</a> - Accounts
<ul>
<li>svcnum - <a href="#cust_svc">primary key</a>
@@ -183,6 +226,7 @@
<li>state
<li>ac - area code
<li>exch - exchange
+ <li>loc - rest of number
</ul>
<li><a name="svc_acct_sm">svc_acct_sm</a> - Domain mail aliases
<ul>
@@ -196,6 +240,21 @@
<li>svcnum - <a href="#cust_svc">primary key</a>
<li>domain
</ul>
+ <li><a name="domain_record">domain_record</a> - Domain zone detail
+ <ul>
+ <li>recnum - primary key
+ <li>svcnum - <a href="#svc_domain">Domain</a> (by svcnum)
+ <li>reczone - zone for this line
+ <li>recaf - address family, usually <b>IN</b>
+ <li>rectype - type for this record (<b>A</b>, <b>MX</b>, etc.)
+ <li>recdata - data for this record
+ </ul>
+ <li><a name="svc_www">svc_www</a>
+ <ul>
+ <li>svcnum - <a href="#cust-svc">primary key</a>
+ <li>recnum - <a href="#domain_record">host</a>
+ <li>usersvc - <a href="#svc_acct">account</a>
+ </ul>
<li><a name="type_pkgs">type_pkgs</a>
<ul>
<li>typenum - <a href="#agent_type">agent type</a>
diff --git a/htdocs/docs/session.html b/htdocs/docs/session.html
new file mode 100644
index 000000000..7dac5fdf7
--- /dev/null
+++ b/htdocs/docs/session.html
@@ -0,0 +1,54 @@
+<head>
+ <title>Session monitor</title>
+</head>
+<body>
+<h1>Session monitor</h1>
+<h2>Installation</h2>
+For security reasons, the client portion of the session montior may run on one
+or more external public machine(s). On these machines, install:
+<ul>
+ <li><a href="http://www.perl.com/CPAN/doc/relinfo/INSTALL.html">Perl</a> (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.)
+ <li><a href="man/FS/SessionClient.html">FS::SessionClient</a> (copy the fs_session/FS-SessionClient directory to the external machine, then: perl Makefile.PL; make; make install)
+</ul>
+Then:
+<ul>
+ <li>Add the user `freeside' to the the external machine.
+ <li>Create the /usr/local/freeside directory on the external machine (owned by the freeside user).
+ <li>touch /usr/local/freeside/fs_sessiond_socket; chown freeside /usr/local/freeside/fs_sessiond_socket; chmod 600 /usr/local/freeside/fs_sessiond_socket
+ <li>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).
+ <li>Run <pre>fs_session_server <i>user</i> <i>machine</i></pre> on the Freeside machine.
+ <ul>
+ <li><i>user</i> is a user from the mapsecrets file.
+ <li><i>machine</i> is the name of the external machine.
+ </ul>
+</ul>
+<h2>Usage</h2>
+<ul>
+ <li>Web
+ <ul>
+ <li>Copy FS-SessionClient/cgi/login.cgi and logout.cgi to your web
+ server's document space.
+ <li>Use <a href="http://www.apache.org/docs/suexec.html">suEXEC</a> or <a href="http://www.perl.com/CPAN-local/doc/manual/html/pod/perlsec.html#Security_Bugs">setuid</a> (see <a href="install.html">install.html</a> for details) to run login.cgi and logout.cgi as the freeside user.
+ </ul>
+ <li>Command-line
+ <br><pre>freeside-login username ( portnum | ip | nasnum nasport )
+freeside-logout username ( portnum | ip | nasnum nasport )</pre>
+ <ul>
+ <li><i>username</i> is a customer username from the svc_acct table
+ <li><i>portnum</i>, <i>ip</i> or <i>nasport</i> and <i>nasnum</i> uniquely identify a port in the <a href="schema.html#port">port</a> database table.
+ </ul>
+ <li>RADIUS
+ <ul>
+ <li>Configure your RADIUS server's login and logout callbacks to use the command-line <tt>freeside-login</tt> and <tt>freeside-logout</tt> utilites.
+ </ul>
+</ul>
+<h2>Callbacks</h2>
+<ul>
+ <li>Sesstion start - The command(s) specified in the <a href="config.html#session-start">session-start</a> 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: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, 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.
+ <li>Session end - The command(s) specified in the <a href="config.html#session-stop">session-stop</a> 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: <code>$ip</code>, <code>$nasip</code> and <code>$nasfqdn</code>, 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.
+</ul>
+<h2>Dropping expired users</h2>
+Run <pre>bin/freeside-session-kill username</pre> periodically from cron.
+</body>
+</html>
diff --git a/htdocs/docs/signup.html b/htdocs/docs/signup.html
new file mode 100644
index 000000000..a40b1f963
--- /dev/null
+++ b/htdocs/docs/signup.html
@@ -0,0 +1,57 @@
+<head>
+ <title>Signup server</title>
+</head>
+<body>
+ <h1>Signup server</h1>
+For security reasons, the signup server should run on an external public
+webserver. On this machine, install:
+<ul>
+ <li>A web server, such as <a href="http://www.apache-ssl.org">Apache-SSL</a> or <a href="http://www.apache.org">Apache</a>
+ <li><a href="ftp://ftp.cs.hut.fi/pub/ssh/">SSH</a>
+ <li><a href="http://www.perl.com/CPAN/doc/relinfo/INSTALL.html">Perl</a> (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.)
+ <li><a href="http://www.perl.com/CPAN/modules/by-module/Text/">Text::Template</a>
+ <li><a href="http://www.sisd.com/useragent">HTTP::Headers::UserAgent</a> (version 2.0 or higher; not yet indexed correctly on CPAN)
+
+ <li><a href="man/FS/SignupClient.html">FS::SignupClient</a> (copy the fs_signup/FS-SignupClient directory to the external machine, then: perl Makefile.PL; make; make install)
+</ul>
+Then:
+<ul>
+ <li>Add the user `freeside' to the the external machine.
+ <li>Copy or symlink fs_signup/FS-SignupClient/cgi/signup.cgi into the web server's document space.
+ <li>Enable CGI execution for files with the `.cgi' extension. (with <a href="http://www.apache.org/docs/mod/mod_mime.html#addhandler">Apache</a>)
+ <li>Create the /usr/local/freeside directory on the external machine (owned by the freeside user).
+ <li>touch /usr/local/freeside/fs_signupd_socket; chown freeside /usr/local/freeside/fs_signupd_socket; chmod 600 /usr/local/freeside/fs_signupd_socket
+ <li>Use <a href="http://www.apache.org/docs/suexec.html">suEXEC</a> or <a href="http://www.perl.com/CPAN-local/doc/manual/html/pod/perlsec.html#Security_Bugs">setuid</a> (see <a href="install.html">install.html</a> for details) to run signup.cgi as the freeside user.
+ <li>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).
+ <li>Run <pre>fs_signup_server <i>user</i> <i>machine</i> <i>agentnum</i> <i>refnum</i></pre> on the Freeside machine.
+ <ul>
+ <li><i>user</i> is a user from the mapsecrets file.
+ <li><i>machine</i> is the name of the external machine.
+ <li><i>agentnum</i> and <i>refnum</i> are the <a href="schema.html#agent">agent</a> and <a href="schema.html#part_referral">referral</a>, respectively, to use for customers who sign up via this signup server.
+ </ul>
+</ul>
+Optional:
+<ul>
+ <li>If you create a <b>/usr/local/freeside/ieak.template</b> file on the external machine, it will be sent to IE users with MIME type <i>application/x-Internet-signup</i>. This file will be processed with <a href="http://search.cpan.org/doc/MJD/Text-Template-1.23/Template.pm">Text::Template</a> with the following variables available:
+ <ul>
+ <li>$ac - area code of selected POP
+ <li>$exch - exchange of selected POP
+ <li>$loc - local part of selected POP
+ <li>$username
+ <li>$password
+ <li>$email_name - first and last name
+ </ul>
+ (an example file is included as <b>fs_signup/ieak.template</b>)
+ <li>If you create a <b>/usr/local/freeside/cck.template</b> file on the external machine, the variables defined will be sent to Netscape users with MIME type <i>application/x-netscape-autoconfigure-dialer-v2</i>. This file will be processed with <a href="http://search.cpan.org/doc/MJD/Text-Template-1.23/Template.pm">Text::Template</a> with the following variables available:
+ <ul>
+ <li>$ac - area code of selected POP
+ <li>$exch - exchange of selected POP
+ <li>$loc - local part of selected POP
+ <li>$username
+ <li>$password
+ <li>$email_name - first and last name
+ </ul>
+ (an example file is included as <b>fs_signup/cck.template</b>). See the <a href="http://help.netscape.com/products/client/mc/acctproc4.html">Netscape documentation</a> for more information.
+ <li>If there are any entries in the <i>prepay_credit</i> table, a user can enter a string matching the <b>identifier</i> column to receive the credit specified in the <b>amount</b> column, and/or the time specified in the <b>seconds</b> column (for use with the <a href="session.html">session monitor</a>), after which that <b>identifier</b> is no longer valid. This can be used to implement pre-paid "calling card" type signups. The <i>bin/generate-prepay</i> script can be used to populate the <i>prepay_credit</i> table.
+</ul>
+</body>
diff --git a/htdocs/docs/trouble.html b/htdocs/docs/trouble.html
index 2cf6d4e71..fce743928 100644
--- a/htdocs/docs/trouble.html
+++ b/htdocs/docs/trouble.html
@@ -5,11 +5,6 @@
<h1>Troubleshooting</h1>
<ul>
<li>When troubleshooting the web interface, helpful information is often in your web server's error log.
- <li>Internet Explorer will not work with Freeside's HTML interface.
-<a HREF="http://www.netscape.com">Netscape</a>,
-<a HREF="http://lynx.browser.org">Lynx</a>, and
-<a HREF="http://www.cs.indiana.edu/elisp/w3/docs.html">Emacs/W3</a>,
-among others, should work fine.
<li>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.
<li>If you get tons of errors in your web server's error log like this:
<pre>
@@ -17,13 +12,6 @@ Ambiguous use of value => resolved to "value" =>
at /usr/lib/perl5/site_perl/File/CounterFile.pm line 132.
</pre>
This clutters up your log files but is otherwise harmless. Upgrade to the latest File::CounterFile.
- <li>If you get an Internal Server Error when adding or editing, but find that the update has occured, and you get something like the following in your web server's error log:
-<pre>
-access to <i>/your/path</i>/edit/process/<i>some_table</i>.cgi failed for
-<i>machine.domain.tld</i>, reason: malformed header from script.
-Bad header=HTTP/1.0 302 Moved Temporarily
-</pre>
- Then you forgot to apply this <a href="CGI-modules-2.76-patch.txt">patch</a> as mentioned in the <a href="install.html">New Installation</a> section of the documentation.
<li>If you get errors like this:
<pre>
UID.pm: Can't open /var/spool/freeside/conf/secrets: Permission denied
@@ -31,11 +19,8 @@ at <i>/your/path</i>/site_perl/FS/UID.pm line 26.
BEGIN failed--compilation aborted at
<i>/your/path</i>/edit/process/part_svc.cgi line 15.
</pre>
- Then the scripts are not running setuid freeside. If you were editing
-the files, it is possible you inadvertantly removed the setuid bit.
-As mentioned in the <a href="install.html">New Installation</a> section of the documentation, set ownership and permissions for the web interface. Your system should support secure setuid scripts or Perl's emulation, see <a href="http://www.perl.com/CPAN-local/doc/manual/html/pod/perlsec.html#Security_Bugs">perlsec: Security Bugs</a> for information and workarounds.
-<pre>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</pre>
+ Then the scripts are not running as the freeside freeside user. See
+the <a href="install.html">New Installation</a> section of the documentation.
+ <li>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 <a href="http://www.mysql.com/Manual_chapter/manual_Problems.html#Can_not_connect_to_server">MySQL documentation</a>, DBI manpage and the DBD::mysql manpage for details.
</ul>
</body>
diff --git a/htdocs/docs/upgrade2.html b/htdocs/docs/upgrade2.html
index 4bf7ea45a..7acae48f7 100644
--- a/htdocs/docs/upgrade2.html
+++ b/htdocs/docs/upgrade2.html
@@ -1,8 +1,8 @@
<head>
- <title>Upgrading to 1.1.3</title>
+ <title>Upgrading to 1.1.4</title>
</head>
<body>
-<h1>Upgrading to 1.1.3 from 1.1.x</h1>
+<h1>Upgrading to 1.1.4 from 1.1.x</h1>
<ul>
<li>If migrating from 1.0.0, see these <a href="upgrade.html">instructions</a> first.
<li>Back up your data and current Freeside installation.
diff --git a/htdocs/docs/upgrade3.html b/htdocs/docs/upgrade3.html
new file mode 100644
index 000000000..0837e0207
--- /dev/null
+++ b/htdocs/docs/upgrade3.html
@@ -0,0 +1,40 @@
+<head>
+ <title>Upgrading to 1.2.x</title>
+</head>
+<body>
+<h1>Upgrading to 1.2.x from 1.1.x</h1>
+<ul>
+ <li>If migrating from 1.0.0, see these <a href="upgrade.html">instructions</a> first.
+ <li>If migrating from less than 1.1.4, see these <a href="upgrade2.html">instructions</a> first.
+ <li>Back up your data and current Freeside installation.
+ <li>Install the Perl module <a href="http://www.perl.com/CPAN/modules/by-module/String/">String-Approx</a>
+ <li><a href="config.html">Configuration file</a> location has changed!
+ <li>Move /var/spool/freeside/dbdef.<i>datasrc</i> to /usr/local/etc/freeside/dbdef.<i>datasrc</i>.
+ <li>Move /var/spool/freeside/counters to /usr/local/etc/freeside/counters.<i>datasrc</i>.
+ <li>Move /var/spool/freeside/export to /usr/local/etc/freeside/export.<i>datasrc</i>.
+ <li>Apply the following changes to your database:
+<pre>
+<!-- ALTER TABLE cust_main ADD middle varchar(80) NULL;
+ALTER TABLE cust_main ADD titlenum int NULL;
+-->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 part_title (
+ titlenum int NOT NULL,
+ title varchar(80) NOT NULL,
+ PRIMARY KEY (titlenum)
+);
+-->CREATE TABLE cust_main_invoice (
+ destnum int NOT NULL,
+ custnum int NOT NULL,
+ dest varchar(80) NOT NULL,
+ PRIMARY KEY (destnum),
+ INDEX ( custnum )
+);
+</pre>
+ <li>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.
+ <li>Copy or symlink htdocs and site_perl to the new copies.
+</body>
diff --git a/htdocs/docs/upgrade4.html b/htdocs/docs/upgrade4.html
new file mode 100644
index 000000000..1d70f8b73
--- /dev/null
+++ b/htdocs/docs/upgrade4.html
@@ -0,0 +1,27 @@
+<head>
+ <title>Upgrading to 1.2.2</title>
+</head>
+<body>
+<h1>Upgrading to 1.2.2 from 1.2.x</h1>
+<ul>
+ <li>If migrating from 1.0.0, see these <a href="upgrade.html">instructions</a> first.
+ <li>If migrating from less than 1.1.4, see these <a href="upgrade2.html">instructions</a> first.
+ <li>If migrating from less than 1.2.0, see these <a href="upgrade3.html">instructions</a> first.
+ <li>Back up your data and current Freeside installation.
+ <li>Install the Perl modules <a href="http://www.perl.com/CPAN/modules/by-module/Locale/">Locale-Codes</a> and <a href="http://www.perl.com/CPAN/modules/by-module/Net/">Net-Whois</a>.
+ <li>Apply the following changes to your database:
+<pre>
+ALTER TABLE cust_pay_batch CHANGE exp exp VARCHAR(11);
+</pre>
+ <li>Copy or symlink htdocs to the new copy.
+ <li>Remove the symlink or directory <i>(your_site_perl_directory)</i>/FS.
+ <li>Change to the FS directory in the new tarball, and build and install the
+ Perl modules:
+ <pre>
+$ cd FS/
+$ perl Makefile.PL
+$ make
+$ su
+# make install</pre>
+ <li>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.
+</body>
diff --git a/htdocs/docs/upgrade5.html b/htdocs/docs/upgrade5.html
new file mode 100644
index 000000000..3f3431653
--- /dev/null
+++ b/htdocs/docs/upgrade5.html
@@ -0,0 +1,34 @@
+<head>
+ <title>Upgrading to 1.3.0</title>
+</head>
+<body>
+<h1>Upgrading to 1.2.3 from 1.2.2</h1>
+<ul>
+ <li>If migrating from 1.0.0, see these <a href="upgrade.html">instructions</a> first.
+ <li>If migrating from less than 1.1.4, see these <a href="upgrade2.html">instructions</a> first.
+ <li>If migrating from less than 1.2.0, see these <a href="upgrade3.html">instructions</a> first.
+ <li>If migrating from less than 1.2.2, see these <a href="upgrade4.html">instructions</a> first.
+ <li>Back up your data and current Freeside installation.
+ <li>Apply the following changes to your database:
+<pre>
+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)
+);
+</pre>
+ <li>Copy or symlink htdocs to the new copy.
+ <li>Remove the symlink or directory <i>(your_site_perl_directory)</i>/FS.
+ <li>Change to the FS directory in the new tarball, and build and install the
+ Perl modules:
+ <pre>
+$ cd FS/
+$ perl Makefile.PL
+$ make
+$ su
+# make install</pre>
+ <li>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.
+</body>
diff --git a/htdocs/docs/upgrade6.html b/htdocs/docs/upgrade6.html
new file mode 100644
index 000000000..dc82975f3
--- /dev/null
+++ b/htdocs/docs/upgrade6.html
@@ -0,0 +1,66 @@
+<head>
+ <title>Upgrading to 1.3.0</title>
+</head>
+<body>
+<h1>Upgrading to 1.3.0 from 1.2.3</h1>
+<ul>
+ <li>If migrating from 1.0.0, see these <a href="upgrade.html">instructions</a> first.
+ <li>If migrating from less than 1.1.4, see these <a href="upgrade2.html">instructions</a> first.
+ <li>If migrating from less than 1.2.0, see these <a href="upgrade3.html">instructions</a> first.
+ <li>If migrating from less than 1.2.2, see these <a href="upgrade4.html">instructions</a> first.
+ <li>If migrating from less than 1.2.3, see these <a href="upgrade5.html">instructions</a> first.
+ <li>Back up your data and current Freeside installation.
+ <li>As 1.3.0 requires transactions, <b>MySQL's default <a href="http://www.mysql.com/doc/M/y/MyISAM.html">MyISAM</a> and <a href="http://www.mysql.com/doc/I/S/ISAM.html">ISAM</a> table types are no longer supported</b>. Converting to <a href="http://www.postgresql.org/">PostgreSQL</a> is recommended. If you really want to use MySQL, convert your tables to one of the <a href="http://www.mysql.com/doc/T/a/Table_types.html">transaction-safe table types</a> such as <a href="http://www.mysql.com/doc/B/D/BDB.html">BDB</a>.
+ <li>Copy the <i>invoice_template</i> file from the <i>conf/</i> directory in the distribution to your <a href="config.html">configuration directory</a>.
+ <li>Install the <a href="http://search.cpan.org/search?dist=Text-Template">Text-Template</a>, <a href="http://search.cpan.org/search?dist=DBIx-DBSchema">DBIx-DBSchema</a>, <a href="http://search.cpan.org/search?dist=Net-SSH">Net-SSH</a>, <a href="http://search.cpan.org/search?dist=String-ShellQuote">String-ShellQuote</a> and <a href="http://search.cpan.org/search?dist=Net-SCP">Net-SCP</a> Perl modules.
+ <li>Apply the following changes to your database:
+<pre>
+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;
+
+</pre>
+ <li>If your database supports dropping columns:
+<pre>
+ALTER TABLE cust_bill DROP owed;
+ALTER TABLE cust_credit DROP credited;
+</pre>
+ Or, if your database does not support dropping columns, you can do this:
+<pre>
+ALTER TABLE cust_bill CHANGE owed depriciated decimal(10,2);
+ALTER TABLE cust_credit CHANGE credited depriciated2 decimal(10,2);
+</pre>
+
+ <li>Copy or symlink htdocs to the new copy.
+ <li>Remove the symlink or directory <i>(your_site_perl_directory)</i>/FS.
+ <li>Change to the FS directory in the new tarball, and build and install the
+ Perl modules:
+ <pre>
+$ cd FS/
+$ perl Makefile.PL
+$ make
+$ su
+# make install</pre>
+ <li>Run bin/dbdef-create.
+</body>
diff --git a/htdocs/docs/upgrade7.html b/htdocs/docs/upgrade7.html
new file mode 100644
index 000000000..d9dcfe2ae
--- /dev/null
+++ b/htdocs/docs/upgrade7.html
@@ -0,0 +1,24 @@
+<head>
+ <title>Upgrading to 1.3.1</title>
+</head>
+<body>
+<h1>Upgrading to 1.3.1 from 1.3.0</h1>
+<ul>
+ <li>If migrating from 1.0.0, see these <a href="upgrade.html">instructions</a> first.
+ <li>If migrating from less than 1.1.4, see these <a href="upgrade2.html">instructions</a> first.
+ <li>If migrating from less than 1.2.0, see these <a href="upgrade3.html">instructions</a> first.
+ <li>If migrating from less than 1.2.2, see these <a href="upgrade4.html">instructions</a> first.
+ <li>If migrating from less than 1.2.3, see these <a href="upgrade5.html">instructions</a> first.
+ <li>If migrating from less than 1.3.0, see these <a href="upgrade6.html">instructions</a> first.
+ <li>Back up your data and current Freeside installation.
+ <li>Copy or symlink htdocs to the new copy.
+ <li>Change to the FS directory in the new tarball, and build and install the
+ Perl modules:
+ <pre>
+$ cd FS/
+$ perl Makefile.PL
+$ make
+$ su
+# make install UNINST=1</pre>
+ <li>Run bin/dbdef-create.
+</body>