diff options
-rwxr-xr-x | admin.pl | 15 | ||||
-rwxr-xr-x | login.pl | 15 | ||||
-rwxr-xr-x | menu.pl | 17 |
3 files changed, 7 insertions, 40 deletions
@@ -48,21 +48,10 @@ # ####################################################################### - -# setup defaults, DO NOT CHANGE -$userspath = "users"; -$spool = "spool"; -${LedgerSMB::Sysconfig::templates} = "templates"; -$memberfile = "users/members"; -$sendmail = "| /usr/sbin/sendmail -t"; -%printer = ( Printer => 'lpr' ); -########## end ########################################### - +use LedgerSMB::Sysconfig; $| = 1; -eval { require "ledger-smb.conf"; }; - if ($ENV{CONTENT_LENGTH}) { read(STDIN, $_, $ENV{CONTENT_LENGTH}); } @@ -87,7 +76,7 @@ $pos = rindex $0, '/'; $script = substr($0, $pos + 1); -if (-e "$userspath/nologin" && $script ne 'admin.pl') { +if (-e "${LedgerSMB::Sysconfig::userspath}/nologin" && $script ne 'admin.pl') { print "Content-Type: text/html\n\n<html><body><strong>"; print "\nLogin disabled!\n"; print "\n</strong></body></html>"; @@ -49,21 +49,10 @@ # ####################################################################### - -# setup defaults, DO NOT CHANGE -$userspath = "users"; -$spool = "spool"; -${LedgerSMB::Sysconfig::templates} = "templates"; -$memberfile = "users/members"; -$sendmail = "| /usr/sbin/sendmail -t"; -%printer = ( Printer => 'lpr' ); -########## end ########################################### - +use LedgerSMB::Sysconfig; $| = 1; -eval { require "ledger-smb.conf"; }; - if ($ENV{CONTENT_LENGTH}) { read(STDIN, $_, $ENV{CONTENT_LENGTH}); } @@ -88,7 +77,7 @@ $pos = rindex $0, '/'; $script = substr($0, $pos + 1); -if (-e "$userspath/nologin" && $script ne 'admin.pl') { +if (-e "${LedgerSMB::Sysconfig::userspath}/nologin" && $script ne 'admin.pl') { print "Content-Type: text/html\n\n<html><body><strong>"; print "\nLogin disabled!\n"; print "\n</strong></body></html>"; @@ -46,16 +46,7 @@ # ####################################################################### -# setup defaults, DO NOT CHANGE -$userspath = "users"; -$spool = "spool"; -${LedgerSMB::Sysconfig::templates} = "templates"; -$memberfile = "users/members"; -$sendmail = "| /usr/sbin/sendmail -t"; -$latex = 0; -%printer = (); -########## end ########################################### - +use LedgerSMB::Sysconfig; $| = 1; @@ -63,8 +54,6 @@ use LedgerSMB::Form; use LedgerSMB::Locale; use LedgerSMB::Session; -eval { require "ledger-smb.conf"; }; - # for custom preprocessing logic eval { require "custom.pl"; }; @@ -85,7 +74,7 @@ $script =~ s/\.pl//; use DBI qw(:sql_types); # check for user config file, could be missing or ??? -eval { require("$userspath/$form->{login}.conf"); }; +eval { require("${LedgerSMB::Sysconfig::userspath}/$form->{login}.conf"); }; if ($@) { $locale = LedgerSMB::Locale->get_handle($myconfig{countrycode}) or $form->error("Locale not loaded: $!\n"); @@ -119,7 +108,7 @@ $form->db_init(\%myconfig); if ($form->{path} ne 'bin/lynx'){ $form->{path} = 'bin/mozilla';} # did sysadmin lock us out -if (-f "$userspath/nologin") { +if (-f "${LedgerSMB::Sysconfig::userspath}/nologin") { $form->error($locale->text('System currently down for maintenance!')); } |