summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-17 19:58:39 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-17 19:58:39 +0000
commitaedecad9fb390118e16be424e2b546b488ab9083 (patch)
tree13296cfda44e5bc0f8cf03c0371856dfbf25c06c /bin
parentfb6c808efc937e8b91ca8bfec4db2b159cdb87d4 (diff)
?path=/bin/lynx now works in the login but the lynx menus need some real help...
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@926 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rwxr-xr-xbin/login.pl22
1 files changed, 20 insertions, 2 deletions
diff --git a/bin/login.pl b/bin/login.pl
index d1fa5202..0caf8114 100755
--- a/bin/login.pl
+++ b/bin/login.pl
@@ -48,6 +48,24 @@ use LedgerSMB::Session;
$form = new Form;
+# For 1.3, this logic should be in LedgerSMB.pm
+if ($form->{path}) {
+
+ if ($form->{path} ne 'bin/lynx'){ $form->{path} = 'bin/mozilla';}
+
+} else {
+
+ $form->{terminal} = "lynx";
+
+ if ($ENV{HTTP_USER_AGENT} !~ /lynx/i) {
+ $form->{terminal} = "mozilla";
+ }
+
+ $form->{path} = "bin/$form->{terminal}";
+
+
+}
+
$locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language}) or
$form->error(__FILE__.':'.__LINE__.": Locale not loaded: $!\n");
$locale->encoding('UTF-8');
@@ -129,7 +147,7 @@ sub login_screen {
<a href="http://www.ledgersmb.org/" target="_top"><img src="ledger-smb.png" width="200" heith="100" border="0" alt="LedgerSMB Logo" /></a>
<h1 class="login" align="center">|.$locale->text('Version').qq| $form->{version}</h1>
<p>
- <form method="post" action="$form->{script}" name="login">
+ <form method="post" action="login.pl" name="login">
<table width="100%">
<tr>
<td align="center">
@@ -230,12 +248,12 @@ sub selectdataset {
sub login {
-
$form->{stylesheet} = "ledger-smb.css";
$form->{favicon} = "favicon.ico";
$form->error(__FILE__.':'.__LINE__.': '.$locale->text('You did not enter a name!')) unless ($form->{login});
+
#this needs to be done via db
#if (! $form->{beenthere}) {
# open(FH, '<', "${LedgerSMB::Sysconfig::memberfile}") or $form->error(__FILE__.':'.__LINE__.": $memberfile : $!");