- add message catalog table & beginning of web interface
authorivan <ivan>
Fri, 5 Apr 2002 23:51:18 +0000 (23:51 +0000)
committerivan <ivan>
Fri, 5 Apr 2002 23:51:18 +0000 (23:51 +0000)
- add security_phrase and conf option to svc_acct.pm
- random other stuff

27 files changed:
ANNOUCE.1.4.0
CREDITS
FS/FS/Conf.pm
FS/FS/msgcat.pm [new file with mode: 0644]
FS/FS/svc_acct.pm
FS/MANIFEST
FS/t/msgcat.t [new file with mode: 0644]
Makefile
README.1.4.0pre12
bin/freeside-session-kill
bin/fs-setup
bin/populate-msgcat [new file with mode: 0755]
bin/sqlradius_reset
conf/locale [new file with mode: 0644]
eg/table_template-svc.pm
eg/table_template.pm
htetc/global.asa
htetc/handler.pl
httemplate/browse/cust_main_county.cgi
httemplate/browse/msgcat.cgi [new file with mode: 0755]
httemplate/browse/part_referral.cgi
httemplate/browse/svc_acct_pop.cgi
httemplate/docs/schema.html
httemplate/docs/upgrade8.html
httemplate/edit/svc_acct.cgi
httemplate/index.html
httemplate/view/svc_acct.cgi

index 8bc16ad..c1da9dd 100644 (file)
@@ -117,3 +117,5 @@ new export! (well, almost)
 
 icradius groups (usergroup table if not radgroupreply & radgroupcheck)
 
 
 icradius groups (usergroup table if not radgroupreply & radgroupcheck)
 
+message catalogs (infrastructure, anyway)
+
diff --git a/CREDITS b/CREDITS
index 13d2861..3a356f9 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -95,7 +95,7 @@ and will doubtless send more once he's got his tree under control.
 Luke Pfeifer <freeside@globalli.com> contributed the "subscription" price plan.
 
 Noment Networks, LLC <http://www.noment.com/> sponsored ICRADIUS/FreeRADIUS
 Luke Pfeifer <freeside@globalli.com> contributed the "subscription" price plan.
 
 Noment Networks, LLC <http://www.noment.com/> sponsored ICRADIUS/FreeRADIUS
-groups.
+groups, message catalogs, and signup server enhancements.
 
 Everything else is my (Ivan Kohler <ivan@420.am>) fault.
 
 
 Everything else is my (Ivan Kohler <ivan@420.am>) fault.
 
index 2bc5e24..bda19c0 100644 (file)
@@ -843,6 +843,21 @@ httemplate/docs/config.html
     'type'        => 'checkbox',
   },
 
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'security_phrase',
+    'section'     => 'password',
+    'description' => 'Enable the tracking of a "security phrase" with each account.  Not recommended, as it is vulnerable to social engineering.',
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'locale',
+    'section'     => 'UI',
+    'description' => 'Message locale',
+    'type'        => 'select',
+    'select_enum' => [ qw(en_US) ],
+  },
+
 );
 
 1;
 );
 
 1;
