summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-09-10 01:41:56 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-09-10 01:41:56 +0000
commit301545e572f38b78c90b27219f4c8715837f54fd (patch)
treeaf78b25af2cb16dc022323ffc167d1cff811db4b
parent64b808ddbc840c881257c42c94cc1c801a716099 (diff)
Revised copyright notices so that these are not as ambiguous.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@53 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--CONTRIBUTORS15
-rwxr-xr-xLedgerSMB/Mailer.pm25
-rwxr-xr-xadmin.pl20
-rwxr-xr-xbin/lynx/aa.pl18
-rwxr-xr-xbin/lynx/admin.pl11
-rwxr-xr-xbin/lynx/am.pl273
-rwxr-xr-xbin/lynx/ap.pl18
-rwxr-xr-xbin/lynx/ar.pl18
-rwxr-xr-xbin/lynx/arap.pl17
-rwxr-xr-xbin/lynx/arapprn.pl17
-rwxr-xr-xbin/lynx/bp.pl17
-rwxr-xr-xbin/lynx/ca.pl18
-rwxr-xr-xbin/lynx/cp.pl18
-rwxr-xr-xbin/lynx/ct.pl18
-rwxr-xr-xbin/lynx/gl.pl18
-rwxr-xr-xbin/lynx/hr.pl17
-rwxr-xr-xbin/lynx/ic.pl18
-rwxr-xr-xbin/lynx/io.pl17
-rwxr-xr-xbin/lynx/ir.pl17
-rwxr-xr-xbin/lynx/is.pl17
-rwxr-xr-xbin/lynx/jc.pl17
-rwxr-xr-xbin/lynx/login.pl546
-rwxr-xr-xbin/lynx/menu.pl28
-rwxr-xr-xbin/lynx/oe.pl17
-rwxr-xr-xbin/lynx/pe.pl17
-rwxr-xr-xbin/lynx/pos.pl18
-rwxr-xr-xbin/lynx/ps.pl16
-rwxr-xr-xbin/lynx/pw.pl17
-rwxr-xr-xbin/lynx/rc.pl17
-rwxr-xr-xbin/lynx/rp.pl19
-rwxr-xr-xbin/mozilla/admin.pl11
-rwxr-xr-xbin/mozilla/login.pl13
-rwxr-xr-xlocale/it/Num2text4
-rwxr-xr-xlogin.pl19
-rwxr-xr-xmenu.pl19
-rwxr-xr-xsetup.pl557
36 files changed, 1488 insertions, 454 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index bf94c27a..b4a4e6c9 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1,8 +1,8 @@
-Copyright of individual lines of code may be owned in part by the contributors.
-
-Dieter Simader <dsimader @ sql-ledger.com>
-Original author of SQL-Ledger, on which LedgerSMB is based.
+Copyright of individual lines of code may be owned in part or whole by the
+individual contributors.
+Current Authors of LedgerSMB:
+==================================
Chris Travers <chris @ metatrontech.com>
Wrote the inventory activity report, helped with the session handling fix,
and other tasks.
@@ -14,6 +14,13 @@ current coding standards, and other contributions.
Joshua Drake <jd @ commandprompt . com>
Contributed database fixes.
+
+Original Authors of SQL-Ledger:
+===================================
+Dieter Simader <dsimader @ sql-ledger.com>
+Original author of SQL-Ledger, on which LedgerSMB is based. He also owns DWS
+Systems, Inc.
+
Christopher Browne <cbrowne @ acm.org>
Tony Fraser <tony @ sybaspace.com>
Both of the above are mentioned as contributors to a single file in SQL-Ledger.
diff --git a/LedgerSMB/Mailer.pm b/LedgerSMB/Mailer.pm
index db44cff0..4f4b477e 100755
--- a/LedgerSMB/Mailer.pm
+++ b/LedgerSMB/Mailer.pm
@@ -2,7 +2,10 @@
# LedgerSMB
# Small Medium Business Accounting software
#
-# See COPYRIGHT file for copyright information
+# See COPYRIGHT file for current copyright information
+#
+# Original Author and copyright holder:
+# Dieter Simader dsmimader@sql-ledger.com
#======================================================================
#
# This file has NOT undergone whitespace cleanup.
@@ -123,7 +126,25 @@ $self->{message}
sub encode_base64 ($;$) {
# this code is from the MIME-Base64-2.12 package
- # Copyright 1995-1999,2001 Gisle Aas <gisle@ActiveState.com>
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
+# Copyright (C) 2002
+#
+# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
my $res = "";
my $eol = $_[1];
diff --git a/admin.pl b/admin.pl
index 03b0d370..009fa65c 100755
--- a/admin.pl
+++ b/admin.pl
@@ -2,11 +2,31 @@
#
######################################################################
# LedgerSMB Accounting and ERP
+
# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
#
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
+# Portions Copyright (C) Dieter Simader 2001
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/bin/lynx/aa.pl b/bin/lynx/aa.pl
index 5fbb9c93..50c143ef 100755
--- a/bin/lynx/aa.pl
+++ b/bin/lynx/aa.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2005
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
diff --git a/bin/lynx/admin.pl b/bin/lynx/admin.pl
index 3bf69501..73c1729e 100755
--- a/bin/lynx/admin.pl
+++ b/bin/lynx/admin.pl
@@ -75,10 +75,8 @@ password=
sub adminlogin {
$form->{title} = qq|LedgerSMB $form->{version} |.$locale->text('Administration');
-
- $form->header;
-
- print qq|
+
+ $myheaderadd = qq|
<script language="JavaScript" type="text/javascript">
<!--
function sf(){
@@ -86,12 +84,15 @@ function sf(){
}
// End -->
</script>
+ |;
+ $form->header(undef, $headeradd);
+ print qq|
<body class=admin onload="sf()">
<div align=center>
-<a href="http://sourceforge.net/projects/ledger-smb/"><img src="ledger-smb.png" width="200" height="100" border="0"></a>
+<a href="http://sourceforge.net/projects/ledger-smb/"><img src="ledger-smb.png" width="200" height="100" border="0" alt="LedgerSMB Logo"></a>
<h1 class=login>|.$locale->text('Version').qq| $form->{version}<p>|.$locale->text('Administration').qq|</h1>
<form method=post action="$form->{script}" name=admin>
diff --git a/bin/lynx/am.pl b/bin/lynx/am.pl
index ad2e91b2..e5601954 100755
--- a/bin/lynx/am.pl
+++ b/bin/lynx/am.pl
@@ -1,23 +1,12 @@
#=====================================================================
-# LedgerSMB Small Medium Business Accounting
-# Copyright (c) 2001
-#
-# Author: DWS Systems Inc.
-# Web: http://sourceforge.net/projects/ledger-smb/
-#
+# LedgerSMB
+# Small Medium Business Accounting software
+#
+# See COPYRIGHT file for copyright information
+#======================================================================
#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# This file has NOT undergone whitespace cleanup.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#======================================================================
#
# administration
@@ -25,12 +14,12 @@
#======================================================================
-use SL::AM;
-use SL::CA;
-use SL::Form;
-use SL::User;
-use SL::RP;
-use SL::GL;
+use LedgerSMB::AM;
+use LedgerSMB::CA;
+use LedgerSMB::Form;
+use LedgerSMB::User;
+use LedgerSMB::RP;
+use LedgerSMB::GL;
1;
@@ -124,15 +113,15 @@ sub account_header {
<td>
<table>
<tr>
- <th align=right>|.$locale->text('Account Number').qq|</th>
+ <th align="right">|.$locale->text('Account Number').qq|</th>
<td><input name=accno size=20 value="$form->{accno}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Description').qq|</th>
+ <th align="right">|.$locale->text('Description').qq|</th>
<td><input name=description size=40 value="$form->{description}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Account Type').qq|</th>
+ <th align="right">|.$locale->text('Account Type').qq|</th>
<td>
<table>
<tr valign=top>
@@ -216,7 +205,7 @@ if ($form->{charttype} eq "A") {
print qq|
<tr>
- <th align=right>|.$locale->text('GIFI').qq|</th>
+ <th align="right">|.$locale->text('GIFI').qq|</th>
<td><input name=gifi_accno size=9 value=$form->{gifi_accno}></td>
</tr>
</table>
@@ -327,8 +316,8 @@ sub list_account {
<tr>
<th class=listtop colspan=$colspan>$form->{title}</th>
</tr>
- <tr height=5></tr>
- <tr class=listheading>
+ <tr height="5"></tr>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -357,11 +346,11 @@ sub list_account {
$gifi_accno = $form->escape($ca->{gifi_accno});
if ($ca->{charttype} eq "H") {
- print qq|<tr class=listheading>|;
+ print qq|<tr class="listheading">|;
- $column_data{accno} = qq|<th><a class=listheading href=$form->{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ca->{accno}</a></th>|;
- $column_data{gifi_accno} = qq|<th class=listheading><a href=$form->{script}?action=edit_gifi&accno=$gifi_accno&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ca->{gifi_accno}</a>&nbsp;</th>|;
- $column_data{description} = qq|<th class=listheading>$ca->{description}&nbsp;</th>|;
+ $column_data{accno} = qq|<th><a class="listheading" href="$form->{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback">$ca->{accno}</a></th>|;
+ $column_data{gifi_accno} = qq|<th class="listheading"><a href="$form->{script}?action=edit_gifi&accno=$gifi_accno&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback">$ca->{gifi_accno}</a>&nbsp;</th>|;
+ $column_data{description} = qq|<th class="listheading">$ca->{description}&nbsp;</th>|;
$column_data{debit} = qq|<th>&nbsp;</th>|;
$column_data{credit} = qq| <th>&nbsp;</th>|;
$column_data{link} = qq|<th>&nbsp;</th>|;
@@ -369,12 +358,12 @@ sub list_account {
} else {
$i++; $i %= 2;
print qq|
-<tr valign=top class=listrow$i>|;
- $column_data{accno} = qq|<td><a href=$form->{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ca->{accno}</a></td>|;
- $column_data{gifi_accno} = qq|<td><a href=$form->{script}?action=edit_gifi&accno=$gifi_accno&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ca->{gifi_accno}</a>&nbsp;</td>|;
+<tr valign=top class="listrow$i">|;
+ $column_data{accno} = qq|<td><a href="$form->{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback">$ca->{accno}</a></td>|;
+ $column_data{gifi_accno} = qq|<td><a href="$form->{script}?action=edit_gifi&accno=$gifi_accno&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback">$ca->{gifi_accno}</a>&nbsp;</td>|;
$column_data{description} = qq|<td>$ca->{description}&nbsp;</td>|;
- $column_data{debit} = qq|<td align=right>$ca->{debit}</td>|;
- $column_data{credit} = qq|<td align=right>$ca->{credit}</td>|;
+ $column_data{debit} = qq|<td align="right">$ca->{debit}</td>|;
+ $column_data{credit} = qq|<td align="right">$ca->{credit}</td>|;
$column_data{link} = qq|<td>$ca->{link}&nbsp;</td>|;
}
@@ -385,7 +374,7 @@ sub list_account {
}
print qq|
- <tr><td colspan=$colspan><hr size=3 noshade></td></tr>
+ <tr><td colspan="$colspan"><hr size="3" noshade /></td></tr>
</table>
</body>
@@ -428,8 +417,8 @@ sub list_gifi {
@column_index = qw(accno description);
- $column_header{accno} = qq|<th class=listheading>|.$locale->text('GIFI').qq|</a></th>|;
- $column_header{description} = qq|<th class=listheading>|.$locale->text('Description').qq|</a></th>|;
+ $column_header{accno} = qq|<th class="listheading">|.$locale->text('GIFI').qq|</a></th>|;
+ $column_header{description} = qq|<th class="listheading">|.$locale->text('Description').qq|</a></th>|;
$form->header;
@@ -443,7 +432,7 @@ sub list_gifi {
<th class=listtop colspan=$colspan>$form->{title}</th>
</tr>
<tr height="5"></tr>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -540,11 +529,11 @@ sub gifi_header {
<td>
<table>
<tr>
- <th align=right>|.$locale->text('GIFI').qq|</th>
+ <th align="right">|.$locale->text('GIFI').qq|</th>
<td><input name=accno size=20 value="$form->{accno}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Description').qq|</th>
+ <th align="right">|.$locale->text('Description').qq|</th>
<td><input name=description size=60 value="$form->{description}"></td>
</tr>
</table>
@@ -674,9 +663,9 @@ sub list_department {
@column_index = qw(description cost profit);
- $column_header{description} = qq|<th width=90%><a class=listheading href=$href>|.$locale->text('Description').qq|</a></th>|;
- $column_header{cost} = qq|<th class=listheading nowrap>|.$locale->text('Cost Center').qq|</th>|;
- $column_header{profit} = qq|<th class=listheading nowrap>|.$locale->text('Profit Center').qq|</th>|;
+ $column_header{description} = qq|<th width=90%><a class="listheading" href=$href>|.$locale->text('Description').qq|</a></th>|;
+ $column_header{cost} = qq|<th class="listheading" nowrap>|.$locale->text('Cost Center').qq|</th>|;
+ $column_header{profit} = qq|<th class="listheading" nowrap>|.$locale->text('Profit Center').qq|</th>|;
$form->header;
@@ -691,7 +680,7 @@ sub list_department {
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -791,7 +780,7 @@ sub department_header {
</tr>
<tr height="5"></tr>
<tr>
- <th align=right>|.$locale->text('Description').qq|</th>
+ <th align="right">|.$locale->text('Description').qq|</th>
<td>$description</td>
</tr>
<tr>
@@ -867,8 +856,8 @@ sub list_business {
@column_index = qw(description discount);
- $column_header{description} = qq|<th width=90%><a class=listheading href=$href>|.$locale->text('Description').qq|</a></th>|;
- $column_header{discount} = qq|<th class=listheading>|.$locale->text('Discount').qq| %</th>|;
+ $column_header{description} = qq|<th width=90%><a class="listheading" href=$href>|.$locale->text('Description').qq|</a></th>|;
+ $column_header{discount} = qq|<th class="listheading">|.$locale->text('Discount').qq| %</th>|;
$form->header;
@@ -883,7 +872,7 @@ sub list_business {
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -903,7 +892,7 @@ sub list_business {
$discount = $form->format_amount(\%myconfig, $ref->{discount} * 100, 2, "&nbsp");
$column_data{description} = qq|<td><a href=$form->{script}?action=edit_business&id=$ref->{id}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ref->{description}</td>|;
- $column_data{discount} = qq|<td align=right>$discount</td>|;
+ $column_data{discount} = qq|<td align="right">$discount</td>|;
for (@column_index) { print "$column_data{$_}\n" }
@@ -977,11 +966,11 @@ sub business_header {
<td>
<table>
<tr>
- <th align=right>|.$locale->text('Type of Business').qq|</th>
+ <th align="right">|.$locale->text('Type of Business').qq|</th>
<td><input name=description size=30 value="$form->{description}"></td>
<tr>
<tr>
- <th align=right>|.$locale->text('Discount').qq| %</th>
+ <th align="right">|.$locale->text('Discount').qq| %</th>
<td><input name=discount size=5 value=$form->{discount}></td>
</tr>
</table>
@@ -1060,8 +1049,8 @@ sub list_sic {
@column_index = $form->sort_columns(qw(code description));
- $column_header{code} = qq|<th><a class=listheading href=$href&sort=code>|.$locale->text('Code').qq|</a></th>|;
- $column_header{description} = qq|<th><a class=listheading href=$href&sort=description>|.$locale->text('Description').qq|</a></th>|;
+ $column_header{code} = qq|<th><a class="listheading" href=$href&sort=code>|.$locale->text('Code').qq|</a></th>|;
+ $column_header{description} = qq|<th><a class="listheading" href=$href&sort=description>|.$locale->text('Description').qq|</a></th>|;
$form->header;
@@ -1076,7 +1065,7 @@ sub list_sic {
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -1091,7 +1080,7 @@ sub list_sic {
if ($ref->{sictype} eq 'H') {
print qq|
- <tr valign=top class=listheading>
+ <tr valign=top class="listheading">
|;
$column_data{code} = qq|<th><a href=$form->{script}?action=edit_sic&code=$ref->{code}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&callback=$callback>$ref->{code}</th>|;
$column_data{description} = qq|<th>$ref->{description}</th>|;
@@ -1175,7 +1164,7 @@ sub sic_header {
</tr>
<tr height="5"></tr>
<tr>
- <th align=right>|.$locale->text('Code').qq|</th>
+ <th align="right">|.$locale->text('Code').qq|</th>
<td><input name=code size=10 value="$form->{code}"></td>
<tr>
<tr>
@@ -1183,7 +1172,7 @@ sub sic_header {
<th align=left><input name=sictype class=checkbox type=checkbox value="H" $checked> |.$locale->text('Heading').qq|</th>
<tr>
<tr>
- <th align=right>|.$locale->text('Description').qq|</th>
+ <th align="right">|.$locale->text('Description').qq|</th>
<td><input name=description size=60 value="$form->{description}"></td>
</tr>
<td colspan=2><hr size=3 noshade></td>
@@ -1258,8 +1247,8 @@ sub list_language {
@column_index = $form->sort_columns(qw(code description));
- $column_header{code} = qq|<th><a class=listheading href=$href&sort=code>|.$locale->text('Code').qq|</a></th>|;
- $column_header{description} = qq|<th><a class=listheading href=$href&sort=description>|.$locale->text('Description').qq|</a></th>|;
+ $column_header{code} = qq|<th><a class="listheading" href=$href&sort=code>|.$locale->text('Code').qq|</a></th>|;
+ $column_header{description} = qq|<th><a class="listheading" href=$href&sort=description>|.$locale->text('Description').qq|</a></th>|;
$form->header;
@@ -1274,7 +1263,7 @@ sub list_language {
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -1361,11 +1350,11 @@ sub language_header {
</tr>
<tr height="5"></tr>
<tr>
- <th align=right>|.$locale->text('Code').qq|</th>
+ <th align="right">|.$locale->text('Code').qq|</th>
<td><input name=code size=10 value="$form->{code}"></td>
<tr>
<tr>
- <th align=right>|.$locale->text('Description').qq|</th>
+ <th align="right">|.$locale->text('Description').qq|</th>
<td><input name=description size=60 value="$form->{description}"></td>
</tr>
<td colspan=2><hr size=3 noshade></td>
@@ -1502,8 +1491,8 @@ sub list_templates {
@column_index = $form->sort_columns(qw(code description));
- $column_header{code} = qq|<th><a class=listheading href=$href&sort=code>|.$locale->text('Code').qq|</a></th>|;
- $column_header{description} = qq|<th><a class=listheading href=$href&sort=description>|.$locale->text('Description').qq|</a></th>|;
+ $column_header{code} = qq|<th><a class="listheading" href=$href&sort=code>|.$locale->text('Code').qq|</a></th>|;
+ $column_header{description} = qq|<th><a class="listheading" href=$href&sort=description>|.$locale->text('Description').qq|</a></th>|;
$form->header;
@@ -1518,7 +1507,7 @@ sub list_templates {
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -1722,40 +1711,40 @@ sub defaults {
<td>
<table>
<tr>
- <th align=right>|.$locale->text('Business Number').qq|</th>
+ <th align="right">|.$locale->text('Business Number').qq|</th>
<td><input name=businessnumber size=25 value="$form->{businessnumber}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Weight Unit').qq|</th>
+ <th align="right">|.$locale->text('Weight Unit').qq|</th>
<td><input name=weightunit size=5 value="$form->{weightunit}"></td>
</tr>
</table>
</td>
</tr>
<tr>
- <th class=listheading>|.$locale->text('Last Numbers & Default Accounts').qq|</th>
+ <th class="listheading">|.$locale->text('Last Numbers & Default Accounts').qq|</th>
</tr>
<tr>
<td>
<table>
<tr>
- <th align=right nowrap>|.$locale->text('Inventory').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Inventory').qq|</th>
<td><select name=IC>$form->{account}{IC}</select></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Income').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Income').qq|</th>
<td><select name=IC_income>$form->{account}{IC_income}</select></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Expense').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Expense').qq|</th>
<td><select name=IC_expense>$form->{account}{IC_expense}</select></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Foreign Exchange Gain').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Foreign Exchange Gain').qq|</th>
<td><select name=FX_gain>$form->{account}{FX_gain}</select></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Foreign Exchange Loss').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Foreign Exchange Loss').qq|</th>
<td><select name=FX_loss>$form->{account}{FX_loss}</select></td>
</tr>
</table>
@@ -1773,51 +1762,51 @@ sub defaults {
<td>
<table>
<tr>
- <th align=right nowrap>|.$locale->text('GL Reference Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('GL Reference Number').qq|</th>
<td><input name=glnumber size=40 value="$form->{glnumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Sales Invoice/AR Transaction Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Sales Invoice/AR Transaction Number').qq|</th>
<td><input name=sinumber size=40 value="$form->{sinumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Sales Order Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Sales Order Number').qq|</th>
<td><input name=sonumber size=40 value="$form->{sonumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Vendor Invoice/AP Transaction Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Vendor Invoice/AP Transaction Number').qq|</th>
<td><input name=vinumber size=40 value="$form->{vinumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Purchase Order Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Purchase Order Number').qq|</th>
<td><input name=ponumber size=40 value="$form->{ponumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Sales Quotation Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Sales Quotation Number').qq|</th>
<td><input name=sqnumber size=40 value="$form->{sqnumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('RFQ Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('RFQ Number').qq|</th>
<td><input name=rfqnumber size=40 value="$form->{rfqnumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Part Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Part Number').qq|</th>
<td><input name=partnumber size=40 value="$form->{partnumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Job/Project Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Job/Project Number').qq|</th>
<td><input name=projectnumber size=40 value="$form->{projectnumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Employee Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Employee Number').qq|</th>
<td><input name=employeenumber size=40 value="$form->{employeenumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Customer Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Customer Number').qq|</th>
<td><input name=customernumber size=40 value="$form->{customernumber}"></td>
</tr>
<tr>
- <th align=right nowrap>|.$locale->text('Vendor Number').qq|</th>
+ <th align="right" nowrap>|.$locale->text('Vendor Number').qq|</th>
<td><input name=vendornumber size=40 value="$form->{vendornumber}"></td>
</tr>
</table>
@@ -1906,7 +1895,7 @@ sub display_taxes {
print qq|
<tr>
- <th align=right>|;
+ <th align="right">|;
if ($form->{"taxdescription_$i"} eq $sametax) {
print "";
@@ -2053,7 +2042,7 @@ sub config {
$printer = qq|
<tr>
- <th align=right>|.$locale->text('Printer').qq|</th>
+ <th align="right">|.$locale->text('Printer').qq|</th>
<td><select name=printer>$selectprinter</select></td>
</tr>
|;
@@ -2081,31 +2070,31 @@ sub config {
<td>
<table>
<tr>
- <th align=right>|.$locale->text('Name').qq|</th>
+ <th align="right">|.$locale->text('Name').qq|</th>
<td><input name=name size=20 value="$myconfig{name}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('E-mail').qq|</th>
+ <th align="right">|.$locale->text('E-mail').qq|</th>
<td><input name=email size=35 value="$myconfig{email}"></td>
</tr>
<tr valign=top>
- <th align=right>|.$locale->text('Signature').qq|</th>
+ <th align="right">|.$locale->text('Signature').qq|</th>
<td><textarea name=signature rows=3 cols=35>$myconfig{signature}</textarea></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Phone').qq|</th>
+ <th align="right">|.$locale->text('Phone').qq|</th>
<td><input name=tel size=14 value="$myconfig{tel}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Fax').qq|</th>
+ <th align="right">|.$locale->text('Fax').qq|</th>
<td><input name=fax size=14 value="$myconfig{fax}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Company').qq|</th>
+ <th align="right">|.$locale->text('Company').qq|</th>
<td><input name=company size=35 value="$myconfig{company}"></td>
</tr>
<tr valign=top>
- <th align=right>|.$locale->text('Address').qq|</th>
+ <th align="right">|.$locale->text('Address').qq|</th>
<td><textarea name=address rows=4 cols=35>$myconfig{address}</textarea></td>
</tr>
</table>
@@ -2113,39 +2102,39 @@ sub config {
<td>
<table>
<tr>
- <th align=right>|.$locale->text('Password').qq|</th>
+ <th align="right">|.$locale->text('Password').qq|</th>
<td><input type=password name=new_password size=10 value=$myconfig{password}></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Confirm').qq|</th>
+ <th align="right">|.$locale->text('Confirm').qq|</th>
<td><input type=password name=confirm_password size=10></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Date Format').qq|</th>
+ <th align="right">|.$locale->text('Date Format').qq|</th>
<td><select name=dateformat>$dateformat</select></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Number Format').qq|</th>
+ <th align="right">|.$locale->text('Number Format').qq|</th>
<td><select name=numberformat>$numberformat</select></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Dropdown Limit').qq|</th>
+ <th align="right">|.$locale->text('Dropdown Limit').qq|</th>
<td><input name=vclimit size=10 value="$myconfig{vclimit}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Menu Width').qq|</th>
+ <th align="right">|.$locale->text('Menu Width').qq|</th>
<td><input name=menuwidth size=10 value="$myconfig{menuwidth}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Language').qq|</th>
+ <th align="right">|.$locale->text('Language').qq|</th>
<td><select name=countrycode>$countrycodes</select></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Session Timeout').qq|</th>
+ <th align="right">|.$locale->text('Session Timeout').qq|</th>
<td><input name=timeout size=10 value="$myconfig{timeout}"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Stylesheet').qq|</th>
+ <th align="right">|.$locale->text('Stylesheet').qq|</th>
<td><select name=usestylesheet>$selectstylesheet</select></td>
</tr>
$printer
@@ -2275,19 +2264,19 @@ sub audit_control {
<td>
<table>
<tr>
- <th align=right>|.$locale->text('Enforce transaction reversal for all dates').qq|</th>
+ <th align="right">|.$locale->text('Enforce transaction reversal for all dates').qq|</th>
<td><input name=revtrans class=radio type=radio value="1" $checked{revtransY}> |.$locale->text('Yes').qq| <input name=revtrans class=radio type=radio value="0" $checked{revtransN}> |.$locale->text('No').qq|</td>
</tr>
<tr>
- <th align=right>|.$locale->text('Close Books up to').qq|</th>
+ <th align="right">|.$locale->text('Close Books up to').qq|</th>
<td><input name=closedto size=11 title="$myconfig{dateformat}" value=$form->{closedto}></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Activate Audit trail').qq|</th>
+ <th align="right">|.$locale->text('Activate Audit trail').qq|</th>
<td><input name=audittrail class=radio type=radio value="1" $checked{audittrailY}> |.$locale->text('Yes').qq| <input name=audittrail class=radio type=radio value="0" $checked{audittrailN}> |.$locale->text('No').qq|</td>
</tr>
<tr>
- <th align=right>|.$locale->text('Remove Audit trail up to').qq|</th>
+ <th align="right">|.$locale->text('Remove Audit trail up to').qq|</th>
<td><input name=removeaudittrail size=11 title="$myconfig{dateformat}"></td>
</tr>
</table>
@@ -2385,7 +2374,7 @@ sub list_warehouse {
@column_index = qw(description);
- $column_header{description} = qq|<th width=100%><a class=listheading href=$href>|.$locale->text('Description').qq|</a></th>|;
+ $column_header{description} = qq|<th width=100%><a class="listheading" href=$href>|.$locale->text('Description').qq|</a></th>|;
$form->header;
@@ -2400,7 +2389,7 @@ sub list_warehouse {
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -2494,7 +2483,7 @@ sub warehouse_header {
</tr>
<tr height="5"></tr>
<tr>
- <th align=right>|.$locale->text('Description').qq|</th>
+ <th align="right">|.$locale->text('Description').qq|</th>
<td>$description</td>
</tr>
<tr>
@@ -2549,23 +2538,23 @@ sub yearend {
<td>
<table>
<tr>
- <th align=right>|.$locale->text('Yearend').qq|</th>
+ <th align="right">|.$locale->text('Yearend').qq|</th>
<td><input name=todate size=11 title="$myconfig{dateformat}" value=$todate></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Reference').qq|</th>
+ <th align="right">|.$locale->text('Reference').qq|</th>
<td><input name=reference size=20 value="|.$locale->text('Yearend').qq|"></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Description').qq|</th>
+ <th align="right">|.$locale->text('Description').qq|</th>
<td><textarea name=description rows=3 cols=50 wrap=soft></textarea></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Retained Earnings').qq|</th>
+ <th align="right">|.$locale->text('Retained Earnings').qq|</th>
<td><select name=accno>$chart</select></td>
</tr>
<tr>
- <th align=right>|.$locale->text('Method').qq|</th>
+ <th align="right">|.$locale->text('Method').qq|</th>
<td><input name=method class=radio type=radio value=accrual checked>&nbsp;|.$locale->text('Accrual').qq|&nbsp;<input name=method class=radio type=radio value=cash>&nbsp;|.$locale->text('Cash').qq|</td>
</tr>
</table>
@@ -2657,8 +2646,8 @@ sub company_logo {
</pre>
<center>
-<a href="http://sourceforge.net/projects/ledger-smb/" target=_blank><img src=ledger-smb.png border=0></a>
-<h1 class=login>|.$locale->text('Version').qq| $form->{version}</h1>
+<a href="http://sourceforge.net/projects/ledger-smb/" target="_blank"><img src="ledger-smb.png" width="200" height="100" border="0" alt="LedgerSMB Logo" /></a>
+<h1 class="login">|.$locale->text('Version').qq| $form->{version}</h1>
<p>
|.$locale->text('Licensed to').qq|
@@ -2671,15 +2660,15 @@ $myconfig{company}
<p>
<table border=0>
<tr>
- <th align=right>|.$locale->text('User').qq|</th>
+ <th align="right">|.$locale->text('User').qq|</th>
<td>$myconfig{name}</td>
</tr>
<tr>
- <th align=right>|.$locale->text('Dataset').qq|</th>
+ <th align="right">|.$locale->text('Dataset').qq|</th>
<td>$myconfig{dbname}</td>
</tr>
<tr>
- <th align=right>|.$locale->text('Database Host').qq|</th>
+ <th align="right">|.$locale->text('Database Host').qq|</th>
<td>$myconfig{dbhost}</td>
</tr>
</table>
@@ -2724,18 +2713,18 @@ sub recurring_transactions {
push @column_index, qw(nextdate enddate id amount curr repeat howmany recurringemail recurringprint);
- $column_header{reference} = "<th><a class=listheading href=$href&sort=reference>".$locale->text('Reference').qq"</a></th>";
- $column_header{ndx} = "<th class=listheading>&nbsp;</th>";
- $column_header{id} = "<th class=listheading>".$locale->text('ID')."</th>";
- $column_header{description} = "<th class=listheading>".$locale->text('Description')."</th>";
- $column_header{nextdate} = "<th><a class=listheading href=$href&sort=nextdate>".$locale->text('Next')."</a></th>";
- $column_header{enddate} = "<th><a class=listheading href=$href&sort=enddate>".$locale->text('Ends')."</a></th>";
- $column_header{amount} = "<th class=listheading>".$locale->text('Amount')."</th>";
- $column_header{curr} = "<th class=listheading>&nbsp;</th>";
- $column_header{repeat} = "<th class=listheading>".$locale->text('Every')."</th>";
- $column_header{howmany} = "<th class=listheading>".$locale->text('Times')."</th>";
- $column_header{recurringemail} = "<th class=listheading>".$locale->text('E-mail')."</th>";
- $column_header{recurringprint} = "<th class=listheading>".$locale->text('Print')."</th>";
+ $column_header{reference} = qq|<th><a class="listheading" href="$href&sort=reference">|.$locale->text('Reference').q|</a></th>|;
+ $column_header{ndx} = q|<th class="listheading">&nbsp;</th>|;
+ $column_header{id} = q|<th class="listheading">|.$locale->text('ID').q|</th>|;
+ $column_header{description} = q|<th class="listheading">|.$locale->text('Description').q|</th>|;
+ $column_header{nextdate} = qq|<th><a class="listheading" href="$href&sort=nextdate">|.$locale->text('Next').q|</a></th>|;
+ $column_header{enddate} = qq|<th><a class="listheading" href="$href&sort=enddate">|.$locale->text('Ends').q|</a></th>|;
+ $column_header{amount} = q|<th class="listheading">|.$locale->text('Amount').q|</th>|;
+ $column_header{curr} = q|<th class="listheading">&nbsp;</th>|;
+ $column_header{repeat} = q|<th class="listheading">|.$locale->text('Every').q|</th>|;
+ $column_header{howmany} = q|<th class="listheading">|.$locale->text('Times').q|</th>|;
+ $column_header{recurringemail} = q|<th class="listheading">|.$locale->text('E-mail').q|</th>|;
+ $column_header{recurringprint} = q|<th class="listheading">|.$locale->text('Print').q|</th>|;
print qq|
<body>
@@ -2750,7 +2739,7 @@ print qq|
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "\n$column_header{$_}" }
@@ -2774,7 +2763,7 @@ print qq|
foreach $transaction (sort keys %{ $form->{transactions} }) {
print qq|
<tr>
- <th class=listheading colspan=$colspan>$tr{$transaction}</th>
+ <th class="listheading" colspan=$colspan>$tr{$transaction}</th>
</tr>
|;
@@ -2817,11 +2806,11 @@ print qq|
$type = ($ref->{vc} eq 'customer') ? "sales_order" : "purchase_order";
}
- $column_data{id} = qq|<td><a href=$module?action=edit&id=$ref->{id}&vc=$ref->{vc}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&type=$type&readonly=1>$ref->{id}</a></td>|;
+ $column_data{id} = qq|<td><a href="$module?action=edit&id=$ref->{id}&vc=$ref->{vc}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}&type=$type&readonly=1">$ref->{id}</a></td>|;
- $column_data{repeat} = "<td align=right nowrap>$repeat</td>";
- $column_data{howmany} = "<td align=right nowrap>".$form->format_amount(\%myconfig, $ref->{howmany})."</td>";
- $column_data{amount} = "<td align=right nowrap>".$form->format_amount(\%myconfig, $ref->{amount}, 2)."</td>";
+ $column_data{repeat} = qq|<td align="right" nowrap>$repeat</td>|;
+ $column_data{howmany} = qq|<td align="right" nowrap>|.$form->format_amount(\%myconfig, $ref->{howmany})."</td>";
+ $column_data{amount} = qq|<td align="right" nowrap>|.$form->format_amount(\%myconfig, $ref->{amount}, 2)."</td>";
$column_data{recurringemail} = "<td nowrap>";
@f = split /:/, $ref->{recurringemail};
diff --git a/bin/lynx/ap.pl b/bin/lynx/ap.pl
index 8eb246e0..3f0a3db8 100755
--- a/bin/lynx/ap.pl
+++ b/bin/lynx/ap.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (C) 2000
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
diff --git a/bin/lynx/ar.pl b/bin/lynx/ar.pl
index 4a475578..46719f2f 100755
--- a/bin/lynx/ar.pl
+++ b/bin/lynx/ar.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2000
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
diff --git a/bin/lynx/arap.pl b/bin/lynx/arap.pl
index 6fc44370..89d16654 100755
--- a/bin/lynx/arap.pl
+++ b/bin/lynx/arap.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2003
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/arapprn.pl b/bin/lynx/arapprn.pl
index 8519df47..a8a98bad 100755
--- a/bin/lynx/arapprn.pl
+++ b/bin/lynx/arapprn.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2003
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/bp.pl b/bin/lynx/bp.pl
index ce724baa..7606cb23 100755
--- a/bin/lynx/bp.pl
+++ b/bin/lynx/bp.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2003
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/ca.pl b/bin/lynx/ca.pl
index 8ea9980d..c6371f7f 100755
--- a/bin/lynx/ca.pl
+++ b/bin/lynx/ca.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (C) 2001
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
diff --git a/bin/lynx/cp.pl b/bin/lynx/cp.pl
index e7303904..e1b3ae41 100755
--- a/bin/lynx/cp.pl
+++ b/bin/lynx/cp.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2002
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
diff --git a/bin/lynx/ct.pl b/bin/lynx/ct.pl
index 300fda0a..5bccf6d1 100755
--- a/bin/lynx/ct.pl
+++ b/bin/lynx/ct.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2001
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Reed White <alta@alta-research.com>
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors: Reed White <alta@alta-research.com>
diff --git a/bin/lynx/gl.pl b/bin/lynx/gl.pl
index 2cd298aa..a8d72d79 100755
--- a/bin/lynx/gl.pl
+++ b/bin/lynx/gl.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2001
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
diff --git a/bin/lynx/hr.pl b/bin/lynx/hr.pl
index 9b86d86b..e3a9f772 100755
--- a/bin/lynx/hr.pl
+++ b/bin/lynx/hr.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2004
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/ic.pl b/bin/lynx/ic.pl
index 47e0304d..daaae47e 100755
--- a/bin/lynx/ic.pl
+++ b/bin/lynx/ic.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2001
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
diff --git a/bin/lynx/io.pl b/bin/lynx/io.pl
index fbc37ac7..295c391e 100755
--- a/bin/lynx/io.pl
+++ b/bin/lynx/io.pl
@@ -1,8 +1,25 @@
######################################################################
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2002
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/ir.pl b/bin/lynx/ir.pl
index 3a4c9905..1c23eea4 100755
--- a/bin/lynx/ir.pl
+++ b/bin/lynx/ir.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2001
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/is.pl b/bin/lynx/is.pl
index 1dde9d87..0ee87c16 100755
--- a/bin/lynx/is.pl
+++ b/bin/lynx/is.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2001
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/jc.pl b/bin/lynx/jc.pl
index 2312dabc..e11213ed 100755
--- a/bin/lynx/jc.pl
+++ b/bin/lynx/jc.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2005
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/login.pl b/bin/lynx/login.pl
index fb2fe312..421b5c7e 100755
--- a/bin/lynx/login.pl
+++ b/bin/lynx/login.pl
@@ -1,61 +1,52 @@
-######################################################################
-# LedgerSMB Small Medium Business Accounting
-# Copyright (c) 2000
+#=====================================================================
+# LedgerSMB
+# Small Medium Business Accounting software
+#
+# See COPYRIGHT file for copyright information
+#======================================================================
#
-# Author: DWS Systems Inc.
-# Web: http://sourceforge.net/projects/ledger-smb/
+# This file has undergone whitespace cleanup.
#
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-######################################################################
+#======================================================================
#
# login frontend
#
#######################################################################
-
use DBI;
-use SL::User;
-use SL::Form;
+use LedgerSMB::User;
+use LedgerSMB::Form;
+## will need this later when session_destroy will be used
+#use LedgerSMB::Session;
-$form = new Form;
+$form = new Form;
$locale = new Locale $language, "login";
$form->{charset} = $locale->{charset};
# customization
if (-f "$form->{path}/custom_$form->{script}") {
- eval { require "$form->{path}/custom_$form->{script}"; };
- $form->error($@) if ($@);
+ eval { require "$form->{path}/custom_$form->{script}"; };
+ $form->error($@) if ($@);
}
# per login customization
if (-f "$form->{path}/$form->{login}_$form->{script}") {
- eval { require "$form->{path}/$form->{login}_$form->{script}"; };
- $form->error($@) if ($@);
+ eval { require "$form->{path}/$form->{login}_$form->{script}"; };
+ $form->error($@) if ($@);
}
# window title bar, user info
$form->{titlebar} = "LedgerSMB ".$locale->text('Version'). " $form->{version}";
if ($form->{action}) {
- $form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}";
- &{ $locale->findsub($form->{action}) };
+ $form->{titlebar} .= " - $myconfig{name} - $myconfig{dbname}";
+ &{ $locale->findsub($form->{action}) };
+
} else {
- &login_screen;
+ &login_screen;
}
@@ -64,287 +55,268 @@ if ($form->{action}) {
sub login_screen {
- $form->{stylesheet} = "ledger-smb.css";
- $form->{favicon} = "favicon.ico";
-
- $form->{endsession} = 1;
- $form->header(1);
-
- if ($form->{login}) {
- $sf = qq|function sf() { document.login.password.focus(); }|;
- } else {
- $sf = qq|function sf() { document.login.login.focus(); }|;
- }
-
- print qq|
-<script language="JavaScript" type="text/javascript">
-<!--
-var agt = navigator.userAgent.toLowerCase();
-var is_major = parseInt(navigator.appVersion);
-var is_nav = ((agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1)
- && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera') == -1)
- && (agt.indexOf('webtv') == -1));
-var is_nav4lo = (is_nav && (is_major <= 4));
-
-function jsp() {
- if (is_nav4lo)
- document.login.js.value = "0"
- else
- document.login.js.value = "1"
-}
-$sf
-// End -->
-</script>
-|;
-
- print qq|
-
-<body class=login onload="jsp(); sf()">
-
-<pre>
-
-</pre>
-
-<center>
-<table class=login border=3 cellpadding=20>
- <tr>
- <td class=login align=center><a href="http://sourceforge.net/projects/ledger-smb/" target=_top><img src=ledger-smb.png border=0></a>
-<h1 class=login align=center>|.$locale->text('Version').qq| $form->{version}
-</h1>
-
-<p>
-
-<form method=post action=$form->{script} name=login>
-
- <table width=100%>
- <tr>
- <td align=center>
- <table>
- <tr>
- <th align=right>|.$locale->text('Name').qq|</th>
- <td><input class=login name=login size=30 value=$form->{login}></td>
- </tr>
- <tr>
- <th align=right>|.$locale->text('Password').qq|</th>
- <td><input class=login type=password name=password size=30></td>
- </tr>
- <input type=hidden name=path value=$form->{path}>
- <input type=hidden name=js value=$form->{js}>
- </table>
-
- <br>
- <input type=submit name=action value="|.$locale->text('Login').qq|">
- </td>
- </tr>
- </table>
-
-</form>
-
- </td>
- </tr>
-</table>
-
+ $form->{stylesheet} = "ledger-smb.css";
+ $form->{favicon} = "favicon.ico";
+
+ $form->{endsession} = 1;
+
+ if ($form->{login}) {
+ $sf = q|function sf() { document.login.password.focus(); }|;
+ } else {
+ $sf = q|function sf() { document.login.login.focus(); }|;
+ }
+
+ my $headeradd = qq|
+ <script language="JavaScript" type="text/javascript">
+ <!--
+ var agt = navigator.userAgent.toLowerCase();
+ var is_major = parseInt(navigator.appVersion);
+ var is_nav = ((agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1)
+ && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera') == -1)
+ && (agt.indexOf('webtv') == -1));
+ var is_nav4lo = (is_nav && (is_major <= 4));
+
+ function jsp() {
+ if (is_nav4lo){
+ document.login.js.value = "0";
+ } else {
+ document.login.js.value = "1";
+ }
+ }
+
+ $sf
+ // End -->
+ </script>|;
+
+ $form->header(1, $headeradd)
+
+ print qq|
+
+<body class="login" onload="jsp(); sf();">
+ <br /><br />
+ <center>
+ <table class="login" border="3" cellpadding="20">
+ <tr>
+ <td class="login" align="center">
+ <a href="http://sourceforge.net/projects/ledger-smb/" 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">
+ <table width="100%">
+ <tr>
+ <td align="center">
+ <table>
+ <tr>
+ <th align="right">|.$locale->text('Name').qq|</th>
+ <td><input class="login" name="login" size="30" value="$form->{login}" /></td>
+ </tr>
+ <tr>
+ <th align="right">|.$locale->text('Password').qq|</th>
+ <td><input class="login" type="password" name="password" size="30" /></td>
+ </tr>
+ </table>
+ <br />
+ </td>
+ </tr>
+ </table>
+ <input type="hidden" name="path" value="$form->{path}" />
+ <input type="hidden" name="js" value="$form->{js}" />
+ <input type="submit" name="action" value="|.$locale->text('Login').qq|" />
+ </form>
+ </p>
+ </td>
+ </tr>
+ </table>
+ </center>
</body>
-</html>
-|;
+</html>|;
}
sub selectdataset {
- my ($login) = @_;
-
- if (-f "css/ledger-smb.css") {
- $form->{stylesheet} = "ledger-smb.css";
- }
-
- $form->header(1);
-
- print qq|
-<body class=login onload="document.forms[0].password.focus()" />
-
-<pre>
-
-</pre>
-
-<center>
-<table class=login border=3 cellpadding=20>
- <tr>
- <td class=login align=center><a href="http://sourceforge.net/projects/ledger-smb/" target=_top><img src=ledger-smb.png border=0></a>
-<h1 class=login align=center>|.$locale->text('Version').qq| $form->{version}
-</h1>
-
-<p>
-
-<form method=post action=$form->{script}>
-
-<input type=hidden name=beenthere value=1>
-
- <table width=100%>
- <tr>
- <td align=center>
- <table>
- <tr>
- <th align=right>|.$locale->text('Name').qq|</th>
- <td>$form->{login}</td>
- </tr>
- <tr>
- <th align=right>|.$locale->text('Password').qq|</th>
- <td><input class=login type=password name=password size=30 value=$form->{password}></td>
- </tr>
- <input type=hidden name=js value=$form->{js}>
- <input type=hidden name=path value=$form->{path}>
- <tr>
- <th align=right>|.$locale->text('Company').qq|</th>
- <td>|;
-
+ my ($login) = @_;
+
+ if (-f "css/ledger-smb.css") {
+ $form->{stylesheet} = "ledger-smb.css";
+ }
+
+ $form->header(1);
+
+ print qq|
+<body class="login" onload="document.forms[0].password.focus()" />
+ <br /><br />
+ <center>
+ <table class="login" border="3" cellpadding="20">
+ <tr>
+ <td class="login" align="center">
+ <a href="http://sourceforge.net/projects/ledger-smb/" target="_top"><img src="ledger-smb.png" width="100" 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}">
+ <input type="hidden" name="beenthere" value="1" />
+ <input type="hidden" name="js" value="$form->{js}" />
+ <input type="hidden" name="path" value="$form->{path}" />
+ <table width="100%">
+ <tr>
+ <td align="center">
+ <table>
+ <tr>
+ <th align="right">|.$locale->text('Name').qq|</th>
+ <td>$form->{login}</td>
+ </tr>
+ <tr>
+ <th align="right">|.$locale->text('Password').qq|</th>
+ <td><input class="login" type="password" name="password" size="30" value="$form->{password}" /></td>
+ </tr>
+ <tr>
+ <th align="right">|.$locale->text('Company').qq|</th>
+ <td>|;
+
$checked = "checked";
foreach $login (sort { $login{$a} cmp $login{$b} } keys %{ $login }) {
- print qq|
- <br><input class=login type=radio name=login value=$login $checked>$login{$login}
- |;
- $checked = "";
+ print qq| <br /><input class="login" type="radio" name="login" value="$login" $checked>$login{$login} |;
+ $checked = "";
}
- print qq|
- </td>
- </tr>
- </table>
- <br>
- <input type=submit name=action value="|.$locale->text('Login').qq|">
- </td>
- </tr>
- </table>
-
-</form>
-
- </td>
- </tr>
-</table>
-
+ print qq|
+ </td>
+ </tr>
+ </table>
+ <br />
+ <input type="submit" name="action" value="|.$locale->text('Login').qq|">
+ </td>
+ </tr>
+ </table>
+ </form>
+ </td>
+ </tr>
+ </table>
+ </center>
</body>
-</html>
-|;
-
+</html>|;
}
sub login {
- $form->{stylesheet} = "ledger-smb.css";
- $form->{favicon} = "favicon.ico";
-
- $form->error($locale->text('You did not enter a name!')) unless ($form->{login});
-
- if (! $form->{beenthere}) {
- open(FH, "$memberfile") or $form->error("$memberfile : $!");
- @a = <FH>;
- close(FH);
-
- foreach $item (@a) {
-
- if ($item =~ /^\[(.*?)\]/) {
- $login = $1;
- $found = 1;
- }
-
- if ($item =~ /^company=/) {
- if ($login =~ /$form->{login}\@/ && $found) {
- ($null, $name) = split /=/, $item, 2;
- $login{$login} = $name;
+ $form->{stylesheet} = "ledger-smb.css";
+ $form->{favicon} = "favicon.ico";
+
+ $form->error($locale->text('You did not enter a name!')) unless ($form->{login});
+
+ if (! $form->{beenthere}) {
+ open(FH, "$memberfile") or $form->error("$memberfile : $!");
+ @a = <FH>;
+ close(FH);
+
+ foreach $item (@a) {
+
+ if ($item =~ /^\[(.*?)\]/) {
+ $login = $1;
+ $found = 1;
+ }
+
+ if ($item =~ /^company=/) {
+ if ($login =~ /$form->{login}\@/ && $found) {
+ ($null, $name) = split /=/, $item, 2;
+ $login{$login} = $name;
+ }
+ $found = 0;
+ }
+ }
+
+ if (keys %login > 1) {
+ &selectdataset(\%login);
+ exit;
+ }
}
- $found = 0;
- }
-
- }
-
- if (keys %login > 1) {
- &selectdataset(\%login);
- exit;
- }
- }
-
-
- $user = new User $memberfile, $form->{login};
-
- # if we get an error back, bale out
- if (($errno = $user->login(\%$form, $userspath)) <= -1) {
-
- $errno *= -1;
- $err[1] = $locale->text('Access Denied!');
- $err[2] = $locale->text('Incorrect Dataset version!');
- $err[3] = $locale->text('Dataset is newer than version!');
-
- if ($errno == 4) {
- # upgrade dataset and log in again
- open FH, ">$userspath/nologin" or $form->error($!);
-
- for (qw(dbname dbhost dbport dbdriver dbuser dbpasswd)) { $form->{$_} = $user->{$_} }
-
- $form->{dbpasswd} = unpack 'u', $form->{dbpasswd};
-
- $form->{dbupdate} = "db$user->{dbname}";
- $form->{$form->{dbupdate}} = 1;
-
- $form->header;
- print $locale->text('Upgrading to Version')." $form->{version} ... ";
-
- # required for Oracle
- $form->{dbdefault} = $sid;
-
- $user->dbupdate(\%$form);
-
- # remove lock file
- unlink "$userspath/nologin";
-
- print $locale->text('done');
-
- print "<p><a href=menu.pl?login=$form->{login}&sessionid=$form->{sessionid}&path=$form->{path}&action=display&main=company_logo&js=$form->{js}>".$locale->text('Continue')."</a>";
-
- exit;
- }
-
- $form->error($err[$errno]);
- }
-
- # made it this far, setup callback for the menu
- $form->{callback} = "menu.pl?action=display";
- for (qw(login path js)) { $form->{callback} .= "&$_=$form->{$_}" }
-
- # check for recurring transactions
- if ($user->{acs} !~ /Recurring Transactions/) {
- if ($user->check_recurring(\%$form)) {
- $form->{callback} .= "&main=recurring_transactions";
- } else {
- $form->{callback} .= "&main=company_logo";
- }
- } else {
- if ($user->{role} eq 'user') {
- $form->{callback} .= "&main=company_logo";
- } else {
- if ($user->check_recurring(\%$form)) {
- $form->{callback} .= "&main=recurring_transactions";
- } else {
- $form->{callback} .= "&main=company_logo";
- }
- }
- }
-
- $form->redirect;
-
-}
+ $user = new User $memberfile, $form->{login};
-sub logout {
+ # if we get an error back, bale out
+ if (($errno = $user->login(\%$form, $userspath)) <= -1) {
- $form->{callback} = "$form->{script}?path=$form->{path}&login=$form->{login}";
+ $errno *= -1;
+ $err[1] = $locale->text('Access Denied!');
+ $err[2] = $locale->text('Incorrect Dataset version!');
+ $err[3] = $locale->text('Dataset is newer than version!');
- $form->{endsession} = 1;
-
- $form->redirect;
+ if ($errno == 4) {
+ # upgrade dataset and log in again
+ open FH, ">$userspath/nologin" or $form->error($!);
+
+ for (qw(dbname dbhost dbport dbdriver dbuser dbpasswd)) { $form->{$_} = $user->{$_} }
+
+ $form->{dbpasswd} = unpack 'u', $form->{dbpasswd};
+
+ $form->{dbupdate} = "db$user->{dbname}";
+ $form->{$form->{dbupdate}} = 1;
+
+ $form->header;
+ print qq|<body>|;
+ print $locale->text('Upgrading to Version')." $form->{version} ... ";
+
+ # required for Oracle
+ $form->{dbdefault} = $sid;
+
+ $user->dbupdate(\%$form);
+
+ # remove lock file
+ unlink "$userspath/nologin";
+
+ print $locale->text('done');
+
+ print "<p><a href=\"menu.pl?login=$form->{login}&sessionid=$form->{sessionid}&path=$form->{path}&action=display&main=company_logo&js=$form->{js}>\">".$locale->text('Continue')."</a>";
+ print qq|</body>|;
+ exit;
+ }
+
+ $form->error($err[$errno]);
+ }
+
+ # made it this far, setup callback for the menu
+ $form->{callback} = "menu.pl?action=display&password=$form->{password}";
+ for (qw(login path js)) { $form->{callback} .= "&$_=$form->{$_}" }
+
+ # check for recurring transactions
+ if ($user->{acs} !~ /Recurring Transactions/) {
+
+ if ($user->check_recurring(\%$form)) {
+ $form->{callback} .= "&main=recurring_transactions";
+ } else {
+ $form->{callback} .= "&main=company_logo";
+ }
+
+ } else {
+
+ if ($user->{role} eq 'user') {
+ $form->{callback} .= "&main=company_logo";
+ } else {
+
+ if ($user->check_recurring(\%$form)) {
+ $form->{callback} .= "&main=recurring_transactions";
+ } else {
+ $form->{callback} .= "&main=company_logo";
+ }
+ }
+ }
+
+ $form->redirect;
+
+}
+
+
+
+sub logout {
+ $form->{callback} = "$form->{script}?path=$form->{path}&login=$form->{login}";
+ $form->{endsession} = 1;
+ #delete the cookie in the browser manually (can't use session_destroy here unfortunately)
+ print qq|Set-Cookie: LedgerSMB=; path=/;\n|;
+ $form->redirect;
}
diff --git a/bin/lynx/menu.pl b/bin/lynx/menu.pl
index d087bc1f..b7dc829d 100755
--- a/bin/lynx/menu.pl
+++ b/bin/lynx/menu.pl
@@ -1,6 +1,32 @@
######################################################################
# LedgerSMB Small Medium Business Accounting
-# Copyright (c) 2006
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
+# Copyright (c) 2000
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Christopher Browne <cbrowne@acm.org>
+# Tony Fraser <tony@sybaspace.com>
+#
+#
+# Portions Copyright (c) 2000
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
#
#
# This program is free software; you can redistribute it and/or modify
diff --git a/bin/lynx/oe.pl b/bin/lynx/oe.pl
index 6d369ef5..5a6a6e1d 100755
--- a/bin/lynx/oe.pl
+++ b/bin/lynx/oe.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2001
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/pe.pl b/bin/lynx/pe.pl
index bc7b108f..daf26fc4 100755
--- a/bin/lynx/pe.pl
+++ b/bin/lynx/pe.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2002
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/pos.pl b/bin/lynx/pos.pl
index ca6a87b4..932315c5 100755
--- a/bin/lynx/pos.pl
+++ b/bin/lynx/pos.pl
@@ -1,8 +1,26 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2003
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Steve Doerr <sdoerr907@everestkc.net>
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors: Steve Doerr <sdoerr907@everestkc.net>
diff --git a/bin/lynx/ps.pl b/bin/lynx/ps.pl
index 1a11743e..47708a25 100755
--- a/bin/lynx/ps.pl
+++ b/bin/lynx/ps.pl
@@ -1,8 +1,24 @@
######################################################################
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 1999 - 2005
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# This program is free software; you can redistribute it and/or modify
diff --git a/bin/lynx/pw.pl b/bin/lynx/pw.pl
index a634e74b..e2824d8b 100755
--- a/bin/lynx/pw.pl
+++ b/bin/lynx/pw.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2004
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/rc.pl b/bin/lynx/rc.pl
index 3ba199e4..e28d6ef6 100755
--- a/bin/lynx/rc.pl
+++ b/bin/lynx/rc.pl
@@ -1,8 +1,25 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2003
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
#
diff --git a/bin/lynx/rp.pl b/bin/lynx/rp.pl
index d9803c93..19c48ff2 100755
--- a/bin/lynx/rp.pl
+++ b/bin/lynx/rp.pl
@@ -1,8 +1,27 @@
#=====================================================================
# LedgerSMB Small Medium Business Accounting
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
# Copyright (c) 2001
#
# Author: DWS Systems Inc.
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Antonio Gallardo <agssa@ibw.com.ni>
+# Benjamin Lee <benjaminlee@consultant.com>
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors: Antonio Gallardo <agssa@ibw.com.ni>
diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl
index 3bf69501..73c1729e 100755
--- a/bin/mozilla/admin.pl
+++ b/bin/mozilla/admin.pl
@@ -75,10 +75,8 @@ password=
sub adminlogin {
$form->{title} = qq|LedgerSMB $form->{version} |.$locale->text('Administration');
-
- $form->header;
-
- print qq|
+
+ $myheaderadd = qq|
<script language="JavaScript" type="text/javascript">
<!--
function sf(){
@@ -86,12 +84,15 @@ function sf(){
}
// End -->
</script>
+ |;
+ $form->header(undef, $headeradd);
+ print qq|
<body class=admin onload="sf()">
<div align=center>
-<a href="http://sourceforge.net/projects/ledger-smb/"><img src="ledger-smb.png" width="200" height="100" border="0"></a>
+<a href="http://sourceforge.net/projects/ledger-smb/"><img src="ledger-smb.png" width="200" height="100" border="0" alt="LedgerSMB Logo"></a>
<h1 class=login>|.$locale->text('Version').qq| $form->{version}<p>|.$locale->text('Administration').qq|</h1>
<form method=post action="$form->{script}" name=admin>
diff --git a/bin/mozilla/login.pl b/bin/mozilla/login.pl
index 5f317d10..421b5c7e 100755
--- a/bin/mozilla/login.pl
+++ b/bin/mozilla/login.pl
@@ -59,7 +59,6 @@ sub login_screen {
$form->{favicon} = "favicon.ico";
$form->{endsession} = 1;
- $form->header(1);
if ($form->{login}) {
$sf = q|function sf() { document.login.password.focus(); }|;
@@ -67,7 +66,7 @@ sub login_screen {
$sf = q|function sf() { document.login.login.focus(); }|;
}
- print qq|
+ my $headeradd = qq|
<script language="JavaScript" type="text/javascript">
<!--
var agt = navigator.userAgent.toLowerCase();
@@ -89,6 +88,8 @@ sub login_screen {
// End -->
</script>|;
+ $form->header(1, $headeradd)
+
print qq|
<body class="login" onload="jsp(); sf();">
@@ -97,7 +98,7 @@ sub login_screen {
<table class="login" border="3" cellpadding="20">
<tr>
<td class="login" align="center">
- <a href="http://sourceforge.net/projects/ledger-smb/" target="_top"><img src="ledger-smb.png" width="200" heith="100" border="0" /></a>
+ <a href="http://sourceforge.net/projects/ledger-smb/" 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">
@@ -149,7 +150,7 @@ sub selectdataset {
<table class="login" border="3" cellpadding="20">
<tr>
<td class="login" align="center">
- <a href="http://sourceforge.net/projects/ledger-smb/" target="_top"><img src="ledger-smb.png" width="100" heith="100" border="0" /></a>
+ <a href="http://sourceforge.net/projects/ledger-smb/" target="_top"><img src="ledger-smb.png" width="100" 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}">
@@ -255,6 +256,7 @@ sub login {
$form->{$form->{dbupdate}} = 1;
$form->header;
+ print qq|<body>|;
print $locale->text('Upgrading to Version')." $form->{version} ... ";
# required for Oracle
@@ -267,7 +269,8 @@ sub login {
print $locale->text('done');
- print "<p><a href=\"menu.pl?login=$form->{login}&sessionid=$form->{sessionid}&path=$form->{path}&action=display&main=company_logo&js=$form->{js}>\"".$locale->text('Continue')."</a>";
+ print "<p><a href=\"menu.pl?login=$form->{login}&sessionid=$form->{sessionid}&path=$form->{path}&action=display&main=company_logo&js=$form->{js}>\">".$locale->text('Continue')."</a>";
+ print qq|</body>|;
exit;
}
diff --git a/locale/it/Num2text b/locale/it/Num2text
index 6086c339..a330a785 100755
--- a/locale/it/Num2text
+++ b/locale/it/Num2text
@@ -2,9 +2,9 @@
# LedgerSMB Small Medium Business Accounting
# Copyright (C) 2002
#
-# Author: Dieter Simader
+# Original Author: Dieter Simader
# Email: dsimader@sql-ledger.org
-# Web: http://sourceforge.net/projects/ledger-smb/
+# Web: http://sourceforge.net/projects/sql-ledger/
#
# Contributors: Luca Venturini <luca@yepa.com>
#
diff --git a/login.pl b/login.pl
index a633a8a3..c1d16c91 100755
--- a/login.pl
+++ b/login.pl
@@ -2,7 +2,26 @@
#
######################################################################
# LedgerSMB Accounting and ERP
+
# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
#
# Web: http://sourceforge.net/projects/ledger-smb/
#
diff --git a/menu.pl b/menu.pl
index 6612d4be..69090246 100755
--- a/menu.pl
+++ b/menu.pl
@@ -2,7 +2,26 @@
#
######################################################################
# LedgerSMB Accounting and ERP
+
# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
+# Copyright (C) 2001
+#
+# Author: Dieter Simader
+# Email: dsimader@sql-ledger.org
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
#
#
# This program is free software; you can redistribute it and/or modify
diff --git a/setup.pl b/setup.pl
index 6daf46c3..81d9b244 100755
--- a/setup.pl
+++ b/setup.pl
@@ -2,7 +2,562 @@
#
######################################################################
# LedgerSMB Small Medium Business Accounting Software Installer
-# Portions Copyright (c) 2002, Dieter Simader
+
+# Copyright (C) 2006
+# This work contains copyrighted information from a number of sources all used
+# with permission.
+#
+# This file contains source code included with or based on SQL-Ledger which
+# is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
+# under the GNU General Public License version 2 or, at your option, any later
+# version. For a full list including contact information of contributors,
+# maintainers, and copyright holders, see the CONTRIBUTORS file.
+#
+# Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
+# Copyright (c) 2002, Dieter Simader
+#
+# Web: http://www.sql-ledger.org
+#
+#######################################################################
+
+$| = 1;
+
+if ($ENV{HTTP_USER_AGENT}) {
+ print "
+This does not work yet!
+use $0 from the command line";
+ exit;
+}
+
+$lynx = `lynx -version`; # if LWP is not installed use lynx
+$gzip = `gzip -V 2>&1`; # gz decompression utility
+$tar = `tar --version 2>&1`; # tar archiver
+$latex = `latex -version`;
+
+%checkversion = ( www => 3, abacus => 4, pluto => 5, neptune => 8 );
+
+%source = (
+ 1 => { url => "http://voxel.dl.sourceforge.net/sourceforge/sql-ledger", site => "New York, U.S.A", locale => us },
+ 2 => { url => "http://easynews.dl.sourceforge.net/sourceforge/sql-ledger", site => "Arizona, U.S.A", locale => us },
+ 3 => { url => "http://www.sql-ledger.com/source", site => "California, U.S.A", locale => us },
+ 4 => { url => "http://abacus.sql-ledger.com/source", site => "Toronto, Canada", locale => ca },
+ 5 => { url => "http://pluto.sql-ledger.com/source", site => "Edmonton, Canada", locale => ca },
+ 6 => { url => "http://ufpr.dl.sourceforge.net/sourceforge/sql-ledger", site =>"Brazil", locale => br },
+ 7 => { url => "http://surfnet.dl.sourceforge.net/sourceforge/sql-ledger", site => "The Netherlands", locale => nl },
+ 8 => { url => "http://neptune.sql-ledger.com/source", site => "Ireland", locale => ie },
+ 9 => { url => "http://kent.dl.sourceforge.net/sourceforge/sql-ledger", site => "U.K", locale => uk },
+ 10 => { url => "http://ovh.dl.sourceforge.net/sourceforge/sql-ledger", site => "France", locale => fr },
+ 11 => { url => "http://mesh.dl.sourceforge.net/sourceforge/sql-ledger", site => "Germany", locale => de },
+ 12 => { url => "http://citkit.dl.sourceforge.net/sourceforge/sql-ledger", site => "Russia", locale => ru },
+ 13 => { url => "http://optusnet.dl.sourceforge.net/sourceforge/sql-ledger", site => "Sydney, Australia", locale => au },
+ 14 => { url => "http://nchc.dl.sourceforge.net/sourceforge/sql-ledger", site => "Taiwan", locale => tw },
+ 15 => { url => "http://jaist.dl.sourceforge.net/sourceforge/sql-ledger", site => "Japan", locale => jp }
+ );
+
+$userspath = "users"; # default for new installation
+
+eval { require "sql-ledger.conf"; };
+
+$filename = shift;
+chomp $filename;
+
+$newinstall = 1;
+
+# is LWP installed
+eval { require LWP::Simple; };
+$lwp = !($@);
+
+unless ($lwp || $lynx || $filename) {
+ die "You must have either lynx or LWP installed or specify a filename.
+perl $0 <filename>\n";
+}
+
+if ($filename) {
+ # extract version
+ die "Not a SQL-Ledger archive\n" if ($filename !~ /^sql-ledger/);
+
+ $version = $filename;
+ $version =~ s/sql-ledger-(\d+\.\d+\.\d+).*$/$1/;
+
+}
+
+if (-f "VERSION") {
+ # get installed version from VERSION file
+ open(FH, "VERSION");
+ @a = <FH>;
+ close(FH);
+ $version = $a[0];
+ chomp $version;
+
+ $newinstall = !$version;
+
+ if (! -f "sql-ledger.conf") {
+ $newinstall = 1;
+ }
+}
+
+$webowner = "nobody";
+$webgroup = "nogroup";
+
+if ($httpd = `find /etc /usr/local/etc -type f -name 'httpd.conf'`) {
+ chomp $httpd;
+ $webowner = `grep "^User " $httpd`;
+ $webgroup = `grep "^Group " $httpd`;
+
+ chomp $webowner;
+ chomp $webgroup;
+
+ ($null, $webowner) = split / /, $webowner;
+ ($null, $webgroup) = split / /, $webgroup;
+
+}
+
+if ($confd = `find /etc /usr/local/etc -type d -name 'apache*/conf.d'`) {
+ chomp $confd;
+}
+
+system("tput clear");
+
+if ($filename) {
+ $install = "\ninstall $version from (f)ile\n";
+}
+
+# check for latest version
+&get_latest_version;
+chomp $latest_version;
+
+if (!$newinstall) {
+
+ $install .= "\n(r)einstall $version\n";
+
+}
+
+if ($version && $latest_version) {
+ if ($version lt $latest_version) {
+ $install .= "\n(u)pgrade to $latest_version\n";
+ }
+}
+
+
+$install .= "\n(i)nstall $latest_version (from Internet)\n" if $latest_version;
+
+$install .= "\n(d)ownload $latest_version (no installation)" unless $filename;
+
+ print qq|
+
+
+ LedgerSMB Accounting and ERP Installation
+
+
+
+$install
+
+
+Enter: |;
+
+$a = <STDIN>;
+chomp $a;
+
+exit unless $a;
+$a = lc $a;
+
+if ($a !~ /d/) {
+
+ print qq|\nEnter httpd owner [$webowner] : |;
+ $web = <STDIN>;
+ chomp $web;
+ $webowner = $web if $web;
+
+ print qq|\nEnter httpd group [$webgroup] : |;
+ $web = <STDIN>;
+ chomp $web;
+ $webgroup = $web if $web;
+
+}
+
+if ($a ne 'f') {
+ system("tput clear");
+
+ # choose site
+ foreach $item (sort { $a <=> $b } keys %source) {
+ $i++;
+ print qq|$i. $source{$item}{site}\n|;
+ }
+
+ $site = "1";
+
+ print qq|\nChoose Location [$site] : |;
+ $b = <STDIN>;
+ chomp $b;
+ $site = $b if $b;
+}
+
+if ($a eq 'd') {
+ &download;
+}
+if ($a =~ /(i|u)/) {
+ &install;
+}
+if ($a eq 'r') {
+ $latest_version = $version;
+ &install;
+}
+if ($a eq 'f') {
+ &install;
+}
+
+exit;
+# end main
+
+
+sub download {
+
+ &get_source_code;
+
+}
+
+
+sub get_latest_version {
+
+ print "Checking for latest version number .... ";
+
+ if ($filename) {
+ print "skipping, filename supplied\n";
+ return;
+ }
+
+ if ($lwp) {
+ foreach $source (qw(pluto www abacus neptune)) {
+ $url = $source{$checkversion{$source}}{url};
+ print "\n$source{$checkversion{$source}}{site} ... ";
+
+ $latest_version = LWP::Simple::get("$url/latest_version");
+
+ if ($latest_version) {
+ last;
+ } else {
+ print "not found";
+ }
+ }
+ } else {
+ if (!$lynx) {
+ print "\nYou must have either lynx or LWP installed";
+ exit 1;
+ }
+
+ foreach $source (qw(pluto www abacus neptune)) {
+ $url = $source{$checkversion{$source}}{url};
+ print "\n$source{$checkversion{$source}}{site} ... ";
+ $ok = `lynx -dump -head $url/latest_version`;
+ if ($ok = ($ok =~ s/HTTP.*?200 //)) {
+ $latest_version = `lynx -dump $url/latest_version`;
+ last;
+ } else {
+ print "not found";
+ }
+ }
+ die unless $ok;
+ }
+
+ if ($latest_version) {
+ print "ok\n";
+ 1;
+ }
+
+}
+
+
+sub get_source_code {
+
+ $err = 0;
+
+ @order = ();
+ push @order, $site;
+
+ for (sort { $a <=> $b } keys %source) {
+ push @order, $_;
+ }
+
+ if ($latest_version) {
+ # download it
+ chomp $latest_version;
+ $latest_version = "sql-ledger-${latest_version}.tar.gz";
+
+ print "\nStatus\n";
+ print "Downloading $latest_version .... ";
+
+ foreach $key (@order) {
+ print "\n$source{$key}{site} .... ";
+
+ if ($lwp) {
+ $err = LWP::Simple::getstore("$source{$key}{url}/$latest_version", "$latest_version");
+ $err -= 200;
+ } else {
+ $ok = `lynx -dump -head $source{$key}{url}/$latest_version`;
+ $err = !($ok =~ s/HTTP.*?200 //);
+
+ if (!$err) {
+ $err = system("lynx -dump $source{$key}{url}/$latest_version > $latest_version");
+ }
+ }
+
+ if ($err) {
+ print "failed!";
+ } else {
+ last;
+ }
+
+ }
+
+ } else {
+ $err = -1;
+ }
+
+ if ($err) {
+ die "Cannot get $latest_version";
+ } else {
+ print "ok!\n";
+ }
+
+ $latest_version;
+
+}
+
+
+sub install {
+
+ if ($filename) {
+ $latest_version = $filename;
+ } else {
+ $latest_version = &get_source_code;
+ }
+
+ &decompress;
+
+ if ($newinstall) {
+ open(FH, "sql-ledger.conf.default");
+ @f = <FH>;
+ close(FH);
+ unless ($latex) {
+ grep { s/^\$latex.*/\$latex = 0;/ } @f;
+ }
+ open(FH, ">sql-ledger.conf");
+ print FH @f;
+ close(FH);
+
+ $alias = $absolutealias = $ENV{'PWD'};
+ $alias =~ s/.*\///g;
+
+ $httpddir = `dirname $httpd`;
+ if ($confd) {
+ $httpddir = $confd;
+ }
+ chomp $httpddir;
+ $filename = "sql-ledger-httpd.conf";
+
+ # do we have write permission?
+ if (!open(FH, ">>$httpddir/$filename")) {
+ open(FH, ">$filename");
+ $norw = 1;
+ }
+
+ $directives = qq|
+Alias /$alias $absolutealias/
+<Directory $absolutealias>
+ AllowOverride All
+ AddHandler cgi-script .pl
+ Options ExecCGI Includes FollowSymlinks
+ Order Allow,Deny
+ Allow from All
+</Directory>
+
+<Directory $absolutealias/users>
+ Order Deny,Allow
+ Deny from All
+</Directory>
+
+|;
+
+ print FH $directives;
+ close(FH);
+
+ print qq|
+This is a new installation.
+
+|;
+
+ if ($norw) {
+ print qq|
+Webserver directives were written to $filename
+
+Copy $filename to $httpddir
+|;
+
+ if (!$confd) {
+ print qq| and add
+# SQL-Ledger
+Include $httpddir/$filename
+
+to $httpd
+|;
+ }
+
+ print qq| and restart your webserver!\n|;
+
+ if (!$permset) {
+ print qq|
+WARNING: permissions for templates, users, css and spool directory
+could not be set. Login as root and set permissions
+
+# chown -hR :$webgroup users templates css spool
+# chmod 771 users templates css spool
+
+|;
+ }
+
+ } else {
+
+ print qq|
+Webserver directives were written to
+
+ $httpddir/$filename
+|;
+
+ if (!$confd) {
+ if (!(`grep "^# SQL-Ledger" $httpd`)) {
+
+ open(FH, ">>$httpd");
+
+ print FH qq|
+
+# SQL-Ledger
+Include $httpddir/$filename
+|;
+ close(FH);
+
+ }
+ }
+
+ if (!$>) {
+ # send SIGHUP to httpd
+ if ($f = `find /var -type f -name 'httpd.pid'`) {
+ $pid = `cat $f`;
+ chomp $pid;
+ if ($pid) {
+ system("kill -s HUP $pid");
+ }
+ }
+ }
+ }
+ }
+
+ # if this is not root, check if user is part of $webgroup
+ if ($>) {
+ if ($permset = ($) =~ getgrnam $webgroup)) {
+ `chown -hR :$webgroup users templates css spool`;
+ chmod 0771, 'users', 'templates', 'css', 'spool';
+ `chown :$webgroup sql-ledger.conf`;
+ }
+ } else {
+ # root
+ `chown -hR 0:0 *`;
+ `chown -hR $webowner:$webgroup users templates css spool`;
+ chmod 0771, 'users', 'templates', 'css', 'spool';
+ `chown $webowner:$webgroup sql-ledger.conf`;
+ }
+
+ chmod 0644, 'sql-ledger.conf';
+ unlink "sql-ledger.conf.default";
+
+ &cleanup;
+
+ while ($a !~ /(Y|N)/) {
+ print qq|\nDisplay README (Y/n) : |;
+ $a = <STDIN>;
+ chomp $a;
+ $a = ($a) ? uc $a : 'Y';
+
+ if ($a eq 'Y') {
+ @args = ("more", "doc/README");
+ system(@args);
+ }
+ }
+
+}
+
+
+sub decompress {
+
+ die "Error: gzip not installed\n" unless ($gzip);
+ die "Error: tar not installed\n" unless ($tar);
+
+ &create_lockfile;
+
+ # ungzip and extract source code
+ print "Decompressing $latest_version ... ";
+
+ if (system("gzip -df $latest_version")) {
+ print "Error: Could not decompress $latest_version\n";
+ &remove_lockfile;
+ exit;
+ } else {
+ print "done\n";
+ }
+
+ # strip gz from latest_version
+ $latest_version =~ s/\.gz//;
+
+ # now untar it
+ print "Unpacking $latest_version ... ";
+ if (system("tar -xf $latest_version")) {
+ print "Error: Could not unpack $latest_version\n";
+ &remove_lockfile;
+ exit;
+ } else {
+ # now we have a copy in sql-ledger
+ if (system("tar -cf $latest_version -C sql-ledger .")) {
+ print "Error: Could not create archive for $latest_version\n";
+ &remove_lockfile;
+ exit;
+ } else {
+ if (system("tar -xf $latest_version")) {
+ print "Error: Could not unpack $latest_version\n";
+ &remove_lockfile;
+ exit;
+ } else {
+ print "done\n";
+ print "cleaning up ... ";
+ `rm -rf sql-ledger`;
+ print "done\n";
+ }
+ }
+ }
+}
+
+
+sub create_lockfile {
+
+ if (-d "$userspath") {
+ open(FH, ">$userspath/nologin");
+ close(FH);
+ }
+
+}
+
+
+sub cleanup {
+
+ unlink "$latest_version";
+ unlink "$userspath/members.default" if (-f "$userspath/members.default");
+
+ &remove_lockfile;
+
+}
+
+
+sub remove_lockfile { unlink "$userspath/nologin" if (-f "$userspath/nologin") };
+
+
#
# Web: http://sourceforge.net/projects/ledger-smb/
#