From 4196bc59e8cceb04c6f76fab46ce249ff0178c43 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 29 Sep 2003 02:17:51 +0000 Subject: finish removing quiet config options --- FS/FS/Conf.pm | 4 ++-- FS/bin/freeside-selfservice-server | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 6fa47b6bd..400de69d6 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -888,8 +888,8 @@ httemplate/docs/config.html { 'key' => 'selfservice_server-quiet', - 'section' => '', - 'description' => 'Disable decline and cancel emails generated by transactions initiated by the selfservice server. Not recommended, unless the customer will get instant feedback from a customer service UI, and receiving an email would be confusing/overkill.', + 'section' => 'deprecated', + 'description' => 'DEPRECATED, the self-service server no longer sends superfluous decline and cancel emails. Used to disable decline and cancel emails generated by transactions initiated by the selfservice server.', 'type' => 'checkbox', }, diff --git a/FS/bin/freeside-selfservice-server b/FS/bin/freeside-selfservice-server index 6cfafda58..107103973 100644 --- a/FS/bin/freeside-selfservice-server +++ b/FS/bin/freeside-selfservice-server @@ -43,11 +43,6 @@ open(LOCKFILE,">$lock_file") or die "can't open $lock_file: $!"; my $conf = new FS::Conf; -if ($conf->exists('selfservice_server-quiet')) { - $FS::cust_bill::quiet = 1; - $FS::cust_pkg::quiet = 1; -} - my $clientd = "/usr/local/sbin/freeside-selfservice-clientd"; #better name? my $warnkids=0; -- cgit v1.2.1 From e17e58178d528e16d45c333996f763afda55e054 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 29 Sep 2003 05:51:20 +0000 Subject: added agent.disabled agent.username agent._password --- FS/bin/freeside-setup | 3 +++ httemplate/docs/schema.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/FS/bin/freeside-setup b/FS/bin/freeside-setup index 27d02529c..bb122700a 100755 --- a/FS/bin/freeside-setup +++ b/FS/bin/freeside-setup @@ -336,6 +336,9 @@ sub tables_hash_hack { 'typenum', 'int', '', '', 'freq', 'int', 'NULL', '', 'prog', @perl_type, + 'disabled', 'char', 'NULL', 1, + 'username', 'varchar', '', $char_d, + '_password','varchar', '', $char_d, ], 'primary_key' => 'agentnum', 'unique' => [], diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index 9204bdc8f..bef567186 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -12,6 +12,9 @@
  • typenum - agent type
  • prog - (unimplemented)
  • freq - (unimplemented) +
  • disabled - Disabled flag, empty or 'Y' +
  • username - Username for the Agent interface +
  • _password - Password for the Agent interface
  • agent_type - Agent types define groups of packages that you can then assign to particular agents.
      -- cgit v1.2.1 From b59a412755582d30b4f7be2147b6ad32037e6f59 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 29 Sep 2003 05:51:50 +0000 Subject: agents can be disabled (auto-sensing based on schema) --- FS/FS/agent.pm | 23 ++++++++++++++- httemplate/browse/agent.cgi | 26 +++++++++++++++-- httemplate/edit/agent.cgi | 65 +++++++++++++++++++++++-------------------- httemplate/edit/cust_main.cgi | 6 ++-- 4 files changed, 85 insertions(+), 35 deletions(-) diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm index 6de15ae6f..bcba602cc 100644 --- a/FS/FS/agent.pm +++ b/FS/FS/agent.pm @@ -50,6 +50,12 @@ from FS::Record. The following fields are currently supported: =item freq - For future use. +=item disabled - Disabled flag, empty or 'Y' + +=item username - Username for the Agent interface + +=item _password - Password for the Agent interface + =back =head1 METHODS @@ -110,6 +116,21 @@ sub check { ; return $error if $error; + if ( $self->dbdef_table->column('disabled') ) { + $error = $self->ut_enum('disabled', [ '', 'Y' ] ); + return $error if $error; + } + + if ( $self->dbdef_table->column('username') ) { + $error = $self->ut_alphan('username'); + return $error if $error; + if ( length($self->username) ) { + $error = $self->ut_text('password'); # ut_text... arbitrary choice + } else { + $self->_password(''); + } + } + return "Unknown typenum!" unless $self->agent_type; @@ -144,7 +165,7 @@ sub pkgpart_hashref { =head1 VERSION -$Id: agent.pm,v 1.4 2003-08-05 00:20:40 khoff Exp $ +$Id: agent.pm,v 1.5 2003-09-29 05:51:50 ivan Exp $ =head1 BUGS diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index 0d808cd0d..ece01724e 100755 --- a/httemplate/browse/agent.cgi +++ b/httemplate/browse/agent.cgi @@ -2,6 +2,14 @@ <% + my %search; + if ( $cgi->param('showdisabled') + || !dbdef->table('agent')->column('disabled') ) { + %search = (); + } else { + %search = ( 'disabled' => '' ); + } + #bad false laziness with search/cust_main.cgi (also needs fixing up for #old mysql) my $ncancelled = " @@ -36,9 +44,18 @@ Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their type).

      Add a new agent

      +<% if ( dbdef->table('agent')->column('disabled') ) { %> + <%= $cgi->param('showdisabled') + ? do { $cgi->param('showdisabled', 0); + '( hide disabled agents )'; } + : do { $cgi->param('showdisabled', 1); + '( show disabled agents )'; } + %> +<% } %> + <%= table() %> - Agent + param('showdisabled') ? 2 : 3 %>>Agent Type Customers Freq. @@ -51,7 +68,7 @@ full offerings (via their type).

      foreach my $agent ( sort { #$a->getfield('agentnum') <=> $b->getfield('agentnum') $a->getfield('agent') cmp $b->getfield('agent') -} qsearch('agent',{}) ) { +} qsearch('agent', \%search ) ) { $ncancelled_sth->execute($agent->agentnum) or die $ncancelled_sth->errstr; my $num_ncancelled = $ncancelled_sth->fetchrow_arrayref->[0]; @@ -66,6 +83,11 @@ foreach my $agent ( sort { <%= $agent->agentnum %> +<% if ( dbdef->table('agent')->column('disabled') + && !$cgi->param('showdisabled') ) { %> + <%= $agent->disabled ? 'DISABLED' : '' %> +<% } %> + <%= $agent->agent %> <%= $agent->agent_type->atype %> diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi index 449456cdd..8a1cb2ae1 100755 --- a/httemplate/edit/agent.cgi +++ b/httemplate/edit/agent.cgi @@ -16,59 +16,64 @@ if ( $cgi->param('error') ) { my $action = $agent->agentnum ? 'Edit' : 'Add'; my $hashref = $agent->hashref; -print header("$action Agent", menubar( +%> + +<%= header("$action Agent", menubar( 'Main Menu' => $p, 'View all agents' => $p. 'browse/agent.cgi', -)); +)) %> -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); +<% if ( $cgi->param('error') ) { %> +Error: <%= $cgi->param('error') %> +<% } %> -print '
      ', - qq!!, - "Agent #", $hashref->{agentnum} ? $hashref->{agentnum} : "(NEW)"; + + +Agent #<%= $hashref->{agentnum} ? $hashref->{agentnum} : "(NEW)" %> -print &ntable("#cccccc", 2, ''), < Agent - + Agent type {disabled} eq 'Y' ? ' CHECKED' : '' %>> + +<% } %> - + - + +<% if ( dbdef->table('agent')->column('username') ) { %> + + Agent interface username + + + + Agent interface password + + +<% } %> -END -print qq!
      !; - -print <"> -END - -%> diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index eeceed889..73a0eef49 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -75,9 +75,11 @@ print qq!
      !, my $r = qq!* !; -my @agents = qsearch( 'agent', {} ); +my %agent_search = dbdef->table('agent')->column('disabled') + ? ( 'disabled' => '' ) : (); +my @agents = qsearch( 'agent', \%agent_search ); #die "No agents created!" unless @agents; -eidiot "You have not created any agents. You must create at least one agent before adding a customer. Go to ". popurl(2). "browse/agent.cgi and create one or more agents." unless @agents; +eidiot "You have not created any agents (or all agents are disabled). You must create at least one agent before adding a customer. Go to ". popurl(2). "browse/agent.cgi and create one or more agents." unless @agents; my $agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first if ( scalar(@agents) == 1 ) { print qq!!; -- cgit v1.2.1 From 292610eafc745b94f4d9d2d784b02669bd297fc6 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 29 Sep 2003 06:22:18 +0000 Subject: eliminate warning --- fs_signup/FS-SignupClient/cgi/signup.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index 57b93d4f0..78f31aa28 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ b/fs_signup/FS-SignupClient/cgi/signup.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: signup.cgi,v 1.43 2003-07-04 03:21:42 ivan Exp $ +# $Id: signup.cgi,v 1.44 2003-09-29 06:22:18 ivan Exp $ use strict; use vars qw( @payby $cgi $locales $packages @@ -524,7 +524,7 @@ sub regionselector { my ( $selected_county, $selected_state, $selected_country, $prefix, $onchange ) = @_; - my $prefix = '' unless defined $prefix; + $prefix = '' unless defined $prefix; my $countyflag = 0; -- cgit v1.2.1 From d68a2fa2e5d615ba978fcb97e600b3d4f067f880 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 29 Sep 2003 06:35:34 +0000 Subject: remove Gratuitous Capitalization --- httemplate/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/index.html b/httemplate/index.html index a898d9134..e3556c2d7 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -195,7 +195,7 @@
    • View/Edit locales and tax rates - Change tax rates, or break down a country into states, or a state into counties and assign different tax rates to each. -
    • View/Edit Access Numbers +
    • View/Edit access numbers - Points of Presence
    • View/Edit invoice events - Actions for overdue invoices
    • View/Edit message catalog - Change error messages and other customizable labels. -- cgit v1.2.1 From ce0cb6c1b8d51cc9bb27fe9685bcccab5d8e25fb Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 29 Sep 2003 06:51:24 +0000 Subject: signup with agent selection --- FS/FS/ClientAPI/Signup.pm | 16 +- .../FS-SignupClient/cgi/signup-agentselect.html | 195 +++++++++++++++++++++ fs_signup/FS-SignupClient/cgi/signup.cgi | 3 +- 3 files changed, 211 insertions(+), 3 deletions(-) create mode 100755 fs_signup/FS-SignupClient/cgi/signup-agentselect.html diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index 36045d9e2..5ca1f93ed 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -3,7 +3,7 @@ package FS::ClientAPI::Signup; use strict; use Tie::RefHash; use FS::Conf; -use FS::Record qw(qsearch qsearchs); +use FS::Record qw(qsearch qsearchs dbdef); use FS::agent; use FS::cust_main_county; use FS::part_pkg; @@ -29,6 +29,15 @@ sub signup_info { 'cust_main_county' => [ map { $_->hashref } qsearch('cust_main_county', {}) ], + 'agent' => + [ + map { $_->hashref } + qsearch('agent', dbdef->table('agent')->column('disabled') + ? { 'disabled' => '' } + : {} + ) + ], + 'agentnum2part_pkg' => { map { @@ -39,7 +48,10 @@ sub signup_info { grep { $_->svcpart('svc_acct') && $href->{ $_->pkgpart } } qsearch( 'part_pkg', { 'disabled' => '' } ) ]; - } qsearch('agent', {} ) + } qsearch('agent', dbdef->table('agent')->column('disabled') + ? { 'disabled' => '' } + : {} + ) }, 'svc_acct_pop' => [ map { $_->hashref } qsearch('svc_acct_pop',{} ) ], diff --git a/fs_signup/FS-SignupClient/cgi/signup-agentselect.html b/fs_signup/FS-SignupClient/cgi/signup-agentselect.html new file mode 100755 index 000000000..24513611f --- /dev/null +++ b/fs_signup/FS-SignupClient/cgi/signup-agentselect.html @@ -0,0 +1,195 @@ +ISP Signup form +ISP Signup form

      +<%= $error %> + + + + +Agent

      +Contact Information + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      *Contact name
      (last, first)
      , +
      Company
      *Address
       
      *City*State/Country + <%= + ($county_html, $state_html, $country_html) = + regionselector( $county, $state, $country ); + + "$county_html $state_html"; + %> + *Zip
      *Country<%= $country_html %>
      Day Phone
      Night Phone
      Fax
      * required fields
      +
      Billing information + + +<%= scalar(@payby) > 1 ? '' : '' %> +
      + + <%= + $OUT .= ' + + Postal mail invoice +
      Email invoice +
      Billing type
      + + + + <%= + + my $cardselect = ''; + + my %payby = ( + 'CARD' => qq!Credit card
      *$cardselect
      *Exp !. expselect("CARD"). qq!
      *Name on card
      !, + 'DCRD' => qq!Credit card
      *$cardselect
      *Exp !. expselect("DCRD"). qq!
      *Name on card
      !, + 'CHEK' => qq!Electronic check
      ${r}Account number
      ${r}ABA/Routing code
      ${r}Bank name !, + 'DCHK' => qq!Electronic check
      ${r}Account number
      ${r}ABA/Routing code
      ${r}Bank name !, + 'LECB' => qq!Phone bill billing
      ${r}Phone number !, + 'BILL' => qq!Billing
      P.O.
      *Exp !. expselect("BILL", "12-2037"). qq!
      *Attention
      !, + 'COMP' => qq!Complimentary
      *Approved by
      *Exp !. expselect("COMP"), + 'PREPAY' => qq!Prepaid card
      *!, + ); + + my( $account, $aba ) = split('@', $payinfo); + my %paybychecked = ( + 'CARD' => qq!Credit card
      *$cardselect
      *Exp !. expselect("CARD", $paydate). qq!
      *Name on card
      !, + 'DCRD' => qq!Credit card
      *$cardselect
      *Exp !. expselect("DCRD", $paydate). qq!
      *Name on card
      !, + 'CHEK' => qq!Electronic check
      ${r}Account number
      ${r}ABA/Routing code
      ${r}Bank name !, + 'DCHK' => qq!Electronic check
      ${r}Account number
      ${r}ABA/Routing code
      ${r}Bank name !, + 'LECB' => qq!Phone bill billing
      ${r}Phone number !, + 'BILL' => qq!Billing
      P.O.
      *Exp !. expselect("BILL", $paydate). qq!
      *Attention
      !, + 'COMP' => qq!Complimentary
      *Approved by
      *Exp !. expselect("COMP", $paydate), + 'PREPAY' => qq!Prepaid card
      *!, + ); + + for (@payby) { + if ( scalar(@payby) == 1) { + $OUT .= '"; + } else { + $OUT .= qq!!; + } else { + $OUT .= qq!> $payby{$_}!; + } + + } + } + %> + +
      '. + qq!!. + "$paybychecked{$_} $paybychecked{$_}
      * required fields for each billing type +

      First package + + + + + + + + + + + + + + + + +<%= + if ( $init_data->{'security_phrase'} ) { + $OUT .= < + + + +ENDOUT + } else { + $OUT .= ''; + } +%> +<%= + if ( scalar(@$pops) ) { + $OUT .= ''; + } else { + $OUT .= popselector($popnum); + } +%> +
      Username
      Password
      Re-enter Password
      Security Phrase +
      Access number'. + popselector($popnum). '
      +

      + diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index 78f31aa28..6fa01deaf 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ b/fs_signup/FS-SignupClient/cgi/signup.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: signup.cgi,v 1.44 2003-09-29 06:22:18 ivan Exp $ +# $Id: signup.cgi,v 1.45 2003-09-29 06:51:24 ivan Exp $ use strict; use vars qw( @payby $cgi $locales $packages @@ -213,6 +213,7 @@ if ( defined $cgi->param('magic') ) { $password = $cgi->param('_password'); $popnum = $cgi->param('popnum'); #$agentnum, # = $cgi->param('agentnum'), + $agentnum ||= $cgi->param('agentnum'); $init_popstate = $cgi->param('init_popstate'); if ( $cgi->param('_password') ne $cgi->param('_password2') ) { -- cgit v1.2.1 From c3e5b694f98b424f9fe68b76450d1464ba7a0fec Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 29 Sep 2003 10:10:47 +0000 Subject: agent browse now links to active/cancelled customers --- httemplate/browse/agent.cgi | 7 ++-- httemplate/search/cust_main.cgi | 77 ++++++++++++++++++++++++++++------------- 2 files changed, 58 insertions(+), 26 deletions(-) diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi index ece01724e..44343e15c 100755 --- a/httemplate/browse/agent.cgi +++ b/httemplate/browse/agent.cgi @@ -78,6 +78,9 @@ foreach my $agent ( sort { my $num_cancelled = $num_total - $num_ncancelled; + my $cust_main_link = $p. 'search/cust_main.cgi?agentnum_on=1&'. + 'agentnum='. $agent->agentnum; + %> @@ -93,9 +96,9 @@ foreach my $agent ( sort { <%= $agent->agent_type->atype %> <%= $num_ncancelled %> - active + active
      <%= $num_cancelled %> - cancelled + cancelled <%= $agent->freq %> <%= $agent->prog %> diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index 5b39a09f2..50d367e1e 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -50,6 +50,7 @@ my $total = 0; my(@cust_main, $sortby, $orderby); if ( $cgi->param('browse') || $cgi->param('otaker_on') + || $cgi->param('agentnum_on') ) { my %search = (); @@ -73,6 +74,9 @@ if ( $cgi->param('browse') if ( $cgi->param('otaker_on') ) { $cgi->param('otaker') =~ /^(\w{1,32})$/ or eidiot "Illegal otaker\n"; $search{otaker} = $1; + } elsif ( $cgi->param('agentnum_on') ) { + $cgi->param('agentnum') =~ /^(\d+)$/ or eidiot "Illegal agentnum\n"; + $search{agentnum} = $1; } else { die "unknown query..."; } @@ -112,6 +116,7 @@ if ( $cgi->param('browse') AND (temp1_$$.count > 0 OR temp2_$$.count = 0 ) "; + } else { $ncancelled = " 0 < ( SELECT COUNT(*) FROM cust_pkg @@ -124,15 +129,32 @@ if ( $cgi->param('browse') WHERE cust_pkg.custnum = cust_main.custnum ) "; - } - + } + } + + my $cancelled = ''; + if ( $cgi->param('cancelled') ) { + $cancelled = " + 0 = ( SELECT COUNT(*) FROM cust_pkg + WHERE cust_pkg.custnum = cust_main.custnum + AND ( cust_pkg.cancel IS NULL + OR cust_pkg.cancel = 0 + ) + ) + AND 0 < ( SELECT COUNT(*) FROM cust_pkg + WHERE cust_pkg.custnum = cust_main.custnum + ) + "; } #EWWWWWW my $qual = join(' AND ', map { "$_ = ". dbh->quote($search{$_}) } keys %search ); - if ( $ncancelled ) { + if ( $cancelled ) { + $qual .= ' AND ' if $qual; + $qual .= $cancelled; + } elsif ( $ncancelled ) { $qual .= ' AND ' if $qual; $qual .= $ncancelled; } @@ -150,21 +172,22 @@ if ( $cgi->param('browse') $total = $sth->fetchrow_arrayref->[0]; - if ( $ncancelled ) { + my $rqual = $cancelled || $ncancelled; + if ( $rqual ) { if ( %search ) { - $ncancelled = " AND $ncancelled"; + $rqual = " AND $rqual"; } else { - $ncancelled = " WHERE $ncancelled"; + $rqual = " WHERE $rqual"; } } my @just_cust_main; if ( driver_name eq 'mysql' ) { @just_cust_main = qsearch('cust_main', \%search, 'cust_main.*', - ",temp1_$$,temp2_$$ $ncancelled $orderby $limit"); + ",temp1_$$,temp2_$$ $rqual $orderby $limit"); } else { @just_cust_main = qsearch('cust_main', \%search, '', - "$ncancelled $orderby $limit" ); + "$rqual $orderby $limit" ); } if ( driver_name eq 'mysql' ) { my $sql = "DROP TABLE temp1_$$,temp2_$$;"; @@ -213,9 +236,12 @@ if ( $cgi->param('browse') } @cust_main = grep { $_->ncancelled_pkgs || ! $_->all_pkgs } @cust_main - if $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me - || ( $conf->exists('hidecancelledcustomers') - && ! $cgi->param('showcancelledcustomers') ); + if ! $cgi->param('cancelled') + && ( + $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me + || ( $conf->exists('hidecancelledcustomers') + && ! $cgi->param('showcancelledcustomers') ) + ); my %saw = (); @cust_main = grep { !$saw{$_->custnum}++ } @cust_main; @@ -277,19 +303,22 @@ if ( scalar(@cust_main) == 1 && ! $cgi->param('referral_custnum') ) { } } #end pager - - if ( $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me - || ( $conf->exists('hidecancelledcustomers') - && ! $cgi->param('showcancelledcustomers') - ) - ) { - $cgi->param('showcancelledcustomers', 1); - $cgi->param('offset', 0); - print qq!( show cancelled customers )!; - } else { - $cgi->param('showcancelledcustomers', 0); - $cgi->param('offset', 0); - print qq!( hide cancelled customers )!; + + unless ( $cgi->param('cancelled') ) { + if ( $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me + || ( $conf->exists('hidecancelledcustomers') + && ! $cgi->param('showcancelledcustomers') + ) + ) { + $cgi->param('showcancelledcustomers', 1); + $cgi->param('offset', 0); + print qq!( show!; + } else { + $cgi->param('showcancelledcustomers', 0); + $cgi->param('offset', 0); + print qq!( hide!; + } + print ' cancelled customers )'; } if ( $cgi->param('referral_custnum') ) { $cgi->param('referral_custnum') =~ /^(\d+)$/ -- cgit v1.2.1 From 5993bc956415cf285d630e0657d4a6e0642ebead Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Sep 2003 07:04:54 +0000 Subject: CGI.pm 2.47 required for ->upload() method --- htetc/global.asa | 2 +- htetc/handler.pl | 2 +- httemplate/docs/upgrade-1.4.2.html | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htetc/global.asa b/htetc/global.asa index f00ae57f5..ee5cfcb3c 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -4,7 +4,7 @@ BEGIN { eval "use Devel::AutoProfiler;"; } #only if installed... use strict; use vars qw( $cgi $p ); -use CGI; +use CGI 2.47; #use CGI::Carp qw(fatalsToBrowser); use Date::Format; use Date::Parse; diff --git a/htetc/handler.pl b/htetc/handler.pl index 1660cb3fa..b007353e3 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -62,7 +62,7 @@ sub handler { package HTML::Mason::Commands; use strict; use vars qw( $cgi $p ); - use CGI; + use CGI 2.47; #use CGI::Carp qw(fatalsToBrowser); use Date::Format; use Date::Parse; diff --git a/httemplate/docs/upgrade-1.4.2.html b/httemplate/docs/upgrade-1.4.2.html index cf3d0de39..c5606b284 100644 --- a/httemplate/docs/upgrade-1.4.2.html +++ b/httemplate/docs/upgrade-1.4.2.html @@ -7,6 +7,7 @@
    • If migrating from less than 1.4.1, see these instructions first.
    • Back up your data and current Freeside installation.
    • Install Locale::SubCountry +
    • CGI.pm minimum version 2.47 is required. You will probably need to install a current CGI.pm from CPAN if you are using Perl 5.005 or earlier.
    • Run make aspdocs or make masondocs.
    • Copy aspdocs/ or masondocs/ to your web server's document space.
    • Run make install-perl-modules. -- cgit v1.2.1 From 56c771abafb2cad3430fee10deacba6e561933de Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Sep 2003 08:23:16 +0000 Subject: calendar popups! --- CREDITS | 3 + httemplate/edit/REAL_cust_pkg.cgi | 58 +- httemplate/elements/calendar-en.js | 45 + httemplate/elements/calendar-setup.js | 135 +++ httemplate/elements/calendar-win2k-2.css | 217 +++++ httemplate/elements/calendar.js | 1379 ++++++++++++++++++++++++++++++ httemplate/elements/calendar_stripped.js | 12 + httemplate/images/calendar.png | Bin 0 -> 426 bytes httemplate/search/cust_pkg.html | 46 +- httemplate/search/report_cc.html | 44 +- httemplate/search/report_credit.html | 44 +- httemplate/search/report_cust_pay.html | 57 +- httemplate/search/report_tax.html | 46 +- 13 files changed, 2010 insertions(+), 76 deletions(-) create mode 100644 httemplate/elements/calendar-en.js create mode 100644 httemplate/elements/calendar-setup.js create mode 100644 httemplate/elements/calendar-win2k-2.css create mode 100644 httemplate/elements/calendar.js create mode 100644 httemplate/elements/calendar_stripped.js create mode 100644 httemplate/images/calendar.png diff --git a/CREDITS b/CREDITS index 0b4e2d9c9..9bc917acc 100644 --- a/CREDITS +++ b/CREDITS @@ -113,5 +113,8 @@ Infostreet export. Richard Siddall sent in Mason fixes and other things I'm probably forgetting. +Contains "JS Calendar" v0.9.3 +by Mihai Bazon licensed under the terms of the GNU LGPL. + Everything else is my (Ivan Kohler ) fault. diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi index e44acba3c..4156b850b 100755 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ b/httemplate/edit/REAL_cust_pkg.cgi @@ -1,6 +1,6 @@ <% -# +# my $error =''; my $pkgnum = ''; @@ -30,6 +30,15 @@ print header('Package Edit'); #, menubar( # 'Main Menu' => popurl(2) #)); +%> + + + + + + +<% + #print info my($susp,$cancel,$expire)=( $cust_pkg->getfield('susp'), @@ -45,6 +54,9 @@ print '
      ', print qq!Error: $error! if $error; +#my $format = "%c %z (%Z)"; +my $format = "%m/%d/%Y %T %z (%Z)"; + print ntable("#cccccc",2), 'Package number', $pkgnum, '', @@ -55,23 +67,29 @@ print ntable("#cccccc",2), 'Order taker', $otaker, '', 'Setup date'. - ''; + ''. + ' '. + ''; print 'Last bill date', - 'last_bill) + ? time2str($format, $cust_pkg->last_bill) : "" ), - '">' + '">'. + ' '. + '' if $cust_pkg->dbdef_table->column('last_bill'); print 'Next bill date', - ''; + ''. + ' '. + ''; print 'Suspension date', - time2str("%D",$susp), '' + time2str($format, $susp), '' if $susp; #print 'Expiration date', @@ -79,18 +97,34 @@ print 'Suspension date', # if $expire; print 'Expiration date'. '', - ''. + ''. + ' '. '
      (will cancel this package'. ' when the date is reached)'. ''; print 'Cancellation date', - time2str("%D",$cancel), '' + time2str($format, $cancel), '' if $cancel; %> +
      diff --git a/httemplate/elements/calendar-en.js b/httemplate/elements/calendar-en.js new file mode 100644 index 000000000..bc075bb74 --- /dev/null +++ b/httemplate/elements/calendar-en.js @@ -0,0 +1,45 @@ +// ** I18N +Calendar._DN = new Array +("Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday"); +Calendar._MN = new Array +("January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Toggle first day of week"; +Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; +Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; +Calendar._TT["GO_TODAY"] = "Go Today"; +Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; +Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; +Calendar._TT["SEL_DATE"] = "Select date"; +Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; +Calendar._TT["PART_TODAY"] = " (today)"; +Calendar._TT["MON_FIRST"] = "Display Monday first"; +Calendar._TT["SUN_FIRST"] = "Display Sunday first"; +Calendar._TT["CLOSE"] = "Close"; +Calendar._TT["TODAY"] = "Today"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; +Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; + +Calendar._TT["WK"] = "wk"; diff --git a/httemplate/elements/calendar-setup.js b/httemplate/elements/calendar-setup.js new file mode 100644 index 000000000..de6ff591f --- /dev/null +++ b/httemplate/elements/calendar-setup.js @@ -0,0 +1,135 @@ +/* Copyright Mihai Bazon, 2002, 2003 | http://students.infoiasi.ro/~mishoo + * --------------------------------------------------------------------------- + * + * The DHTML Calendar + * + * Details and latest version at: + * http://students.infoiasi.ro/~mishoo/site/calendar.epl + * + * Feel free to use this script under the terms of the GNU Lesser General + * Public License, as long as you do not remove or alter this notice. + * + * This file defines helper functions for setting up the calendar. They are + * intended to help non-programmers get a working calendar on their site + * quickly. + */ + +// $Id: calendar-setup.js,v 1.2 2003-09-30 08:23:15 ivan Exp $ + +/** + * This function "patches" an input field (or other element) to use a calendar + * widget for date selection. + * + * The "params" is a single object that can have the following properties: + * + * prop. name | description + * ------------------------------------------------------------------------------------------------- + * inputField | the ID of an input field to store the date + * displayArea | the ID of a DIV or other element to show the date + * button | ID of a button or other element that will trigger the calendar + * eventName | event that will trigger the calendar, without the "on" prefix (default: "click") + * ifFormat | date format that will be stored in the input field + * daFormat | the date format that will be used to display the date in displayArea + * singleClick | (true/false) wether the calendar is in single click mode or not (default: true) + * mondayFirst | (true/false) if true Monday is the first day of week, Sunday otherwise (default: false) + * align | alignment (default: "Bl"); if you don't know what's this see the calendar documentation + * range | array with 2 elements. Default: [1900, 2999] -- the range of years available + * weekNumbers | (true/false) if it's true (default) the calendar will display week numbers + * flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID + * flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar) + * disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar + * + * None of them is required, they all have default values. However, if you + * pass none of "inputField", "displayArea" or "button" you'll get a warning + * saying "nothing to setup". + */ +Calendar.setup = function (params) { + function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; + + param_default("inputField", null); + param_default("displayArea", null); + param_default("button", null); + param_default("eventName", "click"); + param_default("ifFormat", "y/mm/dd"); + param_default("daFormat", "y/mm/dd"); + param_default("singleClick", true); + param_default("disableFunc", null); + param_default("mondayFirst", false); + param_default("align", "Bl"); + param_default("range", [1900, 2999]); + param_default("weekNumbers", true); + param_default("flat", null); + param_default("flatCallback", null); + + var tmp = ["inputField", "displayArea", "button"]; + for (var i in tmp) { + if (typeof params[tmp[i]] == "string") { + params[tmp[i]] = document.getElementById(params[tmp[i]]); + } + } + if (!(params.flat || params.inputField || params.displayArea || params.button)) { + alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); + return false; + } + + function onSelect(cal) { + if (cal.params.flat) { + if (typeof cal.params.flatCallback == "function") { + cal.params.flatCallback(cal); + } else { + alert("No flatCallback given -- doing nothing."); + } + return false; + } + if (cal.params.inputField) { + cal.params.inputField.value = cal.date.print(cal.params.ifFormat); + } + if (cal.params.displayArea) { + cal.params.displayArea.innerHTML = cal.date.print(cal.params.daFormat); + } + if (cal.params.singleClick && cal.dateClicked) { + cal.callCloseHandler(); + } + }; + + if (params.flat != null) { + params.flat = document.getElementById(params.flat); + if (!params.flat) { + alert("Calendar.setup:\n Flat specified but can't find parent."); + return false; + } + var cal = new Calendar(params.mondayFirst, null, onSelect); + cal.params = params; + cal.weekNumbers = params.weekNumbers; + cal.setRange(params.range[0], params.range[1]); + cal.setDisabledHandler(params.disableFunc); + cal.create(params.flat); + cal.show(); + return false; + } + + var triggerEl = params.button || params.displayArea || params.inputField; + triggerEl["on" + params.eventName] = function() { + var dateEl = params.inputField || params.displayArea; + var dateFmt = params.inputField ? params.ifFormat : params.daFormat; + var mustCreate = false; + if (!window.calendar) { + window.calendar = new Calendar(params.mondayFirst, null, onSelect, function(cal) { cal.hide(); }); + window.calendar.weekNumbers = params.weekNumbers; + mustCreate = true; + } else { + window.calendar.hide(); + } + window.calendar.setRange(params.range[0], params.range[1]); + window.calendar.params = params; + window.calendar.setDisabledHandler(params.disableFunc); + window.calendar.setDateFormat(dateFmt); + if (mustCreate) { + window.calendar.create(); + } + window.calendar.parseDate(dateEl.value || dateEl.innerHTML); + window.calendar.refresh(); + window.calendar.showAtElement(params.displayArea || params.inputField, params.align); + return false; + }; +}; diff --git a/httemplate/elements/calendar-win2k-2.css b/httemplate/elements/calendar-win2k-2.css new file mode 100644 index 000000000..398e78efe --- /dev/null +++ b/httemplate/elements/calendar-win2k-2.css @@ -0,0 +1,217 @@ +/* The main calendar widget. DIV containing a table. */ + +.calendar { + position: relative; + display: none; + border-top: 2px solid #fff; + border-right: 2px solid #000; + border-bottom: 2px solid #000; + border-left: 2px solid #fff; + font-size: 11px; + color: #000; + cursor: default; + background: #d4c8d0; + font-family: tahoma,verdana,sans-serif; +} + +.calendar table { + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; + font-size: 11px; + color: #000; + cursor: default; + background: #d4c8d0; + font-family: tahoma,verdana,sans-serif; +} + +/* Header part -- contains navigation buttons and day names. */ + +.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ + text-align: center; + padding: 1px; + border-top: 1px solid #fff; + border-right: 1px solid #000; + border-bottom: 1px solid #000; + border-left: 1px solid #fff; +} + +.calendar thead .title { /* This holds the current "month, year" */ + font-weight: bold; + padding: 1px; + border: 1px solid #000; + background: #847880; + color: #fff; + text-align: center; +} + +.calendar thead .headrow { /* Row containing navigation buttons */ +} + +.calendar thead .daynames { /* Row containing the day names */ +} + +.calendar thead .name { /* Cells containing the day names */ + border-bottom: 1px solid #000; + padding: 2px; + text-align: center; + background: #f4e8f0; +} + +.calendar thead .weekend { /* How a weekend day name shows in header */ + color: #f00; +} + +.calendar thead .hilite { /* How do the buttons in header appear when hover */ + border-top: 2px solid #fff; + border-right: 2px solid #000; + border-bottom: 2px solid #000; + border-left: 2px solid #fff; + padding: 0px; + background: #e4d8e0; +} + +.calendar thead .active { /* Active (pressed) buttons in header */ + padding: 2px 0px 0px 2px; + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; + background: #c4b8c0; +} + +/* The body part -- contains all the days in month. */ + +.calendar tbody .day { /* Cells containing month days dates */ + width: 2em; + text-align: right; + padding: 2px 4px 2px 2px; +} + +.calendar table .wn { + padding: 2px 3px 2px 2px; + border-right: 1px solid #000; + background: #f4e8f0; +} + +.calendar tbody .rowhilite td { + background: #e4d8e0; +} + +.calendar tbody .rowhilite td.wn { + background: #d4c8d0; +} + +.calendar tbody td.hilite { /* Hovered cells */ + padding: 1px 3px 1px 1px; + border-top: 1px solid #fff; + border-right: 1px solid #000; + border-bottom: 1px solid #000; + border-left: 1px solid #fff; +} + +.calendar tbody td.active { /* Active (pressed) cells */ + padding: 2px 2px 0px 2px; + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; +} + +.calendar tbody td.selected { /* Cell showing selected date */ + font-weight: bold; + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; + padding: 2px 2px 0px 2px; + background: #e4d8e0; +} + +.calendar tbody td.weekend { /* Cells showing weekend days */ + color: #f00; +} + +.calendar tbody td.today { /* Cell showing today date */ + font-weight: bold; + color: #00f; +} + +.calendar tbody .disabled { color: #999; } + +.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ + visibility: hidden; +} + +.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ + display: none; +} + +/* The footer part -- status bar and "Close" button */ + +.calendar tfoot .footrow { /* The in footer (only one right now) */ +} + +.calendar tfoot .ttip { /* Tooltip (status bar) cell */ + background: #f4e8f0; + padding: 1px; + border: 1px solid #000; + background: #847880; + color: #fff; + text-align: center; +} + +.calendar tfoot .hilite { /* Hover style for buttons in footer */ + border-top: 1px solid #fff; + border-right: 1px solid #000; + border-bottom: 1px solid #000; + border-left: 1px solid #fff; + padding: 1px; + background: #e4d8e0; +} + +.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ + padding: 2px 0px 0px 2px; + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; +} + +/* Combo boxes (menus that display months/years for direct selection) */ + +.combo { + position: absolute; + display: none; + width: 4em; + top: 0px; + left: 0px; + cursor: default; + border-top: 1px solid #fff; + border-right: 1px solid #000; + border-bottom: 1px solid #000; + border-left: 1px solid #fff; + background: #e4d8e0; + font-size: smaller; + padding: 1px; +} + +.combo .label { + text-align: center; + padding: 1px; +} + +.combo .active { + background: #d4c8d0; + padding: 0px; + border-top: 1px solid #000; + border-right: 1px solid #fff; + border-bottom: 1px solid #fff; + border-left: 1px solid #000; +} + +.combo .hilite { + background: #408; + color: #fea; +} diff --git a/httemplate/elements/calendar.js b/httemplate/elements/calendar.js new file mode 100644 index 000000000..772931b30 --- /dev/null +++ b/httemplate/elements/calendar.js @@ -0,0 +1,1379 @@ +/* Copyright Mihai Bazon, 2002, 2003 | http://students.infoiasi.ro/~mishoo + * --------------------------------------------------------------------------- + * + * The DHTML Calendar, version 0.9.3 "It's still alive & keeps rocking" + * + * Details and latest version at: + * http://students.infoiasi.ro/~mishoo/site/calendar.epl + * + * Feel free to use this script under the terms of the GNU Lesser General + * Public License, as long as you do not remove or alter this notice. + */ + +// $Id: calendar.js,v 1.2 2003-09-30 08:23:15 ivan Exp $ + +/** The Calendar object constructor. */ +Calendar = function (mondayFirst, dateStr, onSelected, onClose) { + // member variables + this.activeDiv = null; + this.currentDateEl = null; + this.checkDisabled = null; + this.timeout = null; + this.onSelected = onSelected || null; + this.onClose = onClose || null; + this.dragging = false; + this.hidden = false; + this.minYear = 1970; + this.maxYear = 2050; + this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"]; + this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"]; + this.isPopup = true; + this.weekNumbers = true; + this.mondayFirst = mondayFirst; + this.dateStr = dateStr; + this.ar_days = null; + // HTML elements + this.table = null; + this.element = null; + this.tbody = null; + this.firstdayname = null; + // Combo boxes + this.monthsCombo = null; + this.yearsCombo = null; + this.hilitedMonth = null; + this.activeMonth = null; + this.hilitedYear = null; + this.activeYear = null; + // Information + this.dateClicked = false; + + // one-time initializations + if (!Calendar._DN3) { + // table of short day names + var ar = new Array(); + for (var i = 8; i > 0;) { + ar[--i] = Calendar._DN[i].substr(0, 3); + } + Calendar._DN3 = ar; + // table of short month names + ar = new Array(); + for (var i = 12; i > 0;) { + ar[--i] = Calendar._MN[i].substr(0, 3); + } + Calendar._MN3 = ar; + } +}; + +// ** constants + +/// "static", needed for event handlers. +Calendar._C = null; + +/// detect a special case of "web browser" +Calendar.is_ie = ( /msie/i.test(navigator.userAgent) && + !/opera/i.test(navigator.userAgent) ); + +// short day names array (initialized at first constructor call) +Calendar._DN3 = null; + +// short month names array (initialized at first constructor call) +Calendar._MN3 = null; + +// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate +// library, at some point. + +Calendar.getAbsolutePos = function(el) { + var r = { x: el.offsetLeft, y: el.offsetTop }; + if (el.offsetParent) { + var tmp = Calendar.getAbsolutePos(el.offsetParent); + r.x += tmp.x; + r.y += tmp.y; + } + return r; +}; + +Calendar.isRelated = function (el, evt) { + var related = evt.relatedTarget; + if (!related) { + var type = evt.type; + if (type == "mouseover") { + related = evt.fromElement; + } else if (type == "mouseout") { + related = evt.toElement; + } + } + while (related) { + if (related == el) { + return true; + } + related = related.parentNode; + } + return false; +}; + +Calendar.removeClass = function(el, className) { + if (!(el && el.className)) { + return; + } + var cls = el.className.split(" "); + var ar = new Array(); + for (var i = cls.length; i > 0;) { + if (cls[--i] != className) { + ar[ar.length] = cls[i]; + } + } + el.className = ar.join(" "); +}; + +Calendar.addClass = function(el, className) { + Calendar.removeClass(el, className); + el.className += " " + className; +}; + +Calendar.getElement = function(ev) { + if (Calendar.is_ie) { + return window.event.srcElement; + } else { + return ev.currentTarget; + } +}; + +Calendar.getTargetElement = function(ev) { + if (Calendar.is_ie) { + return window.event.srcElement; + } else { + return ev.target; + } +}; + +Calendar.stopEvent = function(ev) { + if (Calendar.is_ie) { + window.event.cancelBubble = true; + window.event.returnValue = false; + } else { + ev.preventDefault(); + ev.stopPropagation(); + } + return false; +}; + +Calendar.addEvent = function(el, evname, func) { + if (el.attachEvent) { // IE + el.attachEvent("on" + evname, func); + } else if (el.addEventListener) { // Gecko / W3C + el.addEventListener(evname, func, true); + } else { // Opera (or old browsers) + el["on" + evname] = func; + } +}; + +Calendar.removeEvent = function(el, evname, func) { + if (el.detachEvent) { // IE + el.detachEvent("on" + evname, func); + } else if (el.removeEventListener) { // Gecko / W3C + el.removeEventListener(evname, func, true); + } else { // Opera (or old browsers) + el["on" + evname] = null; + } +}; + +Calendar.createElement = function(type, parent) { + var el = null; + if (document.createElementNS) { + // use the XHTML namespace; IE won't normally get here unless + // _they_ "fix" the DOM2 implementation. + el = document.createElementNS("http://www.w3.org/1999/xhtml", type); + } else { + el = document.createElement(type); + } + if (typeof parent != "undefined") { + parent.appendChild(el); + } + return el; +}; + +// END: UTILITY FUNCTIONS + +// BEGIN: CALENDAR STATIC FUNCTIONS + +/** Internal -- adds a set of events to make some element behave like a button. */ +Calendar._add_evs = function(el) { + with (Calendar) { + addEvent(el, "mouseover", dayMouseOver); + addEvent(el, "mousedown", dayMouseDown); + addEvent(el, "mouseout", dayMouseOut); + if (is_ie) { + addEvent(el, "dblclick", dayMouseDblClick); + el.setAttribute("unselectable", true); + } + } +}; + +Calendar.findMonth = function(el) { + if (typeof el.month != "undefined") { + return el; + } else if (typeof el.parentNode.month != "undefined") { + return el.parentNode; + } + return null; +}; + +Calendar.findYear = function(el) { + if (typeof el.year != "undefined") { + return el; + } else if (typeof el.parentNode.year != "undefined") { + return el.parentNode; + } + return null; +}; + +Calendar.showMonthsCombo = function () { + var cal = Calendar._C; + if (!cal) { + return false; + } + var cal = cal; + var cd = cal.activeDiv; + var mc = cal.monthsCombo; + if (cal.hilitedMonth) { + Calendar.removeClass(cal.hilitedMonth, "hilite"); + } + if (cal.activeMonth) { + Calendar.removeClass(cal.activeMonth, "active"); + } + var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()]; + Calendar.addClass(mon, "active"); + cal.activeMonth = mon; + mc.style.left = cd.offsetLeft + "px"; + mc.style.top = (cd.offsetTop + cd.offsetHeight) + "px"; + mc.style.display = "block"; +}; + +Calendar.showYearsCombo = function (fwd) { + var cal = Calendar._C; + if (!cal) { + return false; + } + var cal = cal; + var cd = cal.activeDiv; + var yc = cal.yearsCombo; + if (cal.hilitedYear) { + Calendar.removeClass(cal.hilitedYear, "hilite"); + } + if (cal.activeYear) { + Calendar.removeClass(cal.activeYear, "active"); + } + cal.activeYear = null; + var Y = cal.date.getFullYear() + (fwd ? 1 : -1); + var yr = yc.firstChild; + var show = false; + for (var i = 12; i > 0; --i) { + if (Y >= cal.minYear && Y <= cal.maxYear) { + yr.firstChild.data = Y; + yr.year = Y; + yr.style.display = "block"; + show = true; + } else { + yr.style.display = "none"; + } + yr = yr.nextSibling; + Y += fwd ? 2 : -2; + } + if (show) { + yc.style.left = cd.offsetLeft + "px"; + yc.style.top = (cd.offsetTop + cd.offsetHeight) + "px"; + yc.style.display = "block"; + } +}; + +// event handlers + +Calendar.tableMouseUp = function(ev) { + var cal = Calendar._C; + if (!cal) { + return false; + } + if (cal.timeout) { + clearTimeout(cal.timeout); + } + var el = cal.activeDiv; + if (!el) { + return false; + } + var target = Calendar.getTargetElement(ev); + Calendar.removeClass(el, "active"); + if (target == el || target.parentNode == el) { + Calendar.cellClick(el); + } + var mon = Calendar.findMonth(target); + var date = null; + if (mon) { + date = new Date(cal.date); + if (mon.month != date.getMonth()) { + date.setMonth(mon.month); + cal.setDate(date); + cal.dateClicked = false; + cal.callHandler(); + } + } else { + var year = Calendar.findYear(target); + if (year) { + date = new Date(cal.date); + if (year.year != date.getFullYear()) { + date.setFullYear(year.year); + cal.setDate(date); + cal.dateClicked = false; + cal.callHandler(); + } + } + } + with (Calendar) { + removeEvent(document, "mouseup", tableMouseUp); + removeEvent(document, "mouseover", tableMouseOver); + removeEvent(document, "mousemove", tableMouseOver); + cal._hideCombos(); + _C = null; + return stopEvent(ev); + } +}; + +Calendar.tableMouseOver = function (ev) { + var cal = Calendar._C; + if (!cal) { + return; + } + var el = cal.activeDiv; + var target = Calendar.getTargetElement(ev); + if (target == el || target.parentNode == el) { + Calendar.addClass(el, "hilite active"); + Calendar.addClass(el.parentNode, "rowhilite"); + } else { + Calendar.removeClass(el, "active"); + Calendar.removeClass(el, "hilite"); + Calendar.removeClass(el.parentNode, "rowhilite"); + } + var mon = Calendar.findMonth(target); + if (mon) { + if (mon.month != cal.date.getMonth()) { + if (cal.hilitedMonth) { + Calendar.removeClass(cal.hilitedMonth, "hilite"); + } + Calendar.addClass(mon, "hilite"); + cal.hilitedMonth = mon; + } else if (cal.hilitedMonth) { + Calendar.removeClass(cal.hilitedMonth, "hilite"); + } + } else { + var year = Calendar.findYear(target); + if (year) { + if (year.year != cal.date.getFullYear()) { + if (cal.hilitedYear) { + Calendar.removeClass(cal.hilitedYear, "hilite"); + } + Calendar.addClass(year, "hilite"); + cal.hilitedYear = year; + } else if (cal.hilitedYear) { + Calendar.removeClass(cal.hilitedYear, "hilite"); + } + } + } + return Calendar.stopEvent(ev); +}; + +Calendar.tableMouseDown = function (ev) { + if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) { + return Calendar.stopEvent(ev); + } +}; + +Calendar.calDragIt = function (ev) { + var cal = Calendar._C; + if (!(cal && cal.dragging)) { + return false; + } + var posX; + var posY; + if (Calendar.is_ie) { + posY = window.event.clientY + document.body.scrollTop; + posX = window.event.clientX + document.body.scrollLeft; + } else { + posX = ev.pageX; + posY = ev.pageY; + } + cal.hideShowCovered(); + var st = cal.element.style; + st.left = (posX - cal.xOffs) + "px"; + st.top = (posY - cal.yOffs) + "px"; + return Calendar.stopEvent(ev); +}; + +Calendar.calDragEnd = function (ev) { + var cal = Calendar._C; + if (!cal) { + return false; + } + cal.dragging = false; + with (Calendar) { + removeEvent(document, "mousemove", calDragIt); + removeEvent(document, "mouseover", stopEvent); + removeEvent(document, "mouseup", calDragEnd); + tableMouseUp(ev); + } + cal.hideShowCovered(); +}; + +Calendar.dayMouseDown = function(ev) { + var el = Calendar.getElement(ev); + if (el.disabled) { + return false; + } + var cal = el.calendar; + cal.activeDiv = el; + Calendar._C = cal; + if (el.navtype != 300) with (Calendar) { + addClass(el, "hilite active"); + addEvent(document, "mouseover", tableMouseOver); + addEvent(document, "mousemove", tableMouseOver); + addEvent(document, "mouseup", tableMouseUp); + } else if (cal.isPopup) { + cal._dragStart(ev); + } + if (el.navtype == -1 || el.navtype == 1) { + cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250); + } else if (el.navtype == -2 || el.navtype == 2) { + cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250); + } else { + cal.timeout = null; + } + return Calendar.stopEvent(ev); +}; + +Calendar.dayMouseDblClick = function(ev) { + Calendar.cellClick(Calendar.getElement(ev)); + if (Calendar.is_ie) { + document.selection.empty(); + } +}; + +Calendar.dayMouseOver = function(ev) { + var el = Calendar.getElement(ev); + if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) { + return false; + } + if (el.ttip) { + if (el.ttip.substr(0, 1) == "_") { + var date = null; + with (el.calendar.date) { + date = new Date(getFullYear(), getMonth(), el.caldate); + } + el.ttip = date.print(el.calendar.ttDateFormat) + el.ttip.substr(1); + } + el.calendar.tooltips.firstChild.data = el.ttip; + } + if (el.navtype != 300) { + Calendar.addClass(el, "hilite"); + if (el.caldate) { + Calendar.addClass(el.parentNode, "rowhilite"); + } + } + return Calendar.stopEvent(ev); +}; + +Calendar.dayMouseOut = function(ev) { + with (Calendar) { + var el = getElement(ev); + if (isRelated(el, ev) || _C || el.disabled) { + return false; + } + removeClass(el, "hilite"); + if (el.caldate) { + removeClass(el.parentNode, "rowhilite"); + } + el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"]; + return stopEvent(ev); + } +}; + +/** + * A generic "click" handler :) handles all types of buttons defined in this + * calendar. + */ +Calendar.cellClick = function(el) { + var cal = el.calendar; + var closing = false; + var newdate = false; + var date = null; + if (typeof el.navtype == "undefined") { + Calendar.removeClass(cal.currentDateEl, "selected"); + Calendar.addClass(el, "selected"); + closing = (cal.currentDateEl == el); + if (!closing) { + cal.currentDateEl = el; + } + cal.date.setDate(el.caldate); + date = cal.date; + newdate = true; + // a date was clicked + cal.dateClicked = true; + } else { + if (el.navtype == 200) { + Calendar.removeClass(el, "hilite"); + cal.callCloseHandler(); + return; + } + date = (el.navtype == 0) ? new Date() : new Date(cal.date); + // unless "today" was clicked, we assume no date was clicked so + // the selected handler will know not to close the calenar when + // in single-click mode. + cal.dateClicked = (el.navtype == 0); + var year = date.getFullYear(); + var mon = date.getMonth(); + function setMonth(m) { + var day = date.getDate(); + var max = date.getMonthDays(m); + if (day > max) { + date.setDate(max); + } + date.setMonth(m); + }; + switch (el.navtype) { + case -2: + if (year > cal.minYear) { + date.setFullYear(year - 1); + } + break; + case -1: + if (mon > 0) { + setMonth(mon - 1); + } else if (year-- > cal.minYear) { + date.setFullYear(year); + setMonth(11); + } + break; + case 1: + if (mon < 11) { + setMonth(mon + 1); + } else if (year < cal.maxYear) { + date.setFullYear(year + 1); + setMonth(0); + } + break; + case 2: + if (year < cal.maxYear) { + date.setFullYear(year + 1); + } + break; + case 100: + cal.setMondayFirst(!cal.mondayFirst); + return; + case 0: + // TODAY will bring us here + if ((typeof cal.checkDisabled == "function") && cal.checkDisabled(date)) { + // remember, "date" was previously set to new + // Date() if TODAY was clicked; thus, it + // contains today date. + return false; + } + break; + } + if (!date.equalsTo(cal.date)) { + cal.setDate(date); + newdate = true; + } + } + if (newdate) { + cal.callHandler(); + } + if (closing) { + Calendar.removeClass(el, "hilite"); + cal.callCloseHandler(); + } +}; + +// END: CALENDAR STATIC FUNCTIONS + +// BEGIN: CALENDAR OBJECT FUNCTIONS + +/** + * This function creates the calendar inside the given parent. If _par is + * null than it creates a popup calendar inside the BODY element. If _par is + * an element, be it BODY, then it creates a non-popup calendar (still + * hidden). Some properties need to be set before calling this function. + */ +Calendar.prototype.create = function (_par) { + var parent = null; + if (! _par) { + // default parent is the document body, in which case we create + // a popup calendar. + parent = document.getElementsByTagName("body")[0]; + this.isPopup = true; + } else { + parent = _par; + this.isPopup = false; + } + this.date = this.dateStr ? new Date(this.dateStr) : new Date(); + + var table = Calendar.createElement("table"); + this.table = table; + table.cellSpacing = 0; + table.cellPadding = 0; + table.calendar = this; + Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown); + + var div = Calendar.createElement("div"); + this.element = div; + div.className = "calendar"; + if (this.isPopup) { + div.style.position = "absolute"; + div.style.display = "none"; + } + div.appendChild(table); + + var thead = Calendar.createElement("thead", table); + var cell = null; + var row = null; + + var cal = this; + var hh = function (text, cs, navtype) { + cell = Calendar.createElement("td", row); + cell.colSpan = cs; + cell.className = "button"; + Calendar._add_evs(cell); + cell.calendar = cal; + cell.navtype = navtype; + if (text.substr(0, 1) != "&") { + cell.appendChild(document.createTextNode(text)); + } + else { + // FIXME: dirty hack for entities + cell.innerHTML = text; + } + return cell; + }; + + row = Calendar.createElement("tr", thead); + var title_length = 6; + (this.isPopup) && --title_length; + (this.weekNumbers) && ++title_length; + + hh("-", 1, 100).ttip = Calendar._TT["TOGGLE"]; + this.title = hh("", title_length, 300); + this.title.className = "title"; + if (this.isPopup) { + this.title.ttip = Calendar._TT["DRAG_TO_MOVE"]; + this.title.style.cursor = "move"; + hh("×", 1, 200).ttip = Calendar._TT["CLOSE"]; + } + + row = Calendar.createElement("tr", thead); + row.className = "headrow"; + + this._nav_py = hh("«", 1, -2); + this._nav_py.ttip = Calendar._TT["PREV_YEAR"]; + + this._nav_pm = hh("‹", 1, -1); + this._nav_pm.ttip = Calendar._TT["PREV_MONTH"]; + + this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0); + this._nav_now.ttip = Calendar._TT["GO_TODAY"]; + + this._nav_nm = hh("›", 1, 1); + this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"]; + + this._nav_ny = hh("»", 1, 2); + this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"]; + + // day names + row = Calendar.createElement("tr", thead); + row.className = "daynames"; + if (this.weekNumbers) { + cell = Calendar.createElement("td", row); + cell.className = "name wn"; + cell.appendChild(document.createTextNode(Calendar._TT["WK"])); + } + for (var i = 7; i > 0; --i) { + cell = Calendar.createElement("td", row); + cell.appendChild(document.createTextNode("")); + if (!i) { + cell.navtype = 100; + cell.calendar = this; + Calendar._add_evs(cell); + } + } + this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild; + this._displayWeekdays(); + + var tbody = Calendar.createElement("tbody", table); + this.tbody = tbody; + + for (i = 6; i > 0; --i) { + row = Calendar.createElement("tr", tbody); + if (this.weekNumbers) { + cell = Calendar.createElement("td", row); + cell.appendChild(document.createTextNode("")); + } + for (var j = 7; j > 0; --j) { + cell = Calendar.createElement("td", row); + cell.appendChild(document.createTextNode("")); + cell.calendar = this; + Calendar._add_evs(cell); + } + } + + var tfoot = Calendar.createElement("tfoot", table); + + row = Calendar.createElement("tr", tfoot); + row.className = "footrow"; + + cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300); + cell.className = "ttip"; + if (this.isPopup) { + cell.ttip = Calendar._TT["DRAG_TO_MOVE"]; + cell.style.cursor = "move"; + } + this.tooltips = cell; + + div = Calendar.createElement("div", this.element); + this.monthsCombo = div; + div.className = "combo"; + for (i = 0; i < Calendar._MN.length; ++i) { + var mn = Calendar.createElement("div"); + mn.className = "label"; + mn.month = i; + mn.appendChild(document.createTextNode(Calendar._MN3[i])); + div.appendChild(mn); + } + + div = Calendar.createElement("div", this.element); + this.yearsCombo = div; + div.className = "combo"; + for (i = 12; i > 0; --i) { + var yr = Calendar.createElement("div"); + yr.className = "label"; + yr.appendChild(document.createTextNode("")); + div.appendChild(yr); + } + + this._init(this.mondayFirst, this.date); + parent.appendChild(this.element); +}; + +/** keyboard navigation, only for popup calendars */ +Calendar._keyEvent = function(ev) { + if (!window.calendar) { + return false; + } + (Calendar.is_ie) && (ev = window.event); + var cal = window.calendar; + var act = (Calendar.is_ie || ev.type == "keypress"); + if (ev.ctrlKey) { + switch (ev.keyCode) { + case 37: // KEY left + act && Calendar.cellClick(cal._nav_pm); + break; + case 38: // KEY up + act && Calendar.cellClick(cal._nav_py); + break; + case 39: // KEY right + act && Calendar.cellClick(cal._nav_nm); + break; + case 40: // KEY down + act && Calendar.cellClick(cal._nav_ny); + break; + default: + return false; + } + } else switch (ev.keyCode) { + case 32: // KEY space (now) + Calendar.cellClick(cal._nav_now); + break; + case 27: // KEY esc + act && cal.hide(); + break; + case 37: // KEY left + case 38: // KEY up + case 39: // KEY right + case 40: // KEY down + if (act) { + var date = cal.date.getDate() - 1; + var el = cal.currentDateEl; + var ne = null; + var prev = (ev.keyCode == 37) || (ev.keyCode == 38); + switch (ev.keyCode) { + case 37: // KEY left + (--date >= 0) && (ne = cal.ar_days[date]); + break; + case 38: // KEY up + date -= 7; + (date >= 0) && (ne = cal.ar_days[date]); + break; + case 39: // KEY right + (++date < cal.ar_days.length) && (ne = cal.ar_days[date]); + break; + case 40: // KEY down + date += 7; + (date < cal.ar_days.length) && (ne = cal.ar_days[date]); + break; + } + if (!ne) { + if (prev) { + Calendar.cellClick(cal._nav_pm); + } else { + Calendar.cellClick(cal._nav_nm); + } + date = (prev) ? cal.date.getMonthDays() : 1; + el = cal.currentDateEl; + ne = cal.ar_days[date - 1]; + } + Calendar.removeClass(el, "selected"); + Calendar.addClass(ne, "selected"); + cal.date.setDate(ne.caldate); + cal.callHandler(); + cal.currentDateEl = ne; + } + break; + case 13: // KEY enter + if (act) { + cal.callHandler(); + cal.hide(); + } + break; + default: + return false; + } + return Calendar.stopEvent(ev); +}; + +/** + * (RE)Initializes the calendar to the given date and style (if mondayFirst is + * true it makes Monday the first day of week, otherwise the weeks start on + * Sunday. + */ +Calendar.prototype._init = function (mondayFirst, date) { + var today = new Date(); + var year = date.getFullYear(); + if (year < this.minYear) { + year = this.minYear; + date.setFullYear(year); + } else if (year > this.maxYear) { + year = this.maxYear; + date.setFullYear(year); + } + this.mondayFirst = mondayFirst; + this.date = new Date(date); + var month = date.getMonth(); + var mday = date.getDate(); + var no_days = date.getMonthDays(); + date.setDate(1); + var wday = date.getDay(); + var MON = mondayFirst ? 1 : 0; + var SAT = mondayFirst ? 5 : 6; + var SUN = mondayFirst ? 6 : 0; + if (mondayFirst) { + wday = (wday > 0) ? (wday - 1) : 6; + } + var iday = 1; + var row = this.tbody.firstChild; + var MN = Calendar._MN3[month]; + var hasToday = ((today.getFullYear() == year) && (today.getMonth() == month)); + var todayDate = today.getDate(); + var week_number = date.getWeekNumber(); + var ar_days = new Array(); + for (var i = 0; i < 6; ++i) { + if (iday > no_days) { + row.className = "emptyrow"; + row = row.nextSibling; + continue; + } + var cell = row.firstChild; + if (this.weekNumbers) { + cell.className = "day wn"; + cell.firstChild.data = week_number; + cell = cell.nextSibling; + } + ++week_number; + row.className = "daysrow"; + for (var j = 0; j < 7; ++j) { + cell.className = "day"; + if ((!i && j < wday) || iday > no_days) { + // cell.className = "emptycell"; + cell.innerHTML = " "; + cell.disabled = true; + cell = cell.nextSibling; + continue; + } + cell.disabled = false; + cell.firstChild.data = iday; + if (typeof this.checkDisabled == "function") { + date.setDate(iday); + if (this.checkDisabled(date)) { + cell.className += " disabled"; + cell.disabled = true; + } + } + if (!cell.disabled) { + ar_days[ar_days.length] = cell; + cell.caldate = iday; + cell.ttip = "_"; + if (iday == mday) { + cell.className += " selected"; + this.currentDateEl = cell; + } + if (hasToday && (iday == todayDate)) { + cell.className += " today"; + cell.ttip += Calendar._TT["PART_TODAY"]; + } + if (wday == SAT || wday == SUN) { + cell.className += " weekend"; + } + } + ++iday; + ((++wday) ^ 7) || (wday = 0); + cell = cell.nextSibling; + } + row = row.nextSibling; + } + this.ar_days = ar_days; + this.title.firstChild.data = Calendar._MN[month] + ", " + year; + // PROFILE + // this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms"; +}; + +/** + * Calls _init function above for going to a certain date (but only if the + * date is different than the currently selected one). + */ +Calendar.prototype.setDate = function (date) { + if (!date.equalsTo(this.date)) { + this._init(this.mondayFirst, date); + } +}; + +/** + * Refreshes the calendar. Useful if the "disabledHandler" function is + * dynamic, meaning that the list of disabled date can change at runtime. + * Just * call this function if you think that the list of disabled dates + * should * change. + */ +Calendar.prototype.refresh = function () { + this._init(this.mondayFirst, this.date); +}; + +/** Modifies the "mondayFirst" parameter (EU/US style). */ +Calendar.prototype.setMondayFirst = function (mondayFirst) { + this._init(mondayFirst, this.date); + this._displayWeekdays(); +}; + +/** + * Allows customization of what dates are enabled. The "unaryFunction" + * parameter must be a function object that receives the date (as a JS Date + * object) and returns a boolean value. If the returned value is true then + * the passed date will be marked as disabled. + */ +Calendar.prototype.setDisabledHandler = function (unaryFunction) { + this.checkDisabled = unaryFunction; +}; + +/** Customization of allowed year range for the calendar. */ +Calendar.prototype.setRange = function (a, z) { + this.minYear = a; + this.maxYear = z; +}; + +/** Calls the first user handler (selectedHandler). */ +Calendar.prototype.callHandler = function () { + if (this.onSelected) { + this.onSelected(this, this.date.print(this.dateFormat)); + } +}; + +/** Calls the second user handler (closeHandler). */ +Calendar.prototype.callCloseHandler = function () { + if (this.onClose) { + this.onClose(this); + } + this.hideShowCovered(); +}; + +/** Removes the calendar object from the DOM tree and destroys it. */ +Calendar.prototype.destroy = function () { + var el = this.element.parentNode; + el.removeChild(this.element); + Calendar._C = null; +}; + +/** + * Moves the calendar element to a different section in the DOM tree (changes + * its parent). + */ +Calendar.prototype.reparent = function (new_parent) { + var el = this.element; + el.parentNode.removeChild(el); + new_parent.appendChild(el); +}; + +// This gets called when the user presses a mouse button anywhere in the +// document, if the calendar is shown. If the click was outside the open +// calendar this function closes it. +Calendar._checkCalendar = function(ev) { + if (!window.calendar) { + return false; + } + var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev); + for (; el != null && el != calendar.element; el = el.parentNode); + if (el == null) { + // calls closeHandler which should hide the calendar. + window.calendar.callCloseHandler(); + return Calendar.stopEvent(ev); + } +}; + +/** Shows the calendar. */ +Calendar.prototype.show = function () { + var rows = this.table.getElementsByTagName("tr"); + for (var i = rows.length; i > 0;) { + var row = rows[--i]; + Calendar.removeClass(row, "rowhilite"); + var cells = row.getElementsByTagName("td"); + for (var j = cells.length; j > 0;) { + var cell = cells[--j]; + Calendar.removeClass(cell, "hilite"); + Calendar.removeClass(cell, "active"); + } + } + this.element.style.display = "block"; + this.hidden = false; + if (this.isPopup) { + window.calendar = this; + Calendar.addEvent(document, "keydown", Calendar._keyEvent); + Calendar.addEvent(document, "keypress", Calendar._keyEvent); + Calendar.addEvent(document, "mousedown", Calendar._checkCalendar); + } + this.hideShowCovered(); +}; + +/** + * Hides the calendar. Also removes any "hilite" from the class of any TD + * element. + */ +Calendar.prototype.hide = function () { + if (this.isPopup) { + Calendar.removeEvent(document, "keydown", Calendar._keyEvent); + Calendar.removeEvent(document, "keypress", Calendar._keyEvent); + Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar); + } + this.element.style.display = "none"; + this.hidden = true; + this.hideShowCovered(); +}; + +/** + * Shows the calendar at a given absolute position (beware that, depending on + * the calendar element style -- position property -- this might be relative + * to the parent's containing rectangle). + */ +Calendar.prototype.showAt = function (x, y) { + var s = this.element.style; + s.left = x + "px"; + s.top = y + "px"; + this.show(); +}; + +/** Shows the calendar near a given element. */ +Calendar.prototype.showAtElement = function (el, opts) { + var p = Calendar.getAbsolutePos(el); + if (!opts || typeof opts != "string") { + this.showAt(p.x, p.y + el.offsetHeight); + return true; + } + this.show(); + var w = this.element.offsetWidth; + var h = this.element.offsetHeight; + this.hide(); + var valign = opts.substr(0, 1); + var halign = "l"; + if (opts.length > 1) { + halign = opts.substr(1, 1); + } + // vertical alignment + switch (valign) { + case "T": p.y -= h; break; + case "B": p.y += el.offsetHeight; break; + case "C": p.y += (el.offsetHeight - h) / 2; break; + case "t": p.y += el.offsetHeight - h; break; + case "b": break; // already there + } + // horizontal alignment + switch (halign) { + case "L": p.x -= w; break; + case "R": p.x += el.offsetWidth; break; + case "C": p.x += (el.offsetWidth - w) / 2; break; + case "r": p.x += el.offsetWidth - w; break; + case "l": break; // already there + } + this.showAt(p.x, p.y); +}; + +/** Customizes the date format. */ +Calendar.prototype.setDateFormat = function (str) { + this.dateFormat = str; +}; + +/** Customizes the tooltip date format. */ +Calendar.prototype.setTtDateFormat = function (str) { + this.ttDateFormat = str; +}; + +/** + * Tries to identify the date represented in a string. If successful it also + * calls this.setDate which moves the calendar to the given date. + */ +Calendar.prototype.parseDate = function (str, fmt) { + var y = 0; + var m = -1; + var d = 0; + var a = str.split(/\W+/); + if (!fmt) { + fmt = this.dateFormat; + } + var b = fmt.split(/\W+/); + var i = 0, j = 0; + for (i = 0; i < a.length; ++i) { + if (b[i] == "D" || b[i] == "DD") { + continue; + } + if (b[i] == "d" || b[i] == "dd") { + d = parseInt(a[i], 10); + } + if (b[i] == "m" || b[i] == "mm") { + m = parseInt(a[i], 10) - 1; + } + if ((b[i] == "y") || (b[i] == "yy")) { + y = parseInt(a[i], 10); + (y < 100) && (y += (y > 29) ? 1900 : 2000); + } + if (b[i] == "M" || b[i] == "MM") { + for (j = 0; j < 12; ++j) { + if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; } + } + } + } + if (y != 0 && m != -1 && d != 0) { + this.setDate(new Date(y, m, d)); + return; + } + y = 0; m = -1; d = 0; + for (i = 0; i < a.length; ++i) { + if (a[i].search(/[a-zA-Z]+/) != -1) { + var t = -1; + for (j = 0; j < 12; ++j) { + if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; } + } + if (t != -1) { + if (m != -1) { + d = m+1; + } + m = t; + } + } else if (parseInt(a[i], 10) <= 12 && m == -1) { + m = a[i]-1; + } else if (parseInt(a[i], 10) > 31 && y == 0) { + y = parseInt(a[i], 10); + (y < 100) && (y += (y > 29) ? 1900 : 2000); + } else if (d == 0) { + d = a[i]; + } + } + if (y == 0) { + var today = new Date(); + y = today.getFullYear(); + } + if (m != -1 && d != 0) { + this.setDate(new Date(y, m, d)); + } +}; + +Calendar.prototype.hideShowCovered = function () { + function getStyleProp(obj, style){ + var value = obj.style[style]; + if (!value) { + if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C + value = document.defaultView. + getComputedStyle(obj, "").getPropertyValue(style); + } else if (obj.currentStyle) { // IE + value = obj.currentStyle[style]; + } else { + value = obj.style[style]; + } + } + return value; + }; + + var tags = new Array("applet", "iframe", "select"); + var el = this.element; + + var p = Calendar.getAbsolutePos(el); + var EX1 = p.x; + var EX2 = el.offsetWidth + EX1; + var EY1 = p.y; + var EY2 = el.offsetHeight + EY1; + + for (var k = tags.length; k > 0; ) { + var ar = document.getElementsByTagName(tags[--k]); + var cc = null; + + for (var i = ar.length; i > 0;) { + cc = ar[--i]; + + p = Calendar.getAbsolutePos(cc); + var CX1 = p.x; + var CX2 = cc.offsetWidth + CX1; + var CY1 = p.y; + var CY2 = cc.offsetHeight + CY1; + + if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) { + if (!cc.__msh_save_visibility) { + cc.__msh_save_visibility = getStyleProp(cc, "visibility"); + } + cc.style.visibility = cc.__msh_save_visibility; + } else { + if (!cc.__msh_save_visibility) { + cc.__msh_save_visibility = getStyleProp(cc, "visibility"); + } + cc.style.visibility = "hidden"; + } + } + } +}; + +/** Internal function; it displays the bar with the names of the weekday. */ +Calendar.prototype._displayWeekdays = function () { + var MON = this.mondayFirst ? 0 : 1; + var SUN = this.mondayFirst ? 6 : 0; + var SAT = this.mondayFirst ? 5 : 6; + var cell = this.firstdayname; + for (var i = 0; i < 7; ++i) { + cell.className = "day name"; + if (!i) { + cell.ttip = this.mondayFirst ? Calendar._TT["SUN_FIRST"] : Calendar._TT["MON_FIRST"]; + cell.navtype = 100; + cell.calendar = this; + Calendar._add_evs(cell); + } + if (i == SUN || i == SAT) { + Calendar.addClass(cell, "weekend"); + } + cell.firstChild.data = Calendar._DN3[i + 1 - MON]; + cell = cell.nextSibling; + } +}; + +/** Internal function. Hides all combo boxes that might be displayed. */ +Calendar.prototype._hideCombos = function () { + this.monthsCombo.style.display = "none"; + this.yearsCombo.style.display = "none"; +}; + +/** Internal function. Starts dragging the element. */ +Calendar.prototype._dragStart = function (ev) { + if (this.dragging) { + return; + } + this.dragging = true; + var posX; + var posY; + if (Calendar.is_ie) { + posY = window.event.clientY + document.body.scrollTop; + posX = window.event.clientX + document.body.scrollLeft; + } else { + posY = ev.clientY + window.scrollY; + posX = ev.clientX + window.scrollX; + } + var st = this.element.style; + this.xOffs = posX - parseInt(st.left); + this.yOffs = posY - parseInt(st.top); + with (Calendar) { + addEvent(document, "mousemove", calDragIt); + addEvent(document, "mouseover", stopEvent); + addEvent(document, "mouseup", calDragEnd); + } +}; + +// BEGIN: DATE OBJECT PATCHES + +/** Adds the number of days array to the Date object. */ +Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31); + +/** Constants used for time computations */ +Date.SECOND = 1000 /* milliseconds */; +Date.MINUTE = 60 * Date.SECOND; +Date.HOUR = 60 * Date.MINUTE; +Date.DAY = 24 * Date.HOUR; +Date.WEEK = 7 * Date.DAY; + +/** Returns the number of days in the current month */ +Date.prototype.getMonthDays = function(month) { + var year = this.getFullYear(); + if (typeof month == "undefined") { + month = this.getMonth(); + } + if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) { + return 29; + } else { + return Date._MD[month]; + } +}; + +/** Returns the number of the week. The algorithm was "stolen" from PPK's + * website, hope it's correct :) http://www.xs4all.nl/~ppk/js/week.html */ +Date.prototype.getWeekNumber = function() { + var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); + var then = new Date(this.getFullYear(), 0, 1, 0, 0, 0); + var time = now - then; + var day = then.getDay(); + (day > 3) && (day -= 4) || (day += 3); + return Math.round(((time / Date.DAY) + day) / 7); +}; + +/** Checks dates equality (ignores time) */ +Date.prototype.equalsTo = function(date) { + return ((this.getFullYear() == date.getFullYear()) && + (this.getMonth() == date.getMonth()) && + (this.getDate() == date.getDate())); +}; + +/** Prints the date in a string according to the given format. */ +Date.prototype.print = function (frm) { + var str = new String(frm); + var m = this.getMonth(); + var d = this.getDate(); + var y = this.getFullYear(); + var wn = this.getWeekNumber(); + var w = this.getDay(); + var s = new Array(); + s["d"] = d; + s["dd"] = (d < 10) ? ("0" + d) : d; + s["m"] = 1+m; + s["mm"] = (m < 9) ? ("0" + (1+m)) : (1+m); + s["y"] = y; + s["yy"] = new String(y).substr(2, 2); + s["w"] = wn; + s["ww"] = (wn < 10) ? ("0" + wn) : wn; + with (Calendar) { + s["D"] = _DN3[w]; + s["DD"] = _DN[w]; + s["M"] = _MN3[m]; + s["MM"] = _MN[m]; + } + var re = /(.*)(\W|^)(d|dd|m|mm|y|yy|MM|M|DD|D|w|ww)(\W|$)(.*)/; + while (re.exec(str) != null) { + str = RegExp.$1 + RegExp.$2 + s[RegExp.$3] + RegExp.$4 + RegExp.$5; + } + return str; +}; + +// END: DATE OBJECT PATCHES + +// global object that remembers the calendar +window.calendar = null; diff --git a/httemplate/elements/calendar_stripped.js b/httemplate/elements/calendar_stripped.js new file mode 100644 index 000000000..38b9b9aad --- /dev/null +++ b/httemplate/elements/calendar_stripped.js @@ -0,0 +1,12 @@ +/* Copyright Mihai Bazon, 2002, 2003 | http://students.infoiasi.ro/~mishoo + * --------------------------------------------------------------------------- + * + * The DHTML Calendar, version 0.9.3 "It's still alive & keeps rocking" + * + * Details and latest version at: + * http://students.infoiasi.ro/~mishoo/site/calendar.epl + * + * Feel free to use this script under the terms of the GNU Lesser General + * Public License, as long as you do not remove or alter this notice. + */ +Calendar=function(mondayFirst,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.checkDisabled=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.mondayFirst=mondayFirst;this.dateStr=dateStr;this.ar_days=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(!Calendar._DN3){var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,3);}Calendar._DN3=ar;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,3);}Calendar._MN3=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar._DN3=null;Calendar._MN3=null;Calendar.getAbsolutePos=function(el){var r={x:el.offsetLeft,y:el.offsetTop};if(el.offsetParent){var tmp=Calendar.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){if(Calendar.is_ie){return window.event.srcElement;}else{return ev.currentTarget;}};Calendar.getTargetElement=function(ev){if(Calendar.is_ie){return window.event.srcElement;}else{return ev.target;}};Calendar.stopEvent=function(ev){if(Calendar.is_ie){window.event.cancelBubble=true;window.event.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;mc.style.left=cd.offsetLeft+"px";mc.style.top=(cd.offsetTop+cd.offsetHeight)+"px";mc.style.display="block";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.firstChild.data=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?2:-2;}if(show){yc.style.left=cd.offsetLeft+"px";yc.style.top=(cd.offsetTop+cd.offsetHeight)+"px";yc.style.display="block";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseover",stopEvent);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){addClass(el,"hilite active");addEvent(document,"mouseover",tableMouseOver);addEvent(document,"mousemove",tableMouseOver);addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev));if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){var date=null;with(el.calendar.date){date=new Date(getFullYear(),getMonth(),el.caldate);}el.ttip=date.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.firstChild.data=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled){return false;}removeClass(el,"hilite");if(el.caldate){removeClass(el.parentNode,"rowhilite");}el.calendar.tooltips.firstChild.data=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}cal.date.setDate(el.caldate);date=cal.date;newdate=true;cal.dateClicked=true;}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=(el.navtype==0)?new Date():new Date(cal.date);cal.dateClicked=(el.navtype==0);var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year0;--i){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.appendChild(document.createTextNode(""));cell.calendar=this;Calendar._add_evs(cell);}}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i0;--i){var yr=Calendar.createElement("div");yr.className="label";yr.appendChild(document.createTextNode(""));div.appendChild(yr);}this._init(this.mondayFirst,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){if(!window.calendar){return false;}(Calendar.is_ie)&&(ev=window.event);var cal=window.calendar;var act=(Calendar.is_ie||ev.type=="keypress");if(ev.ctrlKey){switch(ev.keyCode){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(ev.keyCode){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.hide();break;case 37:case 38:case 39:case 40:if(act){var date=cal.date.getDate()-1;var el=cal.currentDateEl;var ne=null;var prev=(ev.keyCode==37)||(ev.keyCode==38);switch(ev.keyCode){case 37:(--date>=0)&&(ne=cal.ar_days[date]);break;case 38:date-=7;(date>=0)&&(ne=cal.ar_days[date]);break;case 39:(++datethis.maxYear){year=this.maxYear;date.setFullYear(year);}this.mondayFirst=mondayFirst;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var wday=date.getDay();var MON=mondayFirst?1:0;var SAT=mondayFirst?5:6;var SUN=mondayFirst?6:0;if(mondayFirst){wday=(wday>0)?(wday-1):6;}var iday=1;var row=this.tbody.firstChild;var MN=Calendar._MN3[month];var hasToday=((today.getFullYear()==year)&&(today.getMonth()==month));var todayDate=today.getDate();var week_number=date.getWeekNumber();var ar_days=new Array();for(var i=0;i<6;++i){if(iday>no_days){row.className="emptyrow";row=row.nextSibling;continue;}var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.firstChild.data=week_number;cell=cell.nextSibling;}++week_number;row.className="daysrow";for(var j=0;j<7;++j){cell.className="day";if((!i&&jno_days){cell.innerHTML=" ";cell.disabled=true;cell=cell.nextSibling;continue;}cell.disabled=false;cell.firstChild.data=iday;if(typeof this.checkDisabled=="function"){date.setDate(iday);if(this.checkDisabled(date)){cell.className+=" disabled";cell.disabled=true;}}if(!cell.disabled){ar_days[ar_days.length]=cell;cell.caldate=iday;cell.ttip="_";if(iday==mday){cell.className+=" selected";this.currentDateEl=cell;}if(hasToday&&(iday==todayDate)){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(wday==SAT||wday==SUN){cell.className+=" weekend";}}++iday;((++wday)^ 7)||(wday=0);cell=cell.nextSibling;}row=row.nextSibling;}this.ar_days=ar_days;this.title.firstChild.data=Calendar._MN[month]+", "+year;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.mondayFirst,date);}};Calendar.prototype.refresh=function(){this._init(this.mondayFirst,this.date);};Calendar.prototype.setMondayFirst=function(mondayFirst){this._init(mondayFirst,this.date);this._displayWeekdays();};Calendar.prototype.setDisabledHandler=function(unaryFunction){this.checkDisabled=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){if(!window.calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window.calendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window.calendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}this.show();var w=this.element.offsetWidth;var h=this.element.offsetHeight;this.hide();var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "r":p.x+=el.offsetWidth-w;break;case "l":break;}this.showAt(p.x,p.y);};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){var y=0;var m=-1;var d=0;var a=str.split(/\W+/);if(!fmt){fmt=this.dateFormat;}var b=fmt.split(/\W+/);var i=0,j=0;for(i=0;i29)?1900:2000);}if(b[i]=="M"||b[i]=="MM"){for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}}}if(y!=0&&m!=-1&&d!=0){this.setDate(new Date(y,m,d));return;}y=0;m=-1;d=0;for(i=0;i31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0){var today=new Date();y=today.getFullYear();}if(m!=-1&&d!=0){this.setDate(new Date(y,m,d));}};Calendar.prototype.hideShowCovered=function(){function getStyleProp(obj,style){var value=obj.style[style];if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){value=document.defaultView.getComputedStyle(obj,"").getPropertyValue(style);}else if(obj.currentStyle){value=obj.currentStyle[style];}else{value=obj.style[style];}}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2EY2)||(CY23)&&(day-=4)||(day+=3);return Math.round(((time/Date.DAY)+day)/7);};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate()));};Date.prototype.print=function(frm){var str=new String(frm);var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s=new Array();s["d"]=d;s["dd"]=(d<10)?("0"+d):d;s["m"]=1+m;s["mm"]=(m<9)?("0"+(1+m)):(1+m);s["y"]=y;s["yy"]=new String(y).substr(2,2);s["w"]=wn;s["ww"]=(wn<10)?("0"+wn):wn;with(Calendar){s["D"]=_DN3[w];s["DD"]=_DN[w];s["M"]=_MN3[m];s["MM"]=_MN[m];}var re=/(.*)(\W|^)(d|dd|m|mm|y|yy|MM|M|DD|D|w|ww)(\W|$)(.*)/;while(re.exec(str)!=null){str=RegExp.$1+RegExp.$2+s[RegExp.$3]+RegExp.$4+RegExp.$5;}return str;};window.calendar=null; \ No newline at end of file diff --git a/httemplate/images/calendar.png b/httemplate/images/calendar.png new file mode 100644 index 000000000..163266174 Binary files /dev/null and b/httemplate/images/calendar.png differ diff --git a/httemplate/search/cust_pkg.html b/httemplate/search/cust_pkg.html index bb0a5407c..3d80d51a9 100755 --- a/httemplate/search/cust_pkg.html +++ b/httemplate/search/cust_pkg.html @@ -1,24 +1,46 @@ Packages + + + + - -
      -

      Packages

      -
      -
      + +

      Packages

      - Return packages with next bill date: - from m/d/y - to m/d/y - -

      + Return packages with next bill date:

      + + + + + + + + + + + +
      From:
      m/d/y
      To:
      m/d/y
      +

      -
      - diff --git a/httemplate/search/report_cc.html b/httemplate/search/report_cc.html index 8653dcc69..7bbfa40ce 100755 --- a/httemplate/search/report_cc.html +++ b/httemplate/search/report_cc.html @@ -1,23 +1,43 @@ Credit Card Receipt Report Criteria - - -
      -

      Credit Card Receipt Report Criteria

      -
      -
      + + + + + +

      Credit Card Receipt Report Criteria

      Return credit card receipt report for period: - from m/d/y - to m/d/y + + + + + + + + + + +
      From:
      m/d/y
      To:
      m/d/y
      -

      +

      - -
      - diff --git a/httemplate/search/report_credit.html b/httemplate/search/report_credit.html index df9b9581f..310b9cb59 100755 --- a/httemplate/search/report_credit.html +++ b/httemplate/search/report_credit.html @@ -1,23 +1,43 @@ In House Credit Report Criteria - - -
      -

      In House Credit Report Criteria

      -
      -
      + + + + + +

      In House Credit Report Criteria

      Return in house credit report for period: - from m/d/y - to m/d/y + + + + + + + + + + +
      From:
      m/d/y
      To:
      m/d/y
      -

      +

      - -
      - diff --git a/httemplate/search/report_cust_pay.html b/httemplate/search/report_cust_pay.html index 93053e1ee..9d9fffb16 100644 --- a/httemplate/search/report_cust_pay.html +++ b/httemplate/search/report_cust_pay.html @@ -1,24 +1,51 @@ Payment report criteria + + + + - -
      -

      Payment report criteria

      -
      -
      + +

      Payment report criteria

      - Return payments for period
      - from m/d/y - to m/d/y -

      + + + + + + + + + + + + + + +
      Payments of type: +
      From:
      m/d/y
      To:
      m/d/y
      +

      -
      diff --git a/httemplate/search/report_tax.html b/httemplate/search/report_tax.html index 7bf681b42..55b9e097b 100755 --- a/httemplate/search/report_tax.html +++ b/httemplate/search/report_tax.html @@ -1,23 +1,43 @@ Tax Report Criteria - - -
      -

      Tax Report Criteria

      -
      -
      + + + + + +

      Tax Report Criteria

      - Return tax report for period: - from m/d/y - to m/d/y + Return tax report for period: + + + + + + + + + + +
      From:
      m/d/y
      To:
      m/d/y
      -

      +

      - -
      - -- cgit v1.2.1 From d993eaef639b1abd95973b26e7c336fc5e588041 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Sep 2003 12:48:11 +0000 Subject: IE doesn't like downloading MIME type text/comma-separated-values --- httemplate/misc/download-batch.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httemplate/misc/download-batch.cgi b/httemplate/misc/download-batch.cgi index ecb80d256..306ef5d63 100644 --- a/httemplate/misc/download-batch.cgi +++ b/httemplate/misc/download-batch.cgi @@ -1,6 +1,7 @@ <% -http_header('Content-Type' => 'text/comma-separated-values' ); +#http_header('Content-Type' => 'text/comma-separated-values' ); #IE chokes +http_header('Content-Type' => 'text/plain' ); for my $cust_pay_batch ( sort { $a->paybatchnum <=> $b->paybatchnum } qsearch('cust_pay_batch', {} ) -- cgit v1.2.1 From 021e1ac77366fb0765cb364af0c09f5f2df92266 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Sep 2003 14:58:19 +0000 Subject: agent schema changes --- httemplate/docs/upgrade10.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html index 2f7f4d89a..4a6baa59b 100644 --- a/httemplate/docs/upgrade10.html +++ b/httemplate/docs/upgrade10.html @@ -74,6 +74,12 @@ ALTER TABLE cust_main_county ADD recurtax char(1) NULL; ALTER TABLE h_cust_main_county ADD recurtax char(1) NULL; ALTER TABLE cust_pkg ADD last_bill int NULL; ALTER TABLE h_cust_pkg ADD last_bill int NULL; +ALTER TABLE agent ADD disabled char(1) NULL; +ALTER TABLE h_agent ADD disabled char(1) NULL; +ALTER TABLE agent ADD username varchar(80) NULL; +ALTER TABLE h_agent ADD username varchar(80) NULL; +ALTER TABLE agent ADD _password varchar(80) NULL; +ALTER TABLE h_agent ADD _password varchar(80) NULL; dump database, edit: - cust_main: increase otaker from 8 to 32 -- cgit v1.2.1 From c1dfeada58be61ec33bb1cfb80a2cff73f7c9a3c Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 30 Sep 2003 15:01:46 +0000 Subject: no duplicate usernames --- FS/FS/agent.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm index bcba602cc..2f70d654d 100644 --- a/FS/FS/agent.pm +++ b/FS/FS/agent.pm @@ -125,6 +125,9 @@ sub check { $error = $self->ut_alphan('username'); return $error if $error; if ( length($self->username) ) { + my $conflict = qsearchs('agent', { 'username' => $self->username } ); + return 'duplicate agent username (with '. $conflict->agent. ')' + if $conflict; $error = $self->ut_text('password'); # ut_text... arbitrary choice } else { $self->_password(''); @@ -165,7 +168,7 @@ sub pkgpart_hashref { =head1 VERSION -$Id: agent.pm,v 1.5 2003-09-29 05:51:50 ivan Exp $ +$Id: agent.pm,v 1.6 2003-09-30 15:01:46 ivan Exp $ =head1 BUGS -- cgit v1.2.1 From 3a24db8efd975633e5c4146fe1e90e6eda7c0d5f Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Oct 2003 08:56:54 +0000 Subject: update with dictionaries from freeradius 0.9.1, and fix generate-raddb to avoid duplicates --- FS/FS/raddb.pm | 1119 +++++++++++++++++++++++++++++++++++++--------------- bin/generate-raddb | 18 +- 2 files changed, 820 insertions(+), 317 deletions(-) diff --git a/FS/FS/raddb.pm b/FS/FS/raddb.pm index a35a757f5..efeb739bb 100644 --- a/FS/FS/raddb.pm +++ b/FS/FS/raddb.pm @@ -4,1099 +4,1592 @@ use vars qw(%attrib); %attrib = ( 'usr_at_zip_output_filter' => 'USR-AT-Zip-Output-Filter', 'ms_filter' => 'MS-Filter', + 'annex_compression_protoc' => 'Annex-Compression-Protocol', + 'xedia_ssh_privileges' => 'Xedia-SSH-Privileges', 'usr_blocks_received' => 'USR-Blocks-Received', 'shiva_called_number' => 'Shiva-Called-Number', 'annex_filter' => 'Annex-Filter', 'usr_channel_expansion' => 'USR-Channel-Expansion', + 'erx_tunnel_tos' => 'ERX-Tunnel-Tos', 'session_timeout' => 'Session-Timeout', - 'usr_simplified_mnp_level' => 'USR-Simplified-MNP-Levels', 'ascend_route_ipx' => 'Ascend-Route-IPX', - 'annex_user_server_locati' => 'Annex-User-Server-Location', + 'annex_error_correction_p' => 'Annex-Error-Correction-Prot', 'acc_callback_mode' => 'Acc-Callback-Mode', 'usr_filter_zones' => 'USR-Filter-Zones', + 'erx_input_gigapkts' => 'ERX-Input-Gigapkts', 'ascend_session_svr_key' => 'Ascend-Session-Svr-Key', - 'le_nat_tcp_session_timeo' => 'LE-NAT-TCP-Session-Timeout', + 'bind_l2tp_tunnel_namf' => 'Bind_L2TP_Tunnel_Name', + 'ascend_dsl_cir_recv_limi' => 'Ascend-Dsl-CIR-Recv-Limit', + 'altiga_secondary_wins_g' => 'Altiga-Secondary-WINS-G', 'ascend_ts_idle_limit' => 'Ascend-TS-Idle-Limit', 'usr_port_tap_priority' => 'USR-Port-Tap-Priority', + 'cvpn3000_ipsec_client_fw' => 'CVPN3000-IPSec-Client-Fw-Filter-Name', + 'ascend_private_route_req' => 'Ascend-Private-Route-Required', 'ascend_private_route' => 'Ascend-Private-Route', 'prompt' => 'Prompt', 'acct_link_count' => 'Acct-Link-Count', + 'bind_auth_service_grq' => 'Bind_Auth_Service_Grp', + 'itk_tunnel_ip' => 'ITK-Tunnel-IP', 'login_lat_node' => 'Login-LAT-Node', 'usr_mbi_ct_pri_card_slot' => 'USR-Mbi_Ct_PRI_Card_Slot', + 'lac_real_poru' => 'LAC_Real_Port', 'erx_ingress_statistics' => 'ERX-Ingress-Statistics', + 'digest_nonce' => 'Digest-Nonce', 'annex_system_disc_reason' => 'Annex-System-Disc-Reason', + 'pool_name' => 'Pool-Name', + 'altiga_use_client_addres' => 'Altiga-Use-Client-Address-G/U', + 'police_bursu' => 'Police_Burst', 'usr_call_arrival_time' => 'USR-Call-Arrival-Time', 'ascend_disconnect_cause' => 'Ascend-Disconnect-Cause', 'ascend_user_acct_time' => 'Ascend-User-Acct-Time', - 'ascend_appletalk_peer_mo' => 'Ascend-Appletalk-Peer-Mode', 'chap_challenge' => 'CHAP-Challenge', 'ascend_mpp_idle_percent' => 'Ascend-MPP-Idle-Percent', 'ascend_user_acct_port' => 'Ascend-User-Acct-Port', + 'ldap_group' => 'Ldap-Group', 'ascend_numbering_plan_id' => 'Ascend-Numbering-Plan-ID', - 'ascend_access_intercept_' => 'Ascend-Access-Intercept-LEA', - 'pvc_encapsulation_type' => 'PVC_Encapsulation_Type', + 'usr_last_number_dialed_o' => 'USR-Last-Number-Dialed-Out', + 'pvc_encapsulation_type' => 'PVC-Encapsulation-Type', 'ascend_bir_bridge_group' => 'Ascend-BIR-Bridge-Group', 'ascend_atm_group' => 'Ascend-ATM-Group', 'ascend_fr_svc_addr' => 'Ascend-FR-SVC-Addr', 'x_ascend_send_auth' => 'X-Ascend-Send-Auth', 'le_ip_pool' => 'LE-IP-Pool', - 'annex_addr_resolution_se' => 'Annex-Addr-Resolution-Servers', - 'usr_last_callers_number_' => 'USR-Last-Callers-Number-ANI', + 'post_proxy_type' => 'Post-Proxy-Type', + 'wispr_session_terminate_' => 'WISPr-Session-Terminate-Time', + 'bintec_pppextiftable' => 'BinTec-pppExtIfTable', + 'nomadix_subnet' => 'Nomadix-Subnet', 'login_port' => 'Login-Port', 'ms_chap2_response' => 'MS-CHAP2-Response', - 'annex_secondary_dns_serv' => 'Annex-Secondary-DNS-Server', 'ascend_ipsec_profile' => 'Ascend-IPSEC-Profile', + 'usr_compression_algorith' => 'USR-Compression-Algorithm', 'usr_accm_type' => 'USR-ACCM-Type', 'simultaneous_use' => 'Simultaneous-Use', + 'cisco_account_info' => 'Cisco-Account-Info', 'framed_protocol' => 'Framed-Protocol', + 'erx_tunnel_maximum_sessi' => 'ERX-Tunnel-Maximum-Sessions', + 'redcreek_tunneled_wins_t' => 'RedCreek-Tunneled-WINS-Server2', 'ascend_recv_name' => 'Ascend-Recv-Name', 'usr_call_connecting_time' => 'USR-Call-Connecting-Time', - 'tunnel_remote_name' => 'Tunnel_Remote_Name', + 'quintum_h323_gw_id' => 'Quintum-h323-gw-id', + 'acct_dyn_ac_ent' => 'Acct-Dyn-Ac-Ent', + 'tunnel_remote_name' => 'Tunnel-Remote-Name', + 'annex_ppp_trace_level' => 'Annex-PPP-Trace-Level', + 'cisco_call_type' => 'Cisco-Call-Type', + 'cisco_fax_recipient_coun' => 'Cisco-Fax-Recipient-Count', + 'altiga_ipsec_authenticat' => 'Altiga-IPSec-Authentication-G', + 'wispr_location_id' => 'WISPr-Location-ID', + 'itk_start_delay' => 'ITK-Start-Delay', + 'ascend_pre_output_packet' => 'Ascend-Pre-Output-Packets', + 'usr_rmmie_firmware_versi' => 'USR-RMMIE-Firmware-Version', 'usr_vts_session_key' => 'USR-VTS-Session-Key', 'ascend_fr_dce_n393' => 'Ascend-FR-DCE-N393', 'login_host' => 'Login-Host', 'usr_reply_script3' => 'USR-Reply-Script3', + 'cvpn3000_ipsec_split_tuo' => 'CVPN3000-IPSec-Split-Tunneling-Policy', 'ascend_pppoe_enable' => 'Ascend-PPPoE-Enable', 'annex_primary_dns_server' => 'Annex-Primary-DNS-Server', 'x_ascend_bridge_address' => 'X-Ascend-Bridge-Address', 'usr_number_of_link_naks' => 'USR-Number-of-Link-NAKs', + 'altiga_priority_on_sep_g' => 'Altiga-Priority-on-SEP-G/U', 'annex_cli_command' => 'Annex-CLI-Command', 'usr_pw_framed_routing_v2' => 'USR-PW_Framed_Routing_V2', - 'usr_tunnel_switch_endpoi' => 'USR-Tunnel-Switch-Endpoint', + 'session_error_codf' => 'Session_Error_Code', + 'annex_user_server_locati' => 'Annex-User-Server-Location', + 'cisco_fax_mdn_address' => 'Cisco-Fax-Mdn-Address', + 'ascend_calling_subaddres' => 'Ascend-Calling-Subaddress', 'ascend_call_by_call' => 'Ascend-Call-By-Call', 'ascend_first_dest' => 'Ascend-First-Dest', - 'usr_appletalk_network_ra' => 'USR-Appletalk-Network-Range', 'annex_tunnel_authen_type' => 'Annex-Tunnel-Authen-Type', + 'acct_type' => 'Acct-Type', 'sql_user_name' => 'SQL-User-Name', 'erx_secondary_dns' => 'ERX-Secondary-Dns', + 'bridge_grouq' => 'Bridge_Group', 'h323_return_code' => 'h323-return-code', 'annex_host_allow' => 'Annex-Host-Allow', + 'cvx_modem_end_recv_line_' => 'CVX-Modem-End-Recv-Line-Lvl', + 'sip_method' => 'Sip-Method', 'x_ascend_require_auth' => 'X-Ascend-Require-Auth', + 'cvpn3000_sep_card_assign' => 'CVPN3000-SEP-Card-Assignment', 'le_ipsec_deny_action' => 'LE-IPSec-Deny-Action', 'annex_edo' => 'Annex-EDO', 'acct_delay_time' => 'Acct-Delay-Time', - 'ascend_call_block_durati' => 'Ascend-Call-Block-Duration', 'login_tcp_port' => 'Login-TCP-Port', 'ascend_temporary_rtes' => 'Ascend-Temporary-Rtes', + 'versanet_termination_cau' => 'Versanet-Termination-Cause', 'ascend_dialed_number' => 'Ascend-Dialed-Number', - 'x_ascend_dec_channel_cou' => 'X-Ascend-Dec-Channel-Count', + 'cvpn3000_ipsec_authentic' => 'CVPN3000-IPSec-Authentication', 'ascend_fr_dlci' => 'Ascend-FR-DLCI', 'annex_modem_disc_reason' => 'Annex-Modem-Disc-Reason', 'x_ascend_receive_secret' => 'X-Ascend-Receive-Secret', + 'usr_ospf_addressless_ind' => 'USR-OSPF-Addressless-Index', + 'usr_ip_default_route_opt' => 'USR-IP-Default-Route-Option', 'char_noecho' => 'Char-Noecho', + 'redcreek_tunneled_search' => 'RedCreek-Tunneled-Search-List', 'ascend_pri_number_type' => 'Ascend-PRI-Number-Type', - 'ascend_dsl_upstream_limi' => 'Ascend-Dsl-Upstream-Limit', + 'aat_ip_tos_apply_to' => 'AAT-IP-TOS-Apply-To', 'x_ascend_modem_shelfno' => 'X-Ascend-Modem-ShelfNo', 'prefix' => 'Prefix', 'usr_rad_dvmrp_metric' => 'USR-Rad-Dvmrp-Metric', + 'x_ascend_call_attempt_li' => 'X-Ascend-Call-Attempt-Limit', 'usr_ip_saa_filter' => 'USR-IP-SAA-Filter', - 'ms_link_utilization_thre' => 'MS-Link-Utilization-Threshold', + 'itk_prompt' => 'ITK-Prompt', + 'ascend_port_redir_protoc' => 'Ascend-Port-Redir-Protocol', + 'cvx_modem_tx_packets' => 'CVX-Modem-Tx-Packets', + 'usr_tunnel_switch_endpoi' => 'USR-Tunnel-Switch-Endpoint', 'ascend_home_network_name' => 'Ascend-Home-Network-Name', 'acc_customer_id' => 'Acc-Customer-Id', 'message_authenticator' => 'Message-Authenticator', - 'ascend_secondary_home_ag' => 'Ascend-Secondary-Home-Agent', - 'x_ascend_pre_output_octe' => 'X-Ascend-Pre-Output-Octets', + 'cisco_fax_coverpage_flag' => 'Cisco-Fax-Coverpage-Flag', 'usr_multicast_forwarding' => 'USR-Multicast-Forwarding', + 'cvpn3000_allow_network_e' => 'CVPN3000-Allow-Network-Extension-Mode', 'ascend_call_direction' => 'Ascend-Call-Direction', 'acc_connect_rx_speed' => 'Acc-Connect-Rx-Speed', 'ascend_force_56' => 'Ascend-Force-56', + 'st_service_domain' => 'ST-Service-Domain', 'usr_harc_disconnect_code' => 'USR-HARC-Disconnect-Code', 'shasta_service_profile' => 'Shasta-Service-Profile', 'cisco_maximum_time' => 'Cisco-Maximum-Time', 'usr_tunnel_auth_hostname' => 'USR-Tunnel-Auth-Hostname', - 'ascend_client_assign_win' => 'Ascend-Client-Assign-WINS', - 'acc_modem_modulation_typ' => 'Acc-Modem-Modulation-Type', 'acc_ip_gateway_pri' => 'Acc-Ip-Gateway-Pri', 'ascend_bridge_address' => 'Ascend-Bridge-Address', + 'altiga_pptp_min_authenti' => 'Altiga-PPTP-Min-Authentication-G/U', + 'ns_secondary_wins' => 'NS-Secondary-WINS', + 'cbbsm_bandwidth' => 'CBBSM-Bandwidth', 'x_ascend_fr_link_mgt' => 'X-Ascend-FR-Link-Mgt', + 'altiga_ipsec_banner_g' => 'Altiga-IPSec-Banner-G', 'ascend_handle_ipx' => 'Ascend-Handle-IPX', 'ascend_x25_pad_alias_2' => 'Ascend-X25-Pad-Alias-2', + 'st_policy_name' => 'ST-Policy-Name', 'ascend_group' => 'Ascend-Group', 'ascend_dsl_rate_type' => 'Ascend-Dsl-Rate-Type', + 'tunnel_contexu' => 'Tunnel_Context', 'ascend_require_auth' => 'Ascend-Require-Auth', + 'cvx_modem_local_retrains' => 'CVX-Modem-Local-Retrains', + 'cvpn5000_echo' => 'CVPN5000-Echo', + 'cvx_secondary_dns' => 'CVX-Secondary-DNS', 'x_ascend_billing_number' => 'X-Ascend-Billing-Number', 'usr_orig_nas_type' => 'USR-Orig-NAS-Type', 'ascend_remote_fw' => 'Ascend-Remote-FW', 'acct_output_packets' => 'Acct-Output-Packets', 'lm_password' => 'LM-Password', - 'tunnel_window' => 'Tunnel_Window', - 'x_ascend_link_compressio' => 'X-Ascend-Link-Compression', - 'x_ascend_base_channel_co' => 'X-Ascend-Base-Channel-Count', + 'tunnel_window' => 'Tunnel-Window', 'cisco_avpair' => 'Cisco-AVPair', + 'st_service_name' => 'ST-Service-Name', 'shiva_event_flags' => 'Shiva-Event-Flags', - 'usr_number_of_rings_limi' => 'USR-Number-of-Rings-Limit', + 'annex_retrain_requests_s' => 'Annex-Retrain-Requests-Sent', 'ascend_ts_idle_mode' => 'Ascend-TS-Idle-Mode', - 'ascend_bi_directional_au' => 'Ascend-Bi-Directional-Auth', + 'usr_ip_rip_simple_auth_p' => 'USR-IP-RIP-Simple-Auth-Password', + 'tunnel_deadtimf' => 'Tunnel_Deadtime', 'state' => 'State', 'usr_keypress_timeout' => 'USR-Keypress-Timeout', 'usr_pw_vpn_neighbor' => 'USR-PW_VPN_Neighbor', + 'erx_pppoe_description' => 'ERX-Pppoe-Description', 'ldap_userdn' => 'Ldap-UserDn', 'x_ascend_fr_n391' => 'X-Ascend-FR-N391', - 'ascend_tunneling_protoco' => 'Ascend-Tunneling-Protocol', + 'ascend_calling_id_presen' => 'Ascend-Calling-Id-Presentatn', + 'erx_local_loopback_inter' => 'ERX-Local-Loopback-Interface', 'x_ascend_fr_direct' => 'X-Ascend-FR-Direct', 'nas_ip_address' => 'NAS-IP-Address', 'usr_call_end_time' => 'USR-Call-End-Time', - 'tunnel_algorithm' => 'Tunnel_Algorithm', + 'acct_mcast_out_packett' => 'Acct_Mcast_Out_Packets', + 'tunnel_algorithm' => 'Tunnel-Algorithm', 'usr_vpn_encrypter' => 'USR-VPN-Encrypter', + 'tunnel_grouq' => 'Tunnel_Group', 'ascend_atm_connect_group' => 'Ascend-ATM-Connect-Group', 'x_ascend_ft1_caller' => 'X-Ascend-FT1-Caller', + 'usr_dnis_reauthenticatio' => 'USR-DNIS-ReAuthentication', 'login_callback_number' => 'Login-Callback-Number', 'usr_ip_rip_input_filter' => 'USR-IP-RIP-Input-Filter', - 'usr_rmmie_last_update_ev' => 'USR-RMMIE-Last-Update-Event', + 'usr_rmmie_rcv_pwrlvl_330' => 'USR-RMMIE-Rcv-PwrLvl-3300Hz', 'h323_disconnect_cause' => 'h323-disconnect-cause', 'x_ascend_handle_ipx' => 'X-Ascend-Handle-IPX', 'usr_igmp_version' => 'USR-IGMP-Version', 'usr_imsi' => 'USR-IMSI', 'group_name' => 'Group-Name', 'usr_nas_type' => 'USR-NAS-Type', + 'context_namf' => 'Context-Name', 'ascend_ip_tos' => 'Ascend-IP-TOS', 'x_ascend_token_immediate' => 'X-Ascend-Token-Immediate', - 'ascend_private_route_tab' => 'Ascend-Private-Route-Table-ID', + 'tunnel_session_auth_serw' => 'Tunnel_Session_Auth_Service_Grp', 'ms_chap2_cpw' => 'MS-CHAP2-CPW', - 'tunnel_session_auth_ctx' => 'Tunnel_Session_Auth_Ctx', + 'tunnel_session_auth_ctx' => 'Tunnel-Session-Auth-Ctx', 'usr_mobile_numbytes_rxed' => 'USR-Mobile-NumBytes-Rxed', 'usr_mbi_ct_tdm_time_slot' => 'USR-Mbi_Ct_TDM_Time_Slot', 'ascend_x25_nui' => 'Ascend-X25-Nui', 'x_ascend_first_dest' => 'X-Ascend-First-Dest', - 'x_ascend_num_in_multilin' => 'X-Ascend-Num-In-Multilink', 'usr_send_password' => 'USR-Send-Password', + 'x_ascend_fr_direct_profi' => 'X-Ascend-FR-Direct-Profile', 'x_ascend_fr_t391' => 'X-Ascend-FR-T391', + 'altiga_ipsec_sec_associa' => 'Altiga-IPSec-Sec-Association-G/U', + 'ip_address_pool_namf' => 'Ip_Address_Pool_Name', 'acct_input_octets' => 'Acct-Input-Octets', - 'bridge_group' => 'Bridge_Group', + 'cvx_modem_begin_modulati' => 'CVX-Modem-Begin-Modulation', + 'wispr_session_terminatea' => 'WISPr-Session-Terminate-End-Of-Day', + 'cvpn3000_use_client_addr' => 'CVPN3000-Use-Client-Address', + 'bridge_group' => 'Bridge-Group', 'annex_sec_profile_index' => 'Annex-Sec-Profile-Index', 'acc_dns_server_pri' => 'Acc-Dns-Server-Pri', 'ms_acct_auth_type' => 'MS-Acct-Auth-Type', + 'x_ascend_maximum_call_du' => 'X-Ascend-Maximum-Call-Duration', 'tunnel_password' => 'Tunnel-Password', + 'framed_ipv6_prefix' => 'Framed-IPv6-Prefix', 'usr_reply_script5' => 'USR-Reply-Script5', 'shiva_links_in_bundle' => 'Shiva-Links-In-Bundle', 'ascend_fr_profile_name' => 'Ascend-FR-Profile-Name', 'ascend_mtu' => 'Ascend-MTU', + 'nokia_charging_id' => 'Nokia-Charging-Id', + 'cvpn3000_ms_client_subne' => 'CVPN3000-MS-Client-Subnet-Mask', + 'cvpn3000_ipsec_sec_assoc' => 'CVPN3000-IPSec-Sec-Association', 'cisco_ppp_async_map' => 'Cisco-PPP-Async-Map', + 'cvpn3000_user_auth_servf' => 'CVPN3000-User-Auth-Server-Port', 'cisco_num_in_multilink' => 'Cisco-Num-In-Multilink', + 'wispr_logoff_url' => 'WISPr-Logoff-URL', 'usr_mobile_ip_address' => 'USR-Mobile-IP-Address', + 'usr_final_tx_link_data_r' => 'USR-Final-Tx-Link-Data-Rate', + 'itk_ppp_compression_prot' => 'ITK-PPP-Compression-Prot', 'ascend_bridge' => 'Ascend-Bridge', 'x_ascend_presession_time' => 'X-Ascend-PreSession-Time', - 'tunnel_cmd_timeout' => 'Tunnel_Cmd_Timeout', + 'aat_client_primary_dns' => 'AAT-Client-Primary-DNS', + 'cvpn3000_strip_realm' => 'CVPN3000-Strip-Realm', + 'tunnel_cmd_timeout' => 'Tunnel-Cmd-Timeout', 'ascend_multicast_client' => 'Ascend-Multicast-Client', + 'cvx_modem_remote_rate_ne' => 'CVX-Modem-Remote-Rate-Negs', 'tunnel_private_group_id' => 'Tunnel-Private-Group-Id', 'usr_rmmie_rcv_tot_pwrlvl' => 'USR-RMMIE-Rcv-Tot-PwrLvl', 'calling_station_id' => 'Calling-Station-Id', - 'tunnel_rate_limit_burst' => 'Tunnel_Rate_Limit_Burst', + 'tunnel_rate_limit_burst' => 'Tunnel-Rate-Limit-Burst', 'usr_device_connected_to' => 'USR-Device-Connected-To', + 'aat_source_ip_check' => 'AAT-Source-IP-Check', 'login_lat_service' => 'Login-LAT-Service', - 'x_ascend_home_network_na' => 'X-Ascend-Home-Network-Name', 'ascend_h323_fegw_address' => 'Ascend-H323-Fegw-Address', 'usr_called_party_number' => 'USR-Called-Party-Number', + 'bintec_ipnatpresettable' => 'BinTec-ipNatPresetTable', 'ascend_remove_seconds' => 'Ascend-Remove-Seconds', 'shiva_user_attributes' => 'Shiva-User-Attributes', + 'cisco_fax_dsn_flag' => 'Cisco-Fax-Dsn-Flag', 'x_ascend_route_ipx' => 'X-Ascend-Route-IPX', 'acc_route_policy' => 'Acc-Route-Policy', + 'bind_l2tp_flow_controm' => 'Bind_L2TP_Flow_Control', + 'erx_qos_profile_name' => 'ERX-Qos-Profile-Name', 'x_ascend_client_gateway' => 'X-Ascend-Client-Gateway', - 'ms_mppe_encryption_polic' => 'MS-MPPE-Encryption-Policy', + 'pre_proxy_type' => 'Pre-Proxy-Type', + 'smb_account_ctrl_text' => 'SMB-Account-CTRL-TEXT', 'x_ascend_data_filter' => 'X-Ascend-Data-Filter', + 'usr_rmmie_last_update_ti' => 'USR-RMMIE-Last-Update-Time', 'ascend_atm_direct' => 'Ascend-ATM-Direct', 'ascend_session_type' => 'Ascend-Session-Type', 'x_ascend_fr_linkup' => 'X-Ascend-FR-LinkUp', 'ascend_metric' => 'Ascend-Metric', + 'x_ascend_assign_ip_clien' => 'X-Ascend-Assign-IP-Client', 'usr_speed_of_connection' => 'USR-Speed-Of-Connection', + 'cvpn3000_require_hw_clie' => 'CVPN3000-Require-HW-Client-Auth', + 'session_type' => 'Session-Type', + 'acct_input_octets_65' => 'Acct_Input_Octets_64', 'le_nat_outsource_outmap' => 'LE-NAT-Outsource-Outmap', - 'pppoe_url' => 'PPPOE_URL', - 'acct_mcast_out_octets' => 'Acct_Mcast_Out_Octets', + 'cvx_modem_local_rate_neg' => 'CVX-Modem-Local-Rate-Negs', + 'mcast_sene' => 'Mcast_Send', + 'pppoe_url' => 'PPPOE-URL', + 'erx_service_bundle' => 'ERX-Service-Bundle', + 'altiga_secondary_dns_g' => 'Altiga-Secondary-DNS-G', + 'bg_trans_bpdv' => 'BG_Trans_BPDU', + 'cvx_data_filter' => 'CVX-Data-Filter', + 'acct_mcast_out_octets' => 'Acct-Mcast-Out-Octets', 'ascend_callback' => 'Ascend-Callback', 'tunnel_client_auth_id' => 'Tunnel-Client-Auth-Id', 'acct_unique_session_id' => 'Acct-Unique-Session-Id', 'usr_port_tap_format' => 'USR-Port-Tap-Format', 'ascend_ckt_type' => 'Ascend-Ckt-Type', 'ascend_ppp_async_map' => 'Ascend-PPP-Async-Map', + 'usr_rmmie_rcv_pwrlvl_375' => 'USR-RMMIE-Rcv-PwrLvl-3750Hz', 'usr_acct_reason_code' => 'USR-Acct-Reason-Code', 'ascend_filter' => 'Ascend-Filter', 'h323_redirect_number' => 'h323-redirect-number', 'port_limit' => 'Port-Limit', - 'x_ascend_shared_profile_' => 'X-Ascend-Shared-Profile-Enable', - 'tunnel_police_rate' => 'Tunnel_Police_Rate', - 'ascend_calling_id_screen' => 'Ascend-Calling-Id-Screening', + 'rewrite_rule' => 'Rewrite-Rule', + 'tunnel_police_rate' => 'Tunnel-Police-Rate', 'usr_multicast_proxy' => 'USR-Multicast-Proxy', + 'ascend_max_shared_users' => 'Ascend-Max-Shared-Users', 'usr_bridging' => 'USR-Bridging', - 'usr_originate_answer_mod' => 'USR-Originate-Answer-Mode', + 'cvx_presession_time' => 'CVX-PreSession-Time', + 'cvpn5000_vpn_groupinfo' => 'CVPN5000-VPN-GroupInfo', + 'autz_type' => 'Autz-Type', 'x_ascend_fr_dlci' => 'X-Ascend-FR-DLCI', 'usr_request_type' => 'USR-Request-Type', - 'acc_dialout_auth_usernam' => 'Acc-Dialout-Auth-Username', + 'acc_igmp_admin_state' => 'Acc-Igmp-Admin-State', 'ascend_host_info' => 'Ascend-Host-Info', + 'ascend_dhcp_maximum_leas' => 'Ascend-DHCP-Maximum-Leases', 'usr_rmmie_num_of_updates' => 'USR-RMMIE-Num-Of-Updates', 'x_ascend_fr_profile_name' => 'X-Ascend-FR-Profile-Name', 'ascend_fr_direct_profile' => 'Ascend-FR-Direct-Profile', 'x_ascend_bridge' => 'X-Ascend-Bridge', - 'tunnel_deadtime' => 'Tunnel_Deadtime', + 'tunnel_deadtime' => 'Tunnel-Deadtime', 'ms_chap_error' => 'MS-CHAP-Error', 'framed_route' => 'Framed-Route', + 'sip_from' => 'Sip-From', 'expiration' => 'Expiration', 'ascend_backup' => 'Ascend-Backup', 'ascend_pre_output_octets' => 'Ascend-Pre-Output-Octets', + 'ascend_calling_id_number' => 'Ascend-Calling-Id-Number-Plan', 'framed_appletalk_zone' => 'Framed-AppleTalk-Zone', 'annex_audit_level' => 'Annex-Audit-Level', - 'bind_auth_context' => 'Bind_Auth_Context', - 'cisco_asing_ip_pool' => 'Cisco-Asing-IP-Pool', + 'digest_algorithm' => 'Digest-Algorithm', + 'bind_auth_context' => 'Bind-Auth-Context', 'ascend_user_acct_base' => 'Ascend-User-Acct-Base', - 'mcast_receive' => 'Mcast_Receive', + 'st_secondary_dns_server' => 'ST-Secondary-DNS-Server', + 'mcast_receive' => 'Mcast-Receive', 'usr_ds0' => 'USR-DS0', + 'aat_atm_traffic_profile' => 'AAT-ATM-Traffic-Profile', 'ms_ras_vendor' => 'MS-RAS-Vendor', - 'tunnel_domain' => 'Tunnel_Domain', - 'usr_secondary_nbns_serve' => 'USR-Secondary_NBNS_Server', - 'tunnel_max_sessions' => 'Tunnel_Max_Sessions', + 'tunnel_domain' => 'Tunnel-Domain', + 'tunnel_max_sessions' => 'Tunnel-Max-Sessions', 'ascend_ip_direct' => 'Ascend-IP-Direct', + 'xedia_address_pool' => 'Xedia-Address-Pool', 'idle_timeout' => 'Idle-Timeout', + 'tunnel_rate_limit_ratf' => 'Tunnel_Rate_Limit_Rate', + 'annex_rate_reneg_req_sen' => 'Annex-Rate-Reneg-Req-Sent', + 'usr_initial_tx_link_data' => 'USR-Initial-Tx-Link-Data-Rate', 'tunnel_server_auth_id' => 'Tunnel-Server-Auth-Id', + 'cvpn3000_ipsec_banner1' => 'CVPN3000-IPSec-Banner1', 'usr_start_time' => 'USR-Start-Time', 'usr_ip' => 'USR-IP', + 'cvpn3000_reqrd_client_fw' => 'CVPN3000-Reqrd-Client-Fw-Vendor-Code', + 'altiga_ipsec_secondary_d' => 'Altiga-IPSec-Secondary-Domains-G', 'usr_gateway_ip_address' => 'USR-Gateway-IP-Address', - 'usr_number_of_characters' => 'USR-Number-Of-Characters-Lost', 'ascend_dba_monitor' => 'Ascend-DBA-Monitor', + 'ms_link_utilization_thre' => 'MS-Link-Utilization-Threshold', + 'st_primary_dns_server' => 'ST-Primary-DNS-Server', + 'acc_ace_token_ttl' => 'Acc-Ace-Token-Ttl', 'ms_chap_domain' => 'MS-CHAP-Domain', 'cisco_pre_input_octets' => 'Cisco-Pre-Input-Octets', + 'ascend_primary_home_agen' => 'Ascend-Primary-Home-Agent', 'acct_session_time' => 'Acct-Session-Time', 'framed_ip_address' => 'Framed-IP-Address', - 'x_ascend_ip_pool_definit' => 'X-Ascend-IP-Pool-Definition', - 'erx_alternate_cli_access' => 'ERX-Alternate-Cli-Access-Level', - 'medium_type' => 'Medium_Type', - 'acct_output_octets_64' => 'Acct_Output_Octets_64', + 'ns_admin_privilege' => 'NS-Admin-Privilege', + 'medium_type' => 'Medium-Type', + 'acct_output_octets_64' => 'Acct-Output-Octets-64', 'ascend_cir_timer' => 'Ascend-CIR-Timer', - 'police_rate' => 'Police_Rate', + 'police_rate' => 'Police-Rate', + 'tunnel_functioo' => 'Tunnel_Function', + 'quintum_h323_time_and_da' => 'Quintum-h323-time-and-day', + 'ip_tos_fiele' => 'IP_TOS_Field', + 'erx_framed_ip_route_tag' => 'ERX-Framed-Ip-Route-Tag', 'ms_mppe_send_key' => 'MS-MPPE-Send-Key', - 'ascend_multicast_gleave_' => 'Ascend-Multicast-GLeave-Delay', + 'ascend_maximum_call_dura' => 'Ascend-Maximum-Call-Duration', + 'pppoe_motn' => 'PPPOE_MOTM', + 'lac_poru' => 'LAC_Port', + 'bind_dot1q_slou' => 'Bind_Dot1q_Slot', + 'ascend_secondary_home_ag' => 'Ascend-Secondary-Home-Agent', + 'usr_ip_call_output_filte' => 'USR-IP-Call-Output-Filter', 'x_ascend_host_info' => 'X-Ascend-Host-Info', 'erx_egress_policy_name' => 'ERX-Egress-Policy-Name', + 'erx_ppp_password' => 'ERX-PPP-Password', 'user_name' => 'User-Name', - 'bind_bypass_bypass' => 'Bind_Bypass_Bypass', + 'usr_number_of_characters' => 'USR-Number-Of-Characters-Lost', + 'bind_bypass_bypass' => 'Bind-Bypass-Bypass', + 'usr_rad_multicast_routip' => 'USR-Rad-Multicast-Routing-Proto', 'annex_acct_servers' => 'Annex-Acct-Servers', + 'cvpn5000_tunnel_throughp' => 'CVPN5000-Tunnel-Throughput', 'usr_chassis_call_channel' => 'USR-Chassis-Call-Channel', 'annex_input_filter' => 'Annex-Input-Filter', - 'ascend_home_agent_passwo' => 'Ascend-Home-Agent-Password', + 'wispr_billing_class_of_s' => 'WISPr-Billing-Class-Of-Service', 'nas_port_type' => 'NAS-Port-Type', + 'cvx_client_assign_dns' => 'CVX-Client-Assign-DNS', + 'nomadix_maxbytesdown' => 'Nomadix-MaxBytesDown', 'ascend_endpoint_disc' => 'Ascend-Endpoint-Disc', - 'tunnel_police_burst' => 'Tunnel_Police_Burst', - 'bind_auth_max_sessions' => 'Bind_Auth_Max_Sessions', + 'tunnel_police_burst' => 'Tunnel-Police-Burst', + 'bind_auth_max_sessions' => 'Bind-Auth-Max-Sessions', + 'cvx_identification' => 'CVX-Identification', + 'cvpn3000_ipsec_allow_pas' => 'CVPN3000-IPSec-Allow-Passwd-Store', + 'ascend_calling_id_type_o' => 'Ascend-Calling-Id-Type-Of-Num', 'x_ascend_fr_dce_n392' => 'X-Ascend-FR-DCE-N392', 'usr_connect_term_reason' => 'USR-Connect-Term-Reason', - 'usr_mbi_ct_pri_card_span' => 'USR-Mbi_Ct_PRI_Card_Span_Line', 'erx_egress_statistics' => 'ERX-Egress-Statistics', 'ascend_fr_dte_n392' => 'Ascend-FR-DTE-N392', 'usr_esn' => 'USR-ESN', 'x_ascend_fr_dte_n392' => 'X-Ascend-FR-DTE-N392', + 'itk_modem_init_string' => 'ITK-Modem-Init-String', 'x_ascend_fr_nailed_grp' => 'X-Ascend-FR-Nailed-Grp', 'ascend_bridge_non_pppoe' => 'Ascend-Bridge-Non-PPPoE', + 'cvpn3000_ipsec_reqrd_cli' => 'CVPN3000-IPSec-Reqrd-Client-Fw-Cap', 'ascend_ipx_alias' => 'Ascend-IPX-Alias', 'acc_tunnel_port' => 'Acc-Tunnel-Port', + 'quintum_h323_return_code' => 'Quintum-h323-return-code', + 'cvpn3000_l2tp_encryption' => 'CVPN3000-L2TP-Encryption', 'acct_input_gigawords' => 'Acct-Input-Gigawords', + 'bind_dot1q_poru' => 'Bind_Dot1q_Port', + 'altiga_primary_wins_g' => 'Altiga-Primary-WINS-G', 'ascend_maximum_channels' => 'Ascend-Maximum-Channels', + 'x_ascend_home_agent_pass' => 'X-Ascend-Home-Agent-Password', 'x_ascend_ppp_async_map' => 'X-Ascend-PPP-Async-Map', + 'usr_rmmie_manufacturer_i' => 'USR-RMMIE-Manufacturer-ID', 'usr_retrains_requested' => 'USR-Retrains-Requested', 'x_ascend_metric' => 'X-Ascend-Metric', 'acc_apsm_oversubscribed' => 'Acc-Apsm-Oversubscribed', + 'usr_originate_answer_mod' => 'USR-Originate-Answer-Mode', 'erx_atm_pcr' => 'ERX-Atm-PCR', + 'itk_nas_name' => 'ITK-NAS-Name', 'usr_ipx_routing' => 'USR-IPX-Routing', 'usr_tunneled_mlpp' => 'USR-Tunneled-MLPP', 'usr_send_script5' => 'USR-Send-Script5', 'ascend_traffic_shaper' => 'Ascend-Traffic-Shaper', + 'ascend_client_secondarya' => 'Ascend-Client-Secondary-DNS', 'ascend_bacp_enable' => 'Ascend-BACP-Enable', + 'usr_call_terminate_in_gm' => 'USR-Call-Terminate-in-GMT', 'login_time' => 'Login-Time', + 'bg_path_cosu' => 'BG_Path_Cost', + 'aat_require_auth' => 'AAT-Require-Auth', + 'cvpn3000_reqrd_client_fy' => 'CVPN3000-Reqrd-Client-Fw-Description', 'ascend_call_type' => 'Ascend-Call-Type', 'erx_address_pool_name' => 'ERX-Address-Pool-Name', + 'cvpn3000_ipsec_backup_sf' => 'CVPN3000-IPSec-Backup-Server-List', 'h323_incoming_conf_id' => 'h323-incoming-conf-id', + 'user_profile' => 'User-Profile', + 'ip_host_adds' => 'Ip_Host_Addr', + 'ns_primary_wins' => 'NS-Primary-WINS', 'packet_type' => 'Packet-Type', + 'bind_auth_max_sessiont' => 'Bind_Auth_Max_Sessions', + 'altiga_allow_alpha_only_' => 'Altiga-Allow-Alpha-Only-Passwords-G', 'usr_security_resp_limit' => 'USR-Security-Resp-Limit', - 'ip_address_pool_name' => 'Ip_Address_Pool_Name', - 'ascend_cbcp_trunk_group' => 'Ascend-CBCP-Trunk-Group', + 'ip_address_pool_name' => 'Ip-Address-Pool-Name', 'ascend_ipx_node_addr' => 'Ascend-IPX-Node-Addr', + 'ascend_cbcp_trunk_group' => 'Ascend-CBCP-Trunk-Group', 'ascend_menu_selector' => 'Ascend-Menu-Selector', + 'ascend_assign_ip_global_' => 'Ascend-Assign-IP-Global-Pool', 'usr_ds0s' => 'USR-DS0s', 'usr_actual_voltage' => 'USR-Actual-Voltage', + 'quintum_h323_call_type' => 'Quintum-h323-call-type', 'annex_sw_version' => 'Annex-SW-Version', - 'ascend_history_weigh_typ' => 'Ascend-History-Weigh-Type', 'ascend_receive_secret' => 'Ascend-Receive-Secret', + 'bintec_qospolicytable' => 'BinTec-qosPolicyTable', 'usr_ip_rip_policies' => 'USR-IP-RIP-Policies', + 'redcreek_tunneled_ip_add' => 'RedCreek-Tunneled-IP-Addr', 'ascend_pw_warntime' => 'Ascend-PW-Warntime', - 'x_ascend_assign_ip_serve' => 'X-Ascend-Assign-IP-Server', - 'tunnel_session_auth_serv' => 'Tunnel_Session_Auth_Service_Grp', + 'x_ascend_inc_channel_cou' => 'X-Ascend-Inc-Channel-Count', 'usr_blocks_resent' => 'USR-Blocks-Resent', 'usr_fallback_enabled' => 'USR-Fallback-Enabled', 'arap_challenge_response' => 'ARAP-Challenge-Response', - 'tunnel_session_auth' => 'Tunnel_Session_Auth', + 'tunnel_session_auth' => 'Tunnel-Session-Auth', 'usr_sync_async_mode' => 'USR-Sync-Async-Mode', + 'itk_dialout_type' => 'ITK-Dialout-Type', + 'extreme_netlogin_url' => 'Extreme-Netlogin-Url', 'client_port_dnis' => 'Client-Port-DNIS', + 'digest_realm' => 'Digest-Realm', 'ascend_ppp_vj_1172' => 'Ascend-PPP-VJ-1172', - 'ascend_remote_addr' => 'Ascend-Remote-Addr', 'ascend_fr_n391' => 'Ascend-FR-N391', + 'ascend_remote_addr' => 'Ascend-Remote-Addr', 'client_port_id' => 'Client-Port-Id', - 'usr_num_fax_pages_proces' => 'USR-Num-Fax-Pages-Processed', + 'digest_body_digest' => 'Digest-Body-Digest', 'le_ipsec_active_profile' => 'LE-IPSec-Active-Profile', + 'digest_cnonce' => 'Digest-CNonce', 'usr_port_tap_facility' => 'USR-Port-Tap-Facility', 'usr_callback_type' => 'USR-Callback-Type', + 'client_dns_prj' => 'Client_DNS_Pri', + 'digest_response' => 'Digest-Response', 'login_lat_group' => 'Login-LAT-Group', 'x_ascend_call_type' => 'X-Ascend-Call-Type', 'ascend_route_ip' => 'Ascend-Route-IP', + 'usr_rad_multicast_routio' => 'USR-Rad-Multicast-Routing-RtLim', 'usr_pw_vpn_id' => 'USR-PW_VPN_ID', - 'le_nat_sess_dir_fail_act' => 'LE-NAT-Sess-Dir-Fail-Action', + 'cvx_modem_end_modulation' => 'CVX-Modem-End-Modulation', + 'cvpn3000_pptp_mppc_compr' => 'CVPN3000-PPTP-MPPC-Compression', 'cisco_pre_output_octets' => 'Cisco-Pre-Output-Octets', 'h323_billing_model' => 'h323-billing-model', 'usr_equalization_type' => 'USR-Equalization-Type', 'acc_clearing_cause' => 'Acc-Clearing-Cause', + 'altiga_access_hours_g_u' => 'Altiga-Access-Hours-G/U', + 'cvpn3000_ipsec_user_grou' => 'CVPN3000-IPSec-User-Group-Lock', 'x_ascend_menu_selector' => 'X-Ascend-Menu-Selector', 'x_ascend_netware_timeout' => 'X-Ascend-Netware-timeout', 'ascend_fr_linkup' => 'Ascend-FR-LinkUp', - 'police_burst' => 'Police_Burst', + 'annex_num_in_multilink' => 'Annex-Num-In-Multilink', + 'police_burst' => 'Police-Burst', + 'altiga_l2tp_min_authenti' => 'Altiga-L2TP-Min-Authentication-G/U', 'ascend_filter_required' => 'Ascend-Filter-Required', - 'usr_compression_algorith' => 'USR-Compression-Algorithm', - 'le_ipsec_outsource_profi' => 'LE-IPSec-Outsource-Profile', 'x_ascend_idle_limit' => 'X-Ascend-Idle-Limit', - 'usr_call_terminate_in_gm' => 'USR-Call-Terminate-in-GMT', - 'usr_ipx_call_output_filt' => 'USR-IPX-Call-Output-Filter', - 'ip_tos_field' => 'IP_TOS_Field', + 'nomadix_logoff_url' => 'Nomadix-Logoff-URL', + 'cvpn3000_ms_client_icpt_' => 'CVPN3000-MS-Client-Icpt-DHCP-Conf-Msg', + 'ip_tos_field' => 'IP-TOS-Field', 'ascend_ip_tos_apply_to' => 'Ascend-IP-TOS-Apply-To', - 'tunnel_l2f_second_passwo' => 'Tunnel_L2F_Second_Password', 'usr_call_event_code' => 'USR-Call-Event-Code', + 'usr_et_bridge_output_fil' => 'USR-ET-Bridge-Output-Filter', + 'le_nat_sess_dir_fail_act' => 'LE-NAT-Sess-Dir-Fail-Action', 'usr_rmmie_product_code' => 'USR-RMMIE-Product-Code', 'usr_host_type' => 'USR-Host-Type', + 'erx_tunnel_interface_id' => 'ERX-Tunnel-Interface-Id', 'ascend_send_auth' => 'Ascend-Send-Auth', 'shiva_compression_type' => 'Shiva-Compression-Type', - 'filter_id' => 'Filter-Id', + 'itk_banner' => 'ITK-Banner', 'ascend_ft1_caller' => 'Ascend-FT1-Caller', - 'erx_cli_initial_access_l' => 'ERX-Cli-Initial-Access-Level', + 'filter_id' => 'Filter-Id', + 'annex_pre_output_octets' => 'Annex-Pre-Output-Octets', + 'acct_mcast_in_octett' => 'Acct_Mcast_In_Octets', 'usr_log_filter_packets' => 'USR-Log-Filter-Packets', 'ascend_fr_nailed_grp' => 'Ascend-FR-Nailed-Grp', - 'usr_initial_tx_link_data' => 'USR-Initial-Tx-Link-Data-Rate', + 'ascend_atm_loopback_cell' => 'Ascend-ATM-Loopback-Cell-Loss', + 'usr_at_rtmp_output_filte' => 'USR-AT-RTMP-Output-Filter', 'acc_input_errors' => 'Acc-Input-Errors', 'x_ascend_user_acct_port' => 'X-Ascend-User-Acct-Port', 'erx_secondary_wins' => 'ERX-Secondary-Wins', 'usr_rmmie_serial_number' => 'USR-RMMIE-Serial-Number', - 'ascend_client_primary_dn' => 'Ascend-Client-Primary-DNS', + 'usr_et_bridge_input_filt' => 'USR-ET-Bridge-Input-Filter', + 'ns_primary_dns' => 'NS-Primary-DNS', 'usr_slot_connected_to' => 'USR-Slot-Connected-To', 'shiva_disconnect_reason' => 'Shiva-Disconnect-Reason', + 'cvpn5000_client_assignee' => 'CVPN5000-Client-Assigned-IPX', + 'cvx_radius_redirect' => 'CVX-Radius-Redirect', 'usr_receive_acc_map' => 'USR-Receive-Acc-Map', - 'usr_compression_reset_mo' => 'USR-Compression-Reset-Mode', - 'usr_rmmie_planned_discon' => 'USR-RMMIE-Planned-Disconnect', - 'ascend_client_assign_dns' => 'Ascend-Client-Assign-DNS', + 'x_ascend_tunneling_proto' => 'X-Ascend-Tunneling-Protocol', + 'itk_acct_serv_ip' => 'ITK-Acct-Serv-IP', 'ascend_fr_type' => 'Ascend-FR-Type', + 'ascend_client_assign_dns' => 'Ascend-Client-Assign-DNS', + 'annex_retrain_requests_r' => 'Annex-Retrain-Requests-Rcvd', + 'x_ascend_assign_ip_globa' => 'X-Ascend-Assign-IP-Global-Pool', 'tunnel_client_endpoint' => 'Tunnel-Client-Endpoint', + 'alteon_service_type' => 'Alteon-Service-Type', 'x_ascend_send_secret' => 'X-Ascend-Send-Secret', 'x_ascend_call_filter' => 'X-Ascend-Call-Filter', 'usr_ipx_rip_input_filter' => 'USR-IPX-RIP-Input-Filter', 'x_ascend_maximum_time' => 'X-Ascend-Maximum-Time', - 'ascend_x25_pad_x3_profil' => 'Ascend-X25-Pad-X3-Profile', - 'pvc_profile_name' => 'PVC_Profile_Name', + 'pvc_profile_name' => 'PVC-Profile-Name', + 'usr_framed_ip_address_po' => 'USR-Framed_IP_Address_Pool_Name', + 'cvpn3000_ipsec_split_dns' => 'CVPN3000-IPSec-Split-DNS-Names', 'ascend_global_call_id' => 'Ascend-Global-Call-Id', - 'tunnel_local_name' => 'Tunnel_Local_Name', + 'usr_initial_rx_link_data' => 'USR-Initial-Rx-Link-Data-Rate', + 'st_primary_nbns_server' => 'ST-Primary-NBNS-Server', + 'usr_number_of_rings_limi' => 'USR-Number-of-Rings-Limit', + 'tunnel_local_name' => 'Tunnel-Local-Name', 'ascend_fr_t392' => 'Ascend-FR-T392', - 'usr_dnis_reauthenticatio' => 'USR-DNIS-ReAuthentication', - 'ascend_pre_output_packet' => 'Ascend-Pre-Output-Packets', + 'annex_pool_id' => 'Annex-Pool-Id', 'ascend_token_immediate' => 'Ascend-Token-Immediate', + 'usr_rmmie_firmware_build' => 'USR-RMMIE-Firmware-Build-Date', + 'wispr_bandwidth_min_down' => 'WISPr-Bandwidth-Min-Down', 'usr_chassis_call_slot' => 'USR-Chassis-Call-Slot', - 'rate_limit_burst' => 'Rate_Limit_Burst', + 'rate_limit_burst' => 'Rate-Limit-Burst', 'cisco_route_ip' => 'Cisco-Route-IP', - 'dhcp_max_leases' => 'DHCP_Max_Leases', + 'xedia_netbios_server' => 'Xedia-NetBios-Server', + 'session_error_msg' => 'Session-Error-Msg', + 'dhcp_max_leases' => 'DHCP-Max-Leases', + 'acc_vpsm_reject_cause' => 'Acc-Vpsm-Reject-Cause', 'user_category' => 'User-Category', - 'x_ascend_maximum_call_du' => 'X-Ascend-Maximum-Call-Duration', - 'bind_type' => 'Bind_Type', + 'x_ascend_multicast_rate_' => 'X-Ascend-Multicast-Rate-Limit', + 'cvpn3000_ipsec_auth_on_r' => 'CVPN3000-IPSec-Auth-On-Rekey', + 'altiga_min_password_leng' => 'Altiga-Min-Password-Length-G', + 'bind_type' => 'Bind-Type', + 'ascend_tunneling_protoco' => 'Ascend-Tunneling-Protocol', + 'cvx_modem_retx_packets' => 'CVX-Modem-ReTx-Packets', 'usr_framed_ipx_route' => 'USR-Framed-IPX-Route', - 'rate_limit_rate' => 'Rate_Limit_Rate', + 'rate_limit_rate' => 'Rate-Limit-Rate', 'ascend_atm_connect_vpi' => 'Ascend-ATM-Connect-Vpi', - 'x_ascend_inc_channel_cou' => 'X-Ascend-Inc-Channel-Count', 'connect_info' => 'Connect-Info', - 'x_ascend_pre_input_packe' => 'X-Ascend-Pre-Input-Packets', 'usr_port_tap_address' => 'USR-Port-Tap-Address', - 'ascend_home_agent_udp_po' => 'Ascend-Home-Agent-UDP-Port', - 'usr_final_rx_link_data_r' => 'USR-Final-Rx-Link-Data-Rate', + 'usr_simplified_mnp_level' => 'USR-Simplified-MNP-Levels', + 'mcast_receivf' => 'Mcast_Receive', + 'annex_begin_modulation' => 'Annex-Begin-Modulation', 'usr_pw_usr_ifilter_ip' => 'USR-PW_USR_IFilter_IP', 'ascend_route_appletalk' => 'Ascend-Route-Appletalk', 'ms_chap_lm_enc_pw' => 'MS-CHAP-LM-Enc-PW', + 'altiga_ipsec_over_nat_po' => 'Altiga-IPSec-Over-NAT-Port-Num-G', + 'itk_isdn_prot' => 'ITK-ISDN-Prot', 'ascend_callback_delay' => 'Ascend-Callback-Delay', + 'session_error_code' => 'Session-Error-Code', + 'nomadix_endofsession' => 'Nomadix-EndofSession', 'x_ascend_bacp_enable' => 'X-Ascend-BACP-Enable', - 'bg_trans_bpdu' => 'BG_Trans_BPDU', + 'bg_trans_bpdu' => 'BG-Trans-BPDU', + 'bind_int_interface_namf' => 'Bind_Int_Interface_Name', + 'foundry_privilege_level' => 'Foundry-Privilege-Level', 'huntgroup_name' => 'Huntgroup-Name', 'x_ascend_ipx_alias' => 'X-Ascend-IPX-Alias', - 'x_ascend_secondary_home_' => 'X-Ascend-Secondary-Home-Agent', + 'tunnel_l2f_second_passwp' => 'Tunnel_L2F_Second_Password', + 'xedia_dns_server' => 'Xedia-DNS-Server', 'usr_ipx_wan' => 'USR-IPX-WAN', + 'annex_addr_resolution_se' => 'Annex-Addr-Resolution-Servers', + 'acct_output_octets_65' => 'Acct_Output_Octets_64', 'menu' => 'Menu', + 'erx_tunnel_nas_port_meth' => 'ERX-Tunnel-Nas-Port-Method', + 'aat_output_octets_diff' => 'AAT-Output-Octets-Diff', 'x_ascend_fr_direct_dlci' => 'X-Ascend-FR-Direct-DLCI', 'acct_status_type' => 'Acct-Status-Type', 'ascend_port_redir_server' => 'Ascend-Port-Redir-Server', + 'telebit_port_name' => 'Telebit-Port-Name', 'acc_dns_server_sec' => 'Acc-Dns-Server-Sec', + 'cvx_modem_remote_retrain' => 'CVX-Modem-Remote-Retrains', 'ascend_minimum_channels' => 'Ascend-Minimum-Channels', - 'ascend_telnet_profile' => 'Ascend-Telnet-Profile', 'ascend_ipx_route' => 'Ascend-IPX-Route', + 'ascend_telnet_profile' => 'Ascend-Telnet-Profile', 'usr_call_connect_in_gmt' => 'USR-Call-Connect-in-GMT', + 'usr_cusr_hat_script_rule' => 'USR-CUSR-hat-Script-Rules', 'x_ascend_dba_monitor' => 'X-Ascend-DBA-Monitor', + 'response_packet_type' => 'Response-Packet-Type', 'usr_event_id' => 'USR-Event-Id', + 'cvpn3000_ipsec_over_udp_' => 'CVPN3000-IPSec-Over-UDP-Port', 'ascend_inc_channel_count' => 'Ascend-Inc-Channel-Count', 'usr_send_script3' => 'USR-Send-Script3', + 'annex_pre_input_packets' => 'Annex-Pre-Input-Packets', 'framed_callback_id' => 'Framed-Callback-Id', + 'xedia_client_access_netw' => 'Xedia-Client-Access-Network', 'arap_zone_access' => 'ARAP-Zone-Access', + 'ascend_port_redir_portnu' => 'Ascend-Port-Redir-Portnum', 'service_type' => 'Service-Type', 'usr_nfas_id' => 'USR-NFAS-ID', 'shiva_calling_number' => 'Shiva-Calling-Number', 'ascend_user_acct_host' => 'Ascend-User-Acct-Host', + 'tunnel_session_auth_serv' => 'Tunnel-Session-Auth-Service-Grp', + 'juniper_deny_commands' => 'Juniper-Deny-Commands', 'ascend_fr_link_mgt' => 'Ascend-FR-Link-Mgt', + 'nokia_imsi' => 'Nokia-IMSI', + 'quintum_h323_prompt_id' => 'Quintum-h323-prompt-id', + 'cvpn3000_require_individ' => 'CVPN3000-Require-Individual-User-Auth', + 'tunnel_retransmiu' => 'Tunnel_Retransmit', + 'source_validatioo' => 'Source_Validation', + 'sip_to' => 'Sip-To', 'ms_primary_nbns_server' => 'MS-Primary-NBNS-Server', 'quintum_avpair' => 'Quintum-AVPair', - 'x_ascend_home_agent_pass' => 'X-Ascend-Home-Agent-Password', 'ascend_transit_number' => 'Ascend-Transit-Number', 'ascend_cache_refresh' => 'Ascend-Cache-Refresh', - 'versanet_termination_cau' => 'Versanet-Termination-Cause', 'ascend_user_acct_type' => 'Ascend-User-Acct-Type', + 'usr_num_fax_pages_proces' => 'USR-Num-Fax-Pages-Processed', 'usr_mic' => 'USR-MIC', - 'ascend_base_channel_coun' => 'Ascend-Base-Channel-Count', - 'x_ascend_dhcp_pool_numbe' => 'X-Ascend-DHCP-Pool-Number', + 'usr_failure_to_connect_r' => 'USR-Failure-to-Connect-Reason', + 'cisco_fax_auth_status' => 'Cisco-Fax-Auth-Status', + 'bind_dot1q_vlan_tag_ie' => 'Bind_Dot1q_Vlan_Tag_Id', 'ms_chap2_success' => 'MS-CHAP2-Success', + 'erx_tunnel_virtual_route' => 'ERX-Tunnel-Virtual-Router', 'cisco_idle_limit' => 'Cisco-Idle-Limit', 'ascend_pw_lifetime' => 'Ascend-PW-Lifetime', + 'cvpn3000_access_hours' => 'CVPN3000-Access-Hours', + 'bintec_sapcirctable' => 'BinTec-sapCircTable', 'usr_packet_bus_session' => 'USR-Packet-Bus-Session', - 'ascend_atm_loopback_cell' => 'Ascend-ATM-Loopback-Cell-Loss', - 'acct_input_packets_64' => 'Acct_Input_Packets_64', + 'acct_input_packets_64' => 'Acct-Input-Packets-64', + 'ascend_x25_pad_x3_parame' => 'Ascend-X25-Pad-X3-Parameters', + 'usr_secondary_nbns_serve' => 'USR-Secondary_NBNS_Server', 'ascend_modem_slotno' => 'Ascend-Modem-SlotNo', + 'digest_qop' => 'Digest-QOP', 'usr_characters_received' => 'USR-Characters-Received', + 'rate_limit_ratf' => 'Rate_Limit_Rate', 'ms_bap_usage' => 'MS-BAP-Usage', 'cisco_data_filter' => 'Cisco-Data-Filter', - 'ascend_seconds_of_histor' => 'Ascend-Seconds-Of-History', + 'usr_simplified_v42bis_us' => 'USR-Simplified-V42bis-Usage', 'h323_setup_time' => 'h323-setup-time', - 'acc_dialout_auth_passwor' => 'Acc-Dialout-Auth-Password', + 'annex_wan_number' => 'Annex-Wan-Number', + 'cvx_vpop_id' => 'CVX-VPOP-ID', + 'usr_pw_tunnel_authentica' => 'USR-PW_Tunnel_Authentication', 'le_nat_outsource_inmap' => 'LE-NAT-Outsource-Inmap', + 'cvx_modem_begin_recv_lin' => 'CVX-Modem-Begin-Recv-Line-Lvl', + 'telebit_login_command' => 'Telebit-Login-Command', + 'cisco_command_code' => 'Cisco-Command-Code', + 'itk_ppp_auth_type' => 'ITK-PPP-Auth-Type', + 'bintec_qosiftable' => 'BinTec-qosIfTable', + 'x_ascend_mpp_idle_percen' => 'X-Ascend-MPP-Idle-Percent', 'usr_sap_filter_in' => 'USR-SAP-Filter-In', 'framed_appletalk_link' => 'Framed-AppleTalk-Link', - 'usr_initial_rx_link_data' => 'USR-Initial-Rx-Link-Data-Rate', - 'usr_ospf_addressless_ind' => 'USR-OSPF-Addressless-Index', + 'tunnel_domaio' => 'Tunnel_Domain', 'usr_ipx' => 'USR-IPX', + 'nas_real_poru' => 'NAS_Real_Port', 'shiva_connect_reason' => 'Shiva-Connect-Reason', + 'x_ascend_pre_output_octe' => 'X-Ascend-Pre-Output-Octets', 'cisco_ppp_vj_slot_comp' => 'Cisco-PPP-VJ-Slot-Comp', + 'freeradius_proxied_to' => 'Freeradius-Proxied-To', 'ascend_atm_vpi' => 'Ascend-ATM-Vpi', 'acc_ml_mlx_admin_state' => 'Acc-ML-MLX-Admin-State', + 'cvx_modem_snr' => 'CVX-Modem-SNR', 'usr_igmp_robustness' => 'USR-IGMP-Robustness', + 'annex_rate_reneg_req_rcv' => 'Annex-Rate-Reneg-Req-Rcvd', 'add_prefix' => 'Add-Prefix', 'x_ascend_call_by_call' => 'X-Ascend-Call-By-Call', - 'x_ascend_connect_progres' => 'X-Ascend-Connect-Progress', + 'usr_last_callers_number_' => 'USR-Last-Callers-Number-ANI', + 'postauth_type' => 'PostAuth-Type', + 'pvc_circuit_paddinh' => 'PVC_Circuit_Padding', 'usr_at_rtmp_input_filter' => 'USR-AT-RTMP-Input-Filter', 'erx_igmp_enable' => 'ERX-Igmp-Enable', - 'usr_rmmie_rcv_pwrlvl_375' => 'USR-RMMIE-Rcv-PwrLvl-3750Hz', + 'bind_bypass_contexu' => 'Bind_Bypass_Context', + 'x_ascend_num_in_multilin' => 'X-Ascend-Num-In-Multilink', 'usr_pw_packet' => 'USR-PW_Packet', 'dialback_no' => 'Dialback-No', 'ascend_ip_tos_precedence' => 'Ascend-IP-TOS-Precedence', + 'cvpn5000_vpn_password' => 'CVPN5000-VPN-Password', 'annex_cli_filter' => 'Annex-CLI-Filter', 'x_ascend_dial_number' => 'X-Ascend-Dial-Number', 'usr_iwf_call_identifier' => 'USR-IWF-Call-Identifier', 'ms_secondary_dns_server' => 'MS-Secondary-DNS-Server', - 'ascend_client_secondary_' => 'Ascend-Client-Secondary-WINS', 'shiva_type_of_service' => 'Shiva-Type-Of-Service', - 'usr_framed_ip_address_po' => 'USR-Framed_IP_Address_Pool_Name', - 'bind_ses_context' => 'Bind_Ses_Context', + 'bind_ses_context' => 'Bind-Ses-Context', 'acc_reason_code' => 'Acc-Reason-Code', 'ms_chap_cpw_1' => 'MS-CHAP-CPW-1', + 'wispr_bandwidth_max_down' => 'WISPr-Bandwidth-Max-Down', 'h323_call_type' => 'h323-call-type', + 'bind_bypass_bypast' => 'Bind_Bypass_Bypass', + 'usr_number_of_link_timeo' => 'USR-Number-of-Link-Timeouts', 'ascend_fr_08_mode' => 'Ascend-FR-08-Mode', 'usr_calling_party_number' => 'USR-Calling-Party-Number', - 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-RtLim', 'usr_reply_script2' => 'USR-Reply-Script2', 'usr_security_login_limit' => 'USR-Security-Login-Limit', 'cisco_link_compression' => 'Cisco-Link-Compression', - 'usr_et_bridge_output_fil' => 'USR-ET-Bridge-Output-Filter', 'ascend_vrouter_name' => 'Ascend-VRouter-Name', + 'erx_ppp_auth_protocol' => 'ERX-PPP-Auth-Protocol', + 'x_ascend_call_block_dura' => 'X-Ascend-Call-Block-Duration', 'usr_modem_setup_time' => 'USR-Modem-Setup-Time', + 'pppoe_urm' => 'PPPOE_URL', 'cisco_ip_direct' => 'Cisco-IP-Direct', 'x_ascend_temporary_rtes' => 'X-Ascend-Temporary-Rtes', 'ascend_x25_pad_alias_3' => 'Ascend-X25-Pad-Alias-3', - 'usr_rmmie_pwrlvl_xmit_lv' => 'USR-RMMIE-PwrLvl-Xmit-Lvl', + 'annex_multilink_id' => 'Annex-Multilink-Id', + 'mcast_maxgroupt' => 'Mcast_MaxGroups', 'configuration_token' => 'Configuration-Token', - 'usr_at_rtmp_output_filte' => 'USR-AT-RTMP-Output-Filter', - 'usr_ip_default_route_opt' => 'USR-IP-Default-Route-Option', - 'ascend_calling_subaddres' => 'Ascend-Calling-Subaddress', + 'ascend_h323_conference_i' => 'Ascend-H323-Conference-Id', + 'ascend_ipx_header_compre' => 'Ascend-IPX-Header-Compression', 'stripped_user_name' => 'Stripped-User-Name', + 'usr_ipx_rip_output_filte' => 'USR-IPX-RIP-Output-Filter', 'cisco_call_filter' => 'Cisco-Call-Filter', + 'nas_ipv6_address' => 'NAS-IPv6-Address', 'termination_menu' => 'Termination-Menu', + 'ascend_shared_profile_en' => 'Ascend-Shared-Profile-Enable', 'port_message' => 'Port-Message', - 'usr_igmp_maximum_respons' => 'USR-IGMP-Maximum-Response-Time', 'erx_ingress_policy_name' => 'ERX-Ingress-Policy-Name', - 'ascend_call_attempt_limi' => 'Ascend-Call-Attempt-Limit', 'acc_service_profile' => 'Acc-Service-Profile', 'ascend_bir_proxy' => 'Ascend-BIR-Proxy', + 'aat_ppp_address' => 'AAT-PPP-Address', + 'usr_mbi_ct_pri_card_span' => 'USR-Mbi_Ct_PRI_Card_Span_Line', 'ascend_x25_nui_prompt' => 'Ascend-X25-Nui-Prompt', - 'usr_rmmie_pwrlvl_noise_l' => 'USR-RMMIE-PwrLvl-Noise-Lvl', - 'usr_rmmie_pwrlvl_nearech' => 'USR-RMMIE-PwrLvl-NearEcho-Canc', - 'x_ascend_multicast_clien' => 'X-Ascend-Multicast-Client', + 'itk_modem_pool_id' => 'ITK-Modem-Pool-Id', + 'usr_compression_reset_mo' => 'USR-Compression-Reset-Mode', 'usr_unauthenticated_time' => 'USR-Unauthenticated-Time', + 'ascend_multicast_gleave_' => 'Ascend-Multicast-GLeave-Delay', 'acc_callback_cbcp_type' => 'Acc-Callback-CBCP-Type', + 'medium_typf' => 'Medium_Type', 'login_service' => 'Login-Service', - 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-Bound', + 'itk_username_prompt' => 'ITK-Username-Prompt', 'ascend_dial_number' => 'Ascend-Dial-Number', + 'framed_ipv6_route' => 'Framed-IPv6-Route', 'x_ascend_remote_addr' => 'X-Ascend-Remote-Addr', - 'usr_rmmie_rcv_pwrlvl_330' => 'USR-RMMIE-Rcv-PwrLvl-3300Hz', 'usr_call_end_date_time' => 'USR-Call-End-Date-Time', - 'bind_dot1q_slot' => 'Bind_Dot1q_Slot', + 'bind_dot1q_slot' => 'Bind-Dot1q-Slot', 'le_connect_detail' => 'LE-Connect-Detail', 'annex_user_level' => 'Annex-User-Level', - 'tunnel_dnis' => 'Tunnel_DNIS', - 'assigned_ip_address' => 'Assigned_IP_Address', + 'tunnel_dnis' => 'Tunnel-DNIS', + 'assigned_ip_address' => 'Assigned-IP-Address', 'acc_bridging_support' => 'Acc-Bridging-Support', 'usr_channel' => 'USR-Channel', 'arap_security_data' => 'ARAP-Security-Data', - 'bind_auth_service_grp' => 'Bind_Auth_Service_Grp', - 'x_ascend_pre_output_pack' => 'X-Ascend-Pre-Output-Packets', - 'x_ascend_seconds_of_hist' => 'X-Ascend-Seconds-Of-History', + 'bind_auth_service_grp' => 'Bind-Auth-Service-Grp', + 'cisco_abort_cause' => 'Cisco-Abort-Cause', + 'bg_span_dit' => 'BG_Span_Dis', 'h323_voice_quality' => 'h323-voice-quality', - 'usr_rmmie_last_update_ti' => 'USR-RMMIE-Last-Update-Time', - 'usr_disconnect_cause_ind' => 'USR-Disconnect-Cause-Indicator', + 'lac_real_port_typf' => 'LAC_Real_Port_Type', 'usr_channel_connected_to' => 'USR-Channel-Connected-To', - 'ascend_calling_id_number' => 'Ascend-Calling-Id-Number-Plan', + 'ascend_client_assign_win' => 'Ascend-Client-Assign-WINS', + 'redcreek_tunneled_gatewa' => 'RedCreek-Tunneled-Gateway', 'usr_number_of_fallbacks' => 'USR-Number-of-Fallbacks', - 'usr_ip_call_output_filte' => 'USR-IP-Call-Output-Filter', + 'nokia_prepaid_ind' => 'Nokia-Prepaid-Ind', + 'nomadix_maxbytesup' => 'Nomadix-MaxBytesUp', + 'login_hosu' => 'Login-Host', 'ascend_bir_enable' => 'Ascend-BIR-Enable', 'usr_connect_time_limit' => 'USR-Connect-Time-Limit', 'ascend_presession_time' => 'Ascend-PreSession-Time', - 'ascend_private_route_req' => 'Ascend-Private-Route-Required', - 'ascend_dsl_cir_xmit_limi' => 'Ascend-Dsl-CIR-Xmit-Limit', + 'altiga_simultaneous_logi' => 'Altiga-Simultaneous-Logins-G/U', + 'cvpn3000_ipsec_default_d' => 'CVPN3000-IPSec-Default-Domain', + 'aat_atm_vci' => 'AAT-ATM-VCI', + 'extreme_netlogin_url_des' => 'Extreme-Netlogin-Url-Desc', + 'itk_auth_serv_ip' => 'ITK-Auth-Serv-IP', + 'erx_alternate_cli_vroute' => 'ERX-Alternate-Cli-Vrouter-Name', 'framed_compression' => 'Framed-Compression', 'ascend_svc_enabled' => 'Ascend-SVC-Enabled', 'proxy_state' => 'Proxy-State', - 'ascend_tunnel_vrouter_na' => 'Ascend-Tunnel-VRouter-Name', - 'usr_ipx_call_input_filte' => 'USR-IPX-Call-Input-Filter', - 'x_ascend_assign_ip_globa' => 'X-Ascend-Assign-IP-Global-Pool', - 'erx_alternate_cli_vroute' => 'ERX-Alternate-Cli-Vrouter-Name', - 'ascend_dhcp_maximum_leas' => 'Ascend-DHCP-Maximum-Leases', + 'aat_vrouter_name' => 'AAT-Vrouter-Name', + 'usr_rmmie_pwrlvl_farecho' => 'USR-RMMIE-PwrLvl-FarEcho-Canc', + 'nas_poru' => 'NAS-Port', + 'wispr_location_name' => 'WISPr-Location-Name', + 'digest_user_name' => 'Digest-User-Name', 'ascend_modem_shelfno' => 'Ascend-Modem-ShelfNo', - 'bind_auth_protocol' => 'Bind_Auth_Protocol', 'shasta_user_privilege' => 'Shasta-User-Privilege', + 'bind_auth_protocol' => 'Bind-Auth-Protocol', + 'ascend_home_agent_passwo' => 'Ascend-Home-Agent-Password', 'acct_interim_interval' => 'Acct-Interim-Interval', + 'ascend_history_weigh_typ' => 'Ascend-History-Weigh-Type', + 'ms_link_drop_time_limit' => 'MS-Link-Drop-Time-Limit', 'hint' => 'Hint', 'x_ascend_target_util' => 'X-Ascend-Target-Util', - 'ms_link_drop_time_limit' => 'MS-Link-Drop-Time-Limit', 'acc_access_partition' => 'Acc-Access-Partition', - 'x_ascend_multilink_id' => 'X-Ascend-Multilink-ID', 'usr_power_supply_number' => 'USR-Power-Supply-Number', - 'acc_ipx_compression' => 'Acc-Ipx-Compression', + 'x_ascend_multilink_id' => 'X-Ascend-Multilink-ID', + 'redcreek_tunneled_domain' => 'RedCreek-Tunneled-DomainName', 'nomadix_bw_down' => 'Nomadix-Bw-Down', - 'usr_call_reference_numbe' => 'USR-Call-Reference-Number', + 'acc_ipx_compression' => 'Acc-Ipx-Compression', + 'quintum_h323_setup_time' => 'Quintum-h323-setup-time', 'cisco_target_util' => 'Cisco-Target-Util', - 'usr_back_channel_data_ra' => 'USR-Back-Channel-Data-Rate', 'acc_ip_gateway_sec' => 'Acc-Ip-Gateway-Sec', - 'usr_dte_ring_no_answer_l' => 'USR-DTE-Ring-No-Answer-Limit', - 'usr_connect_time' => 'USR-Connect-Time', + 'ascend_dsl_cir_xmit_limi' => 'Ascend-Dsl-CIR-Xmit-Limit', 'ascend_ip_pool_definitio' => 'Ascend-IP-Pool-Definition', + 'bind_sub_user_at_contexu' => 'Bind_Sub_User_At_Context', + 'itk_dest_no' => 'ITK-Dest-No', + 'usr_connect_time' => 'USR-Connect-Time', 'usr_call_start_date_time' => 'USR-Call-Start-Date-Time', + 'altiga_l2tp_encryption_g' => 'Altiga-L2TP-Encryption-G', + 'ascend_auth_delay' => 'Ascend-Auth-Delay', + 'ascend_x25_pad_x3_profil' => 'Ascend-X25-Pad-X3-Profile', + 'ascend_access_intercepta' => 'Ascend-Access-Intercept-Log', + 'ascend_home_agent_udp_po' => 'Ascend-Home-Agent-UDP-Port', + 'bind_tun_context' => 'Bind-Tun-Context', 'dialback_name' => 'Dialback-Name', - 'bind_tun_context' => 'Bind_Tun_Context', 'h323_redirect_ip_address' => 'h323-redirect-ip-address', 'annex_keypress_timeout' => 'Annex-Keypress-Timeout', + 'x_ascend_home_network_na' => 'X-Ascend-Home-Network-Name', 'ascend_x25_pad_alias_1' => 'Ascend-X25-Pad-Alias-1', + 'ascend_call_attempt_limi' => 'Ascend-Call-Attempt-Limit', + 'quintum_h323_currency_ty' => 'Quintum-h323-currency-type', 'ms_chap_response' => 'MS-CHAP-Response', + 'st_secondary_nbns_server' => 'ST-Secondary-NBNS-Server', + 'x_ascend_history_weigh_t' => 'X-Ascend-History-Weigh-Type', 'usr_max_channels' => 'USR-Max-Channels', 'ascend_fr_dte_n393' => 'Ascend-FR-DTE-N393', 'ascend_pre_input_octets' => 'Ascend-Pre-Input-Octets', 'erx_atm_mbs' => 'ERX-Atm-MBS', + 'cvpn3000_simultaneous_lo' => 'CVPN3000-Simultaneous-Logins', + 'juniper_allow_commands' => 'Juniper-Allow-Commands', 'usr_line_reversals' => 'USR-Line-Reversals', + 'itk_users_default_pw' => 'ITK-Users-Default-Pw', 'x_ascend_third_prompt' => 'X-Ascend-Third-Prompt', + 'cisco_fax_msg_id' => 'Cisco-Fax-Msg-Id', 'x_ascend_pw_warntime' => 'X-Ascend-PW-Warntime', 'ascend_data_filter' => 'Ascend-Data-Filter', 'framed_address' => 'Framed-Address', 'context_name' => 'Context-Name', 'usr_send_script2' => 'USR-Send-Script2', 'ms_arap_pw_change_reason' => 'MS-ARAP-PW-Change-Reason', + 'tunnel_session_auth_cty' => 'Tunnel_Session_Auth_Ctx', 'acct_session_id' => 'Acct-Session-Id', + 'annex_port' => 'Annex-Port', + 'quintum_h323_call_origin' => 'Quintum-h323-call-origin', + 'erx_cli_initial_access_l' => 'ERX-Cli-Initial-Access-Level', + 'x_ascend_shared_profile_' => 'X-Ascend-Shared-Profile-Enable', + 'tunnel_cmd_timeouu' => 'Tunnel_Cmd_Timeout', 'initial_modulation_type' => 'Initial-Modulation-Type', 'ascend_h323_gatekeeper' => 'Ascend-H323-Gatekeeper', 'x_ascend_fcp_parameter' => 'X-Ascend-FCP-Parameter', - 'tunnel_type' => 'Tunnel-Type', 'multi_link_flag' => 'Multi-Link-Flag', + 'tunnel_type' => 'Tunnel-Type', + 'erx_output_gigapkts' => 'ERX-Output-Gigapkts', 'ascend_idle_limit' => 'Ascend-Idle-Limit', + 'ns_user_group' => 'NS-User-Group', 'password_retry' => 'Password-Retry', 'h323_remote_address' => 'h323-remote-address', 'erx_atm_service_category' => 'ERX-Atm-Service-Category', 'acct_input_packets' => 'Acct-Input-Packets', 'h323_disconnect_time' => 'h323-disconnect-time', - 'ascend_billing_number' => 'Ascend-Billing-Number', 'usr_syslog_tap' => 'USR-Syslog-Tap', + 'telebit_accounting_info' => 'Telebit-Accounting-Info', + 'ascend_billing_number' => 'Ascend-Billing-Number', + 'ascend_tunnel_vrouter_na' => 'Ascend-Tunnel-VRouter-Name', 'ms_mppe_encryption_type' => 'MS-MPPE-Encryption-Type', + 'quintum_h323_credit_amou' => 'Quintum-h323-credit-amount', + 'acc_ace_token' => 'Acc-Ace-Token', 'ascend_assign_ip_pool' => 'Ascend-Assign-IP-Pool', + 'annex_end_modulation' => 'Annex-End-Modulation', 'usr_routing_protocol' => 'USR-Routing-Protocol', + 'cvx_assign_ip_pool' => 'CVX-Assign-IP-Pool', 'usr_rad_location_type' => 'USR-Rad-Location-Type', + 'usr_rmmie_pwrlvl_noise_l' => 'USR-RMMIE-PwrLvl-Noise-Lvl', 'usr_characters_sent' => 'USR-Characters-Sent', 'usr_mp_edo_hiper' => 'USR-MP-EDO-HIPER', + 'ascend_x25_nui_password_' => 'Ascend-X25-Nui-Password-Prompt', 'annex_host_restrict' => 'Annex-Host-Restrict', 'user_service_type' => 'User-Service-Type', 'acct_multi_session_id' => 'Acct-Multi-Session-Id', 'ms_chap_cpw_2' => 'MS-CHAP-CPW-2', - 'x_ascend_primary_home_ag' => 'X-Ascend-Primary-Home-Agent', + 'x_ascend_secondary_home_' => 'X-Ascend-Secondary-Home-Agent', 'x_ascend_dialout_allowed' => 'X-Ascend-Dialout-Allowed', 'ascend_connect_progress' => 'Ascend-Connect-Progress', 'x_ascend_ara_pw' => 'X-Ascend-Ara-PW', + 'cisco_fax_modem_time' => 'Cisco-Fax-Modem-Time', + 'sql_group' => 'Sql-Group', + 'annex_multicast_rate_lim' => 'Annex-Multicast-Rate-Limit', + 'cvpn3000_user_auth_servg' => 'CVPN3000-User-Auth-Server-Secret', 'ns_mta_md5_password' => 'NS-MTA-MD5-Password', + 'annex_addr_resolution_pr' => 'Annex-Addr-Resolution-Protocol', 'callback_number' => 'Callback-Number', - 'acct_output_packets_64' => 'Acct_Output_Packets_64', + 'cvx_multilink_match_info' => 'CVX-Multilink-Match-Info', + 'tunnel_max_tunnelt' => 'Tunnel_Max_Tunnels', + 'tunnel_local_namf' => 'Tunnel_Local_Name', + 'quintum_h323_conf_id' => 'Quintum-h323-conf-id', + 'acct_output_packets_64' => 'Acct-Output-Packets-64', + 'annex_signal_to_noise_ra' => 'Annex-Signal-to-Noise-Ratio', + 'acct_output_packets_65' => 'Acct_Output_Packets_64', 'x_ascend_user_acct_key' => 'X-Ascend-User-Acct-Key', + 'erx_dial_out_number' => 'ERX-Dial-Out-Number', 'ascend_modem_portno' => 'Ascend-Modem-PortNo', 'ascend_assign_ip_server' => 'Ascend-Assign-IP-Server', 'ascend_fcp_parameter' => 'Ascend-FCP-Parameter', - 'ascend_inter_arrival_jit' => 'Ascend-Inter-Arrival-Jitter', + 'usr_chassis_temp_thresho' => 'USR-Chassis-Temp-Threshold', + 'usr_mpip_tunnel_originat' => 'USR-MPIP-Tunnel-Originator', + 'tunnel_rate_limit_bursu' => 'Tunnel_Rate_Limit_Burst', 'client_ip_address' => 'Client-IP-Address', - 'usr_number_of_link_timeo' => 'USR-Number-of-Link-Timeouts', - 'ascend_dsl_cir_recv_limi' => 'Ascend-Dsl-CIR-Recv-Limit', + 'le_nat_tcp_session_timeo' => 'LE-NAT-TCP-Session-Timeout', + 'quintum_h323_redirect_ip' => 'Quintum-h323-redirect-ip-address', 'ms_acct_eap_type' => 'MS-Acct-EAP-Type', - 'x_ascend_user_acct_type' => 'X-Ascend-User-Acct-Type', 'usr_rmmie_x2_status' => 'USR-RMMIE-x2-Status', - 'ascend_dsl_downstream_li' => 'Ascend-Dsl-Downstream-Limit', + 'x_ascend_user_acct_type' => 'X-Ascend-User-Acct-Type', 'shiva_customer_id' => 'Shiva-Customer-Id', - 'lac_real_port' => 'LAC_Real_Port', + 'pvc_encapsulation_typf' => 'PVC_Encapsulation_Type', + 'st_acct_vc_connection_id' => 'ST-Acct-VC-Connection-Id', + 'lac_real_port' => 'LAC-Real-Port', 'h323_connect_time' => 'h323-connect-time', - 'old_password' => 'Old-Password', 'usr_vpn_gw_location_id' => 'USR-VPN-GW-Location-Id', + 'old_password' => 'Old-Password', 'x_ascend_if_netmask' => 'X-Ascend-IF-Netmask', 'add_suffix' => 'Add-Suffix', - 'x_ascend_client_assign_d' => 'X-Ascend-Client-Assign-DNS', - 'usr_q931_call_reference_' => 'USR-Q931-Call-Reference-Value', + 'lac_port_typf' => 'LAC_Port_Type', + 'acc_ip_pool_name' => 'Acc-Ip-Pool-Name', 'usr_terminal_type' => 'USR-Terminal-Type', 'usr_spoofing' => 'USR-Spoofing', 'erx_tunnel_password' => 'ERX-Tunnel-Password', - 'ascend_assign_ip_client' => 'Ascend-Assign-IP-Client', + 'ascend_inter_arrival_jit' => 'Ascend-Inter-Arrival-Jitter', + 'ascend_call_block_durati' => 'Ascend-Call-Block-Duration', + 'itk_channel_binding' => 'ITK-Channel-Binding', 'usr_server_time' => 'USR-Server-Time', + 'ascend_assign_ip_client' => 'Ascend-Assign-IP-Client', + 'erx_pppoe_max_sessions' => 'ERX-Pppoe-Max-Sessions', + 'cvx_multilink_group_numb' => 'CVX-Multilink-Group-Number', + 'x_ascend_client_assign_d' => 'X-Ascend-Client-Assign-DNS', + 'erx_pppoe_url' => 'ERX-Pppoe-Url', + 'police_ratf' => 'Police_Rate', 'ascend_data_svc' => 'Ascend-Data-Svc', 'annex_authen_servers' => 'Annex-Authen-Servers', 'nomadix_bw_up' => 'Nomadix-Bw-Up', + 'cvx_modem_data_compressi' => 'CVX-Modem-Data-Compression', 'shiva_link_speed' => 'Shiva-Link-Speed', 'usr_reply_script6' => 'USR-Reply-Script6', 'usr_expansion_algorithm' => 'USR-Expansion-Algorithm', - 'x_ascend_mpp_idle_percen' => 'X-Ascend-MPP-Idle-Percent', + 'cabletron_protocol_calla' => 'Cabletron-Protocol-Callable', 'cisco_data_rate' => 'Cisco-Data-Rate', 'usr_primary_dns_server' => 'USR-Primary_DNS_Server', - 'erx_local_loopback_inter' => 'ERX-Local-Loopback-Interface', + 'juniper_deny_configurati' => 'Juniper-Deny-Configuration', 'ascend_target_util' => 'Ascend-Target-Util', - 'usr_default_dte_data_rat' => 'USR-Default-DTE-Data-Rate', + 'digest_method' => 'Digest-Method', + 'altiga_ipsec_split_tunne' => 'Altiga-IPSec-Split-Tunnel-List-G', + 'erx_alternate_cli_access' => 'ERX-Alternate-Cli-Access-Level', 'x_ascend_event_type' => 'X-Ascend-Event-Type', + 'usr_q931_call_reference_' => 'USR-Q931-Call-Reference-Value', 'usr_mp_mrru' => 'USR-MP-MRRU', - 'bind_bypass_context' => 'Bind_Bypass_Context', + 'cvx_ipsvc_mask' => 'CVX-IPSVC-Mask', + 'bind_bypass_context' => 'Bind-Bypass-Context', + 'usr_rmmie_last_update_ev' => 'USR-RMMIE-Last-Update-Event', 'no_such_attribute' => 'No-Such-Attribute', - 'acct_mcast_out_packets' => 'Acct_Mcast_Out_Packets', + 'acct_mcast_out_packets' => 'Acct-Mcast-Out-Packets', 'tunnel_medium_type' => 'Tunnel-Medium-Type', + 'quintum_h323_remote_addr' => 'Quintum-h323-remote-address', 'acc_callback_delay' => 'Acc-Callback-Delay', - 'x_ascend_home_agent_udp_' => 'X-Ascend-Home-Agent-UDP-Port', - 'acct_input_octets_64' => 'Acct_Input_Octets_64', + 'acct_input_octets_64' => 'Acct-Input-Octets-64', + 'ascend_base_channel_coun' => 'Ascend-Base-Channel-Count', 'ascend_atm_connect_vci' => 'Ascend-ATM-Connect-Vci', 'erx_primary_dns' => 'ERX-Primary-Dns', + 'altiga_ipsec_over_nat_g' => 'Altiga-IPSec-Over-NAT-G', + 'cvx_multicast_rate_limit' => 'CVX-Multicast-Rate-Limit', 'ascend_xmit_rate' => 'Ascend-Xmit-Rate', 'ms_new_arap_password' => 'MS-New-ARAP-Password', 'usr_call_error_code' => 'USR-Call-Error-Code', 'acct_output_octets' => 'Acct-Output-Octets', - 'usr_failure_to_connect_r' => 'USR-Failure-to-Connect-Reason', + 'ascend_client_primary_wi' => 'Ascend-Client-Primary-WINS', + 'cvpn3000_primary_wins' => 'CVPN3000-Primary-WINS', + 'bintec_ipextrttable' => 'BinTec-ipExtRtTable', + 'cisco_fax_mdn_flag' => 'Cisco-Fax-Mdn-Flag', + 'ascend_destination_nas_p' => 'Ascend-Destination-Nas-Port', 'ascend_num_in_multilink' => 'Ascend-Num-In-Multilink', + 'digest_attributes' => 'Digest-Attributes', + 'cvpn3000_ipsec_tunnel_ty' => 'CVPN3000-IPSec-Tunnel-Type', 'x_ascend_number_sessions' => 'X-Ascend-Number-Sessions', 'usr_ip_rip_output_filter' => 'USR-IP-RIP-Output-Filter', - 'usr_chassis_temp_thresho' => 'USR-Chassis-Temp-Threshold', + 'tunnel_police_bursu' => 'Tunnel_Police_Burst', + 'redcreek_tunneled_wins_s' => 'RedCreek-Tunneled-WINS-Server1', 'usr_blocks_sent' => 'USR-Blocks-Sent', + 'erx_cli_allow_all_vr_acc' => 'ERX-Cli-Allow-All-VR-Access', + 'tunnel_police_ratf' => 'Tunnel_Police_Rate', 'usr_ids0_call_type' => 'USR-IDS0-Call-Type', 'acc_ccp_option' => 'Acc-Ccp-Option', 'ascend_client_gateway' => 'Ascend-Client-Gateway', - 'x_ascend_multicast_rate_' => 'X-Ascend-Multicast-Rate-Limit', + 'cvx_maximum_channels' => 'CVX-Maximum-Channels', + 'bg_aging_timf' => 'BG_Aging_Time', + 'annex_secondary_dns_serv' => 'Annex-Secondary-DNS-Server', 'le_ipsec_passive_profile' => 'LE-IPSec-Passive-Profile', 'usr_chassis_call_span' => 'USR-Chassis-Call-Span', - 'usr_mobileip_home_agent_' => 'USR-MobileIP-Home-Agent-Address', + 'aat_client_primary_wins_' => 'AAT-Client-Primary-WINS-NBNS', + 'h323_currency' => 'h323-currency', 'password' => 'Password', 'le_nat_log_options' => 'LE-NAT-Log-Options', - 'x_ascend_ppp_address' => 'X-Ascend-PPP-Address', 'usr_fallback_limit' => 'USR-Fallback-Limit', + 'x_ascend_ppp_address' => 'X-Ascend-PPP-Address', 'suffix' => 'Suffix', 'usr_multicast_receive' => 'USR-Multicast-Receive', - 'client_dns_sec' => 'Client_DNS_Sec', + 'client_dns_sec' => 'Client-DNS-Sec', 'annex_product_name' => 'Annex-Product-Name', 'cisco_pw_lifetime' => 'Cisco-PW-Lifetime', 'x_ascend_fr_dce_n393' => 'X-Ascend-FR-DCE-N393', 'x_ascend_ts_idle_limit' => 'X-Ascend-TS-Idle-Limit', - 'usr_last_number_dialed_o' => 'USR-Last-Number-Dialed-Out', - 'mcast_send' => 'Mcast_Send', - 'pppoe_motm' => 'PPPOE_MOTM', + 'mcast_send' => 'Mcast-Send', + 'x_ascend_primary_home_ag' => 'X-Ascend-Primary-Home-Agent', + 'tunnel_max_sessiont' => 'Tunnel_Max_Sessions', + 'pppoe_motm' => 'PPPOE-MOTM', 'usr_pw_usr_ifilter_ipx' => 'USR-PW_USR_IFilter_IPX', - 'usr_pw_tunnel_authentica' => 'USR-PW_Tunnel_Authentication', - 'ascend_source_ip_check' => 'Ascend-Source-IP-Check', - 'ascend_assign_ip_global_' => 'Ascend-Assign-IP-Global-Pool', 'ms_ras_version' => 'MS-RAS-Version', - 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-Ttl', - 'x_ascend_modem_slotno' => 'X-Ascend-Modem-SlotNo', + 'ascend_source_ip_check' => 'Ascend-Source-IP-Check', + 'bintec_ospfiftable' => 'BinTec-ospfIfTable', 'acc_ml_call_threshold' => 'Acc-ML-Call-Threshold', + 'x_ascend_modem_slotno' => 'X-Ascend-Modem-SlotNo', 'ascend_menu_item' => 'Ascend-Menu-Item', - 'usr_cdma_call_reference_' => 'USR-CDMA-Call-Reference-Number', 'callback_id' => 'Callback-Id', 'framed_ipx_network' => 'Framed-IPX-Network', - 'x_ascend_disconnect_caus' => 'X-Ascend-Disconnect-Cause', + 'altiga_pptp_encryption_g' => 'Altiga-PPTP-Encryption-G', + 'ascend_x25_reverse_charg' => 'Ascend-X25-Reverse-Charging', 'ascend_user_acct_key' => 'Ascend-User-Acct-Key', 'x_ascend_pw_lifetime' => 'X-Ascend-PW-Lifetime', 'user_name_is_star' => 'User-Name-Is-Star', - 'x_ascend_authen_alias' => 'X-Ascend-Authen-Alias', + 'nomadix_url_redirection' => 'Nomadix-URL-Redirection', 'framed_pool' => 'Framed-Pool', + 'x_ascend_authen_alias' => 'X-Ascend-Authen-Alias', + 'cisco_fax_dsn_address' => 'Cisco-Fax-Dsn-Address', 'ms_primary_dns_server' => 'MS-Primary-DNS-Server', + 'acc_dialout_auth_usernam' => 'Acc-Dialout-Auth-Username', 'realm' => 'Realm', 'arap_features' => 'ARAP-Features', + 'bind_auth_protocom' => 'Bind_Auth_Protocol', 'acc_connect_tx_speed' => 'Acc-Connect-Tx-Speed', - 'usr_last_number_dialed_i' => 'USR-Last-Number-Dialed-In-DNIS', 'usr_chassis_temperature' => 'USR-Chassis-Temperature', + 'altiga_ipsec_mode_config' => 'Altiga-IPSec-Mode-Config-G', + 'ascend_home_agent_ip_add' => 'Ascend-Home-Agent-IP-Addr', 'x_ascend_xmit_rate' => 'X-Ascend-Xmit-Rate', + 'cvpn3000_secondary_dns' => 'CVPN3000-Secondary-DNS', 'x_ascend_send_passwd' => 'X-Ascend-Send-Passwd', + 'bind_int_contexu' => 'Bind_Int_Context', + 'cisco_fax_account_id_ori' => 'Cisco-Fax-Account-Id-Origin', 'le_modem_info' => 'LE-Modem-Info', 'ascend_ipx_peer_mode' => 'Ascend-IPX-Peer-Mode', - 'le_nat_other_session_tim' => 'LE-NAT-Other-Session-Timeout', - 'tunnel_rate_limit_rate' => 'Tunnel_Rate_Limit_Rate', - 'ascend_maximum_call_dura' => 'Ascend-Maximum-Call-Duration', + 'juniper_local_user_name' => 'Juniper-Local-User-Name', + 'tunnel_rate_limit_rate' => 'Tunnel-Rate-Limit-Rate', + 'quintum_h323_credit_time' => 'Quintum-h323-credit-time', + 'acc_modem_modulation_typ' => 'Acc-Modem-Modulation-Type', + 'x_ascend_seconds_of_hist' => 'X-Ascend-Seconds-Of-History', 'ascend_dhcp_pool_number' => 'Ascend-DHCP-Pool-Number', + 'redcreek_tunneled_ip_net' => 'RedCreek-Tunneled-IP-Netmask', 'x_ascend_callback' => 'X-Ascend-Callback', - 'ascend_access_intercept_' => 'Ascend-Access-Intercept-Log', 'usr_iwf_ip_address' => 'USR-IWF-IP-Address', + 'aat_input_octets_diff' => 'AAT-Input-Octets-Diff', 'nas_port_id' => 'NAS-Port-Id', 'le_advice_of_charge' => 'LE-Advice-of-Charge', + 'x_ascend_dhcp_pool_numbe' => 'X-Ascend-DHCP-Pool-Number', 'ascend_add_seconds' => 'Ascend-Add-Seconds', 'annex_transmit_speed' => 'Annex-Transmit-Speed', 'usr_port_tap' => 'USR-Port-Tap', 'usr_at_call_input_filter' => 'USR-AT-Call-Input-Filter', + 'framed_ipv6_pool' => 'Framed-IPv6-Pool', 'ascend_qos_downstream' => 'Ascend-QOS-Downstream', - 'ascend_x25_reverse_charg' => 'Ascend-X25-Reverse-Charging', - 'lac_port' => 'LAC_Port', + 'lac_port' => 'LAC-Port', 'tunnel_assignment_id' => 'Tunnel-Assignment-Id', + 'acct_mcast_out_octett' => 'Acct_Mcast_Out_Octets', + 'ascend_bi_directional_au' => 'Ascend-Bi-Directional-Auth', 'fall_through' => 'Fall-Through', + 'cvpn3000_ipsec_ip_compre' => 'CVPN3000-IPSec-IP-Compression', 'cisco_disconnect_cause' => 'Cisco-Disconnect-Cause', - 'module_message' => 'Module-Message', + 'usr_rad_multicast_routiq' => 'USR-Rad-Multicast-Routing-Bound', + 'altiga_tunneling_protoco' => 'Altiga-Tunneling-Protocols-G/U', + 'itk_tunnel_prot' => 'ITK-Tunnel-Prot', + 'client_dns_sed' => 'Client_DNS_Sec', 'framed_ip_netmask' => 'Framed-IP-Netmask', + 'usr_call_reference_numbe' => 'USR-Call-Reference-Number', 'ascend_egress_enabled' => 'Ascend-Egress-Enabled', 'ascend_dsl_rate_mode' => 'Ascend-Dsl-Rate-Mode', - 'x_ascend_client_primary_' => 'X-Ascend-Client-Primary-DNS', 'usr_pw_usr_ofilter_sap' => 'USR-PW_USR_OFilter_SAP', + 'bintec_iproutetable' => 'BinTec-ipRouteTable', 'acct_terminate_cause' => 'Acct-Terminate-Cause', 'x_ascend_fr_dte_n393' => 'X-Ascend-FR-DTE-N393', - 'x_ascend_call_block_dura' => 'X-Ascend-Call-Block-Duration', 'ascend_ppp_address' => 'Ascend-PPP-Address', + 'erx_maximum_bps' => 'ERX-Maximum-BPS', 'caller_id' => 'Caller-ID', - 'bind_int_interface_name' => 'Bind_Int_Interface_Name', - 'x_ascend_ppp_vj_slot_com' => 'X-Ascend-PPP-VJ-Slot-Comp', + 'bintec_ipfiltertable' => 'BinTec-ipFilterTable', + 'x_ascend_base_channel_co' => 'X-Ascend-Base-Channel-Count', + 'bind_int_interface_name' => 'Bind-Int-Interface-Name', 'usr_modem_group' => 'USR-Modem-Group', 'cisco_maximum_channels' => 'Cisco-Maximum-Channels', + 'erx_ppp_username' => 'ERX-PPP-Username', 'ascend_link_compression' => 'Ascend-Link-Compression', + 'annex_retransmitted_pack' => 'Annex-Retransmitted-Packets', 'usr_retrains_granted' => 'USR-Retrains-Granted', 'ascend_dropped_packets' => 'Ascend-Dropped-Packets', + 'erx_bearer_type' => 'ERX-Bearer-Type', 'usr_pw_usr_ofilter_ip' => 'USR-PW_USR_OFilter_IP', 'quintum_nas_port' => 'Quintum-NAS-Port', + 'x_ascend_pre_output_pack' => 'X-Ascend-Pre-Output-Packets', + 'usr_cdma_call_reference_' => 'USR-CDMA-Call-Reference-Number', + 'tunnel_function' => 'Tunnel-Function', 'annex_tunnel_authen_mode' => 'Annex-Tunnel-Authen-Mode', - 'tunnel_function' => 'Tunnel_Function', 'usr_mp_edo' => 'USR-MP-EDO', 'le_nat_outmap' => 'LE-NAT-Outmap', + 'cvpn3000_primary_dns' => 'CVPN3000-Primary-DNS', 'usr_modulation_type' => 'USR-Modulation-Type', + 'ascend_calling_id_screen' => 'Ascend-Calling-Id-Screening', 'ascend_maximum_time' => 'Ascend-Maximum-Time', + 'user_password' => 'User-Password', 'annex_callback_portlist' => 'Annex-Callback-Portlist', - 'x_ascend_remove_seconds' => 'X-Ascend-Remove-Seconds', + 'cvpn3000_ipsec_split_tun' => 'CVPN3000-IPSec-Split-Tunnel-List', + 'annex_pre_output_packets' => 'Annex-Pre-Output-Packets', + 'usr_at_call_output_filte' => 'USR-AT-Call-Output-Filter', + 'x_ascend_client_primary_' => 'X-Ascend-Client-Primary-DNS', 'tunnel_server_endpoint' => 'Tunnel-Server-Endpoint', + 'x_ascend_remove_seconds' => 'X-Ascend-Remove-Seconds', + 'cvpn3000_user_auth_serve' => 'CVPN3000-User-Auth-Server-Name', 'arap_password' => 'ARAP-Password', + 'x_ascend_assign_ip_serve' => 'X-Ascend-Assign-IP-Server', + 'cisco_fax_pages' => 'Cisco-Fax-Pages', 'ms_chap_mppe_keys' => 'MS-CHAP-MPPE-Keys', 'ascend_source_auth' => 'Ascend-Source-Auth', 'group' => 'Group', 'usr_send_script6' => 'USR-Send-Script6', 'le_nat_inmap' => 'LE-NAT-Inmap', 'chap_password' => 'CHAP-Password', - 'annex_primary_nbns_serve' => 'Annex-Primary-NBNS-Server', 'annex_receive_speed' => 'Annex-Receive-Speed', - 'usr_rmmie_manufacturer_i' => 'USR-RMMIE-Manufacturer-ID', - 'bind_l2tp_flow_control' => 'Bind_L2TP_Flow_Control', + 'usr_mobileip_home_agent_' => 'USR-MobileIP-Home-Agent-Address', + 'bind_l2tp_flow_control' => 'Bind-L2TP-Flow-Control', 'smb_account_ctrl' => 'SMB-Account-CTRL', - 'ascend_calling_id_presen' => 'Ascend-Calling-Id-Presentatn', 'ascend_ip_pool_chaining' => 'Ascend-IP-Pool-Chaining', 'le_admin_group' => 'LE-Admin-Group', - 'nas_identifier' => 'NAS-Identifier', - 'x_ascend_history_weigh_t' => 'X-Ascend-History-Weigh-Type', 'tunnel_connection_id' => 'Tunnel-Connection-Id', - 'nas_real_port' => 'NAS_Real_Port', + 'tunnel_windox' => 'Tunnel_Window', + 'nas_identifier' => 'NAS-Identifier', + 'dhcp_max_leaset' => 'DHCP_Max_Leases', + 'digest_nonce_count' => 'Digest-Nonce-Count', + 'nas_real_port' => 'NAS-Real-Port', 'ms_old_arap_password' => 'MS-Old-ARAP-Password', - 'usr_ip_rip_simple_auth_p' => 'USR-IP-RIP-Simple-Auth-Password', - 'erx_primary_wins' => 'ERX-Primary-Wins', 'usr_pw_index' => 'USR-PW_Index', - 'erx_cli_allow_all_vr_acc' => 'ERX-Cli-Allow-All-VR-Access', + 'erx_primary_wins' => 'ERX-Primary-Wins', + 'ascend_appletalk_peer_mo' => 'Ascend-Appletalk-Peer-Mode', 'le_ipsec_log_options' => 'LE-IPSec-Log-Options', - 'ascend_home_agent_ip_add' => 'Ascend-Home-Agent-IP-Addr', + 'x_ascend_maximum_channel' => 'X-Ascend-Maximum-Channels', + 'cvx_ipsvc_aznlvl' => 'CVX-IPSVC-AZNLVL', + 'x_ascend_client_secondar' => 'X-Ascend-Client-Secondary-DNS', 'annex_re_chap_timeout' => 'Annex-Re-CHAP-Timeout', - 'usr_final_tx_link_data_r' => 'USR-Final-Tx-Link-Data-Rate', - 'client_dns_pri' => 'Client_DNS_Pri', + 'aat_ip_pool_definition' => 'AAT-IP-Pool-Definition', + 'client_dns_pri' => 'Client-DNS-Pri', + 'cisco_service_info' => 'Cisco-Service-Info', 'usr_primary_nbns_server' => 'USR-Primary_NBNS_Server', - 'usr_cusr_hat_script_rule' => 'USR-CUSR-hat-Script-Rules', - 'ascend_multicast_rate_li' => 'Ascend-Multicast-Rate-Limit', - 'usr_rmmie_pwrlvl_farecho' => 'USR-RMMIE-PwrLvl-FarEcho-Canc', + 'aat_atm_direct' => 'AAT-ATM-Direct', + 'bind_ses_contexu' => 'Bind_Ses_Context', + 'sip_translated_request_u' => 'Sip-Translated-Request-URI', 'acc_acct_on_off_reason' => 'Acc-Acct-On-Off-Reason', 'le_multicast_client' => 'LE-Multicast-Client', + 'bind_sub_passwore' => 'Bind_Sub_Password', + 'cvpn3000_cisco_ip_phone_' => 'CVPN3000-Cisco-IP-Phone-Bypass', 'ascend_send_passwd' => 'Ascend-Send-Passwd', - 'annex_unauthenticated_ti' => 'Annex-Unauthenticated-Time', - 'tunnel_context' => 'Tunnel_Context', - 'acc_nbns_server_sec' => 'Acc-Nbns-Server-Sec', + 'tunnel_remote_namf' => 'Tunnel_Remote_Name', + 'cvx_disconnect_cause' => 'CVX-Disconnect-Cause', + 'itk_auth_serv_prot' => 'ITK-Auth-Serv-Prot', + 'tunnel_context' => 'Tunnel-Context', + 'digest_uri' => 'Digest-URI', 'usr_channel_decrement' => 'USR-Channel-Decrement', - 'usr_rmmie_firmware_versi' => 'USR-RMMIE-Firmware-Version', + 'acc_nbns_server_sec' => 'Acc-Nbns-Server-Sec', 'ms_chap_challenge' => 'MS-CHAP-Challenge', - 'x_ascend_client_secondar' => 'X-Ascend-Client-Secondary-DNS', + 'cisco_assign_ip_pool' => 'Cisco-Assign-IP-Pool', 'ascend_cbcp_mode' => 'Ascend-CBCP-Mode', 'ascend_x25_rpoa' => 'Ascend-X25-Rpoa', 'usr_dtr_false_timeout' => 'USR-DTR-False-Timeout', - 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-Proto', - 'ascend_x25_pad_x3_parame' => 'Ascend-X25-Pad-X3-Parameters', + 'acct_dyn_ac_enu' => 'Acct_Dyn_Ac_Ent', 'usr_physical_state' => 'USR-Physical-State', + 'x_ascend_ppp_vj_slot_com' => 'X-Ascend-PPP-VJ-Slot-Comp', + 'x_ascend_link_compressio' => 'X-Ascend-Link-Compression', 'ascend_fr_t391' => 'Ascend-FR-T391', - 'bind_dot1q_port' => 'Bind_Dot1q_Port', - 'lac_port_type' => 'LAC_Port_Type', - 'bg_aging_time' => 'BG_Aging_Time', + 'bind_dot1q_port' => 'Bind-Dot1q-Port', + 'ns_secondary_dns' => 'NS-Secondary-DNS', + 'altiga_ipsec_tunnel_type' => 'Altiga-IPSec-Tunnel-Type-G', + 'lac_port_type' => 'LAC-Port-Type', + 'bg_aging_time' => 'BG-Aging-Time', 'erx_atm_scr' => 'ERX-Atm-SCR', + 'x_ascend_pre_input_octet' => 'X-Ascend-Pre-Input-Octets', + 'cisco_fax_connect_speed' => 'Cisco-Fax-Connect-Speed', 'x_ascend_menu_item' => 'X-Ascend-Menu-Item', + 'quintum_h323_voice_quali' => 'Quintum-h323-voice-quality', 'ascend_x25_pad_banner' => 'Ascend-X25-Pad-Banner', + 'module_failure_message' => 'Module-Failure-Message', 'h323_gw_id' => 'h323-gw-id', 'h323_preferred_lang' => 'h323-preferred-lang', 'usr_min_compression_size' => 'USR-Min-Compression-Size', 'usr_compression_type' => 'USR-Compression-Type', - 'x_ascend_call_attempt_li' => 'X-Ascend-Call-Attempt-Limit', + 'bintec_ipxstaticroutetab' => 'BinTec-ipxStaticRouteTable', 'ascend_dialout_allowed' => 'Ascend-Dialout-Allowed', 'annex_local_username' => 'Annex-Local-Username', 'cisco_pre_input_packets' => 'Cisco-Pre-Input-Packets', - 'ascend_send_secret' => 'Ascend-Send-Secret', 'shiva_function' => 'Shiva-Function', - 'usr_dte_data_idle_timout' => 'USR-DTE-Data-Idle-Timout', + 'ascend_send_secret' => 'Ascend-Send-Secret', 'usr_number_of_blers' => 'USR-Number-of-Blers', + 'usr_dte_data_idle_timout' => 'USR-DTE-Data-Idle-Timout', 'usr_card_type' => 'USR-Card-Type', - 'ascend_token_idle' => 'Ascend-Token-Idle', + 'x_ascend_connect_progres' => 'X-Ascend-Connect-Progress', 'x_ascend_group' => 'X-Ascend-Group', + 'ascend_token_idle' => 'Ascend-Token-Idle', + 'erx_qos_profile_interfac' => 'ERX-Qos-Profile-Interface-Type', + 'ascend_private_route_tab' => 'Ascend-Private-Route-Table-ID', 'nt_password' => 'NT-Password', - 'acct_mcast_in_packets' => 'Acct_Mcast_In_Packets', + 'acct_mcast_in_packets' => 'Acct-Mcast-In-Packets', + 'x_ascend_multicast_clien' => 'X-Ascend-Multicast-Client', 'usr_supports_tags' => 'USR-Supports-Tags', + 'cvpn3000_authd_user_idle' => 'CVPN3000-Authd-User-Idle-Timeout', 'ascend_number_sessions' => 'Ascend-Number-Sessions', 'x_ascend_add_seconds' => 'X-Ascend-Add-Seconds', 'usr_number_of_upshifts' => 'USR-Number-of-Upshifts', 'proxy_to_realm' => 'Proxy-To-Realm', + 'aat_client_secondary_win' => 'AAT-Client-Secondary-WINS-NBNS', + 'aat_ip_tos_precedence' => 'AAT-IP-TOS-Precedence', 'acc_callback_num_valid' => 'Acc-Callback-Num-Valid', - 'x_ascend_maximum_channel' => 'X-Ascend-Maximum-Channels', + 'nokia_ggsn_ip_address' => 'Nokia-GGSN-IP-Address', 'acc_access_community' => 'Acc-Access-Community', - 'x_ascend_fr_direct_profi' => 'X-Ascend-FR-Direct-Profile', + 'ascend_multicast_rate_li' => 'Ascend-Multicast-Rate-Limit', + 'usr_default_dte_data_rat' => 'USR-Default-DTE-Data-Rate', + 'usr_rmmie_pwrlvl_nearech' => 'USR-RMMIE-PwrLvl-NearEcho-Canc', 'usr_send_name' => 'USR-Send-Name', 'usr_chassis_slot' => 'USR-Chassis-Slot', 'login_ip_host' => 'Login-IP-Host', 'ascend_netware_timeout' => 'Ascend-Netware-timeout', + 'bind_sub_user_at_context' => 'Bind-Sub-User-At-Context', 'vendor_specific' => 'Vendor-Specific', - 'bind_sub_user_at_context' => 'Bind_Sub_User_At_Context', 'ascend_fr_direct_dlci' => 'Ascend-FR-Direct-DLCI', - 'ascend_atm_fault_managem' => 'Ascend-ATM-Fault-Management', 'ascend_qos_upstream' => 'Ascend-QOS-Upstream', - 'source_validation' => 'Source_Validation', + 'aat_user_mac_address' => 'AAT-User-MAC-Address', + 'source_validation' => 'Source-Validation', 'x_ascend_token_expiry' => 'X-Ascend-Token-Expiry', + 'altiga_ipsec_user_group_' => 'Altiga-IPSec-User-Group-Lock-G', 'ascend_dec_channel_count' => 'Ascend-Dec-Channel-Count', + 'assigned_ip_addrest' => 'Assigned_IP_Address', 'usr_local_framed_ip_addr' => 'USR-Local-Framed-IP-Addr', 'usr_service_option' => 'USR-Service-Option', 'usr_transmit_acc_map' => 'USR-Transmit-Acc-Map', 'ascend_fr_direct' => 'Ascend-FR-Direct', + 'usr_final_rx_link_data_r' => 'USR-Final-Rx-Link-Data-Rate', 'x_ascend_expect_callback' => 'X-Ascend-Expect-Callback', + 'x_ascend_disconnect_caus' => 'X-Ascend-Disconnect-Cause', 'acc_ml_damping_factor' => 'Acc-ML-Damping-Factor', 'framed_netmask' => 'Framed-Netmask', 'usr_connect_speed' => 'USR-Connect-Speed', - 'ascend_client_primary_wi' => 'Ascend-Client-Primary-WINS', + 'x_ascend_home_agent_ip_a' => 'X-Ascend-Home-Agent-IP-Addr', + 'usr_disconnect_cause_ind' => 'USR-Disconnect-Cause-Indicator', + 'bg_span_dis' => 'BG-Span-Dis', 'cisco_multilink_id' => 'Cisco-Multilink-ID', - 'bg_span_dis' => 'BG_Span_Dis', + 'tunnel_max_tunnels' => 'Tunnel-Max-Tunnels', + 'ascend_dsl_downstream_li' => 'Ascend-Dsl-Downstream-Limit', 'ascend_multilink_id' => 'Ascend-Multilink-ID', - 'tunnel_max_tunnels' => 'Tunnel_Max_Tunnels', + 'altiga_ipsec_default_dom' => 'Altiga-IPSec-Default-Domain-G', 'ascend_dhcp_reply' => 'Ascend-DHCP-Reply', + 'login_ipv6_host' => 'Login-IPv6-Host', 'ascend_x25_cug' => 'Ascend-X25-Cug', 'shiva_network_protocols' => 'Shiva-Network-Protocols', + 'cvpn3000_ipsec_mode_conf' => 'CVPN3000-IPSec-Mode-Config', + 'extreme_netlogin_vlan' => 'Extreme-Netlogin-Vlan', 'ascend_ara_pw' => 'Ascend-Ara-PW', - 'ip_host_addr' => 'Ip_Host_Addr', + 'tunnel_l2f_second_passwo' => 'Tunnel-L2F-Second-Password', + 'altiga_sep_card_assignme' => 'Altiga-SEP-Card-Assignment-G/U', + 'ip_host_addr' => 'Ip-Host-Addr', 'le_ip_gateway' => 'LE-IP-Gateway', 'usr_mobile_numbytes_txed' => 'USR-Mobile-NumBytes-Txed', + 'altiga_ipsec_allow_passw' => 'Altiga-IPSec-Allow-Passwd-Store-G/U', + 'itk_users_default_entry' => 'ITK-Users-Default-Entry', + 'quintum_h323_redirect_nu' => 'Quintum-h323-redirect-number', 'x_ascend_fr_t392' => 'X-Ascend-FR-T392', + 'acc_igmp_version' => 'Acc-Igmp-Version', 'cisco_pre_output_packets' => 'Cisco-Pre-Output-Packets', - 'tunnel_group' => 'Tunnel_Group', - 'bind_sub_password' => 'Bind_Sub_Password', + 'tunnel_group' => 'Tunnel-Group', + 'x_ascend_home_agent_udp_' => 'X-Ascend-Home-Agent-UDP-Port', + 'cvpn3000_tunneling_proto' => 'CVPN3000-Tunneling-Protocols', + 'usr_igmp_maximum_respons' => 'USR-IGMP-Maximum-Response-Time', + 'bind_sub_password' => 'Bind-Sub-Password', 'eap_message' => 'EAP-Message', 'exec_program' => 'Exec-Program', - 'bg_path_cost' => 'BG_Path_Cost', - 'auth_type' => 'Auth-Type', + 'cvpn3000_reqrd_client_fx' => 'CVPN3000-Reqrd-Client-Fw-Product-Code', + 'bg_path_cost' => 'BG-Path-Cost', 'usr_modem_training_time' => 'USR-Modem-Training-Time', - 'ascend_cbcp_enable' => 'Ascend-CBCP-Enable', + 'auth_type' => 'Auth-Type', + 'itk_acct_serv_prot' => 'ITK-Acct-Serv-Prot', 'x_ascend_ipx_route' => 'X-Ascend-IPX-Route', + 'altiga_primary_dns_g' => 'Altiga-Primary-DNS-G', + 'ascend_cbcp_enable' => 'Ascend-CBCP-Enable', + 'ms_mppe_encryption_polic' => 'MS-MPPE-Encryption-Policy', + 'annex_unauthenticated_ti' => 'Annex-Unauthenticated-Time', + 'annex_begin_receive_line' => 'Annex-Begin-Receive-Line-Level', + 'ascend_atm_direct_profil' => 'Ascend-ATM-Direct-Profile', + 'redcreek_tunneled_dns_se' => 'RedCreek-Tunneled-DNS-Server', 'ascend_redirect_number' => 'Ascend-Redirect-Number', 'h323_credit_time' => 'h323-credit-time', + 'cvx_idle_limit' => 'CVX-Idle-Limit', 'ascend_appletalk_route' => 'Ascend-Appletalk-Route', + 'aat_ip_tos' => 'AAT-IP-TOS', + 'cvx_ppp_address' => 'CVX-PPP-Address', + 'aat_data_filter' => 'AAT-Data-Filter', + 'cvx_primary_dns' => 'CVX-Primary-DNS', 'shiva_link_protocol' => 'Shiva-Link-Protocol', 'x_ascend_fr_circuit_name' => 'X-Ascend-FR-Circuit-Name', - 'client_id' => 'Client-Id', 'usr_appletalk' => 'USR-Appletalk', - 'usr_mpip_tunnel_originat' => 'USR-MPIP-Tunnel-Originator', + 'client_id' => 'Client-Id', + 'tunnel_algorithn' => 'Tunnel_Algorithm', + 'aat_assign_ip_pool' => 'AAT-Assign-IP-Pool', + 'quintum_h323_incoming_co' => 'Quintum-h323-incoming-conf-id', + 'aat_atm_vpi' => 'AAT-ATM-VPI', 'annex_output_filter' => 'Annex-Output-Filter', - 'pvc_circuit_padding' => 'PVC_Circuit_Padding', - 'x_ascend_minimum_channel' => 'X-Ascend-Minimum-Channels', + 'pvc_circuit_padding' => 'PVC-Circuit-Padding', + 'usr_ipx_call_output_filt' => 'USR-IPX-Call-Output-Filter', + 'usr_rmmie_planned_discon' => 'USR-RMMIE-Planned-Disconnect', + 'session_error_msh' => 'Session_Error_Msg', + 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-Ttl', 'h323_time_and_day' => 'h323-time-and-day', - 'ascend_ipx_header_compre' => 'Ascend-IPX-Header-Compression', + 'cvpn3000_ipsec_backup_se' => 'CVPN3000-IPSec-Backup-Servers', 'termination_action' => 'Termination-Action', - 'x_ascend_modem_portno' => 'X-Ascend-Modem-PortNo', + 'cvpn3000_ipsec_client_fx' => 'CVPN3000-IPSec-Client-Fw-Filter-Opt', + 'aat_client_primary_dnt' => 'AAT-Client-Primary-DNS', 'acct_tunnel_packets_lost' => 'Acct-Tunnel-Packets-Lost', + 'x_ascend_modem_portno' => 'X-Ascend-Modem-PortNo', 'framed_filter_id' => 'Framed-Filter-Id', 'usr_ccp_algorithm' => 'USR-CCP-Algorithm', + 'quintum_h323_preferred_l' => 'Quintum-h323-preferred-lang', + 'ascend_fr_link_status_dl' => 'Ascend-FR-Link-Status-DLCI', 'ascend_token_expiry' => 'Ascend-Token-Expiry', - 'annex_secondary_nbns_ser' => 'Annex-Secondary-NBNS-Server', - 'usr_et_bridge_call_outpu' => 'USR-ET-Bridge-Call-Output-Filte', + 'itk_auth_req_type' => 'ITK-Auth-Req-Type', 'acc_modem_error_protocol' => 'Acc-Modem-Error-Protocol', 'acc_request_type' => 'Acc-Request-Type', + 'usr_last_number_dialed_i' => 'USR-Last-Number-Dialed-In-DNIS', 'x_ascend_ipx_peer_mode' => 'X-Ascend-IPX-Peer-Mode', 'ascend_ppp_vj_slot_comp' => 'Ascend-PPP-VJ-Slot-Comp', 'cisco_presession_time' => 'Cisco-PreSession-Time', 'usr_chat_script_name' => 'USR-Chat-Script-Name', + 'tunnel_session_auti' => 'Tunnel_Session_Auth', 'ascend_fr_circuit_name' => 'Ascend-FR-Circuit-Name', 'ascend_expect_callback' => 'Ascend-Expect-Callback', 'framed_mtu' => 'Framed-MTU', - 'ascend_port_redir_protoc' => 'Ascend-Port-Redir-Protocol', 'usr_pw_vpn_name' => 'USR-PW_VPN_Name', + 'nomadix_ip_upsell' => 'Nomadix-IP-Upsell', 'ascend_nas_port_format' => 'Ascend-NAS-Port-Format', - 'shasta_vpn_name' => 'Shasta-VPN-Name', 'usr_dtr_true_timeout' => 'USR-DTR-True-Timeout', - 'ascend_third_prompt' => 'Ascend-Third-Prompt', + 'shasta_vpn_name' => 'Shasta-VPN-Name', 'connect_rate' => 'Connect-Rate', - 'usr_block_error_count_li' => 'USR-Block-Error-Count-Limit', + 'ascend_third_prompt' => 'Ascend-Third-Prompt', + 'cabletron_protocol_enabl' => 'Cabletron-Protocol-Enable', + 'annex_pre_input_octets' => 'Annex-Pre-Input-Octets', + 'cvx_modem_error_correcti' => 'CVX-Modem-Error-Correction', + 'cvx_ss7_session_id_type' => 'CVX-SS7-Session-ID-Type', 'called_station_id' => 'Called-Station-Id', + 'itk_ddi' => 'ITK-DDI', 'usr_pw_cutoff' => 'USR-PW_Cutoff', 'ascend_data_rate' => 'Ascend-Data-Rate', + 'acct_input_packets_65' => 'Acct_Input_Packets_64', 'x_ascend_ts_idle_mode' => 'X-Ascend-TS-Idle-Mode', 'ascend_x25_pad_prompt' => 'Ascend-X25-Pad-Prompt', 'x_ascend_dhcp_reply' => 'X-Ascend-DHCP-Reply', 'acc_nbns_server_pri' => 'Acc-Nbns-Server-Pri', + 'post_auth_type' => 'Post-Auth-Type', 'ascend_call_filter' => 'Ascend-Call-Filter', 'acc_tunnel_secret' => 'Acc-Tunnel-Secret', - 'usr_simplified_v42bis_us' => 'USR-Simplified-V42bis-Usage', - 'bind_int_context' => 'Bind_Int_Context', + 'colubris_avpair' => 'Colubris-AVPair', + 'bind_int_context' => 'Bind-Int-Context', + 'annex_logical_channel_nu' => 'Annex-Logical-Channel-Number', 'erx_virtual_router_name' => 'ERX-Virtual-Router-Name', + 'wispr_redirection_url' => 'WISPr-Redirection-URL', + 'bintec_ipextiftable' => 'BinTec-ipExtIfTable', 'crypt_password' => 'Crypt-Password', 'challenge_state' => 'Challenge-State', - 'ascend_client_secondary_' => 'Ascend-Client-Secondary-DNS', - 'strip_user_name' => 'Strip-User-Name', + 'x_ascend_pre_input_packe' => 'X-Ascend-Pre-Input-Packets', + 'altiga_ipsec_l2l_keepali' => 'Altiga-IPSec-L2L-Keepalives-G', + 'x_ascend_dhcp_maximum_le' => 'X-Ascend-DHCP-Maximum-Leases', + 'acc_dialout_auth_passwor' => 'Acc-Dialout-Auth-Password', + 'itk_ip_pool' => 'ITK-IP-Pool', + 'pvc_profile_namf' => 'PVC_Profile_Name', 'x_ascend_user_acct_host' => 'X-Ascend-User-Acct-Host', - 'x_ascend_route_ip' => 'X-Ascend-Route-IP', - 'x_ascend_assign_ip_clien' => 'X-Ascend-Assign-IP-Client', + 'strip_user_name' => 'Strip-User-Name', + 'itk_ppp_client_server_mo' => 'ITK-PPP-Client-Server-Mode', 'usr_mbi_ct_bchannel_used' => 'USR-Mbi_Ct_BChannel_Used', + 'x_ascend_route_ip' => 'X-Ascend-Route-IP', + 'ascend_seconds_of_histor' => 'Ascend-Seconds-Of-History', + 'cvx_data_rate' => 'CVX-Data-Rate', 'ascend_x25_profile_name' => 'Ascend-X25-Profile-Name', + 'itk_ftp_auth_ip' => 'ITK-Ftp-Auth-IP', + 'cisco_control_info' => 'Cisco-Control-Info', + 'cvpn3000_secondary_wins' => 'CVPN3000-Secondary-WINS', 'usr_call_type' => 'USR-Call-Type', 'x_ascend_user_acct_base' => 'X-Ascend-User-Acct-Base', + 'acct_mcast_in_packett' => 'Acct_Mcast_In_Packets', + 'ns_vsys_name' => 'NS-VSYS-Name', 'acct_output_gigawords' => 'Acct-Output-Gigawords', - 'usr_rmmie_firmware_build' => 'USR-RMMIE-Firmware-Build-Date', - 'ascend_fr_link_status_dl' => 'Ascend-FR-Link-Status-DLCI', + 'bind_typf' => 'Bind_Type', + 'bintec_ipqostable' => 'BinTec-ipQoSTable', + 'bintec_ipxstaticservtabl' => 'BinTec-ipxStaticServTable', + 'cvpn3000_l2tp_mppc_compr' => 'CVPN3000-L2TP-MPPC-Compression', 'login_lat_port' => 'Login-LAT-Port', 'usr_call_arrival_in_gmt' => 'USR-Call-Arrival-in-GMT', - 'acct_mcast_in_octets' => 'Acct_Mcast_In_Octets', + 'acct_mcast_in_octets' => 'Acct-Mcast-In-Octets', 'erx_sa_validate' => 'ERX-Sa-Validate', 'ascend_service_type' => 'Ascend-Service-Type', - 'ascend_x25_nui_password_' => 'Ascend-X25-Nui-Password-Prompt', 'usr_pw_vpn_gateway' => 'USR-PW_VPN_Gateway', - 'ascend_fr_dce_n392' => 'Ascend-FR-DCE-N392', 'acc_ip_compression' => 'Acc-Ip-Compression', - 'lac_real_port_type' => 'LAC_Real_Port_Type', - 'ascend_if_netmask' => 'Ascend-IF-Netmask', + 'ascend_fr_dce_n392' => 'Ascend-FR-DCE-N392', + 'bintec_ipxcirctable' => 'BinTec-ipxCircTable', + 'lac_real_port_type' => 'LAC-Real-Port-Type', + 'ascend_client_primary_dn' => 'Ascend-Client-Primary-DNS', 'acct_session_start_time' => 'Acct-Session-Start-Time', + 'ascend_if_netmask' => 'Ascend-IF-Netmask', 'ms_chap_nt_enc_pw' => 'MS-CHAP-NT-Enc-PW', - 'ascend_port_redir_portnu' => 'Ascend-Port-Redir-Portnum', - 'mcast_maxgroups' => 'Mcast_MaxGroups', - 'x_ascend_home_agent_ip_a' => 'X-Ascend-Home-Agent-IP-Addr', + 'ms_mppe_encryption_types' => 'MS-MPPE-Encryption-Types', + 'cisco_fax_process_abort_' => 'Cisco-Fax-Process-Abort-Flag', + 'mcast_maxgroups' => 'Mcast-MaxGroups', + 'annex_end_receive_line_l' => 'Annex-End-Receive-Line-Level', + 'usr_ipx_call_input_filte' => 'USR-IPX-Call-Input-Filter', + 'usr_back_channel_data_ra' => 'USR-Back-Channel-Data-Rate', 'ascend_cache_time' => 'Ascend-Cache-Time', 'x_ascend_data_svc' => 'X-Ascend-Data-Svc', - 'erx_tunnel_virtual_route' => 'ERX-Tunnel-Virtual-Router', 'usr_re_chap_timeout' => 'USR-Re-Chap-Timeout', + 'bintec_bibodialtable' => 'BinTec-biboDialTable', + 'annex_connect_progress' => 'Annex-Connect-Progress', 'x_ascend_ppp_vj_1172' => 'X-Ascend-PPP-VJ-1172', 'usr_igmp_routing' => 'USR-IGMP-Routing', + 'x_ascend_ip_pool_definit' => 'X-Ascend-IP-Pool-Definition', 'h323_prompt_id' => 'h323-prompt-id', + 'foundry_command_string' => 'Foundry-Command-String', 'le_terminate_detail' => 'LE-Terminate-Detail', + 'cvpn3000_pptp_encryption' => 'CVPN3000-PPTP-Encryption', + 'quintum_h323_disconnect_' => 'Quintum-h323-disconnect-time', 'acc_ml_clear_threshold' => 'Acc-ML-Clear-Threshold', 'x_ascend_ip_direct' => 'X-Ascend-IP-Direct', - 'nas_port' => 'NAS-Port', - 'x_ascend_data_rate' => 'X-Ascend-Data-Rate', 'usr_ip_call_input_filter' => 'USR-IP-Call-Input-Filter', + 'x_ascend_data_rate' => 'X-Ascend-Data-Rate', + 'nas_port' => 'NAS-Port', + 'ascend_client_secondary_' => 'Ascend-Client-Secondary-WINS', 'ascend_auth_type' => 'Ascend-Auth-Type', 'x_ascend_preempt_limit' => 'X-Ascend-Preempt-Limit', + 'cvx_xmit_rate' => 'CVX-Xmit-Rate', + 'annex_transmitted_packet' => 'Annex-Transmitted-Packets', 'h323_credit_amount' => 'h323-credit-amount', 'usr_reply_script1' => 'USR-Reply-Script1', - 'usr_et_bridge_input_filt' => 'USR-ET-Bridge-Input-Filter', 'current_time' => 'Current-Time', 'cisco_xmit_rate' => 'Cisco-Xmit-Rate', - 'ascend_authen_alias' => 'Ascend-Authen-Alias', 'x_ascend_session_svr_key' => 'X-Ascend-Session-Svr-Key', + 'ascend_authen_alias' => 'Ascend-Authen-Alias', + 'erx_redirect_vr_name' => 'ERX-Redirect-VR-Name', + 'module_success_message' => 'Module-Success-Message', 'acc_dialout_auth_mode' => 'Acc-Dialout-Auth-Mode', + 'bind_auth_contexu' => 'Bind_Auth_Context', + 'x_ascend_minimum_channel' => 'X-Ascend-Minimum-Channels', 'usr_event_date_time' => 'USR-Event-Date-Time', 'x_ascend_ipx_node_addr' => 'X-Ascend-IPX-Node-Addr', - 'ascend_primary_home_agen' => 'Ascend-Primary-Home-Agent', + 'cvpn3000_ipsec_over_udp' => 'CVPN3000-IPSec-Over-UDP', 'x_ascend_user_acct_time' => 'X-Ascend-User-Acct-Time', - 'usr_at_call_output_filte' => 'USR-AT-Call-Output-Filter', + 'cisco_email_server_ack_f' => 'Cisco-Email-Server-Ack-Flag', + 'telebit_activate_command' => 'Telebit-Activate-Command', 'acc_output_errors' => 'Acc-Output-Errors', - 'usr_ipx_rip_output_filte' => 'USR-IPX-RIP-Output-Filter', + 'juniper_allow_configurat' => 'Juniper-Allow-Configuration', + 'bind_l2tp_tunnel_name' => 'Bind-L2TP-Tunnel-Name', 'x_ascend_pri_number_type' => 'X-Ascend-PRI-Number-Type', - 'bind_l2tp_tunnel_name' => 'Bind_L2TP_Tunnel_Name', - 'replicate_to_realm' => 'Replicate-To-Realm', + 'bintec_biboppptable' => 'BinTec-biboPPPTable', + 'le_ipsec_outsource_profi' => 'LE-IPSec-Outsource-Profile', 'usr_at_zip_input_filter' => 'USR-AT-Zip-Input-Filter', + 'replicate_to_realm' => 'Replicate-To-Realm', 'annex_mrru' => 'Annex-MRRU', 'event_timestamp' => 'Event-Timestamp', + 'nokia_sgsn_ip_address' => 'Nokia-SGSN-IP-Address', 'ascend_pre_input_packets' => 'Ascend-Pre-Input-Packets', + 'cvpn5000_client_assigned' => 'CVPN5000-Client-Assigned-IP', + 'tunnel_dnit' => 'Tunnel_DNIS', 'h323_call_origin' => 'h323-call-origin', 'x_ascend_fr_type' => 'X-Ascend-FR-Type', + 'itk_provider_id' => 'ITK-Provider-Id', + 'cvx_ppp_log_mask' => 'CVX-PPP-Log-Mask', 'x_ascend_token_idle' => 'X-Ascend-Token-Idle', + 'usr_rmmie_pwrlvl_xmit_lv' => 'USR-RMMIE-PwrLvl-Xmit-Lvl', 'usr_igmp_query_interval' => 'USR-IGMP-Query-Interval', + 'quintum_h323_billing_mod' => 'Quintum-h323-billing-model', 'ascend_atm_vci' => 'Ascend-ATM-Vci', 'usr_port_tap_output' => 'USR-Port-Tap-Output', 'session' => 'Session', + 'itk_welcome_message' => 'ITK-Welcome-Message', + 'cvpn3000_ike_keep_alives' => 'CVPN3000-IKE-Keep-Alives', 'ascend_uu_info' => 'Ascend-UU-Info', - 'ms_mppe_recv_key' => 'MS-MPPE-Recv-Key', + 'usr_et_bridge_call_outpu' => 'USR-ET-Bridge-Call-Output-Filte', 'usr_secondary_dns_server' => 'USR-Secondary_DNS_Server', - 'x_ascend_tunneling_proto' => 'X-Ascend-Tunneling-Protocol', + 'ms_mppe_recv_key' => 'MS-MPPE-Recv-Key', + 'bintec_ripcirctable' => 'BinTec-ripCircTable', 'acc_dial_port_index' => 'Acc-Dial-Port-Index', 'cisco_nas_port' => 'Cisco-NAS-Port', + 'itk_username' => 'ITK-Username', 'usr_send_script1' => 'USR-Send-Script1', + 'cvpn3000_ipsec_ike_peer_' => 'CVPN3000-IPSec-IKE-Peer-ID-Check', + 'ascend_dsl_upstream_limi' => 'Ascend-Dsl-Upstream-Limit', + 'x_ascend_dec_channel_cou' => 'X-Ascend-Dec-Channel-Count', 'usr_tunnel_security' => 'USR-Tunnel-Security', 'arap_security' => 'ARAP-Security', 'tunnel_preference' => 'Tunnel-Preference', + 'cisco_port_used' => 'Cisco-Port-Used', 'usr_reply_script4' => 'USR-Reply-Script4', - 'h323_currency_type' => 'h323-currency-type', + 'cvpn5000_client_real_ip' => 'CVPN5000-Client-Real-IP', 'usr_rmmie_status' => 'USR-RMMIE-Status', - 'ascend_shared_profile_en' => 'Ascend-Shared-Profile-Enable', - 'annex_syslog_tap' => 'Annex-Syslog-Tap', 'usr_send_script4' => 'USR-Send-Script4', + 'quintum_h323_connect_tim' => 'Quintum-h323-connect-time', + 'annex_syslog_tap' => 'Annex-Syslog-Tap', + 'redcreek_tunneled_hostna' => 'RedCreek-Tunneled-HostName', 'acc_clearing_location' => 'Acc-Clearing-Location', + 'ascend_access_intercept_' => 'Ascend-Access-Intercept-LEA', 'annex_disconnect_reason' => 'Annex-Disconnect-Reason', - 'x_ascend_dhcp_maximum_le' => 'X-Ascend-DHCP-Maximum-Leases', 'usr_at_input_filter' => 'USR-AT-Input-Filter', 'usr_auth_mode' => 'USR-Auth-Mode', - 'shiva_session_id' => 'Shiva-Session-Id', 'usr_expected_voltage' => 'USR-Expected-Voltage', + 'shiva_session_id' => 'Shiva-Session-Id', + 'annex_maximum_call_durat' => 'Annex-Maximum-Call-Duration', + 'usr_block_error_count_li' => 'USR-Block-Error-Count-Limit', 'ascend_owner_ip_addr' => 'Ascend-Owner-IP-Addr', - 'ascend_atm_direct_profil' => 'Ascend-ATM-Direct-Profile', + 'bind_tun_contexu' => 'Bind_Tun_Context', 'usr_pw_usr_ofilter_ipx' => 'USR-PW_USR_OFilter_IPX', 'framed_routing' => 'Framed-Routing', - 'pam_auth' => 'Pam-Auth', + 'annex_primary_nbns_serve' => 'Annex-Primary-NBNS-Server', 'usr_interface_index' => 'USR-Interface-Index', - 'x_ascend_transit_number' => 'X-Ascend-Transit-Number', + 'pam_auth' => 'Pam-Auth', 'usr_end_time' => 'USR-End-Time', + 'rate_limit_bursu' => 'Rate_Limit_Burst', + 'nomadix_expiration' => 'Nomadix-Expiration', + 'x_ascend_transit_number' => 'X-Ascend-Transit-Number', + 'itk_usergroup' => 'ITK-Usergroup', 'x_ascend_assign_ip_pool' => 'X-Ascend-Assign-IP-Pool', + 'annex_secondary_nbns_ser' => 'Annex-Secondary-NBNS-Server', + 'bind_dot1q_vlan_tag_id' => 'Bind-Dot1q-Vlan-Tag-Id', 'ms_secondary_nbns_server' => 'MS-Secondary-NBNS-Server', - 'bind_dot1q_vlan_tag_id' => 'Bind_Dot1q_Vlan_Tag_Id', + 'tunnel_retransmit' => 'Tunnel-Retransmit', 'acct_tunnel_connection' => 'Acct-Tunnel-Connection', - 'tunnel_retransmit' => 'Tunnel_Retransmit', 'x_ascend_backup' => 'X-Ascend-Backup', + 'xedia_ppp_echo_interval' => 'Xedia-PPP-Echo-Interval', 'usr_bearer_capabilities' => 'USR-Bearer-Capabilities', - 'ascend_calling_id_type_o' => 'Ascend-Calling-Id-Type-Of-Num', 'shiva_acct_serv_switch' => 'Shiva-Acct-Serv-Switch', - 'ascend_h323_conference_i' => 'Ascend-H323-Conference-Id', 'acct_authentic' => 'Acct-Authentic', + 'le_nat_other_session_tim' => 'LE-NAT-Other-Session-Timeout', + 'cvpn3000_ipsec_banner2' => 'CVPN3000-IPSec-Banner2', 'x_ascend_force_56' => 'X-Ascend-Force-56', 'framed_appletalk_network' => 'Framed-AppleTalk-Network', 'reply_message' => 'Reply-Message', - 'annex_addr_resolution_pr' => 'Annex-Addr-Resolution-Protocol', 'class' => 'Class', 'h323_conf_id' => 'h323-conf-id', + 'quintum_h323_disconnecta' => 'Quintum-h323-disconnect-cause', + 'itk_filter_rule' => 'ITK-Filter-Rule', + 'wispr_bandwidth_max_up' => 'WISPr-Bandwidth-Max-Up', + 'usr_appletalk_network_ra' => 'USR-Appletalk-Network-Range', 'ascend_cbcp_delay' => 'Ascend-CBCP-Delay', + 'usr_dte_ring_no_answer_l' => 'USR-DTE-Ring-No-Answer-Limit', + 'pre_acct_type' => 'Pre-Acct-Type', + 'usr_local_ip_address' => 'USR-Local-IP-Address', 'ascend_dropped_octets' => 'Ascend-Dropped-Octets', 'ascend_h323_dialed_time' => 'Ascend-H323-Dialed-Time', - 'usr_local_ip_address' => 'USR-Local-IP-Address', + 'cisco_email_server_addre' => 'Cisco-Email-Server-Address', 'ascend_x25_x121_address' => 'Ascend-X25-X121-Address', - 'ascend_destination_nas_p' => 'Ascend-Destination-Nas-Port', - 'annex_local_ip_address' => 'Annex-Local-IP-Address', + 'cvx_multicast_client' => 'CVX-Multicast-Client', + 'wispr_bandwidth_min_up' => 'WISPr-Bandwidth-Min-Up', 'usr_at_output_filter' => 'USR-AT-Output-Filter', + 'annex_local_ip_address' => 'Annex-Local-IP-Address', 'cisco_ip_pool_definition' => 'Cisco-IP-Pool-Definition', + 'cisco_gateway_id' => 'Cisco-Gateway-Id', + 'itk_password_prompt' => 'ITK-Password-Prompt', 'annex_domain_name' => 'Annex-Domain-Name', + 'foundry_command_exceptio' => 'Foundry-Command-Exception-Flag', 'ascend_preempt_limit' => 'Ascend-Preempt-Limit', + 'erx_minimum_bps' => 'ERX-Minimum-BPS', + 'aat_mcast_client' => 'AAT-MCast-Client', + 'ascend_atm_fault_managem' => 'Ascend-ATM-Fault-Management', 'ascend_event_type' => 'Ascend-Event-Type', - 'x_ascend_pre_input_octet' => 'X-Ascend-Pre-Input-Octets', 'exec_program_wait' => 'Exec-Program-Wait', - - #NOMENT - 'nomadix_ip_upsell' => 'Nomadix-IP-Upsell', + 'framed_interface_id' => 'Framed-Interface-Id', #NETC.NET.AU (RADIATOR?) 'authentication_type' => 'Authentication-Type', diff --git a/bin/generate-raddb b/bin/generate-raddb index 1d0053a2b..f946b05b3 100755 --- a/bin/generate-raddb +++ b/bin/generate-raddb @@ -13,10 +13,18 @@ END while (<>) { next if /^(#|\s*$|\$INCLUDE\s+)/; next if /^(VALUE|VENDOR|BEGIN\-VENDOR|END\-VENDOR)\s+/; - /^(ATTRIBUTE|ATTRIB_NMC)\s+([\w\-]+)\s+/ or die $_; + /^(ATTRIBUTE|ATTRIB_NMC)\s+([\w\-\/]+)\s+/ or die $_; $attrib = $2; $dbname = lc($2); - $dbname =~ s/\-/_/g; + $dbname =~ s/[\-\/]/_/g; + $dbname = substr($dbname,0,24); + while ( exists $hash{$dbname} ) { + #warn $dbname; + $dbname =~ s/(.)$//; + my $w = $1; + $w =~ tr/_a-z0-9/a-z0-9_/; + $dbname = "$dbname$w"; + } $hash{$dbname} = $attrib; #print "$2\n"; } @@ -25,8 +33,10 @@ foreach ( keys %hash ) { # print "$_\n" if length($_)>24; # print substr($_,0,24),"\n" if length($_)>24; # $max = length($_) if length($_)>$max; -#everything >24 is still unique, at least with freeradius comprehensive dataset - print " '". substr($_,0,24). "' => '$hash{$_}',\n"; +# have to fudge things since everything >24 is *not* unique + + #print " '". substr($_,0,24). "' => '$hash{$_}',\n"; + print " '$_' => '$hash{$_}',\n"; } print < Date: Thu, 2 Oct 2003 10:18:24 +0000 Subject: added -y switch to freeside-daily to specify an offset in days --- FS/bin/freeside-daily | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily index 80b8edf82..5fb966665 100755 --- a/FS/bin/freeside-daily +++ b/FS/bin/freeside-daily @@ -10,8 +10,8 @@ use FS::Conf; use FS::cust_main; &untaint_argv; #what it sounds like (eww) -use vars qw($opt_d $opt_v $opt_p $opt_s); -getopts("p:d:vs"); +use vars qw($opt_d $opt_v $opt_p $opt_s $opt_y); +getopts("p:d:vsy:"); my $user = shift or die &usage; adminsuidsetup $user; @@ -28,6 +28,7 @@ my @cust_main = @ARGV #we're at now now (and later). my($time)= $opt_d ? str2time($opt_d) : $^T; +$time += $opt_y * 86400 if $opt_y; my($cust_main,%saw); foreach $cust_main ( @cust_main ) { @@ -99,7 +100,7 @@ freeside-daily - Run daily billing and invoice collection events. =head1 SYNOPSIS - freeside-daily [ -d 'date' ] [ -p 'payby' ] [ -s ] [ -v ] user [ custnum custnum ... ] + freeside-daily [ -d 'date' ] [ -y days ] [ -p 'payby' ] [ -s ] [ -v ] user [ custnum custnum ... ] =head1 DESCRIPTION @@ -114,6 +115,11 @@ the bill and collect methods of a cust_main object. See L. -d: Pretend it's 'date'. Date is in any format Date::Parse is happy with, but be careful. + -y: In addition to -d, which specifies an absolute date, the -y switch + specifies an offset, in days. For example, "-y 15" would increment the + "pretend date" 15 days from whatever was specified by the -d switch + (or now, if no -d switch was given). + -p: Only process customers with the specified payby (I, I, I, I, I, I, I) -s: re-charge setup fees -- cgit v1.2.1 From d8ea8ef98411f56069ff4036bd5a2403b456655b Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Oct 2003 11:23:04 +0000 Subject: removing testing info --- fs_selfservice/FS-SelfService/cgi/login.html | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs_selfservice/FS-SelfService/cgi/login.html b/fs_selfservice/FS-SelfService/cgi/login.html index ca6251eb1..5607de783 100644 --- a/fs_selfservice/FS-SelfService/cgi/login.html +++ b/fs_selfservice/FS-SelfService/cgi/login.html @@ -7,23 +7,20 @@ Username - - + Domain - - + Password - - + -- cgit v1.2.1 From 98527623b1fea1107b2c0422a0838b4602c21fa9 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Oct 2003 12:42:23 +0000 Subject: update Makefile.PL dependancies (PREREQ_PM) for self-service module and signup wrapper --- fs_selfservice/FS-SelfService/Makefile.PL | 4 +++- fs_signup/FS-SignupClient/Makefile.PL | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs_selfservice/FS-SelfService/Makefile.PL b/fs_selfservice/FS-SelfService/Makefile.PL index da0a0aa24..e5cbd1aef 100644 --- a/fs_selfservice/FS-SelfService/Makefile.PL +++ b/fs_selfservice/FS-SelfService/Makefile.PL @@ -8,7 +8,9 @@ WriteMakefile( 'INSTALLSCRIPT' => '/usr/local/sbin', 'INSTALLSITEBIN' => '/usr/local/sbin', 'PERM_RWX' => '750', - 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 + 'PREREQ_PM' => { + 'Storable' => 0, + }, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'SelfService.pm', # retrieve abstract from module AUTHOR => 'Ivan Kohler ') : ()), diff --git a/fs_signup/FS-SignupClient/Makefile.PL b/fs_signup/FS-SignupClient/Makefile.PL index e74051947..c3c213fb6 100644 --- a/fs_signup/FS-SignupClient/Makefile.PL +++ b/fs_signup/FS-SignupClient/Makefile.PL @@ -12,7 +12,7 @@ WriteMakefile( 'Business::CreditCard' => 0, 'HTTP::BrowserDetect' => 0, 'HTTP::Headers::UserAgent' => 3, - 'Storable' => 0, 'Text::Template' => 0, + 'FS::SelfService' => 0, }, ); -- cgit v1.2.1 From 2563e2d621c76a1fe9987e99e68fbe33e3f7aa7e Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Oct 2003 13:08:58 +0000 Subject: turn off super-verbose logging --- fs_selfservice/FS-SelfService/freeside-selfservice-clientd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_selfservice/FS-SelfService/freeside-selfservice-clientd b/fs_selfservice/FS-SelfService/freeside-selfservice-clientd index 438d472c9..45d9da9c7 100644 --- a/fs_selfservice/FS-SelfService/freeside-selfservice-clientd +++ b/fs_selfservice/FS-SelfService/freeside-selfservice-clientd @@ -17,7 +17,7 @@ use IO::File; #STDOUT->setbuf(''); use vars qw( $Debug ); -$Debug = 3; #2 will turn on child logging, 3 will log packet contents, +$Debug = 2; #2 will turn on child logging, 3 will log packet contents, #including potentially compromising information my $socket = "/usr/local/freeside/selfservice_socket"; -- cgit v1.2.1 From 1e9ae4ab4387c8d646476df989e2e92c15ce468d Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Oct 2003 14:20:29 +0000 Subject: add emaildecline-exclude config option --- FS/FS/Conf.pm | 7 +++++++ FS/FS/cust_main.pm | 2 ++ 2 files changed, 9 insertions(+) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 400de69d6..51feb3847 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -957,6 +957,13 @@ httemplate/docs/config.html 'type' => 'checkbox', }, + { + 'key' => 'emaildecline-exclude', + 'section' => 'billing', + 'description' => 'List of error messages that should not trigger email decline notices, one per line.', + 'type' => 'textarea', + }, + { 'key' => 'cancelmessage', 'section' => 'billing', diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index de22ab5c5..2ee8a42f0 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1774,6 +1774,8 @@ sub realtime_bop { if ( !$options{'quiet'} && !$realtime_bop_decline_quiet && $conf->exists('emaildecline') && grep { $_ ne 'POST' } $self->invoicing_list + && ! grep { $_ eq $transaction->error_message } + $conf->config('emaildecline-exclude') ) { my @templ = $conf->config('declinetemplate'); my $template = new Text::Template ( -- cgit v1.2.1 From f5a81134be779b26688d3d4703840f3b038ca2f7 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Oct 2003 14:26:48 +0000 Subject: minor Makefile updates --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d4d753d6d..4a2afd000 100644 --- a/Makefile +++ b/Makefile @@ -13,20 +13,24 @@ ASP_GLOBAL = /usr/local/etc/freeside/asp-global MASON_HANDLER = /usr/local/etc/freeside/handler.pl MASONDATA = /usr/local/etc/freeside/masondata -#deb, others? +#deb FREESIDE_DOCUMENT_ROOT = /var/www/freeside +#redhat +#FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside #freebsd #FREESIDE_DOCUMENT_ROOT = /usr/local/www/data/freeside #openbsd #FREESIDE_DOCUMENT_ROOT = /var/www/htdocs/freeside -#deb, others? +#deb, redhat, others? INIT_FILE = /etc/init.d/freeside #freebsd #INIT_FILE = /usr/local/etc/rc.d/011.freeside.sh -#deb, others? +#deb HTTPD_RESTART = /etc/init.d/apache restart +#redhat +#HTTPD_RESTART = /etc/init.d/httpd restart #freebsd #HTTPD_RESTART = /usr/local/etc/rc.d/apache.sh stop; sleep 1; /usr/local/etc/rc.d/apache.sh start #openbsd @@ -34,7 +38,7 @@ HTTPD_RESTART = /etc/init.d/apache restart FREESIDE_RESTART = ${INIT_FILE} restart -#deb, others? +#deb, redhat, others? INSTALLGROUP = root #freebsd,openbsd #INSTALLGROUP = wheel -- cgit v1.2.1 From 2b6242f9d8fe2d9afb3937e3eea03cd0ece1e5f8 Mon Sep 17 00:00:00 2001 From: khoff Date: Thu, 2 Oct 2003 21:51:27 +0000 Subject: $field isn't a global. --- httemplate/edit/svc_broadband.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/edit/svc_broadband.cgi b/httemplate/edit/svc_broadband.cgi index 6828791c0..db27b3241 100644 --- a/httemplate/edit/svc_broadband.cgi +++ b/httemplate/edit/svc_broadband.cgi @@ -157,7 +157,7 @@ Service #<%=$svcnum ? $svcnum : "(NEW)"%>

      <% } %> <% -foreach $field ($svc_broadband->virtual_fields) { +foreach my $field ($svc_broadband->virtual_fields) { if ( $part_svc->part_svc_column($field)->columnflag ne 'F' ) { print $svc_broadband->pvf($field)->widget('HTML', 'edit', $svc_broadband->getfield($field)); -- cgit v1.2.1 From 71eb3c33da045ffdc963b5ad8111af8a8bef878d Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 6 Oct 2003 11:14:30 +0000 Subject: agent browse shows # of active accounts & links to appropriate account search --- httemplate/browse/svc_acct_pop.cgi | 52 +++++++++++++++++++++++--------------- httemplate/search/svc_acct.cgi | 13 +++++++++- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi index 8d35cb56a..80168728c 100755 --- a/httemplate/browse/svc_acct_pop.cgi +++ b/httemplate/browse/svc_acct_pop.cgi @@ -1,4 +1,9 @@ +<% + my $accounts_sth = dbh->prepare("SELECT COUNT(*) FROM svc_acct + WHERE popnum = ? ") + or die dbh->errstr; +%> <%= header('Access Number Listing', menubar( 'Main Menu' => $p )) %> Points of Presence

      Add new Access Number

      @@ -10,6 +15,7 @@ Points of Presence

      Area code Exchange Local + Accounts <% @@ -18,32 +24,38 @@ foreach my $svc_acct_pop ( sort { $a->state cmp $b->state || $a->city cmp $b->city || $a->ac <=> $b->ac || $a->exch <=> $b->exch || $a->loc <=> $b->loc } qsearch('svc_acct_pop',{}) ) { - my($hashref)=$svc_acct_pop->hashref; - print <popnum; + + $accounts_sth->execute($svc_acct_pop->popnum) or die $accounts_sth->errstr; + my $num_accounts = $accounts_sth->fetchrow_arrayref->[0]; + + my $svc_acct_link = $p. 'search/svc_acct.cgi?popnum='. $svc_acct_pop->popnum; + +%> - - $hashref->{popnum} - - $hashref->{city} - - $hashref->{state} - - $hashref->{ac} - - $hashref->{exch} - - $hashref->{loc} + + <%= $svc_acct_pop->popnum %> + + <%= $svc_acct_pop->city %> + + <%= $svc_acct_pop->state %> + + <%= $svc_acct_pop->ac %> + + <%= $svc_acct_pop->exch %> + + <%= $svc_acct_pop->loc %> + + <%= $num_accounts %> + active + -END +<% } %> -} - -print < -END -%> diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi index e43f4f79b..0954bf652 100755 --- a/httemplate/search/svc_acct.cgi +++ b/httemplate/search/svc_acct.cgi @@ -48,12 +48,23 @@ if ( $query eq 'svcnum' ) { $sortby=\*uid_sort; $orderby = ( $unlinked ? 'AND' : 'WHERE' ). " ${tblname}uid IS NOT NULL ORDER BY ${tblname}uid"; +} elsif ( $query =~ /popnum=(\d+)/ ) { + my $popnum = $1; + $unlinked .= ( $unlinked ? 'AND' : 'WHERE' ). + " popnum = $popnum"; + $sortby=\*username_sort; + $orderby = "ORDER BY ${tblname}username"; } else { $sortby=\*uid_sort; @svc_acct = @{&usernamesearch}; } -if ( $query eq 'svcnum' || $query eq 'username' || $query eq 'uid' ) { + +if ( $query eq 'svcnum' + || $query eq 'username' + || $query eq 'uid' + || $query eq 'popnum' + ) { my $statement = "SELECT COUNT(*) FROM svc_acct $unlinked"; my $sth = dbh->prepare($statement) -- cgit v1.2.1 From 83178acdc79de25f98c3e7eee9a4de1a17eaf9f4 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 6 Oct 2003 11:20:58 +0000 Subject: fix linking to account list per access number --- httemplate/browse/svc_acct_pop.cgi | 2 +- httemplate/search/svc_acct.cgi | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi index 80168728c..f77fe820b 100755 --- a/httemplate/browse/svc_acct_pop.cgi +++ b/httemplate/browse/svc_acct_pop.cgi @@ -48,7 +48,7 @@ foreach my $svc_acct_pop ( sort { <%= $svc_acct_pop->loc %> <%= $num_accounts %> - active + active <% } %> diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi index 0954bf652..bbcac30b5 100755 --- a/httemplate/search/svc_acct.cgi +++ b/httemplate/search/svc_acct.cgi @@ -48,7 +48,7 @@ if ( $query eq 'svcnum' ) { $sortby=\*uid_sort; $orderby = ( $unlinked ? 'AND' : 'WHERE' ). " ${tblname}uid IS NOT NULL ORDER BY ${tblname}uid"; -} elsif ( $query =~ /popnum=(\d+)/ ) { +} elsif ( $query =~ /^popnum=(\d+)$/ ) { my $popnum = $1; $unlinked .= ( $unlinked ? 'AND' : 'WHERE' ). " popnum = $popnum"; @@ -63,7 +63,7 @@ if ( $query eq 'svcnum' ) { if ( $query eq 'svcnum' || $query eq 'username' || $query eq 'uid' - || $query eq 'popnum' + || $query =~ /^popnum=(\d+)$/ ) { ) { my $statement = "SELECT COUNT(*) FROM svc_acct $unlinked"; -- cgit v1.2.1 From 3ca42bd26b6724fa389c9a3e08d091e65954b616 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 6 Oct 2003 11:22:26 +0000 Subject: typo --- httemplate/search/svc_acct.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi index bbcac30b5..cd86031c5 100755 --- a/httemplate/search/svc_acct.cgi +++ b/httemplate/search/svc_acct.cgi @@ -63,7 +63,7 @@ if ( $query eq 'svcnum' ) { if ( $query eq 'svcnum' || $query eq 'username' || $query eq 'uid' - || $query =~ /^popnum=(\d+)$/ ) { + || $query =~ /^popnum=(\d+)$/ ) { my $statement = "SELECT COUNT(*) FROM svc_acct $unlinked"; -- cgit v1.2.1 From b144cab922a4c09462f0335e4835a72c985bb56a Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 6 Oct 2003 11:39:19 +0000 Subject: fix URL argument processing for account searches by popnum --- httemplate/search/svc_acct.cgi | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi index cd86031c5..e20649cd9 100755 --- a/httemplate/search/svc_acct.cgi +++ b/httemplate/search/svc_acct.cgi @@ -48,10 +48,9 @@ if ( $query eq 'svcnum' ) { $sortby=\*uid_sort; $orderby = ( $unlinked ? 'AND' : 'WHERE' ). " ${tblname}uid IS NOT NULL ORDER BY ${tblname}uid"; -} elsif ( $query =~ /^popnum=(\d+)$/ ) { - my $popnum = $1; +} elsif ( $cgi->param('popnum') =~ /^(\d+)$/ ) { $unlinked .= ( $unlinked ? 'AND' : 'WHERE' ). - " popnum = $popnum"; + " popnum = $1"; $sortby=\*username_sort; $orderby = "ORDER BY ${tblname}username"; } else { @@ -63,7 +62,7 @@ if ( $query eq 'svcnum' ) { if ( $query eq 'svcnum' || $query eq 'username' || $query eq 'uid' - || $query =~ /^popnum=(\d+)$/ + || $cgi->param('popnum') =~ /^(\d+)$/ ) { my $statement = "SELECT COUNT(*) FROM svc_acct $unlinked"; -- cgit v1.2.1 From e4cb834b6ae70167fd95b2c2048d6c2082a07aed Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 6 Oct 2003 12:05:47 +0000 Subject: - put link to main menu on quick payment search page --- httemplate/search/cust_main-quickpay.html | 1 + 1 file changed, 1 insertion(+) diff --git a/httemplate/search/cust_main-quickpay.html b/httemplate/search/cust_main-quickpay.html index 9f39db914..25d9db36b 100755 --- a/httemplate/search/cust_main-quickpay.html +++ b/httemplate/search/cust_main-quickpay.html @@ -7,6 +7,7 @@ Quick payment entry

      + Main Menu

      Search for last name: -- cgit v1.2.1 From 449875d3a1e67ab4d2f8ee1c5d57309ffc18c6ad Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 7 Oct 2003 02:27:11 +0000 Subject: add suspension / unsuspension export to communigate --- FS/FS/part_export/communigate_pro.pm | 45 +++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index ae20e2423..35c7fbf41 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -57,16 +57,27 @@ sub _export_delete { ); } -#sub _export_suspend { -#} +sub _export_suspend { + my( $self, $svc_acct ) = (shift, shift); + $self->communigate_pro_queue( $svc_acct->svcnum, 'UpdateAccountSettings', + 'accountName' => $svc_acct->email, + 'AccessModes' => 'Mail', + ); +} -#sub _export_unsuspend { -#} +sub _export_unsuspend { + my( $self, $svc_acct ) = (shift, shift); + $self->communigate_pro_queue( $svc_acct->svcnum, 'UpdateAccountSettings', + 'accountName' => $svc_acct->email, + 'AccessModes' => $self->option('AccessModes'), + ); +} sub communigate_pro_queue { my( $self, $svcnum, $method ) = (shift, shift, shift); - my $sub = $method eq 'CreateAccount' - ? 'CreateAccount' + my @kludge_methods = qw(CreateAccount UpdateAccountSettings); + my $sub = grep { $method eq $_ } @kludge_methods + ? $method : 'communigate_pro_command'; my $queue = new FS::queue { 'svcnum' => $svcnum, @@ -84,24 +95,30 @@ sub communigate_pro_queue { } sub CreateAccount { - my( $machine, $port, $login, $password, $method, @args ) = @_; - - my %args = @args; + my( $machine, $port, $login, $password, $method, %args ) = @_; my $accountName = delete $args{'accountName'}; my $accountType = delete $args{'accountType'}; my $externalFlag = delete $args{'externalFlag'}; $args{'AccessModes'} = [ split(' ', $args{'AccessModes'}) ]; - @args = ( accountName => $accountName, - accountType => $accountType, - settings => \%args, - ); - #externalFlag => $externalFlag, + my @args = ( accountName => $accountName, + accountType => $accountType, + settings => \%args, + ); + #externalFlag => $externalFlag, push @args, externalFlag => $externalFlag if $externalFlag; communigate_pro_command( $machine, $port, $login, $password, $method, @args ); } +sub UpdateAccountSettings { + my( $machine, $port, $login, $password, $method, %args ) = @_; + my $accountName = delete $args{'accountName'}; + $args{'AccessModes'} = [ split(' ', $args{'AccessModes'}) ]; + @args = ( $accountName, \%args ); + communigate_pro_command( $machine, $port, $login, $password, $method, @args ); +} + sub communigate_pro_command { #subroutine, not method my( $machine, $port, $login, $password, $method, @args ) = @_; -- cgit v1.2.1 From 4a22a31cd586fc6cff704294b4de39841b0bc86b Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 7 Oct 2003 05:49:21 +0000 Subject: doc --- FS/FS/svc_acct.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 7e8cb0710..3fb28c054 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -599,13 +599,11 @@ sub replace { =item suspend -Suspends this account by prefixing *SUSPENDED* to the password. If there is an -error, returns the error, otherwise returns false. +Suspends this account by calling export-specific suspend hooks. If there is +an error, returns the error, otherwise returns false. Called by the suspend method of FS::cust_pkg (see L). -Calls any export-specific suspend hooks. - =cut sub suspend { @@ -625,13 +623,11 @@ sub suspend { =item unsuspend -Unsuspends this account by removing *SUSPENDED* from the password. If there is -an error, returns the error, otherwise returns false. +Unsuspends this account by by calling export-specific suspend hooks. If there +is an error, returns the error, otherwise returns false. Called by the unsuspend method of FS::cust_pkg (see L). -Calls any export-specific unsuspend hooks. - =cut sub unsuspend { -- cgit v1.2.1 From 972ef71fa13cf9a76cb6453a98ece950e1776f1a Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 7 Oct 2003 05:50:04 +0000 Subject: add suspend and unsuspend hooks, don't try and set '*SUSPENDED*' passwords --- FS/FS/part_export/communigate_pro.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index 35c7fbf41..a9d9591ca 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -39,6 +39,8 @@ sub _export_replace { || $old->finger ne $new->finger || $old->quota ne $new->quota; + return '' if '*SUSPENDED* '. $old->_password eq $new->_password; + #my $err_or_queue = $self->communigate_pro_queue( $new->svcnum,'RenameAccount', # $old->email, $new->email ); #return $err_or_queue unless ref($err_or_queue); -- cgit v1.2.1 From 79dcffa66be02e3ddb342d36dcded01888c3d841 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 7 Oct 2003 06:03:17 +0000 Subject: fix subroutine call from UpdateAccountSettings sub --- FS/FS/part_export/communigate_pro.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index a9d9591ca..4240618ac 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -109,7 +109,7 @@ sub CreateAccount { #externalFlag => $externalFlag, push @args, externalFlag => $externalFlag if $externalFlag; - communigate_pro_command( $machine, $port, $login, $password, $method, @args ); + &communigate_pro_command( $machine, $port, $login, $password, $method, @args); } @@ -118,7 +118,7 @@ sub UpdateAccountSettings { my $accountName = delete $args{'accountName'}; $args{'AccessModes'} = [ split(' ', $args{'AccessModes'}) ]; @args = ( $accountName, \%args ); - communigate_pro_command( $machine, $port, $login, $password, $method, @args ); + &communigate_pro_command( $machine, $port, $login, $password, $method, @args); } sub communigate_pro_command { #subroutine, not method -- cgit v1.2.1 From 069c216ff8e61e002535b099cab0cb67fc1defd9 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 7 Oct 2003 06:06:50 +0000 Subject: problem was scalar context propogating to the wrong place in the grep --- FS/FS/part_export/communigate_pro.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index 4240618ac..9a4539a4a 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -78,9 +78,8 @@ sub _export_unsuspend { sub communigate_pro_queue { my( $self, $svcnum, $method ) = (shift, shift, shift); my @kludge_methods = qw(CreateAccount UpdateAccountSettings); - my $sub = grep { $method eq $_ } @kludge_methods - ? $method - : 'communigate_pro_command'; + my $sub = 'communigate_pro_command'; + $sub = $method if grep { $method eq $_ } @kludge_methods; my $queue = new FS::queue { 'svcnum' => $svcnum, 'job' => "FS::part_export::communigate_pro::$sub", @@ -109,7 +108,7 @@ sub CreateAccount { #externalFlag => $externalFlag, push @args, externalFlag => $externalFlag if $externalFlag; - &communigate_pro_command( $machine, $port, $login, $password, $method, @args); + communigate_pro_command( $machine, $port, $login, $password, $method, @args ); } @@ -118,7 +117,7 @@ sub UpdateAccountSettings { my $accountName = delete $args{'accountName'}; $args{'AccessModes'} = [ split(' ', $args{'AccessModes'}) ]; @args = ( $accountName, \%args ); - &communigate_pro_command( $machine, $port, $login, $password, $method, @args); + communigate_pro_command( $machine, $port, $login, $password, $method, @args ); } sub communigate_pro_command { #subroutine, not method -- cgit v1.2.1 From 5bdc87ecf59cfab3f9c6ca0ea1b97a41ed5561c8 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 7 Oct 2003 08:06:11 +0000 Subject: adding acct_snarf --- FS/FS.pm | 2 + FS/FS/acct_snarf.pm | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++ FS/FS/part_export.pm | 4 -- 3 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 FS/FS/acct_snarf.pm diff --git a/FS/FS.pm b/FS/FS.pm index e4a32082c..a299e659d 100644 --- a/FS/FS.pm +++ b/FS/FS.pm @@ -54,6 +54,8 @@ L - Service base class L - Account (shell, RADIUS, POP3) class +L - External mail account class + L - RADIUS groups L - Domain class diff --git a/FS/FS/acct_snarf.pm b/FS/FS/acct_snarf.pm new file mode 100644 index 000000000..7c51d6945 --- /dev/null +++ b/FS/FS/acct_snarf.pm @@ -0,0 +1,128 @@ +package FS::acct_snarf; + +use strict; +use vars qw( @ISA ); +use FS::Record; + +@ISA = qw( FS::Record ); + +=head1 NAME + +FS::acct_snarf - Object methods for acct_snarf records + +=head1 SYNOPSIS + + use FS::acct_snarf; + + $record = new FS::acct_snarf \%hash; + $record = new FS::acct_snarf { 'column' => 'value' }; + + $error = $record->insert; + + $error = $new_record->replace($old_record); + + $error = $record->delete; + + $error = $record->check; + +=head1 DESCRIPTION + +An FS::svc_acct object represents an external mail account, typically for +download of mail. FS::acct_snarf inherits from FS::Record. The following +fields are currently supported: + +=over 4 + +=item snarfnum - primary key + +=item svcnum - Account (see L) + +=item machine - external machine to download mail from + +=item protocol - protocol (pop3, imap, etc.) + +=item username - external login username + +=item _password - external login password + +=back + +=head1 METHODS + +=over 4 + +=item new HASHREF + +Creates a new record. To add the record to the database, see L<"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 I method. + +=cut + +sub table { 'acct_snarf'; } + +=item insert + +Adds this record to the database. If there is an error, returns the error, +otherwise returns false. + +=cut + +# the insert method can be inherited from FS::Record + +=item delete + +Delete this record from the database. + +=cut + +# the delete method can be inherited from FS::Record + +=item replace OLD_RECORD + +Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. + +=cut + +# the replace method can be inherited from FS::Record + +=item check + +Checks all fields to make sure this is a valid example. If there is +an error, returns the error, otherwise returns false. Called by the insert +and replace methods. + +=cut + +sub check { + my $self = shift; + my $error = + $self->ut_numbern('snarfnum') + || $self->ut_number('svcnum') + || $self->ut_foreign_key('svcnum', 'svc_acct', 'svcnum') + || $self->ut_domain('machine') + || $self->alphan('protocol') + || $self->ut_textn('username') + ; + return $error if $error; + + $self->_password =~ /^[^\t\n]*$/ or return "illegal password"; + $self->_password($1); + + ''; #no error +} + +=back + +=head1 BUGS + +=head1 SEE ALSO + +L, schema.html from the base documentation. + +=cut + +1; + diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 01e71c0ed..3dfaaee9b 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -274,10 +274,6 @@ sub check { ; return $error if $error; - $self->machine =~ /^([\w\-\.]*)$/ - or return "Illegal machine: ". $self->machine; - $self->machine($1); - $self->nodomain =~ /^(Y?)$/ or return "Illegal nodomain: ". $self->nodomain; $self->nodomain($1); -- cgit v1.2.1 From a5d29a11e284cbe0283e5a104b1c87189edc85c0 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 7 Oct 2003 13:50:13 +0000 Subject: mandrake --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4a2afd000..42dba360f 100644 --- a/Makefile +++ b/Makefile @@ -15,21 +15,21 @@ MASONDATA = /usr/local/etc/freeside/masondata #deb FREESIDE_DOCUMENT_ROOT = /var/www/freeside -#redhat +#redhat, mandrake #FREESIDE_DOCUMENT_ROOT = /var/www/html/freeside #freebsd #FREESIDE_DOCUMENT_ROOT = /usr/local/www/data/freeside #openbsd #FREESIDE_DOCUMENT_ROOT = /var/www/htdocs/freeside -#deb, redhat, others? +#deb, redhat, mandrake, others? INIT_FILE = /etc/init.d/freeside #freebsd #INIT_FILE = /usr/local/etc/rc.d/011.freeside.sh #deb HTTPD_RESTART = /etc/init.d/apache restart -#redhat +#redhat, mandrake #HTTPD_RESTART = /etc/init.d/httpd restart #freebsd #HTTPD_RESTART = /usr/local/etc/rc.d/apache.sh stop; sleep 1; /usr/local/etc/rc.d/apache.sh start @@ -38,9 +38,9 @@ HTTPD_RESTART = /etc/init.d/apache restart FREESIDE_RESTART = ${INIT_FILE} restart -#deb, redhat, others? +#deb, redhat, mandrake, others? INSTALLGROUP = root -#freebsd,openbsd +#freebsd, openbsd #INSTALLGROUP = wheel #edit the stuff below to have the daemons start -- cgit v1.2.1 From 8950be198d09bf5e9e0959fe2b55726be63a2397 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 8 Oct 2003 04:09:05 +0000 Subject: can't use File::Basename::basename for windows filenames! use a regex instead --- htetc/global.asa | 1 - htetc/handler.pl | 1 - httemplate/misc/upload-batch.cgi | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htetc/global.asa b/htetc/global.asa index ee5cfcb3c..2e31be394 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -9,7 +9,6 @@ use CGI 2.47; use Date::Format; use Date::Parse; use Time::Local; -use File::Basename; use Tie::IxHash; use HTML::Entities; use IO::Handle; diff --git a/htetc/handler.pl b/htetc/handler.pl index b007353e3..ba73bcfaf 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -67,7 +67,6 @@ sub handler use Date::Format; use Date::Parse; use Time::Local; - use File::Basename; use Tie::IxHash; use HTML::Entities; use IO::Handle; diff --git a/httemplate/misc/upload-batch.cgi b/httemplate/misc/upload-batch.cgi index 565a6da5c..cc5346606 100644 --- a/httemplate/misc/upload-batch.cgi +++ b/httemplate/misc/upload-batch.cgi @@ -2,7 +2,8 @@ my $fh = $cgi->upload('batch_results'); my $filename = $cgi->param('batch_results'); - my $paybatch = basename($filename); + $filename =~ /^.*[\/\\]([^\/\\]+)$/ or die; + my $paybatch = $1; my $error = defined($fh) ? FS::cust_pay_batch::import_results( { -- cgit v1.2.1 From 04980f381a8de1e935193102b0e924bf7a3f944d Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 9 Oct 2003 11:05:21 +0000 Subject: don't install on a public server! --- httemplate/docs/install.html | 1 + 1 file changed, 1 insertion(+) diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 463575c53..4d3a63958 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -3,6 +3,7 @@

      Installation

      +Note: Install Freeside on a firewalled, private server, not a public (web, RADIUS, etc.) server.

      Before installing, you need:
      • Perl Don't enable experimental features like threads or the PerlIO abstraction layer. -- cgit v1.2.1 From beac873f6d82cf787ccb32760a6ffac78dfe1851 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 9 Oct 2003 17:40:02 +0000 Subject: parse last line from TD Canada Trust --- FS/FS/cust_pay_batch.pm | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/FS/FS/cust_pay_batch.pm b/FS/FS/cust_pay_batch.pm index 97c168159..f53e55b94 100644 --- a/FS/FS/cust_pay_batch.pm +++ b/FS/FS/cust_pay_batch.pm @@ -210,6 +210,8 @@ sub import_results { my $paybatch = $param->{'paybatch'}; my @fields; + my $end_condition; + my $end_hook; my $condition; my $hook; @@ -236,9 +238,23 @@ sub import_results { '', # Terminal ID: Terminal ID used to process the transaction ); + $end_condition = sub { + my $hash = shift; + $hash->{'type'} eq '0BC'; + }; + + $end_hook = sub { + my( $hash, $total) = @_; + $total = sprintf("%.2f", $total); + my $batch_total = sprintf("%.2f", $hash->{'paybatchnum'} / 100 ); + return "Our total $total does not match bank total $batch_total!" + if $total != $batch_total; + ''; + }; + $condition = sub { my $hash = shift; - $hash->{'result'} == 3 && $hash->{'type'} == 0; + $hash->{'result'} == 3 && $hash->{'type'} eq '0'; }; $hook = sub { @@ -269,9 +285,12 @@ sub import_results { local $FS::UID::AutoCommit = 0; my $dbh = dbh; + my $total = 0; my $line; while ( defined($line=<$fh>) ) { + next if $line =~ /^\s*$/; #skip blank lines + $csv->parse($line) or do { $dbh->rollback if $oldAutoCommit; return "can't parse: ". $csv->error_input(); @@ -285,6 +304,15 @@ sub import_results { $hash{$field} = $value; } + if ( &{$end_condition}(\%hash) ) { + my $error = &{$end_hook}(\%hash, $total); + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return $error; + } + last; + } + my $cust_pay_batch = qsearchs('cust_pay_batch', { 'paybatchnum' => $hash{'paybatchnum'} } ); unless ( $cust_pay_batch ) { @@ -314,6 +342,7 @@ sub import_results { $dbh->rollback if $oldAutoCommit; return "error adding payment paybatchnum $hash{'paybatchnum'}: $error\n"; } + $total += $hash{'paid'}; $cust_pay->cust_main->apply_payments; -- cgit v1.2.1 From 948043dcd53db87a686707469416e6709948e721 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 14 Oct 2003 17:00:00 +0000 Subject: fix the default success template --- fs_signup/FS-SignupClient/cgi/signup.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index 6fa01deaf..2458bcf19 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ b/fs_signup/FS-SignupClient/cgi/signup.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: signup.cgi,v 1.45 2003-09-29 06:51:24 ivan Exp $ +# $Id: signup.cgi,v 1.46 2003-10-14 17:00:00 ivan Exp $ use strict; use vars qw( @payby $cgi $locales $packages @@ -647,7 +647,7 @@ Signup information for <%= $email_name %>:

        Username: <%= $username %>
        Password: <%= $password %>
        -Access number: (<%= $ac %>) / $exch - $local
        +Access number: (<%= $ac %>) / <%= $exch %> - <%= $local %>
        Package: <%= $pkg %>
        END -- cgit v1.2.1 From 94eb1849a28630ef039eb644f961dae8b19f58fc Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 15 Oct 2003 09:41:43 +0000 Subject: - Business::OnlinePayment "recurring_billing" flag is set for subsequent credit card transactions; some processors (AuthorozeNet, others?) use this to waive the CVV2 requirement. --- FS/FS/cust_main.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 2ee8a42f0..58cfc0c76 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1653,6 +1653,12 @@ sub realtime_bop { $content{card_number} = $self->payinfo; $self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/; $content{expiration} = "$2/$1"; + if ( qsearch('cust_pay', { 'custnum' => $self->custnum, + 'payby' => 'CARD', + 'payinfo' => $self->payinfo, } ) + ) { + $content{recurring_billing} = 'YES'; + } } elsif ( $method eq 'ECHECK' ) { my($account_number,$routing_code) = $self->payinfo; ( $content{account_number}, $content{routing_code} ) = -- cgit v1.2.1 From 7598ece6cac31548505dd610ef418ca001adf5b2 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 15 Oct 2003 12:08:47 +0000 Subject: fix agent username and password nullability --- FS/bin/freeside-setup | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/FS/bin/freeside-setup b/FS/bin/freeside-setup index bb122700a..b7b45dc63 100755 --- a/FS/bin/freeside-setup +++ b/FS/bin/freeside-setup @@ -337,8 +337,8 @@ sub tables_hash_hack { 'freq', 'int', 'NULL', '', 'prog', @perl_type, 'disabled', 'char', 'NULL', 1, - 'username', 'varchar', '', $char_d, - '_password','varchar', '', $char_d, + 'username', 'varchar', 'NULL', $char_d, + '_password','varchar', 'NULL', $char_d, ], 'primary_key' => 'agentnum', 'unique' => [], @@ -1104,6 +1104,20 @@ sub tables_hash_hack { 'index' => [], }, + 'acct_snarf' => { + 'columns' => [ + 'snarfnum', 'int', '', '', + 'svcnum', 'int', '', '', + 'machine', 'varchar', '', 255, + 'protocol', 'varchar', '', $char_d, + 'username', 'varchar', '', $char_d, + '_password', 'varchar', '', $char_d, + ], + 'primary_key' => 'snarfnum', + 'unique' => [], + 'index' => [ [ 'svcnum' ] ], + }, + ); %tables; -- cgit v1.2.1 From bacea004a735c7a9c30a35e9184a63897a200e6e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 15 Oct 2003 15:03:56 +0000 Subject: add tagging ability so we can run multiple self-service clients on one machine --- FS/bin/freeside-selfservice-server | 3 ++- fs_selfservice/FS-SelfService/SelfService.pm | 3 ++- fs_selfservice/FS-SelfService/freeside-selfservice-clientd | 8 +++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/FS/bin/freeside-selfservice-server b/FS/bin/freeside-selfservice-server index 107103973..05fa72b43 100644 --- a/FS/bin/freeside-selfservice-server +++ b/FS/bin/freeside-selfservice-server @@ -33,6 +33,7 @@ $kids = 0; my $user = shift or die &usage; my $machine = shift or die &usage; +my $tag = scalar(@ARGV) ? shift : ''; my $pid_file = "/var/run/freeside-selfservice-server.$user.pid"; #my $pid_file = "/var/run/freeside-selfservice-server.$user.pid"; $FS::UID::datasrc not posible, but should include machine name at least, hmm @@ -50,7 +51,7 @@ while (1) { my($writer,$reader,$error) = (new IO::Handle, new IO::Handle, new IO::Handle); warn "connecting to $machine\n" if $Debug; - $ssh_pid = sshopen2($machine,$reader,$writer,$clientd); + $ssh_pid = sshopen2($machine,$reader,$writer,$clientd,$tag); # nstore_fd(\*writer, {'hi'=>'there'}); diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm index 5d3f50b10..b2532be71 100644 --- a/fs_selfservice/FS-SelfService/SelfService.pm +++ b/fs_selfservice/FS-SelfService/SelfService.pm @@ -1,7 +1,7 @@ package FS::SelfService; use strict; -use vars qw($VERSION @ISA @EXPORT_OK $socket %autoload ); +use vars qw($VERSION @ISA @EXPORT_OK $socket %autoload $tag); use Exporter; use Socket; use FileHandle; @@ -14,6 +14,7 @@ $VERSION = '0.03'; @ISA = qw( Exporter ); $socket = "/usr/local/freeside/selfservice_socket"; +$socket .= '.'.$tag if defined $tag && length($tag); #maybe should ask ClientAPI for this list %autoload = ( diff --git a/fs_selfservice/FS-SelfService/freeside-selfservice-clientd b/fs_selfservice/FS-SelfService/freeside-selfservice-clientd index 45d9da9c7..a8b1e713b 100644 --- a/fs_selfservice/FS-SelfService/freeside-selfservice-clientd +++ b/fs_selfservice/FS-SelfService/freeside-selfservice-clientd @@ -16,16 +16,18 @@ use IO::File; #STDOUT->setbuf(''); +my $tag = scalar(@ARGV) ? '.'.shift : ''; + use vars qw( $Debug ); $Debug = 2; #2 will turn on child logging, 3 will log packet contents, #including potentially compromising information -my $socket = "/usr/local/freeside/selfservice_socket"; +my $socket = "/usr/local/freeside/selfservice_socket$tag"; my $pid_file = "$socket.pid"; -my $log_file = "/usr/local/freeside/selfservice.log"; +my $log_file = "/usr/local/freeside/selfservice$tag.log"; -my $lock_file = "/usr/local/freeside/selfservice.writelock"; +my $lock_file = "/usr/local/freeside/selfservice$tag.writelock"; #my $me = '[client]'; -- cgit v1.2.1 From ac1c39dff69b630907bb75cb87accfe67e484128 Mon Sep 17 00:00:00 2001 From: khoff Date: Wed, 15 Oct 2003 22:48:41 +0000 Subject: File got munged during svc_broadband merge. Added ability to create a 'customer router'. --- httemplate/view/svc_broadband.cgi | 112 ++++++++++++++++++++++++++++++-------- 1 file changed, 89 insertions(+), 23 deletions(-) diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi index 677a4b058..a4ec7569e 100644 --- a/httemplate/view/svc_broadband.cgi +++ b/httemplate/view/svc_broadband.cgi @@ -37,10 +37,9 @@ my ( $svc_broadband->getfield('speed_up'), $svc_broadband->getfield('ip_addr') ); +%> - - -print header('Broadband Service View', menubar( +<%=header('Broadband Service View', menubar( ( ( $custnum ) ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", @@ -49,29 +48,96 @@ print header('Broadband Service View', menubar( "${p}misc/cancel-unaudited.cgi?$svcnum" ) ), "Main menu" => $p, -)). - qq!Edit this information
        !. - ntable("#cccccc"). ''. ntable("#cccccc",2). - qq!Service number!. - qq!$svcnum!. - qq!Router!. - qq!$routernum: $routername!. - qq!Download Speed!. - qq!$speed_down!. - qq!Upload Speed!. - qq!$speed_up!. - qq!IP Address!. - qq!$ip_addr!. - ''; +)) +%> +Edit this information +
        +<%=ntable("#cccccc")%> + + + <%=ntable("#cccccc",2)%> + + Service number + <%=$svcnum%> + + + Router + <%=$routernum%>: <%=$routername%> + + + Download Speed + <%=$speed_down%> + + + Upload Speed + <%=$speed_up%> + + + IP Address + <%=$ip_addr%> + + + +<% foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) { - print $svc_broadband->pvf($_)->widget('HTML', 'view', - $svc_broadband->getfield($_)), "\n"; + print $svc_broadband->pvf($_)->widget('HTML', 'view', + $svc_broadband->getfield($_)), "\n"; } -print ''; +%> + + + + -print '
        '. joblisting({'svcnum'=>$svcnum}, 1). - '' -; +
        +<%=ntable("#cccccc", 2)%> +<% + my $sb_router = qsearchs('router', { svcnum => $svcnum }); + if ($sb_router) { + %> + Router associated: <%=$sb_router->routername%> + + (details) + +
        + <% my @addr_block; + if (@addr_block = $sb_router->addr_block) { + %> + Address space + + (edit) + +
        + <% print ntable("#cccccc", 1); + foreach (@addr_block) { %> + + <%=$_->ip_gateway%>/<%=$_->ip_netmask%> + + <% } %> + + <% } else { %> + No address space allocated. + <% } %> +
        + <% + } else { %> + + + +Add router named + + + + +<% +} +%> + +
        +<%=joblisting({'svcnum'=>$svcnum}, 1)%> + + + -- cgit v1.2.1 From 9d0dd4b0c9017b18b634e3b6c62cfd0eda549f5c Mon Sep 17 00:00:00 2001 From: khoff Date: Wed, 15 Oct 2003 22:59:31 +0000 Subject: More changes that got lost in the merge somehow. --- httemplate/edit/router.cgi | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/httemplate/edit/router.cgi b/httemplate/edit/router.cgi index 5c365a21e..a573c6504 100755 --- a/httemplate/edit/router.cgi +++ b/httemplate/edit/router.cgi @@ -22,6 +22,8 @@ print header("$action Router", menubar( 'View all routers' => "${p}browse/router.cgi", )); +my $p3 = popurl(3); + if($cgi->param('error')) { %> Error: <%=$cgi->param('error')%> <% } %> @@ -31,6 +33,7 @@ if($cgi->param('error')) { + Router #<%=$routernum or "(NEW)"%>

        Name @@ -49,12 +52,14 @@ foreach my $field ($router->virtual_fields) { - +<% +unless ($router->svcnum) { +%>

        Select the service types available on this router
        <% -foreach my $part_svc ( qsearch('part_svc', { svcdb => 'svc_broadband', - disabled => '' }) ) { + foreach my $part_svc ( qsearch('part_svc', { svcdb => 'svc_broadband', + disabled => '' }) ) { %>
        'svc_broadband', <%=$part_svc->svcpart%>: <%=$part_svc->svc%> <% } %> +<% } %> +

        -- cgit v1.2.1 From 526a7b2f5b8675b086745cf3fa5cfa6366fd67cf Mon Sep 17 00:00:00 2001 From: khoff Date: Wed, 15 Oct 2003 23:17:19 +0000 Subject: $router isn't a global. --- httemplate/browse/router.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/browse/router.cgi b/httemplate/browse/router.cgi index a9ec6fd61..feee4ecaa 100644 --- a/httemplate/browse/router.cgi +++ b/httemplate/browse/router.cgi @@ -18,7 +18,7 @@ my $p2 = popurl(2); Router name Address block(s) -<% foreach $router (sort {$a->routernum <=> $b->routernum} @router) { +<% foreach my $router (sort {$a->routernum <=> $b->routernum} @router) { my @addr_block = $router->addr_block; %> -- cgit v1.2.1 From 03ea266c86cbaa01900755f754db791a866bf951 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 16 Oct 2003 13:48:31 +0000 Subject: fix Text::Template link --- httemplate/docs/billing.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/docs/billing.html b/httemplate/docs/billing.html index c78a87f04..1d6f8c4fc 100644 --- a/httemplate/docs/billing.html +++ b/httemplate/docs/billing.html @@ -11,7 +11,7 @@
      • Credit card decline alerts: Customize the declinetemplate configuration option and set the emaildecline configuration option.
      • Optional: Invoice template customization
          -
        • See the Text::Template documentation for details on the substitution language. +
        • See the Text::Template documentation for details on the substitution language.
        • You must call the invoice_lines() function at least once - pass it a number of lines, and it returns a list of array references, each of two elements: a service description column, and a price column. Alternatively, call invoice_lines() with no arguments, and pagination will be disabled - all invoice line items will print on one page, with no padding (recommended for email invoices).
        • In addition, the following variables are available:
            -- cgit v1.2.1 From 2696b950330fd4fd232b62262b7b47256a2e2a04 Mon Sep 17 00:00:00 2001 From: khoff Date: Thu, 16 Oct 2003 22:57:30 +0000 Subject: Telnet/SSH router export for svc_broadband. --- FS/FS/part_export/router.pm | 166 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 FS/FS/part_export/router.pm diff --git a/FS/FS/part_export/router.pm b/FS/FS/part_export/router.pm new file mode 100644 index 000000000..1d1f907e2 --- /dev/null +++ b/FS/FS/part_export/router.pm @@ -0,0 +1,166 @@ +package FS::part_export::router; + +=head1 FS::part_export::router + +This export connects to a router and transmits commands via telnet or SSH. +It requires the following custom router fields: + +=over 4 + +=item admin_address - IP address (or hostname) to connect + +=item admin_user - username for admin access + +=item admin_password - password for admin access + +=back + +The export itself needs the following options: + +=over 4 + +=item insert, replace, delete - command strings (to be interpolated) + +=item Prompt - prompt string to expect from router after successful login + +=item Timeout - time to wait for prompt string + +=back + +(Prompt and Timeout are required only for telnet connections.) + +=cut + +use vars qw(@ISA @saltset); +use String::ShellQuote; +use FS::part_export; + +@ISA = qw(FS::part_export); + +@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); + +sub rebless { shift; } + +sub _export_insert { + my($self) = shift; + $self->_export_command('insert', @_); +} + +sub _export_delete { + my($self) = shift; + $self->_export_command('delete', @_); +} + +sub _export_suspend { + my($self) = shift; + $self->_export_command('suspend', @_); +} + +sub _export_unsuspend { + my($self) = shift; + $self->_export_command('unsuspend', @_); +} + +sub _export_command { + my ( $self, $action, $svc_broadband) = (shift, shift, shift); + my $command = $self->option($action); + return '' if $command =~ /^\s*$/; + + no strict 'vars'; + { + no strict 'refs'; + ${$_} = $svc_broadband->getfield($_) foreach $svc_broadband->fields; + } + # fetch router info + my $router = $svc_broadband->addr_block->router; + my %r; + $r{$_} = $router->getfield($_) foreach $router->virtual_fields; + #warn qq("$command"); + #warn eval(qq("$command")); + + warn "admin_address: '$r{admin_address}'"; + + if ($r{admin_address} ne '') { + $self->router_queue( $svc_broadband->svcnum, $self->option('protocol'), + user => $r{admin_user}, + password => $r{admin_password}, + host => $r{admin_address}, + Timeout => $self->option('Timeout'), + Prompt => $self->option('Prompt'), + command => eval(qq("$command")), + ); + } else { + return ''; + } +} + +sub _export_replace { + + # We don't handle the case of a svc_broadband moving between routers. + # If you want to do that, reprovision the service. + + my($self, $new, $old ) = (shift, shift, shift); + my $command = $self->option('replace'); + no strict 'vars'; + { + no strict 'refs'; + ${"old_$_"} = $old->getfield($_) foreach $old->fields; + ${"new_$_"} = $new->getfield($_) foreach $new->fields; + } + + my $router = $new->addr_block->router; + my %r; + $r{$_} = $router->getfield($_) foreach $router->virtual_fields; + + if ($r{admin_address} ne '') { + $self->router_queue( $new->svcnum, $self->option('protocol'), + user => $r{admin_user}, + password => $r{admin_password}, + host => $r{admin_address}, + Timeout => $self->option('Timeout'), + Prompt => $self->option('Prompt'), + command => eval(qq("$command")), + ); + } else { + return ''; + } +} + +#a good idea to queue anything that could fail or take any time +sub router_queue { + #warn join ':', @_; + my( $self, $svcnum, $protocol ) = (shift, shift, shift); + my $queue = new FS::queue { + 'svcnum' => $svcnum, + }; + $queue->job ("FS::part_export::router::".$protocol."_cmd"); + $queue->insert( @_ ); +} + +sub ssh_cmd { #subroutine, not method + use Net::SSH '0.07'; + &Net::SSH::ssh_cmd( { @_ } ); +} + +sub telnet_cmd { + use Net::Telnet; + + warn join(', ', @_); + + my %arg = @_; + + my $t = new Net::Telnet (Timeout => $arg{Timeout}, + Prompt => $arg{Prompt}); + $t->open($arg{host}); + $t->login($arg{user}, $arg{password}); + my @error = $t->cmd($arg{command}); + die @error if (grep /^ERROR/, @error); +} + +#sub router_insert { #subroutine, not method +#} +#sub router_replace { #subroutine, not method +#} +#sub router_delete { #subroutine, not method +#} + -- cgit v1.2.1 From 23e2dbc925c01f035984b3a7f3dccfa5ff7c4ccf Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 19 Oct 2003 18:08:36 +0000 Subject: fix CPAN link --- httemplate/docs/install.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 4d3a63958..1355a113c 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -18,7 +18,7 @@ Before installing, you need: MySQL's default MyISAM and ISAM table types are not supported. If you want to use MySQL, you must use one of the new transaction-safe table types such as BDB or InnoDB, and set it as the default table type using the --default-table-type=BDB or --default-table-type=InnoDB mysqld command-line option or by setting default-table-type=BDB or default-table-type=InnoDB in the my.cnf option file.
          -
        • Perl modules (CPAN will query, download and build perl modules automatically) +
        • Perl modules (CPAN will query, download and build perl modules automatically)
            -- cgit v1.2.1 From db8213a6e1f89a0ff5f6e8a4ee40ce3db59d1c09 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 20 Oct 2003 02:28:44 +0000 Subject: adding openbsd and red hat installs --- install/openbsd/INSTALL | 54 +++++++++++++++++++++++++++++++++++++++++++ install/openbsd/cpan | 15 ++++++++++++ install/openbsd/ports | 24 +++++++++++++++++++ install/redhat/9/INSTALL | 14 +++++++++++ install/redhat/9/sources.list | 2 ++ 5 files changed, 109 insertions(+) create mode 100644 install/openbsd/INSTALL create mode 100644 install/openbsd/cpan create mode 100644 install/openbsd/ports create mode 100644 install/redhat/9/INSTALL create mode 100644 install/redhat/9/sources.list diff --git a/install/openbsd/INSTALL b/install/openbsd/INSTALL new file mode 100644 index 000000000..1beef9208 --- /dev/null +++ b/install/openbsd/INSTALL @@ -0,0 +1,54 @@ +#!/bin/sh + +DIR=`pwd` + +#cd /usr/ports +#cvs -q -d anoncvs@anoncvs6.usa.openbsd.org:/cvs up -r OPENBSD_`uname -r | perl -pe 's/\./_/g;'` -Pd + +for a in `grep -v '^ *#' $DIR/ports` +do cd /usr/ports/$a + make install +done + +for a in `grep -v '^ *#' $DIR/cpan` +do perl -MCPAN -e "install $a" +done + +#from /usr/local/share/doc/postgresql/README.OpenBSD +useradd -c "PostgreSQL Admin User" -g =uid -m -d /var/postgresql -s /bin/sh postgresql + +su -l postgresql -c 'mkdir /var/postgresql/data' +su -l postgresql -c 'initdb -D /var/postgresql/data' + +cat <>/etc/rc.local +if [ -x /usr/local/bin/pg_ctl ]; then + su -l postgresql -c "/usr/local/bin/pg_ctl start \ + -D /var/postgresql/data -l /var/postgresql/logfile \ + -o '-D /var/postgresql/data'" + echo -n ' postgresql' +fi +END + +cat <>/etc/rc.shutdown +if [ -f /var/postgresql/data/postmaster.pid ]; then + su -l postgresql -c "/usr/local/bin/pg_ctl stop -m fast \ + -D /var/postgresql/data" + rm -f /var/postgresql/data/postmaster.pid +fi + +su -l postgresql -c "/usr/local/bin/pg_ctl start \ + -D /var/postgresql/data -l /var/postgresql/logfile \ + -o '-D /var/postgresql/data'" + +useradd -c "Freeside" -g =uid -m freeside +su -l postgresql -c 'createuser -P freeside' +su -l freeside -c 'createdb freeside' + +#? +cd ../.. +make install-perl-modules +make create-config +make deploy + +#edit apache config, etc. + diff --git a/install/openbsd/cpan b/install/openbsd/cpan new file mode 100644 index 000000000..4304b726c --- /dev/null +++ b/install/openbsd/cpan @@ -0,0 +1,15 @@ +DBIx::DBSchema +Time::Duration +Business::CreditCard +String::ShellQuote +Net::SSH +HTML::Mason +HTML::Widgets::SelectLayers +DBIx::DataSource +Date::Manip +String::Approx +Tie::IxHash +Date::Parse +File::CounterFile +Net::SCP +Mail::Internet diff --git a/install/openbsd/ports b/install/openbsd/ports new file mode 100644 index 000000000..3e17d8272 --- /dev/null +++ b/install/openbsd/ports @@ -0,0 +1,24 @@ +shells/zsh +misc/screen +#www/apache13-modssl +www/mod_perl +net/rsync +databases/postgresql +converters/p5-MIME-Base64 +security/p5-Digest-MD5 +security/p5-MD5 +www/p5-HTML-Tagset +www/p5-HTML-Parser +net/p5-libnet +misc/p5-Locale-Codes +net/p5-Net-Whois +www/p5-libwww +#mail/p5-Mail-Tools +devel/p5-FreezeThaw +textproc/p5-Text-Template +databases/p5-DBI +databases/p5-DBD-Pg +#databases/p5-DBD-Msql-Mysql +www/p5-Apache-ASP +devel/p5-Storable +www/p5-Apache-DBI diff --git a/install/redhat/9/INSTALL b/install/redhat/9/INSTALL new file mode 100644 index 000000000..4c07f88e8 --- /dev/null +++ b/install/redhat/9/INSTALL @@ -0,0 +1,14 @@ +#!/bin/sh + +wget ftp://apt-rpm.tuxfamily.org/apt/redhat/7.3/en/i386/RPMS.extra/apt-*i386.rpm +rpm -i apt*i386.rpm +cp sources.list /etc/apt/ +apt-get update; apt-get update +apt-get install apache mod_ssl mod_perl perl-CGI perl-CPAN perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-DateManip perl-Digest-MD5 perl-HTML-Parser perl-HTML-Tagset perl-MIME-Base64 perl-Storable perl-TimeDate perl-URI perl-libnet perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server screen zsh lftp cvs #openssh + +perl -MCPAN -e"install Locale::Country, Net::Whois, Business::CreditCard, \ + Mail::Internet, File::CounterFile, FreezeThaw, \ + String::Approx, Text::Template, DBIx::DataSource, \ + DBIx::DBSchema, Net::SSH, String::ShellQuote, \ + Net::SCP, Apache::ASP, Tie::IxHash, Time::Duration, \ + HTML::Widgets::SelectLayers, Apache::DBI" diff --git a/install/redhat/9/sources.list b/install/redhat/9/sources.list new file mode 100644 index 000000000..9a9ad5cdf --- /dev/null +++ b/install/redhat/9/sources.list @@ -0,0 +1,2 @@ +rpm ftp://apt-rpm.tuxfamily.org/apt redhat/7.3/en/i386 os updates extra +rpm-src ftp://apt-rpm.tuxfamily.org/apt redhat/7.3/en/i386 os updates extra -- cgit v1.2.1 From 56c3927f50ecd1ee957a52d76871557bd8813670 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 20 Oct 2003 02:35:48 +0000 Subject: update for rh9 --- install/redhat/9/INSTALL | 5 +++-- install/redhat/9/sources.list | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/install/redhat/9/INSTALL b/install/redhat/9/INSTALL index 4c07f88e8..78c718dd7 100644 --- a/install/redhat/9/INSTALL +++ b/install/redhat/9/INSTALL @@ -1,10 +1,11 @@ #!/bin/sh -wget ftp://apt-rpm.tuxfamily.org/apt/redhat/7.3/en/i386/RPMS.extra/apt-*i386.rpm +wget ftp://apt-rpm.tuxfamily.org/apt/redhat/9/en/i386/RPMS.extra/apt-*i386.rpm rpm -i apt*i386.rpm cp sources.list /etc/apt/ apt-get update; apt-get update -apt-get install apache mod_ssl mod_perl perl-CGI perl-CPAN perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-DateManip perl-Digest-MD5 perl-HTML-Parser perl-HTML-Tagset perl-MIME-Base64 perl-Storable perl-TimeDate perl-URI perl-libnet perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server screen zsh lftp cvs #openssh +#apt-get install apache mod_ssl mod_perl perl-CGI perl-CPAN perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-DateManip perl-Digest-MD5 perl-HTML-Parser perl-HTML-Tagset perl-MIME-Base64 perl-Storable perl-TimeDate perl-URI perl-libnet perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server screen zsh lftp cvs #openssh +apt-get install perl-CGI perl-CPAN perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-DateManip perl-Digest-MD5 perl-HTML-Parser perl-HTML-Tagset perl-MIME-Base64 perl-Storable perl-TimeDate perl-URI perl-libnet perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server screen zsh lftp cvs #openssh perl -MCPAN -e"install Locale::Country, Net::Whois, Business::CreditCard, \ Mail::Internet, File::CounterFile, FreezeThaw, \ diff --git a/install/redhat/9/sources.list b/install/redhat/9/sources.list index 9a9ad5cdf..f6f21f4c9 100644 --- a/install/redhat/9/sources.list +++ b/install/redhat/9/sources.list @@ -1,2 +1,2 @@ -rpm ftp://apt-rpm.tuxfamily.org/apt redhat/7.3/en/i386 os updates extra -rpm-src ftp://apt-rpm.tuxfamily.org/apt redhat/7.3/en/i386 os updates extra +rpm ftp://apt-rpm.tuxfamily.org/apt redhat/9/en/i386 os updates extra +rpm-src ftp://apt-rpm.tuxfamily.org/apt redhat/9/en/i386 os updates extra -- cgit v1.2.1 From ea1d9968a9439272b58593e6b2ccbb3869002b20 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 20 Oct 2003 04:25:18 +0000 Subject: daily/weekly billing --- FS/FS/cust_main.pm | 22 +++++++++++++-- FS/FS/part_pkg.pm | 10 ++++++- FS/bin/freeside-setup | 2 +- httemplate/docs/upgrade10.html | 64 +++++++++++++++++++++++++++++++++++++++++- httemplate/edit/part_pkg.cgi | 51 +++++++++++++++++++++++++++++---- 5 files changed, 137 insertions(+), 12 deletions(-) diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 58cfc0c76..0283e3d04 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1089,7 +1089,7 @@ sub bill { #bill recurring fee my $recur = 0; my $sdate; - if ( $part_pkg->getfield('freq') > 0 && + if ( $part_pkg->getfield('freq') ne '0' && ! $cust_pkg->getfield('susp') && ( $cust_pkg->getfield('bill') || 0 ) <= $time ) { @@ -1127,8 +1127,19 @@ sub bill { $cust_pkg->last_bill($sdate) if $cust_pkg->dbdef_table->column('last_bill'); - $mon += $part_pkg->freq; - until ( $mon < 12 ) { $mon -= 12; $year++; } + if ( $part_pkg->freq =~ /^\d+$/ ) { + $mon += $part_pkg->freq; + until ( $mon < 12 ) { $mon -= 12; $year++; } + } elsif ( $part_pkg->freq =~ /^(\d+)w$/ ) { + my $weeks = $1; + $mday += $weeks * 7; + } elsif ( $part_pkg->freq =~ /^(\d+)d$/ ) { + my $days = $1; + $mday += $days; + } else { + $dbh->rollback if $oldAutoCommit; + return "unparsable frequency: ". $part_pkg->freq; + } $cust_pkg->setfield('bill', timelocal_nocheck($sec,$min,$hour,$mday,$mon,$year)); $cust_pkg_mod_flag = 1; @@ -1208,6 +1219,11 @@ sub bill { my ($mon,$year) = (localtime($sdate) )[4,5]; $mon++; my $freq = $part_pkg->freq || 1; + if ( $freq !~ /(\d+)$/ ) { + $dbh->rollback if $oldAutoCommit; + return "daily/weekly package definitions not (yet?)". + " compatible with monthly tax exemptions"; + } my $taxable_per_month = sprintf("%.2f", $taxable_charged / $freq ); foreach my $which_month ( 1 .. $freq ) { my %hash = ( diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm index 12ee804ff..695d48ceb 100644 --- a/FS/FS/part_pkg.pm +++ b/FS/FS/part_pkg.pm @@ -229,11 +229,19 @@ sub check { } + if ( $self->dbdef_table->column('freq')->type =~ /(int)/i ) { + my $error = $self->ut_number('freq'); + return $error if $error; + } else { + $self->freq =~ /^(\d+[dw]?)$/ + or return "Illegal or empty freq: ". $self->freq; + $self->freq($1); + } + $self->ut_numbern('pkgpart') || $self->ut_text('pkg') || $self->ut_text('comment') || $self->ut_anything('setup') - || $self->ut_number('freq') || $self->ut_anything('recur') || $self->ut_alphan('plan') || $self->ut_anything('plandata') diff --git a/FS/bin/freeside-setup b/FS/bin/freeside-setup index b7b45dc63..375a63c2f 100755 --- a/FS/bin/freeside-setup +++ b/FS/bin/freeside-setup @@ -678,7 +678,7 @@ sub tables_hash_hack { 'pkg', 'varchar', '', $char_d, 'comment', 'varchar', '', $char_d, 'setup', @perl_type, - 'freq', 'int', '', '', #billing frequency (months) + 'freq', 'varchar', '', $char_d, #billing frequency 'recur', @perl_type, 'setuptax', 'char', 'NULL', 1, 'recurtax', 'char', 'NULL', 1, diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html index 4a6baa59b..446090503 100644 --- a/httemplate/docs/upgrade10.html +++ b/httemplate/docs/upgrade10.html @@ -62,6 +62,68 @@ CREATE TABLE svc_broadband ( PRIMARY KEY (svcnum) ); +CREATE TABLE acct_snarf ( + snarfnum serial, + svcnum int NOT NULL, + machine varchar(255) NULL, + protocol varchar(80) NULL, + username varchar(80) NULL, + _password varchar(80) NULL, + PRIMARY KEY (snarfnum) +); +CREATE INDEX acct_snarf1 ON acct_snarf ( svcnum ); + +CREATE TABLE part_pkg_temp ( + pkgpart serial NOT NULL, + pkg varchar(80) NOT NULL, + "comment" varchar(80) NOT NULL, + setup text NULL, + freq varchar(80) NOT NULL, + recur text NULL, + setuptax char(1) NULL, + recurtax char(1) NULL, + plan varchar(80) NULL, + plandata text NULL, + disabled char(1) NULL, + taxclass varchar(80) NULL, + PRIMARY KEY (pkgpart), +); +INSERT INTO part_pkg_temp SELECT * from part_pkg; +DROP TABLE part_pkg; +ALTER TABLE part_pkg_temp RENAME TO part_pkg; +ALTER TABLE part_pkg DROP CONSTRAINT part_pkg_temp_pkey; +ALTER TABLE part_pkg ADD PRIMARY KEY (pkgpart); +CREATE INDEX part_pkg1 ON part_pkg(disabled); +select setval('public.part_pkg_temp_pkgpart_seq', ( select max(pkgpart) from part_pkg) ); #? + +CREATE TABLE h_part_pkg_temp ( + historynum serial NOT NULL, + history_date int, + history_user varchar(80) NOT NULL, + history_action varchar(80) NOT NULL, + pkgpart int NOT NULL, + pkg varchar(80) NOT NULL, + "comment" varchar(80) NOT NULL, + setup text NULL, + freq varchar(80) NOT NULL, + recur text NULL, + setuptax char(1) NULL, + recurtax char(1) NULL, + plan varchar(80) NULL, + plandata text NULL, + disabled char(1) NULL, + taxclass varchar(80) NULL, + PRIMARY KEY (historynum) +); +INSERT INTO h_part_pkg_temp SELECT * from h_part_pkg; +DROP TABLE h_part_pkg; +ALTER TABLE h_part_pkg_temp RENAME TO h_part_pkg; +ALTER TABLE h_part_pkg DROP CONSTRAINT h_part_pkg_temp_pkey; +ALTER TABLE h_part_pkg ADD PRIMARY KEY (historynum); +CREATE INDEX h_part_pkg1 ON h_part_pkg(disabled); +select setval('public.h_part_pkg_temp_historynum_seq', ( select max(historynum) from h_part_pkg) ); + + DROP INDEX cust_bill_pkg1; ALTER TABLE cust_bill_pkg ADD itemdesc varchar(80) NULL; @@ -106,7 +168,7 @@ optionally: mandatory again: dbdef-create username -create-history-tables username cust_bill_pkg_detail router part_svc_router addr_block svc_broadband +create-history-tables username cust_bill_pkg_detail router part_svc_router addr_block svc_broadband acct_snarf dbdef-create username apache - fix sections to include .html also diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index dee356250..daa5b7483 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -66,12 +66,51 @@ print '
            '; #print qq!!, print "Package Part #", $hashref->{pkgpart} ? $hashref->{pkgpart} : "(NEW)"; -print ntable("#cccccc",2), <Package (customer-visible) -Comment (customer-hidden) -Frequency (months) of recurring fee  0=no recurring fee, 1=monthly, 3=quarterly, 12=yearly -Setup fee tax exempt -END +my %freq; +tie %freq, 'Tie::IxHash', + '0' => '(no recurring fee)', + '1d' => 'daily', + '1w' => 'weekly', + '2w' => 'biweekly (every 2 weeks)', + '1' => 'monthly', + '2' => 'bimonthly (every 2 months)', + '3' => 'quarterly (every 3 months)', + '6' => 'semiannually (every 6 months)', + '12' => 'annually', + '24' => 'biannually (every 2 years)', +; +if ( $part_pkg->dbdef_table->column('freq')->type =~ /(int)/i ) { + delete $freq{$_} foreach grep { ! /^\d+$/ } keys %freq; +} + +%> +<%= ntable("#cccccc",2) %> + + Package (customer-visible) + + + + + + Comment (customer-hidden) + + + + + + Recurring fee frequency + + + + + + Setup fee tax exempt + +<% print '{setuptax} eq "Y"; -- cgit v1.2.1 From f6c14a1aa55d317747e56d4c0d669b4c902018c4 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 20 Oct 2003 05:01:51 +0000 Subject: finish up weekly billing --- FS/FS/cust_main.pm | 2 +- httemplate/edit/part_pkg.cgi | 1 + httemplate/view/cust_main.cgi | 17 ++++++++++------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 0283e3d04..2ba0ff046 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1215,7 +1215,7 @@ sub bill { || $tax->recurtax =~ /^Y$/i; next unless $taxable_charged; - if ( $tax->exempt_amount ) { + if ( $tax->exempt_amount > 0 ) { my ($mon,$year) = (localtime($sdate) )[4,5]; $mon++; my $freq = $part_pkg->freq || 1; diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index daa5b7483..862e98ecf 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -66,6 +66,7 @@ print ''; #print qq!!, print "Package Part #", $hashref->{pkgpart} ? $hashref->{pkgpart} : "(NEW)"; +#false laziness w/view/cust_main.cgi my %freq; tie %freq, 'Tie::IxHash', '0' => '(no recurring fee)', diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index fb3f0f111..83f114ef9 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -412,14 +412,17 @@ foreach my $pkg (sort pkgsort_pkgnum_cancel @$packages) { sub freq { + #false laziness w/edit/part_pkg.cgi my %freq = ( #move this - 1 => 'monthly', - 2 => 'bi-monthly', - 3 => 'quarterly', - 6 => 'semi-annually', - 12 => 'annually', - 24 => 'bi-annually', - 36 => 'tri-annually', + '1d' => 'daily', + '1w' => 'weekly', + '2w' => 'biweekly (every 2 weeks)', + '1' => 'monthly', + '2' => 'bimonthly (every 2 months)', + '3' => 'quarterly (every 3 months)', + '6' => 'semiannually (every 6 months)', + '12' => 'annually', + '24' => 'biannually (every 2 years)', ); my $freq = shift; -- cgit v1.2.1 From 991b6184840504c5869fd75af5da4097c4993163 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 20 Oct 2003 18:59:22 +0000 Subject: add passive flag to wget --- install/redhat/7.3/INSTALL | 2 +- install/redhat/9/INSTALL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/redhat/7.3/INSTALL b/install/redhat/7.3/INSTALL index 4c07f88e8..8eff42bfc 100644 --- a/install/redhat/7.3/INSTALL +++ b/install/redhat/7.3/INSTALL @@ -1,6 +1,6 @@ #!/bin/sh -wget ftp://apt-rpm.tuxfamily.org/apt/redhat/7.3/en/i386/RPMS.extra/apt-*i386.rpm +wget --passive-ftp ftp://apt-rpm.tuxfamily.org/apt/redhat/7.3/en/i386/RPMS.extra/apt-*i386.rpm rpm -i apt*i386.rpm cp sources.list /etc/apt/ apt-get update; apt-get update diff --git a/install/redhat/9/INSTALL b/install/redhat/9/INSTALL index 78c718dd7..b66086894 100644 --- a/install/redhat/9/INSTALL +++ b/install/redhat/9/INSTALL @@ -1,6 +1,6 @@ #!/bin/sh -wget ftp://apt-rpm.tuxfamily.org/apt/redhat/9/en/i386/RPMS.extra/apt-*i386.rpm +wget --passive-ftp ftp://apt-rpm.tuxfamily.org/apt/redhat/9/en/i386/RPMS.extra/apt-*i386.rpm rpm -i apt*i386.rpm cp sources.list /etc/apt/ apt-get update; apt-get update -- cgit v1.2.1 From 752fb0dc07d9a67f0edffeae646b518393d45872 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 21 Oct 2003 00:07:49 +0000 Subject: update rh9 install foo --- install/redhat/9/INSTALL | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/install/redhat/9/INSTALL b/install/redhat/9/INSTALL index b66086894..0e24fbbad 100644 --- a/install/redhat/9/INSTALL +++ b/install/redhat/9/INSTALL @@ -1,15 +1,22 @@ #!/bin/sh + wget --passive-ftp ftp://apt-rpm.tuxfamily.org/apt/redhat/9/en/i386/RPMS.extra/apt-*i386.rpm rpm -i apt*i386.rpm cp sources.list /etc/apt/ apt-get update; apt-get update #apt-get install apache mod_ssl mod_perl perl-CGI perl-CPAN perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-DateManip perl-Digest-MD5 perl-HTML-Parser perl-HTML-Tagset perl-MIME-Base64 perl-Storable perl-TimeDate perl-URI perl-libnet perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server screen zsh lftp cvs #openssh -apt-get install perl-CGI perl-CPAN perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-DateManip perl-Digest-MD5 perl-HTML-Parser perl-HTML-Tagset perl-MIME-Base64 perl-Storable perl-TimeDate perl-URI perl-libnet perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server screen zsh lftp cvs #openssh + +apt-get install perl-Devel-Symdump perl-BSD-Resource + +wget --passive-ftp http://reb00t.com/linux/RPMS/redhat-9/apache/apache-1.3.28-0.n0i.i686.rpm http://reb00t.com/linux/RPMS/redhat-9/mm/mm-1.2.1-0.n0i.i686.rpm ftp://at.rpmfind.net/linux/redhat.com/dist/linux/beta/severn/en/os/i386/RedHat/RPMS/db4-4.1.25-10.i386.rpm +rpm -i db4-4.1.25-10.i386.rpm mm-1.2.1-0.n0i.i686.rpm apache-1.3.28-0.n0i.i686.rpm + +apt-get install perl-CGI perl-CPAN perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-DateManip perl-HTML-Parser perl-HTML-Tagset perl-TimeDate perl-URI perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server screen zsh lftp cvs #openssh perl -MCPAN -e"install Locale::Country, Net::Whois, Business::CreditCard, \ Mail::Internet, File::CounterFile, FreezeThaw, \ String::Approx, Text::Template, DBIx::DataSource, \ DBIx::DBSchema, Net::SSH, String::ShellQuote, \ Net::SCP, Apache::ASP, Tie::IxHash, Time::Duration, \ - HTML::Widgets::SelectLayers, Apache::DBI" + HTML::Widgets::SelectLayers, Apache::DBI, Cache::Cache" -- cgit v1.2.1 From 6a82984a55a00f5f127db1ac3bd5b79b4a277d13 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 21 Oct 2003 01:28:51 +0000 Subject: more rh9 install foo --- install/redhat/9/INSTALL | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/install/redhat/9/INSTALL b/install/redhat/9/INSTALL index 0e24fbbad..2fecd1164 100644 --- a/install/redhat/9/INSTALL +++ b/install/redhat/9/INSTALL @@ -9,8 +9,14 @@ apt-get update; apt-get update apt-get install perl-Devel-Symdump perl-BSD-Resource -wget --passive-ftp http://reb00t.com/linux/RPMS/redhat-9/apache/apache-1.3.28-0.n0i.i686.rpm http://reb00t.com/linux/RPMS/redhat-9/mm/mm-1.2.1-0.n0i.i686.rpm ftp://at.rpmfind.net/linux/redhat.com/dist/linux/beta/severn/en/os/i386/RedHat/RPMS/db4-4.1.25-10.i386.rpm -rpm -i db4-4.1.25-10.i386.rpm mm-1.2.1-0.n0i.i686.rpm apache-1.3.28-0.n0i.i686.rpm +wget --passive-ftp http://reb00t.com/linux/RPMS/redhat-9/apache/apache-1.3.28-0.n0i.src.rpm http://reb00t.com/linux/RPMS/redhat-9/mm/mm-1.2.1-0.n0i.i686.rpm http://reb00t.com/linux/RPMS/redhat-9/mm/mm-devel-1.2.1-0.n0i.i686.rpm +rpm -i mm-1.2.1-0.n0i.i686.rpm mm-devel-1.2.1-0.n0i.i686.rpm apache-1.3.28-0.n0i.src.rpm + +cd /usr/src/redhat/SPECS +rpmbuild -ba apache.spec + +cd /usr/src/redhat/RPMS/i386 +rpm -i apache-1.3.28-0.n0i.i386.rpm apt-get install perl-CGI perl-CPAN perl-DBD-MySQL perl-DBD-Pg perl-DBI perl-DateManip perl-HTML-Parser perl-HTML-Tagset perl-TimeDate perl-URI perl-libwww-perl perl-suidperl rsync postgresql postgresql-docs postgresql-libs postgresql-server screen zsh lftp cvs #openssh @@ -20,3 +26,25 @@ perl -MCPAN -e"install Locale::Country, Net::Whois, Business::CreditCard, \ DBIx::DBSchema, Net::SSH, String::ShellQuote, \ Net::SCP, Apache::ASP, Tie::IxHash, Time::Duration, \ HTML::Widgets::SelectLayers, Apache::DBI, Cache::Cache" + +#edit /etc/init.d/httpd, add -DHAVE_PERL -DHAVE_SSL, then remove perl & ssl +# module load bits from /etc/httpd/conf/httpd.conf + +useradd freeside + +chkconfig postgresql on +/etc/init.d/postgresql start + +su postgres -c "createuser -P freeside" + +su freeside -c "createdb freeside" + +#? +cd ../.. +make install-perl-modules +make create-config +freeside-adduser -c -h /usr/local/etc/freeside/htpasswd ivan +su freeside -c 'freeside-setup ivan' +su freeside -c '/home/ivan/freeside/bin/populate-msgcat ivan' +make deploy + -- cgit v1.2.1 From e5b08c9a31a68826e00b90b62249a57a24ebb9e3 Mon Sep 17 00:00:00 2001 From: khoff Date: Wed, 22 Oct 2003 19:10:13 +0000 Subject: dbh is a global. --- httemplate/edit/process/router.cgi | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/httemplate/edit/process/router.cgi b/httemplate/edit/process/router.cgi index 7e40c48a7..a2fa46dd9 100644 --- a/httemplate/edit/process/router.cgi +++ b/httemplate/edit/process/router.cgi @@ -1,8 +1,5 @@ <% -use FS::UID qw(dbh); - -my $dbh = dbh; local $FS::UID::AutoCommit=0; sub check { @@ -10,7 +7,7 @@ sub check { if($error) { $cgi->param('error', $error); print $cgi->redirect(popurl(3) . "edit/router.cgi?". $cgi->query_string); - $dbh->rollback; + dbh->rollback; exit; } } @@ -38,7 +35,7 @@ check($error); if ($old) { @old_psr = $old->part_svc_router; - foreach $psr (@old_psr) { + foreach my $psr (@old_psr) { if($cgi->param('svcpart_'.$psr->svcpart) eq 'ON') { # do nothing } else { @@ -64,7 +61,7 @@ foreach($cgi->param) { # Yay, everything worked! -$dbh->commit or die $dbh->errstr; +dbh->commit or die dbh->errstr; print $cgi->redirect(popurl(3). "browse/router.cgi"); %> -- cgit v1.2.1 From aa71df24486955d494c30ccc14fbe5917029ddec Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 23 Oct 2003 07:49:56 +0000 Subject: Declined results from batches should now suspend the relevant customer. --- FS/FS/cust_pay_batch.pm | 69 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 21 deletions(-) diff --git a/FS/FS/cust_pay_batch.pm b/FS/FS/cust_pay_batch.pm index f53e55b94..8059f1ca2 100644 --- a/FS/FS/cust_pay_batch.pm +++ b/FS/FS/cust_pay_batch.pm @@ -188,6 +188,18 @@ sub check { $self->SUPER::check; } +=item cust_main + +Returns the customer (see L) for this batched credit card +payment. + +=cut + +sub cust_main { + my $self = shift; + qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); +} + =back =head1 SUBROUTINES @@ -212,8 +224,9 @@ sub import_results { my @fields; my $end_condition; my $end_hook; - my $condition; my $hook; + my $approved_condition; + my $declined_condition; if ( $format eq 'csv-td_canada_trust-merchant_pc_batch' ) { @@ -252,11 +265,6 @@ sub import_results { ''; }; - $condition = sub { - my $hash = shift; - $hash->{'result'} == 3 && $hash->{'type'} eq '0'; - }; - $hook = sub { my $hash = shift; $hash->{'paid'} = sprintf("%.2f", $hash->{'paid'} / 100 ); @@ -268,6 +276,18 @@ sub import_results { substr($hash->{'_date'}, 0, 4)-1900, ); }; + $approved_condition = sub { + my $hash = shift; + $hash->{'type'} eq '0' && $hash->{'result'} == 3; + }; + + $declined_condition = sub { + my $hash = shift; + $hash->{'type'} eq '0' && ( $hash->{'result'} == 4 + || $hash->{'result'} == 5 ); + }; + + } else { return "Unknown format $format"; } @@ -327,24 +347,31 @@ sub import_results { return "error removing paybatchnum $hash{'paybatchnum'}: $error\n"; } - next unless &{$condition}(\%hash); - &{$hook}(\%hash); - my $cust_pay = new FS::cust_pay ( { - 'custnum' => $custnum, - 'payby' => 'CARD', - 'paybatch' => $paybatch, - map { $_ => $hash{$_} } (qw( paid _date payinfo )), - } ); - $error = $cust_pay->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "error adding payment paybatchnum $hash{'paybatchnum'}: $error\n"; - } - $total += $hash{'paid'}; + if ( &{$approved_condition}(\%hash) ) { + + my $cust_pay = new FS::cust_pay ( { + 'custnum' => $custnum, + 'payby' => 'CARD', + 'paybatch' => $paybatch, + map { $_ => $hash{$_} } (qw( paid _date payinfo )), + } ); + $error = $cust_pay->insert; + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return "error adding payment paybatchnum $hash{'paybatchnum'}: $error\n"; + } + $total += $hash{'paid'}; + + $cust_pay->cust_main->apply_payments; - $cust_pay->cust_main->apply_payments; + } elsif ( &{$declined_condition}(\%hash) ) { + + #this should be configurable... if anybody else ever uses batches + $cust_pay_batch->cust_main->suspend; + + } } -- cgit v1.2.1 From 324a43d9fbc5cd64353229c63289bdb394407ae3 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 23 Oct 2003 09:02:24 +0000 Subject: fix cranky verbitage at the top --- httemplate/docs/legacy.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/docs/legacy.html b/httemplate/docs/legacy.html index 678780962..94efe53af 100755 --- a/httemplate/docs/legacy.html +++ b/httemplate/docs/legacy.html @@ -3,7 +3,7 @@

            Importing legacy data

            -In most cases, legacy data import all cases will require writing custom code to deal with your particular legacy data. The example scripts here will not work "out-of-the-box". Importing your legacy data will most probably involve some hacking on the example scripts noted below. Contributions to the import process are welcome. +In almost all cases, legacy data import will require writing custom code to deal with your particular legacy data. The example scripts here will probably not work "out-of-the-box", and are provided as a starting point only.

            Some import scripts may require installation of the Array-PrintCols and Term-Query (make test broken; install manually) modules.
            • bin/bind.import - Import domain information from BIND named -- cgit v1.2.1 From 952ce66262265a57634240373c18ddb6d8dd57bd Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 23 Oct 2003 22:37:03 +0000 Subject: require DBIx::DBSchema 0.22 to deal with Pg version problems --- bin/dbdef-create | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/dbdef-create b/bin/dbdef-create index c977f876e..a449d67cc 100755 --- a/bin/dbdef-create +++ b/bin/dbdef-create @@ -1,10 +1,8 @@ #!/usr/bin/perl -Tw -# -# $Id: dbdef-create,v 1.6 2002-09-19 13:34:52 ivan Exp $ use strict; use DBI; -use DBIx::DBSchema 0.21; +use DBIx::DBSchema 0.22; use FS::UID qw(adminsuidsetup datasrc driver_name); my $user = shift or die &usage; -- cgit v1.2.1 From 368bc5c098a47c32db7c575f912683ebe8662f59 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 24 Oct 2003 00:39:50 +0000 Subject: referral listing now shows customer signups today and past week/30/60/90/6months/year/total --- httemplate/browse/part_referral.cgi | 49 ++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi index 084c21bd0..1a57a5b24 100755 --- a/httemplate/browse/part_referral.cgi +++ b/httemplate/browse/part_referral.cgi @@ -8,31 +8,56 @@ Where a customer heard about your service. Tracked for informational purposes. Add a new advertising source

              +<% + my $today = timelocal(0, 0, 0, (localtime(time))[3..5] ); + my %past; + tie %past, 'Tie::IxHash', + 'Today' => 0, + 'Past week' => 518400, # 60sec * 60min * 24hrs * 6days + 'Past 30 days' => 2505600, # 60sec * 60min * 24hrs * 29days + 'Past 60 days' => 5097600, # 60sec * 60min * 24hrs * 29days + 'Past 90 days' => 7689600, # 60sec * 60min * 24hrs * 29days + 'Past 6 months' => 15724800, # 60sec * 60min * 24hrs * 182days + 'Past year' => 31486000, # 60sec * 60min * 24hrs * 364days + 'Total' => $today, + ; + + my $sth = dbh->prepare("SELECT COUNT(*) FROM h_cust_main + WHERE refnum = ? + AND history_date > ? ") + or die dbh->errstr; +%> + <%= table() %> - Advertising source + Advertising source + >Customers + +<% for my $period ( keys %past ) { %> + <%= $period %> +<% } %> <% foreach my $part_referral ( sort { $a->getfield('refnum') <=> $b->getfield('refnum') } qsearch('part_referral',{}) ) { - my($hashref)=$part_referral->hashref; - print < - $hashref->{refnum} + <%= $part_referral->refnum %> - $hashref->{referral} + <%= $part_referral->referral %> + <% for my $period ( values %past ) { + $sth->execute($part_referral->refnum, $today-$period) + or die $sth->errstr; + my $number = $sth->fetchrow_arrayref->[0]; + %> + <%= $number %> + <% } %> -END - -} +<% } %> -print < -END - -%> -- cgit v1.2.1 From f69fa5bd9f1f7a51285c167a0a17d0a4f78b72a7 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 24 Oct 2003 00:50:50 +0000 Subject: UI: adjust alignment of stats --- httemplate/browse/part_referral.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi index 1a57a5b24..37eb32991 100755 --- a/httemplate/browse/part_referral.cgi +++ b/httemplate/browse/part_referral.cgi @@ -53,7 +53,7 @@ foreach my $part_referral ( sort { or die $sth->errstr; my $number = $sth->fetchrow_arrayref->[0]; %> - <%= $number %> + <%= $number %> <% } %> <% } %> -- cgit v1.2.1 From 07b53cca107614acdb9a8d66737f37fe2565d4ee Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 24 Oct 2003 05:52:01 +0000 Subject: adding cvv2 images --- httemplate/images/cvv2.png | Bin 0 -> 3854 bytes httemplate/images/cvv2_amex.png | Bin 0 -> 4573 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 httemplate/images/cvv2.png create mode 100644 httemplate/images/cvv2_amex.png diff --git a/httemplate/images/cvv2.png b/httemplate/images/cvv2.png new file mode 100644 index 000000000..4610dcbe6 Binary files /dev/null and b/httemplate/images/cvv2.png differ diff --git a/httemplate/images/cvv2_amex.png b/httemplate/images/cvv2_amex.png new file mode 100644 index 000000000..21c36a0ab Binary files /dev/null and b/httemplate/images/cvv2_amex.png differ -- cgit v1.2.1 From f63c0e821610c885f9f49d301eeccf804e1ca6d3 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 24 Oct 2003 19:30:44 +0000 Subject: cvv! --- FS/FS/ClientAPI/Signup.pm | 5 ++- FS/FS/cust_main.pm | 51 +++++++++++++++++++++++++--- FS/bin/freeside-setup | 1 + fs_signup/FS-SignupClient/SignupClient.pm | 2 ++ fs_signup/FS-SignupClient/cgi/cvv2.html | 25 ++++++++++++++ fs_signup/FS-SignupClient/cgi/cvv2.png | Bin 0 -> 3854 bytes fs_signup/FS-SignupClient/cgi/cvv2_amex.png | Bin 0 -> 4573 bytes fs_signup/FS-SignupClient/cgi/signup.cgi | 8 +++-- fs_signup/FS-SignupClient/cgi/signup.html | 27 ++++++++++++++- httemplate/docs/cvv2.html | 25 ++++++++++++++ httemplate/docs/schema.html | 1 + httemplate/docs/upgrade10.html | 4 ++- httemplate/edit/cust_main.cgi | 37 ++++++++++++++++++-- httemplate/edit/process/cust_main.cgi | 8 +++++ 14 files changed, 182 insertions(+), 12 deletions(-) create mode 100644 fs_signup/FS-SignupClient/cgi/cvv2.html create mode 100644 fs_signup/FS-SignupClient/cgi/cvv2.png create mode 100644 fs_signup/FS-SignupClient/cgi/cvv2_amex.png create mode 100644 httemplate/docs/cvv2.html diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index 5ca1f93ed..92fc6361d 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -60,6 +60,8 @@ sub signup_info { 'payby' => [ $conf->config('signup_server-payby') ], + 'cvv_enabled' => defined dbdef->table('cust_main')->column('paycvv'), + 'msgcat' => { map { $_=>gettext($_) } qw( passwords_dont_match invalid_card unknown_card_type not_a ) }, @@ -116,7 +118,8 @@ sub new_customer { map { $_ => $packet->{$_} } qw( last first ss company address1 address2 city county state zip country - daytime night fax payby payinfo paydate payname referral_custnum comments + daytime night fax payby payinfo paycvv paydate payname referral_custnum + comments ), } ); diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 2ba0ff046..0ab2aa50d 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -172,6 +172,8 @@ FS::Record. The following fields are currently supported: =item payinfo - card number, P.O., comp issuer (4-8 lowercase alphanumerics; think username) or prepayment identifier (see L) +=item paycvv - Card Verification Value, "CVV2" (also known as CVC2 or CID), the 3 or 4 digit number on the back (or front, for American Express) of the credit card + =item paydate - expiration date, mm/yyyy, m/yyyy, mm/yy or m/yy =item payname - name on card or billing name @@ -773,6 +775,21 @@ sub check { or return gettext('invalid_card'); # . ": ". $self->payinfo; return gettext('unknown_card_type') if cardtype($self->payinfo) eq "Unknown"; + if ( defined $self->dbdef_table->column('paycvv') ) { + if ( length($self->paycvv) ) { + if ( cardtype($self->payinfo) eq 'American Express card' ) { + $self->paycvv =~ /^(\d{4})$/ + or return "CVV2 (CID) for American Express cards is four digits."; + $self->paycvv($1); + } else { + $self->paycvv =~ /^(\d{3})$/ + or return "CVV2 (CVC2/CID) is three digits."; + $self->paycvv($1); + } + } else { + $self->paycvv(''); + } + } } elsif ( $self->payby eq 'CHEK' || $self->payby eq 'DCHK' ) { @@ -781,6 +798,7 @@ sub check { $payinfo =~ /^(\d+)\@(\d{9})$/ or return 'invalid echeck account@aba'; $payinfo = "$1\@$2"; $self->payinfo($payinfo); + $self->paycvv('') if $self->dbdef_table->column('paycvv'); } elsif ( $self->payby eq 'LECB' ) { @@ -789,11 +807,13 @@ sub check { $payinfo =~ /^1?(\d{10})$/ or return 'invalid btn billing telephone number'; $payinfo = $1; $self->payinfo($payinfo); + $self->paycvv('') if $self->dbdef_table->column('paycvv'); } elsif ( $self->payby eq 'BILL' ) { $error = $self->ut_textn('payinfo'); return "Illegal P.O. number: ". $self->payinfo if $error; + $self->paycvv('') if $self->dbdef_table->column('paycvv'); } elsif ( $self->payby eq 'COMP' ) { @@ -804,6 +824,7 @@ sub check { $error = $self->ut_textn('payinfo'); return "Illegal comp account issuer: ". $self->payinfo if $error; + $self->paycvv('') if $self->dbdef_table->column('paycvv'); } elsif ( $self->payby eq 'PREPAY' ) { @@ -814,6 +835,7 @@ sub check { return "Illegal prepayment identifier: ". $self->payinfo if $error; return "Unknown prepayment identifier" unless qsearchs('prepay_credit', { 'identifier' => $self->payinfo } ); + $self->paycvv('') if $self->dbdef_table->column('paycvv'); } @@ -1666,15 +1688,20 @@ sub realtime_bop { my %content; if ( $method eq 'CC' ) { + $content{card_number} = $self->payinfo; $self->paydate =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/; $content{expiration} = "$2/$1"; - if ( qsearch('cust_pay', { 'custnum' => $self->custnum, + + $content{cvv2} = $self->paycvv + if defined $self->dbdef_table->column('paycvv') + && length($self->paycvv); + + $content{recurring_billing} = 'YES' + if qsearch('cust_pay', { 'custnum' => $self->custnum, 'payby' => 'CARD', - 'payinfo' => $self->payinfo, } ) - ) { - $content{recurring_billing} = 'YES'; - } + 'payinfo' => $self->payinfo, } ); + } elsif ( $method eq 'ECHECK' ) { my($account_number,$routing_code) = $self->payinfo; ( $content{account_number}, $content{routing_code} ) = @@ -1759,6 +1786,20 @@ sub realtime_bop { } + #remove paycvv after initial transaction + #make this disable-able via a config option if anyone insists? + # (though that probably violates cardholder agreements) + if ( defined $self->dbdef_table->column('paycvv') + && length($self->paycvv) + ) { + my $new = new FS::cust_main { $self->hash }; + $new->paycvv(''); + my $error = $new->replace($self); + if ( $error ) { + warn "error removing cvv: $error\n"; + } + } + #result handling if ( $transaction->is_success() ) { diff --git a/FS/bin/freeside-setup b/FS/bin/freeside-setup index 375a63c2f..80b74c1f1 100755 --- a/FS/bin/freeside-setup +++ b/FS/bin/freeside-setup @@ -502,6 +502,7 @@ sub tables_hash_hack { 'ship_fax', 'varchar', 'NULL', 12, 'payby', 'char', '', 4, 'payinfo', 'varchar', 'NULL', $char_d, + 'paycvv', 'varchar', 'NULL', 4, #'paydate', @date_type, 'paydate', 'varchar', 'NULL', 10, 'payname', 'varchar', 'NULL', $char_d, diff --git a/fs_signup/FS-SignupClient/SignupClient.pm b/fs_signup/FS-SignupClient/SignupClient.pm index 1d91a418f..fb2b12fb0 100644 --- a/fs_signup/FS-SignupClient/SignupClient.pm +++ b/fs_signup/FS-SignupClient/SignupClient.pm @@ -43,6 +43,7 @@ FS::SignupClient - Freeside signup client API 'fax' => $fax, 'payby' => $payby, 'payinfo' => $payinfo, + 'paycvv' => $paycvv, 'paydate' => $paydate, 'payname' => $payname, 'invoicing_list' => $invoicing_list, @@ -125,6 +126,7 @@ a paramater with the following keys: fax payby payinfo + paycvv paydate payname invoicing_list diff --git a/fs_signup/FS-SignupClient/cgi/cvv2.html b/fs_signup/FS-SignupClient/cgi/cvv2.html new file mode 100644 index 000000000..b178c8513 --- /dev/null +++ b/fs_signup/FS-SignupClient/cgi/cvv2.html @@ -0,0 +1,25 @@ + + + + CVV2 information + + + + The CVV2 number (also called CVC2 or CID) is a three- or four-digit + security code used to reduce credit card fraud.

              + + + + + + + + +
              Visa / MasterCard / DiscoverAmerican Express
              + Visa/MasterCard/Discover + + American Express +
              +
              (close window)
              + + diff --git a/fs_signup/FS-SignupClient/cgi/cvv2.png b/fs_signup/FS-SignupClient/cgi/cvv2.png new file mode 100644 index 000000000..4610dcbe6 Binary files /dev/null and b/fs_signup/FS-SignupClient/cgi/cvv2.png differ diff --git a/fs_signup/FS-SignupClient/cgi/cvv2_amex.png b/fs_signup/FS-SignupClient/cgi/cvv2_amex.png new file mode 100644 index 000000000..21c36a0ab Binary files /dev/null and b/fs_signup/FS-SignupClient/cgi/cvv2_amex.png differ diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index 2458bcf19..70facb570 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ b/fs_signup/FS-SignupClient/cgi/signup.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: signup.cgi,v 1.46 2003-10-14 17:00:00 ivan Exp $ +# $Id: signup.cgi,v 1.47 2003-10-24 19:28:49 ivan Exp $ use strict; use vars qw( @payby $cgi $locales $packages @@ -8,7 +8,7 @@ use vars qw( @payby $cgi $locales $packages $init_data $error $last $first $ss $company $address1 $address2 $city $state $county $country $zip $daytime $night $fax $invoicing_list $payby $payinfo - $paydate $payname $referral_custnum $init_popstate + $paycvv $paydate $payname $referral_custnum $init_popstate $pkgpart $username $password $password2 $sec_phrase $popnum $agentnum $ieak_file $ieak_template $cck_file $cck_template @@ -178,6 +178,9 @@ if ( defined $cgi->param('magic') ) { $paydate = $cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ); $payname = $cgi->param( $payby. '_payname' ); + $paycvv = defined $cgi->param( $payby. '_paycvv' ) + ? $cgi->param( $payby. '_paycvv' ) + : ''; if ( $invoicing_list = $cgi->param('invoicing_list') ) { $invoicing_list .= ', POST' if $cgi->param('invoicing_list_POST'); @@ -252,6 +255,7 @@ if ( defined $cgi->param('magic') ) { 'fax' => $fax, 'payby' => $payby, 'payinfo' => $payinfo, + 'paycvv' => $paycvv, 'paydate' => $paydate, 'payname' => $payname, 'invoicing_list' => $invoicing_list, diff --git a/fs_signup/FS-SignupClient/cgi/signup.html b/fs_signup/FS-SignupClient/cgi/signup.html index 80774099c..dc4252c73 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.html +++ b/fs_signup/FS-SignupClient/cgi/signup.html @@ -1,5 +1,18 @@ ISP Signup form -ISP Signup form

              + + +ISP Signup form

              <%= $error %> @@ -101,6 +114,12 @@ Contact Information 'PREPAY' => qq!Prepaid card
              *!, ); + if ( $init_data->{'cvv_enabled'} ) { + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 + $payby{$payby} .= qq!
              CVV2 (help!; + } + } + my( $account, $aba ) = split('@', $payinfo); my %paybychecked = ( 'CARD' => qq!Credit card
              *$cardselect
              *Exp !. expselect("CARD", $paydate). qq!
              *Name on card
              !, @@ -113,6 +132,12 @@ Contact Information 'PREPAY' => qq!Prepaid card
              *!, ); + if ( $init_data->{'cvv_enabled'} ) { + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 + $paybychecked{$payby} .= qq!
              CVV2 (help!; + } + } + for (@payby) { if ( scalar(@payby) == 1) { $OUT .= ''. diff --git a/httemplate/docs/cvv2.html b/httemplate/docs/cvv2.html new file mode 100644 index 000000000..fe8a17f6f --- /dev/null +++ b/httemplate/docs/cvv2.html @@ -0,0 +1,25 @@ + + + + CVV2 information + + + + The CVV2 number (also called CVC2 or CID) is a three- or four-digit + security code used to reduce credit card fraud.

              + + + + + + + + +
              Visa / MasterCard / DiscoverAmerican Express
              + Visa/MasterCard/Discover + + American Express +
              +
              (close window)
              + + diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index bef567186..06be8960d 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -121,6 +121,7 @@
            • ship_fax
            • payby - CARD, DCHK, CHEK, DCHK, LECB, BILL, or COMP
            • payinfo - card number, P.O.#, or comp issuer +
            • paycvv - Card Verification Value, "CVV2" (also known as CVC2 or CID), the 3 or 4 digit number on the back (or front, for American Express) of the credit card
            • paydate - expiration date
            • payname - billing name (name on card)
            • tax - tax exempt, Y or null diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html index 446090503..080528bac 100644 --- a/httemplate/docs/upgrade10.html +++ b/httemplate/docs/upgrade10.html @@ -1,7 +1,7 @@
               this is incomplete
               
              -install DBIx::DBSchema 0.21
              +install DBIx::DBSchema 0.22
               
               install NetAddr::IP and Chart::Base
               
              @@ -142,6 +142,8 @@ ALTER TABLE agent ADD username varchar(80) NULL;
               ALTER TABLE h_agent ADD username varchar(80) NULL;
               ALTER TABLE agent ADD _password varchar(80) NULL;
               ALTER TABLE h_agent ADD _password varchar(80) NULL;
              +ALTER TABLE cust_main ADD paycvv varchar(4) NULL;
              +ALTER TABLE h_cust_main ADD paycvv varchar(4) NULL;
               
               dump database, edit:
               - cust_main: increase otaker from 8 to 32
              diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
              index 73a0eef49..1909b5438 100755
              --- a/httemplate/edit/cust_main.cgi
              +++ b/httemplate/edit/cust_main.cgi
              @@ -39,6 +39,12 @@ if ( $cgi->param('error') ) {
                 $query =~ /^(\d+)$/;
                 $custnum=$1;
                 $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } );
              +  if ( $cust_main->dbdef_table->column('paycvv')
              +       && length($cust_main->paycvv)             ) {
              +    my $paycvv = $cust_main->paycvv;
              +    $paycvv =~ s/./*/g;
              +    $cust_main->paycvv($paycvv);
              +  }
                 $saved_pkgpart = 0;
                 $username = '';
                 $password = '';
              @@ -61,7 +67,7 @@ my $action = $custnum ? 'Edit' : 'Add';
               # top
               
               my $p1 = popurl(1);
              -print header("Customer $action", '');
              +print header("Customer $action", '', ' onUnload="myclose()"');
               print qq!Error: !, $error, ""
                 if $error;
               
              @@ -400,7 +406,19 @@ if ( $payby_default eq 'HIDE' ) {
                 print qq!Email invoice !;
               
                 print "Billing type",
              -        "",
              +        "", '',
                       &table("#cccccc"), "";
               
                 my($payinfo, $payname)=(
              @@ -418,6 +436,12 @@ if ( $payby_default eq 'HIDE' ) {
                   'COMP' => qq!Complimentary
              ${r}Approved by
              ${r}Exp !. expselect("COMP"), ); + if ( $cust_main->dbdef_table->column('paycvv') ) { + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 bs + $payby{$payby} .= qq!
              CVV2 (help!; + } + } + my( $account, $aba ) = split('@', $payinfo); my %paybychecked = ( @@ -430,6 +454,15 @@ if ( $payby_default eq 'HIDE' ) { 'COMP' => qq!Complimentary
              ${r}Approved by
              ${r}Exp !. expselect("COMP", $cust_main->paydate), ); + if ( $cust_main->dbdef_table->column('paycvv') ) { + my $paycvv = $cust_main->paycvv; + + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 bs + $paybychecked{$payby} .= qq!
              CVV2 (help!; + } + } + + $cust_main->payby($payby_default) unless $cust_main->payby; for (qw(CARD DCRD CHEK DCHK LECB BILL COMP)) { print qq!param('paydate', $cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ) ); $cgi->param('payname', $cgi->param( $payby. '_payname' ) ); + $cgi->param('paycvv', $cgi->param( $payby. '_paycvv' ) ) + if defined $cgi->param( $payby. '_paycvv' ); } $cgi->param('otaker', &getotaker ); @@ -27,6 +29,7 @@ my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') ); push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST'); $cgi->param('invoicing_list', join(',', @invoicing_list) ); + #create new record object my $new = new FS::cust_main ( { @@ -113,6 +116,11 @@ if ( $new->custnum eq '' ) { } else { #create old record object my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } ); $error ||= "Old record not found!" unless $old; + if ( defined dbdef->table('cust_main')->column('paycvv') + && length($old->paycvv) + && $new->paycvv =~ /^\s*\*+\s*$/ ) { + $new->paycvv($old->paycvv); + } $error ||= $new->replace($old, \@invoicing_list); } -- cgit v1.2.1 From 3da1a075bdfba74af39b52a468241bc2e12d2692 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 24 Oct 2003 20:38:10 +0000 Subject: add cvv-save configuration value to save the cvv data for specific card types --- FS/FS/Conf.pm | 16 ++++++++++++++++ FS/FS/cust_main.pm | 1 + 2 files changed, 17 insertions(+) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 51feb3847..ea32b2c23 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1080,6 +1080,22 @@ httemplate/docs/config.html 'type' => 'textarea', }, + { + 'key' => 'cvv-save', + 'section' => 'billing', + 'description' => 'Save CVV2 information after the initial transaction for the selected credit card types. Enabling this option may be in violation of your merchant agreement(s), so please check them carefully before enabling this option for any credit card types.', + 'type' => 'selectmultiple', + 'select_enum' => [ "VISA card", + "MasterCard", + "Discover card", + "American Express card", + "Diner's Club/Carte Blanche", + "enRoute", + "JCB", + "BankCard", + ], + }, + ); 1; diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 0ab2aa50d..1d2e9edcd 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -1791,6 +1791,7 @@ sub realtime_bop { # (though that probably violates cardholder agreements) if ( defined $self->dbdef_table->column('paycvv') && length($self->paycvv) + && ! grep { $_ eq cardtype($self->payinfo) } $conf->config('cvv-save') ) { my $new = new FS::cust_main { $self->hash }; $new->paycvv(''); -- cgit v1.2.1 From c97b6a00f150f5e7a4aa58b71389d5c504817cf2 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 25 Oct 2003 01:06:37 +0000 Subject: better link to .INS files documentation --- httemplate/docs/signup.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httemplate/docs/signup.html b/httemplate/docs/signup.html index 5168f47d6..684521dc0 100644 --- a/httemplate/docs/signup.html +++ b/httemplate/docs/signup.html @@ -36,7 +36,7 @@ Then: Optional:
              • If you create a /usr/local/freeside/ieak.template file on the external machine, it will be sent to IE users with MIME type application/x-Internet-signup. This file will be processed with Text::Template with the variables listed below available. - (an example file is included as fs_signup/ieak.template) See the IEAK documentation for more information. + (an example file is included as fs_signup/ieak.template) See the section on internet settings files in the IEAK documentation for more information.
              • If you create a /usr/local/freeside/cck.template file on the external machine, the variables defined will be sent to Netscape users with MIME type application/x-netscape-autoconfigure-dialer-v2. This file will be processed with Text::Template with the variables listed below available. (an example file is included as fs_signup/cck.template). See the Netscape documentation for more information.
              • If you create a /usr/local/freeside/success.html file on the external machine, it will be used as the success HTML page. Although template substiutions are available, a regular HTML file will work fine here, unlike signup.html. An example file is included as fs_signup/FS-SignupClient/cgi/success.html -- cgit v1.2.1 From 42ea96aceed291c4cb92cf475cb715b6ad7832c3 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 25 Oct 2003 02:05:05 +0000 Subject: adding signup with snarf input --- fs_signup/FS-SignupClient/cgi/signup-snarf.html | 228 ++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100755 fs_signup/FS-SignupClient/cgi/signup-snarf.html diff --git a/fs_signup/FS-SignupClient/cgi/signup-snarf.html b/fs_signup/FS-SignupClient/cgi/signup-snarf.html new file mode 100755 index 000000000..d167efbf9 --- /dev/null +++ b/fs_signup/FS-SignupClient/cgi/signup-snarf.html @@ -0,0 +1,228 @@ +ISP Signup form + + +ISP Signup form

                +<%= $error %> + + + + +Contact Information + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                *Contact name
                (last, first)
                , +
                Company
                *Address
                 
                *City*State/Country + <%= + ($county_html, $state_html, $country_html) = + regionselector( $county, $state, $country ); + + "$county_html $state_html"; + %> + *Zip
                *Country<%= $country_html %>
                Day Phone
                Night Phone
                Fax
                * required fields
                +
                Billing information + + +<%= scalar(@payby) > 1 ? '' : '' %> +
                + + <%= + $OUT .= ' + + Postal mail invoice +
                Email invoice +
                Billing type
                + + + + <%= + + my $cardselect = ''; + + my %payby = ( + 'CARD' => qq!Credit card
                *$cardselect
                *Exp !. expselect("CARD"). qq!
                *Name on card
                !, + 'DCRD' => qq!Credit card
                *$cardselect
                *Exp !. expselect("DCRD"). qq!
                *Name on card
                !, + 'CHEK' => qq!Electronic check
                ${r}Account number
                ${r}ABA/Routing code
                ${r}Bank name !, + 'DCHK' => qq!Electronic check
                ${r}Account number
                ${r}ABA/Routing code
                ${r}Bank name !, + 'LECB' => qq!Phone bill billing
                ${r}Phone number !, + 'BILL' => qq!Billing
                P.O.
                *Exp !. expselect("BILL", "12-2037"). qq!
                *Attention
                !, + 'COMP' => qq!Complimentary
                *Approved by
                *Exp !. expselect("COMP"), + 'PREPAY' => qq!Prepaid card
                *!, + ); + + if ( $init_data->{'cvv_enabled'} ) { + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 + $payby{$payby} .= qq!
                CVV2 (help!; + } + } + + my( $account, $aba ) = split('@', $payinfo); + my %paybychecked = ( + 'CARD' => qq!Credit card
                *$cardselect
                *Exp !. expselect("CARD", $paydate). qq!
                *Name on card
                !, + 'DCRD' => qq!Credit card
                *$cardselect
                *Exp !. expselect("DCRD", $paydate). qq!
                *Name on card
                !, + 'CHEK' => qq!Electronic check
                ${r}Account number
                ${r}ABA/Routing code
                ${r}Bank name !, + 'DCHK' => qq!Electronic check
                ${r}Account number
                ${r}ABA/Routing code
                ${r}Bank name !, + 'LECB' => qq!Phone bill billing
                ${r}Phone number !, + 'BILL' => qq!Billing
                P.O.
                *Exp !. expselect("BILL", $paydate). qq!
                *Attention
                !, + 'COMP' => qq!Complimentary
                *Approved by
                *Exp !. expselect("COMP", $paydate), + 'PREPAY' => qq!Prepaid card
                *!, + ); + + if ( $init_data->{'cvv_enabled'} ) { + foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5 + $paybychecked{$payby} .= qq!
                CVV2 (help!; + } + } + + for (@payby) { + if ( scalar(@payby) == 1) { + $OUT .= '"; + } else { + $OUT .= qq!!; + } else { + $OUT .= qq!> $payby{$_}!; + } + + } + } + %> + +
                '. + qq!!. + "$paybychecked{$_} $paybychecked{$_}
                * required fields for each billing type +

                First package + + + + + + + + + + + + + + + + +<%= + if ( $init_data->{'security_phrase'} ) { + $OUT .= < + + + +ENDOUT + } else { + $OUT .= ''; + } +%> +<%= + if ( scalar(@$pops) ) { + $OUT .= ''; + } else { + $OUT .= popselector($popnum); + } +%> +
                Username
                Password
                Re-enter Password
                Security Phrase +
                Access number'. + popselector($popnum). '
                +

                Enter up to ten external accounts from which to retrieve email + + + + + + +<%= + for my $num ( 1..10 ) { + no strict 'vars'; + $OUT .= qq!!. + qq!!. + qq!!. + qq!!. + qq!!; + } +%> +
                Mail serverUsernamePassword
                + +

                + -- cgit v1.2.1