diff --git a/FS/FS/msgcat.pm b/FS/FS/msgcat.pm
new file mode 100644 (file)
index 0000000..53a7aee
--- /dev/null
@@ -0,0 +1,187 @@
+package FS::msgcat;
+
+use strict;
+use vars qw( @ISA @EXPORT_OK $conf $locale );
+use Exporter;
+use FS::UID;
+use FS::Record qw( qsearchs );
+use FS::Conf;
+
+@ISA = qw(FS::Record);
+@EXPORT_OK = qw( gettext geterror );
+
+$FS::UID::callback{'msgcat'} = sub {
+  $conf = new FS::Conf;
+  $locale = $conf->config('locale') || 'en_US';
+};
+
+=head1 NAME
+
+FS::msgcat - Object methods for message catalog entries
+
+=head1 SYNOPSIS
+
+  use FS::msgcat qw(gettext);
+
+  #simple interface for retreiving messages...
+  $message = gettext('msgcode');
+  #or errors (includes the error code)
+  $message = geterror('msgcode');
+
+  #maintenance stuff
+  $record = new FS::msgcat \%hash;
+  $record = new FS::msgcat { 'column' => 'value' };
+
+  $error = $record->insert;
+
+  $error = $new_record->replace($old_record);
+
+  $error = $record->delete;
+
+  $error = $record->check;
+
+=head1 DESCRIPTION
+
+An FS::msgcat object represents an message catalog entry.  FS::msgcat inherits 
+from FS::Record.  The following fields are currently supported:
+
+=over 4
+
+=item msgnum - primary key
+
+=item msgcode - Error code
+
+=item locale - Locale
+
+=item msg - Message
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item new HASHREF
+
+Creates a new example.  To add the example 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<hash> method.
+
+=cut
+
+# the new method can be inherited from FS::Record, if a table method is defined
+
+sub table { 'msgcat'; }
+
+=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
+
+# the check method should currently be supplied - FS::Record contains some
+# data checking routines
+
+sub check {
+  my $self = shift;
+
+  my $error =
+    $self->ut_numbern('msgnum')
+    || $self->ut_text('msgcode')
+    || $self->ut_text('msg')
+  ;
+  return $error if $error;
+
+  $self->locale =~ /^([\w\@]+)$/ or return "illegal locale: ". $self->locale;
+  $self->locale($1);
+
+  ''; #no error
+}
+
+=back
+
+=head1 SUBROUTINES
+
+=over 4
+
+=item gettext MSGCODE
+
+Returns the full message for the supplied message code.
+
+=cut
+
+sub gettext {
+  my $msgcode = shift;
+  my $msgcat = qsearchs('msgcat', {
+    'msgcode' => $msgcode,
+    'locale' => $locale
+  } );
+  if ( $msgcat ) {
+    $msgcat->msg;
+  } else {
+    warn "WARNING: message for msgcode $msgcode in locale $locale not found";
+    $msgcode;
+  }
+
+}
+
+=item geterror MSGCODE
+
+Returns the full message for the supplied message code, including the message
+code.
+
+=cut
+
+sub geterror {
+  my $msgcode = shift;
+  my $msg = gettext($msgcode);
+  if ( $msg eq $msgcode ) {
+    "Error code $msgcode (message for locale $locale not found)";
+  } else {
+    "$msg (error code $msgcode)";
+  }
+}
+
+=back
+
+=head1 BUGS
+
+i18n/l10n is a mess.
+
+=head1 SEE ALSO
+
+L<FS::Record>, schema.html from the base documentation.
+
+=cut
+
+1;
+
index 197eec1..8d22c21 100644 (file)
@@ -1079,6 +1079,7 @@ sub check {
 
   my $error = $self->ut_numbern('svcnum')
               || $self->ut_number('domsvc')
 
   my $error = $self->ut_numbern('svcnum')
               || $self->ut_number('domsvc')
+              || $self->ut_textn('sec_phrase')
   ;
   return $error if $error;
 
   ;
   return $error if $error;
 
index 8f7dfe5..dd9eb09 100644 (file)
@@ -72,6 +72,7 @@ FS/raddb.pm
 FS/radius_usergroup.pm
 FS/queue.pm
 FS/queue_arg.pm
 FS/radius_usergroup.pm
 FS/queue.pm
 FS/queue_arg.pm
+FS/msgcat.pm
 t/agent.t
 t/agent_type.t
 t/CGI.t
 t/agent.t
 t/agent_type.t
 t/CGI.t
@@ -120,5 +121,6 @@ t/svc_www.t
 t/type_pkgs.t
 t/queue.t
 t/queue_arg.t
 t/type_pkgs.t
 t/queue.t
 t/queue_arg.t
+t/msgcat.t
 t/UID.t
 t/raddb.t
 t/UID.t
 t/raddb.t
diff --git a/FS/t/msgcat.t b/FS/t/msgcat.t
new file mode 100644 (file)
index 0000000..c38c639
--- /dev/null
@@ -0,0 +1,5 @@
+BEGIN { $| = 1; print "1..1\n" }
+END {print "not ok 1\n" unless $loaded;}
+use FS::msgcat;
+$loaded=1;
+print "ok 1\n";
index 8f577c5..21aeb45 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,8 +6,8 @@ DATASOURCE = DBI:Pg:host=localhost;dbname=freeside
 DB_USER = freeside
 DB_PASSWORD=
 
 DB_USER = freeside
 DB_PASSWORD=
 
-TEMPLATE = asp
-#TEMPLATE = mason
+#TEMPLATE = asp
+TEMPLATE = mason
 
 ASP_GLOBAL = /usr/local/etc/freeside/asp-global
 
 
 ASP_GLOBAL = /usr/local/etc/freeside/asp-global
 
index abbf6e5..72353ba 100644 (file)
@@ -23,12 +23,23 @@ CREATE TABLE radius_usergroup (
 CREATE INDEX radius_usergroup1 ON radius_usergroup ( svcnum );
 CREATE INDEX radius_usergroup2 ON radius_usergroup ( groupname );
 
 CREATE INDEX radius_usergroup1 ON radius_usergroup ( svcnum );
 CREATE INDEX radius_usergroup2 ON radius_usergroup ( groupname );
 
+ALTER TABLE svc_acct ADD sec_phrase varchar(80) NULL;
+CREATE TABLE msgcat (
+  msgnum int primary key,
+  msgcode varchar(80) not null,
+  locale varchar(16) not null,
+  msg text not null
+);
+CREATE INDEX msgcat1 ON msgcat ( msgcode, locale );
+
 Run bin/dbdef-create
 
 Run bin/create-history-tables
 
 Run bin/dbdef-create again
 
 Run bin/dbdef-create
 
 Run bin/create-history-tables
 
 Run bin/dbdef-create again
 
+Run bin/populate-msgcat
+
 the mxmachines, nsmachines, arecords and cnamerecords configuration values have been deprecated.  Use the defaultrecords configuration value instead.
 
 New export code has landed!  If you were using the icradiusmachines,
 the mxmachines, nsmachines, arecords and cnamerecords configuration values have been deprecated.  Use the defaultrecords configuration value instead.
 
 New export code has landed!  If you were using the icradiusmachines,
index 9f11abd..d5fd703 100755 (executable)
@@ -98,3 +98,6 @@ foreach my $join ( @session ) {
 
 $dbh->commit or die $dbh->errstr;
 
 
 $dbh->commit or die $dbh->errstr;
 
+sub usage {
+  die "Usage:\n\n  freeside-session-kill user\n";
+}
index 01e08f7..55edeb6 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
 #!/usr/bin/perl -Tw
 #
-# $Id: fs-setup,v 1.84 2002-03-22 18:56:32 ivan Exp $
+# $Id: fs-setup,v 1.85 2002-04-05 23:51:17 ivan Exp $
 
 #to delay loading dbdef until we're ready
 BEGIN { $FS::Record::setup_hack = 1; }
 
 #to delay loading dbdef until we're ready
 BEGIN { $FS::Record::setup_hack = 1; }
@@ -752,6 +752,7 @@ sub tables_hash_hack {
         'svcnum',    'int',    '',   '',
         'username',  'varchar',   '',   $username_len, #unique (& remove dup code)
         '_password', 'varchar',   '',   50, #13 for encryped pw's plus ' *SUSPENDED* (mp5 passwords can be 34)
         'svcnum',    'int',    '',   '',
         'username',  'varchar',   '',   $username_len, #unique (& remove dup code)
         '_password', 'varchar',   '',   50, #13 for encryped pw's plus ' *SUSPENDED* (mp5 passwords can be 34)
+        'sec_phrase', 'varchar',  'NULL',   $char_d,
         'popnum',    'int',    'NULL',   '',
         'uid',       'int', 'NULL',   '',
         'gid',       'int', 'NULL',   '',
         'popnum',    'int',    'NULL',   '',
         'uid',       'int', 'NULL',   '',
         'gid',       'int', 'NULL',   '',
@@ -962,6 +963,18 @@ sub tables_hash_hack {
       'index'       => [ [ 'svcnum' ], [ 'groupname' ] ],
     },
 
       'index'       => [ [ 'svcnum' ], [ 'groupname' ] ],
     },
 
+    'msgcat' => {
+      'columns' => [
+        'msgnum', 'int', '', '',
+        'msgcode', 'varchar', '', $char_d,
+        'locale', 'varchar', '', 16,
+        'msg', 'text', '', '',
+      ],
+      'primary_key' => 'msgnum',
+      'unique'      => [ [ 'msgcode', 'locale' ] ],
+      'index'       => [],
+    },
+
   );
 
   %tables;
   );
 
   %tables;
diff --git a/bin/populate-msgcat b/bin/populate-msgcat
new file mode 100755 (executable)
index 0000000..fa88732
--- /dev/null
@@ -0,0 +1,45 @@
+#!/usr/bin/perl
+
+use FS::UID qw(adminsuidsetup);
+use FS::msgcat;
+
+my $user = shift or die &usage;
+adminsuidsetup $user;
+
+foreach my $del_msgcat ( qsearchs('msgcat', {}) ) {
+  my $error = $del_msgcat->delete;
+  die $error if $error;
+}
+
+my %messages = messages();
+
+foreach $msgcode ( keys %messages ) {
+  foreach my $locale ( keys %{$messages{$msgcode}} ) {
+    my $msgcat = new FS::msgcat( {
+      'msgcode' => $msgcode,
+      'locale'  => $locale,
+    });
+    my $error = $msgcat->insert;
+    die $error if $error;
+  }
+}
+
+sub messages {
+
+  #  'msgcode' => {
+  #    'en_US' => 'Message',
+  #  },
+
+  (
+
+    'msgcode' => {
+      'en_US' => 'Message',
+    },
+
+  );
+}
+
+sub usage {
+  die "Usage:\n\n  populate-msgcat user\n";
+}
+
index 5016854..da98fe6 100644 (file)
@@ -38,8 +38,8 @@ foreach my $export ( @exports ) {
 }
 
 sub usage {
 }
 
 sub usage {
-  #die "Usage:\n\n  icradius_reset user machine\n";
-  die "Usage:\n\n  icradius_reset user\n";
+  #die "Usage:\n\n  sqlradius_reset user machine\n";
+  die "Usage:\n\n  sqlradius_reset user\n";
 }
 
 
 }
 
 
