[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [926] branches/1.2/bin/login.pl



Revision: 926
          http://svn.sourceforge.net/ledger-smb/?rev=926&view=rev
Author:   einhverfr
Date:     2007-03-17 12:58:39 -0700 (Sat, 17 Mar 2007)

Log Message:
-----------
?path=/bin/lynx now works in the login but the lynx menus need some real help...

Modified Paths:
--------------
    branches/1.2/bin/login.pl

Modified: branches/1.2/bin/login.pl
===================================================================
--- branches/1.2/bin/login.pl	2007-03-17 04:48:59 UTC (rev 925)
+++ branches/1.2/bin/login.pl	2007-03-17 19:58:39 UTC (rev 926)
@@ -48,6 +48,24 @@
 
 $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 @@
 					<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 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 : $!");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.