summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/abbr_state.txt72
-rwxr-xr-xetc/acp_logfile-parse197
-rwxr-xr-xetc/example-direct-cardin67
3 files changed, 72 insertions, 264 deletions
diff --git a/etc/abbr_state.txt b/etc/abbr_state.txt
new file mode 100644
index 000000000..7e4f57f78
--- /dev/null
+++ b/etc/abbr_state.txt
@@ -0,0 +1,72 @@
+State/Possession Abbreviation
+
+ALABAMA AL
+ALASKA AK
+AMERICAN SAMOA AS
+ARIZONA AZ
+ARKANSAS AR
+CALIFORNIA CA
+COLORADO CO
+CONNECTICUT CT
+DELAWARE DE
+DISTRICT OF COLUMBIA DC
+FEDERATED STATES OF MICRONESIA FM
+FLORIDA FL
+GEORGIA GA
+GUAM GU
+HAWAII HI
+IDAHO ID
+ILLINOIS IL
+INDIANA IN
+IOWA IA
+KANSAS KS
+KENTUCKY KY
+LOUISIANA LA
+MAINE ME
+MARSHALL ISLANDS MH
+MARYLAND MD
+MASSACHUSETTS MA
+MICHIGAN MI
+MINNESOTA MN
+MISSISSIPPI MS
+MISSOURI MO
+MONTANA MT
+NEBRASKA NE
+NEVADA NV
+NEW HAMPSHIRE NH
+NEW JERSEY NJ
+NEW MEXICO NM
+NEW YORK NY
+NORTH CAROLINA NC
+NORTH DAKOTA ND
+NORTHERN MARIANA ISLANDS MP
+OHIO OH
+OKLAHOMA OK
+OREGON OR
+PALAU PW
+PENNSYLVANIA PA
+PUERTO RICO PR
+RHODE ISLAND RI
+SOUTH CAROLINA SC
+SOUTH DAKOTA SD
+TENNESSEE TN
+TEXAS TX
+UTAH UT
+VERMONT VT
+VIRGIN ISLANDS VI
+VIRGINIA VA
+WASHINGTON WA
+WEST VIRGINIA WV
+WISCONSIN WI
+WYOMING WY
+
+
+Military "State" Abbreviation
+
+Armed Forces Africa AE
+Armed Forces Americas AA
+(except Canada)
+Armed Forces Canada AE
+Armed Forces Europe AE
+Armed Forces Middle East AE
+Armed Forces Pacific AP
diff --git a/etc/acp_logfile-parse b/etc/acp_logfile-parse
deleted file mode 100755
index 5e258991b..000000000
--- a/etc/acp_logfile-parse
+++ /dev/null
@@ -1,197 +0,0 @@
-#!/usr/bin/perl
-
-###
-# WHO WROTE THIS???
-###
-
-#require "perldb.pl";
-
-# Compute SLIP/PPP log times
-# Arguments -a Process entire file with totals
-# -t Process only totals
-# -f File to be processed if not current
-# -d processing start date (default is entire file)
-# -l to return all totals for dayuse
-# -w name of tmp work file for dayuse
-# user names
-
-require "time.pl";
-
-$space=' ';
-
-unless (@ARGV[0]) {
- print "Missing Arguments\n";
- print "-a - entire file\n";
- print "-t - totals only\n";
- print "-f - file name to be processed\n";
- print "-d - processing start date (yymmdd)\n";
- print "-l - return totals for dayuse\n";
- print "-w - tmp work file for dayuse\n";
- exit;
-} # end if test for missing arguments
-
-$infile = "/usr/annex/acp_logfile";
-$tmpfile = "/tmp/ppp";
-$n = $#ARGV;
-$start_yymmdd = "";
-for ($i = 0; $i <= $n; $i++) {
- if ($ARGV[$i] eq "-a") {
- $allflag = "true";
- }
- elsif ($ARGV[$i] eq "-t") {
- $totalflag = "true";
- }
- elsif ($ARGV[$i] eq "-f") {
- $i++;
- $infile = $ARGV[$i];
- }
- elsif ($ARGV[$i] eq "-d") {
- $i++;
- $start_yymmdd = $ARGV[$i];
- } #end start yymmdd
- elsif ($ARGV[$i] eq "-l") {
- $logflag = "true";
- $totalflag = "true";
- } # end log
- elsif ($ARGV[$i] eq "-w") {
- $i++;
- $tmpfile = $ARGV[$i];
- } # end tmp file
- else {
- ($arg_user,$arg_yymmdd) = split (/:/, $ARGV[$i]);
- $ip_user_date {$arg_user} = $ARGV[$i];
- $userflag = "true";
- } # end else
- } # end for 1 = 1 to n
-
-open (IN,$infile)
- || die "Can't open acp_logfile";
-
-NEXTUSER: while (<IN>) {
- chop;
- ($add,$ether,$port,$date,$time,$type,$action,$user) = split(/:/);
-
- if ($logflag) {
- $start_yymmdd = '';
- if ($ip_user_date{$user}) {
- ($ip_user, $start_yymmdd) =
- split (/:/, $ip_user_date{$user});
- } # end get date
- } # end log flag
- if ($start_yymmdd) {
- if ($date < $start_yymmdd) {
- next NEXTUSER;
- } #end date compare
- } #end if date
- if ($userflag){
- if (!$ip_user_date{$user}) {
- next NEXTUSER;
- } # end user test
- } # end by user or all
- if (($totalflag) ||
- ($allflag) ||
- ($ip_user_date{$user})) {
- if (($type eq 'ppp') || ($type eq 'slip')) {
-
- if ($action eq 'login') {
- $login{$user} = "$time:$date";
-
- }
- elsif ($action eq 'logout') {
- if (!$login{$user}) {
- $login{$user} = "010101:$date";
- } #end pad user if carry over
- ($stime,$sdate) = split(':',$login{$user});
- $start = &annex2sec($stime);
- $end = &annex2sec($time);
-
- #If we went through midnight, add a day;
- if ($end < $start) {$end += 86400;}
- $timeon = $end - $start;
-
- $elapsed{$user} += $timeon;
-
- if (!$totalflag) {
- print (&fmt_user($user),
- ' ', &fmt_date($sdate), ' In: ',
- &fmt_time($stime),' Out: ',
- &fmt_time($time),
- ' Elapsed: ', &fmt_sec($timeon), "\n");
- } # end total test
- } #end elsif action
- } # type = ppp of slip
- } # check arguments
-}
-close IN;
-
-if ($logflag) {
- open (TMPPPP, ">$tmpfile")
- || die "Can't open ppp tmp file";
- foreach $user ( sort((keys(%elapsed))) ) {
- $log_time = &fmt_sec($elapsed{$user});
- $tmp = join (':',
- $user,
- $log_time);
- print (TMPPPP "$tmp\n");
- }
- close (TMPPPP);
-}
- else {
- print "\n\nTotal Time On For Period:\n";
- print "-------------------------\n";
-
- foreach $user ( sort((keys(%elapsed))) ) {
- print (&fmt_user($user), " ",&fmt_sec($elapsed{$user}), "\n");
- }
- }
-exit(0);
-
-#-------------------------------------------------------
-#--------------- Subroutines Start Here ----------------
-#-------------------------------------------------------
-
-sub annex2sec {
- local($time) = @_;
- return( &time2sec( &break_annex($time) ) );
-}
-
-sub fmt_date {
- local($date) = @_;
-
- return( substr($date,2,2).'/'.substr($date,4,2).'/'.substr($date,0,2) );
-}
-
-sub fmt_time {
- local($time) = @_;
- local($s,$m,$h) = &break_annex($time);
- return ("$h:$m:$s");
-}
-
-
-sub break_annex {
- local($time) = @_;
- local($h,$m,$s);
-
- $h=substr($time,0,2);
- $m=substr($time,2,2);
- $s=substr($time,4,2);
-
- return ($s,$m,$h);
-}
-
-sub fmt_sec {
- local(@t) = &sec2time(@_);
- @t[2] += (@t[3]*24);
-
- foreach $a (@t) {
- if ($a < 10) {$a = "0$a";}
- }
-
- return ("@t[2]:@t[1]:@t[0]");
-}
-
-sub fmt_user {
- local($user) = @_;
- return( $user.substr($space,0,8 - length($user) ).' ' );
-}
-
diff --git a/etc/example-direct-cardin b/etc/example-direct-cardin
deleted file mode 100755
index 1a4097221..000000000
--- a/etc/example-direct-cardin
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/local/bin/perl
-
-###
-# THIS IS FROM CYBERCASH (is there a newer version?)
-###
-
-$paymentserverhost = 'localhost';
-$paymentserverport = 8000;
-$paymentserversecret = 'two-turntables';
-use CCLib qw(sendmserver);
-
-# first lets fake up some data
-# use time of day and pid to give me my pretend
-# order number
-# you obviously need to get real data from somewhere...
-
-$oid = "test$$"; #fake order number.
-$amount = 'usd 42.42';
-$ramount = 'usd 24.24';
-$pan = '4111111111111111';
-$name = 'John Q. Doe';
-$addr = '17 Richard Rd.';
-$city = 'Ivyland';
-$state = 'PA';
-$zip = '18974';
-$country = 'USA';
-$exp = '7/97';
-
-
-%result = &sendmserver('mauthcapture',
- 'Order-ID', $oid,
- 'Amount', $amount,
- 'Card-Number', $pan,
- 'Card-Name', $name,
- 'Card-Address', $addr,
- 'Card-City', $city,
- 'Card-State', $state,
- 'Card-Zip', $zip,
- 'Card-Country', $country,
- 'Card-Exp', $exp);
-
-#
-# just dump results to stdout.
-# you should process them...
-# to allow results to affect operation of your fulfillment...
-#
-foreach (keys(%result)) {
- print " $_ ==> $result{$_}\n";
-}
-
-print "\n";
-
-exit;
-
-$trans=$result{'MTransactionNumber'};
-$code=$result{'MRetrievalCode'};
-
-%result = &sendmserver('return',
- 'Order-ID', $oid,
- 'Return-Amount',$ramount,
- 'Amount',$amount,
- );
-
-foreach (keys(%result)) {
- print " $_ ==> $result{$_}\n";
-}
-