diff --git a/conf/locale b/conf/locale
new file mode 100644 (file)
index 0000000..7741b83
--- /dev/null
@@ -0,0 +1 @@
+en_US
index c5e8f96..ebf7299 100644 (file)
@@ -146,10 +146,6 @@ sub check {
 
 =back
 
 
 =back
 
-=head1 VERSION
-
-$Id: table_template-svc.pm,v 1.2 2001-08-21 02:44:47 ivan Exp $
-
 =head1 BUGS
 
 The author forgot to customize this manpage.
 =head1 BUGS
 
 The author forgot to customize this manpage.
index 2cc1e1d..d609bd5 100644 (file)
@@ -98,10 +98,6 @@ sub check {
 
 =back
 
 
 =back
 
-=head1 VERSION
-
-$Id: table_template.pm,v 1.2 2000-10-27 20:15:50 ivan Exp $
-
 =head1 BUGS
 
 The author forgot to customize this manpage.
 =head1 BUGS
 
 The author forgot to customize this manpage.
index 48d0d6f..0576951 100644 (file)
@@ -48,6 +48,7 @@ use FS::svc_www;
 use FS::type_pkgs;
 use FS::part_export;
 use FS::part_export_option;
 use FS::type_pkgs;
 use FS::part_export;
 use FS::part_export_option;
+use FS::msgcat qw(gettext geterror);
 
 sub Script_OnStart {
   $Response->AddHeader('Pragma' => 'no-cache');
 
 sub Script_OnStart {
   $Response->AddHeader('Pragma' => 'no-cache');
index 1a746a5..2f8146e 100644 (file)
@@ -105,6 +105,7 @@ sub handler
       use FS::type_pkgs;
       use FS::part_export;
       use FS::part_export_option;
       use FS::type_pkgs;
       use FS::part_export;
       use FS::part_export_option;
+      use FS::msgcat qw(gettext geterror);
 
       *CGI::redirect = sub {
         my( $self, $location ) = @_;
 
       *CGI::redirect = sub {
         my( $self, $location ) = @_;
index 8fbd7fa..5df8dfa 100755 (executable)
@@ -95,7 +95,6 @@ END
 
 print <<END;
     </TABLE>
 
 print <<END;
     </TABLE>
-    </CENTER>
   </BODY>
 </HTML>
 END
   </BODY>
 </HTML>
 END
diff --git a/httemplate/browse/msgcat.cgi b/httemplate/browse/msgcat.cgi
new file mode 100755 (executable)
index 0000000..5dab5cf
--- /dev/null
@@ -0,0 +1,50 @@
+<!-- mason kludge -->
+<%
+
+print header("Message catalog", menubar(
+  'Main Menu' => $p,
+  'Edit message catalog' => $p. "edit/msgcat.cgi",
+)), '<BR>';
+
+my $widget = new HTML::Widgets::SelectLayers(
+  'selected_layer' => 'en_US',
+  'options'        => { 'en_US'=>'en_US' },
+  'layer_callback' => sub {
+    my $layer = shift;
+    my $html = "<BR>Messages for locale $layer<BR>". table().
+               "<TR><TH COLSPAN=2>Code</TH>".
+               "<TH>Message</TH>";
+    $html .= "<TH>en_US Message</TH>" unless $layer eq 'en_US';
+    $html .= '</TR>';
+
+    #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode }
+    #                       qsearchs('msgcat', { 'locale' => $layer } ) ) {
+    foreach my $msgcat ( qsearchs('msgcat', { 'locale' => $layer } ) ) {
+      $html .= '<TR><TD>'. $msgcat->msgnum. '</TD>'.
+               '<TD>'. $msgcat->msgcode. '</TD>'.
+               '<TD>'. $msgcat->msg. '</TD>';
+      unless ( $layer eq 'en_US' ) {
+        my $en_msgcat = qsearchs('msgcat', {
+          'locale'  => 'en_US',
+          'msgcode' => $msgcat->msgcode,
+        } );
+        $html .= '<TD>'. $en_msgcat->msg. '</TD>';
+      }
+      $html .= '</TR>';
+    }
+
+    $html .= '</TABLE>';
+    $html;
+  },
+
+);
+
+print $widget->html;
+
+print <<END;
+    </TABLE>
+  </BODY>
+</HTML>
+END
+
+%>
index bbae8d0..93a6976 100755 (executable)
@@ -30,7 +30,6 @@ print <<END;
         <TD COLSPAN=2><A HREF="${p}edit/part_referral.cgi"><I>Add a new advertising source</I></A></TD>
       </TR>
     </TABLE>
         <TD COLSPAN=2><A HREF="${p}edit/part_referral.cgi"><I>Add a new advertising source</I></A></TD>
       </TR>
     </TABLE>
-    </CENTER>
   </BODY>
 </HTML>
 END
   </BODY>
 </HTML>
 END
index fb42aa7..f8ee58c 100755 (executable)
@@ -44,7 +44,6 @@ print <<END;
         <TD COLSPAN=5><A HREF="${p}edit/svc_acct_pop.cgi"><I>Add new Access Number</I></A></TD>
       </TR>
     </TABLE>
         <TD COLSPAN=5><A HREF="${p}edit/svc_acct_pop.cgi"><I>Add new Access Number</I></A></TD>
       </TR>
     </TABLE>
-    </CENTER>
   </BODY>
 </HTML>
 END
   </BODY>
 </HTML>
 END
index 192f56b..a7c21c7 100644 (file)
         <li>svcnum - <a href="#cust_svc">primary key</a>
         <li>username
         <li>_password
         <li>svcnum - <a href="#cust_svc">primary key</a>
         <li>username
         <li>_password
+        <li>sec_phrase - security phrase
         <li>popnum - <a href="#svc_acct_pop">Point of Presence</a>
         <li>uid
         <li>gid
         <li>popnum - <a href="#svc_acct_pop">Point of Presence</a>
         <li>uid
         <li>gid
         <li>svcnum - <a href="#svc_acct">account</a>
         <li>groupname
       </ul>
         <li>svcnum - <a href="#svc_acct">account</a>
         <li>groupname
       </ul>
+    <li><a name="msgcat" href="man/FS/msgcat.html">msgcat</a> - i18n message catalog
+      <ul>
+        <li>msgnum - primary key
+        <li>msgcode - message code
+        <li>locale - locale
+        <li>msg - Message text
+      </ul>
   </ul>
 </body>
   </ul>
 </body>
index 440024d..a7b5853 100644 (file)
@@ -179,6 +179,14 @@ CREATE TABLE radius_usergroup (
 CREATE INDEX radius_usergroup1 ON radius_usergroup ( svcnum );
 CREATE INDEX radius_usergroup2 ON radius_usergroup ( groupname );
 
 CREATE INDEX radius_usergroup1 ON radius_usergroup ( svcnum );
 CREATE INDEX radius_usergroup2 ON radius_usergroup ( groupname );
 
+CREATE TABLE msgcat (
+  msgnum int primary key,
+  msgcode varchar(80) not null,
+  locale varchar(16) not null,
+  msg text not null
+);
+CREATE INDEX msgcat1 ON msgcat ( msgcode, locale );
+
 ALTER TABLE svc_acct ADD domsvc integer NOT NULL;
 ALTER TABLE svc_domain ADD catchall integer NULL;
 ALTER TABLE cust_main ADD referral_custnum integer NULL;
 ALTER TABLE svc_acct ADD domsvc integer NOT NULL;
 ALTER TABLE svc_domain ADD catchall integer NULL;
 ALTER TABLE cust_main ADD referral_custnum integer NULL;
@@ -198,6 +206,7 @@ ALTER TABLE cust_credit ADD closed char(1) NULL;
 ALTER TABLE cust_refund ADD closed char(1) NULL;
 ALTER TABLE cust_bill_event ADD status varchar(80);
 ALTER TABLE cust_bill_event ADD statustext text NULL;
 ALTER TABLE cust_refund ADD closed char(1) NULL;
 ALTER TABLE cust_bill_event ADD status varchar(80);
 ALTER TABLE cust_bill_event ADD statustext text NULL;
+ALTER TABLE svc_acct ADD sec_phrase varchar(80) NULL;
 CREATE INDEX cust_main3 ON cust_main ( referral_custnum );
 CREATE INDEX cust_credit_bill1 ON cust_credit_bill ( crednum );
 CREATE INDEX cust_credit_bill2 ON cust_credit_bill ( invnum );
 CREATE INDEX cust_main3 ON cust_main ( referral_custnum );
 CREATE INDEX cust_credit_bill1 ON cust_credit_bill ( crednum );
 CREATE INDEX cust_credit_bill2 ON cust_credit_bill ( invnum );
index 723c91c..540d04c 100755 (executable)
@@ -122,6 +122,15 @@ print &ntable("#cccccc",2), <<END;
 </TR>
 END
 
 </TR>
 END
 
+if ( $conf->exists('security_phrase') ) {
+  print <<END;
+  <TR><TD ALIGN="right">Security phrase</TD>
+  <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase" SIZE=32>
+    (for forgotten passwords)</TD>
+  </TD>
+END
+}
+
 #domain
 my $domsvc = $svc_acct->domsvc || 0;
 if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'F' ) {
 #domain
 my $domsvc = $svc_acct->domsvc || 0;
 if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'F' ) {
index fecd107..99d8df9 100644 (file)
           <LI><A HREF="browse/svc_acct_pop.cgi">View/Edit Access Numbers</A>
             - Points of Presence 
           <LI><A HREF="browse/part_bill_event.cgi">View/Edit invoice events</A> - Actions for overdue invoices
           <LI><A HREF="browse/svc_acct_pop.cgi">View/Edit Access Numbers</A>
             - Points of Presence 
           <LI><A HREF="browse/part_bill_event.cgi">View/Edit invoice events</A> - Actions for overdue invoices
+          <LI><A HREF="browse/msgcat.cgi">View/Edit message catalog</A> - Change error messages and other customizable labels.
         </ul>
         <BR>
       </TD></TR>
         </ul>
         <BR>
       </TD></TR>
index b779e87..496dab3 100755 (executable)
@@ -79,6 +79,12 @@ if ( $conf->exists('showpasswords') ) {
 print "</TR></TD>";
 $password = '';
 
 print "</TR></TD>";
 $password = '';
 
+if ( $conf->exists('security_phrase') ) {
+  my $sec_phrase = $svc_acct->sec_phrase;
+  print '<TR><TD ALIGN="right">Security phrase</TD><TD BGCOLOR="#ffffff">'.
+        $svc_acct->sec_phrase. '</TD></TR>;
+}
+
 my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum});
 print "<TR><TD ALIGN=\"right\">Access number</TD>".
       "<TD BGCOLOR=\"#ffffff\">". $svc_acct_pop->text. '</TD></TR>'
 my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum});
 print "<TR><TD ALIGN=\"right\">Access number</TD>".
       "<TD BGCOLOR=\"#ffffff\">". $svc_acct_pop->text. '</TD></TR>'