initial checkin of module files for proper perl installation
[freeside.git] / htdocs / edit / svc_acct.cgi
index 876d7be..963bc1e 100755 (executable)
@@ -1,12 +1,10 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: svc_acct.cgi,v 1.7 1999-02-07 09:59:22 ivan Exp $
+# $Id: svc_acct.cgi,v 1.10 1999-04-14 11:27:06 ivan Exp $
 #
 # Usage: svc_acct.cgi {svcnum} | pkgnum{pkgnum}-svcpart{svcpart}
 #        http://server.name/path/svc_acct.cgi? {svcnum} | pkgnum{pkgnum}-svcpart{svcpart}
 #
-# Note: Should be run setuid freeside as user nobody
-#
 # ivan@voicenet.com 96-dec-18
 #
 # rewrite ivan@sisd.com 98-mar-8
 # use conf/shells and dbdef username length ivan@sisd.com 98-jul-13
 #
 # $Log: svc_acct.cgi,v $
-# Revision 1.7  1999-02-07 09:59:22  ivan
+# Revision 1.10  1999-04-14 11:27:06  ivan
+# showpasswords config option to show passwords
+#
+# Revision 1.9  1999/02/28 00:03:37  ivan
+# removed misleading comments
+#
+# Revision 1.8  1999/02/23 08:09:22  ivan
+# beginnings of one-screen new customer entry and some other miscellania
+#
+# Revision 1.7  1999/02/07 09:59:22  ivan
 # more mod_perl fixes, and bugfixes Peter Wemm sent via email
 #
 # Revision 1.6  1999/01/19 05:13:43  ivan
@@ -117,10 +124,16 @@ $svc = $part_svc->getfield('svc');
 
 $otaker = getotaker;
 
-($username,$password)=(
-  $svc_acct->username,
-  $svc_acct->_password ? "*HIDDEN*" : '',
-);
+$username = $svc_acct->username;
+if ( $svc_acct->_password ) {
+  if ( $conf->exists('showpasswords') ) {
+    $password = $svc_acct->_password;
+  } else {
+    $password = "*HIDDEN*";
+  }
+} else {
+  $password = '';
+}
 
 $ulen = $svc_acct->dbdef_table->column('username')->length;
 $ulen2 = $ulen+2;
@@ -156,7 +169,7 @@ if ( $part_svc->svc_acct__popnum_flag eq "F" ) {
         $svc_acct_pop->popnum, ": ", 
         $svc_acct_pop->city, ", ",
         $svc_acct_pop->state,
-        "(", $svc_acct_pop->ac, ")/",
+        " (", $svc_acct_pop->ac, ")/",
         $svc_acct_pop->exch, "\n"
       ;
   }
@@ -204,7 +217,7 @@ if ( $part_svc->svc_acct__slipip_flag eq "F" ) {
 }
 
 #submit
-print qq!<P><CENTER><INPUT TYPE="submit" VALUE="Submit"></CENTER>!; 
+print qq!<P><INPUT TYPE="submit" VALUE="Submit">!; 
 
 print <<END;
     </FORM>