[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [53] trunk
- Subject: SF.net SVN: ledger-smb: [53] trunk
- From: ..hidden..
- Date: Sat, 09 Sep 2006 18:42:09 -0700
Revision: 53
http://svn.sourceforge.net/ledger-smb/?rev=53&view=rev
Author: einhverfr
Date: 2006-09-09 18:41:56 -0700 (Sat, 09 Sep 2006)
Log Message:
-----------
Revised copyright notices so that these are not as ambiguous.
Modified Paths:
--------------
trunk/CONTRIBUTORS
trunk/LedgerSMB/Mailer.pm
trunk/admin.pl
trunk/bin/lynx/aa.pl
trunk/bin/lynx/admin.pl
trunk/bin/lynx/am.pl
trunk/bin/lynx/ap.pl
trunk/bin/lynx/ar.pl
trunk/bin/lynx/arap.pl
trunk/bin/lynx/arapprn.pl
trunk/bin/lynx/bp.pl
trunk/bin/lynx/ca.pl
trunk/bin/lynx/cp.pl
trunk/bin/lynx/ct.pl
trunk/bin/lynx/gl.pl
trunk/bin/lynx/hr.pl
trunk/bin/lynx/ic.pl
trunk/bin/lynx/io.pl
trunk/bin/lynx/ir.pl
trunk/bin/lynx/is.pl
trunk/bin/lynx/jc.pl
trunk/bin/lynx/login.pl
trunk/bin/lynx/menu.pl
trunk/bin/lynx/oe.pl
trunk/bin/lynx/pe.pl
trunk/bin/lynx/pos.pl
trunk/bin/lynx/ps.pl
trunk/bin/lynx/pw.pl
trunk/bin/lynx/rc.pl
trunk/bin/lynx/rp.pl
trunk/bin/mozilla/admin.pl
trunk/bin/mozilla/login.pl
trunk/locale/it/Num2text
trunk/login.pl
trunk/menu.pl
trunk/setup.pl
Modified: trunk/CONTRIBUTORS
===================================================================
--- trunk/CONTRIBUTORS 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/CONTRIBUTORS 2006-09-10 01:41:56 UTC (rev 53)
@@ -1,8 +1,8 @@
-Copyright of individual lines of code may be owned in part by the contributors.
+Copyright of individual lines of code may be owned in part or whole by the
+individual contributors.
-Dieter Simader <dsimader @ sql-ledger.com>
-Original author of SQL-Ledger, on which LedgerSMB is based.
-
+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 @@
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.
Modified: trunk/LedgerSMB/Mailer.pm
===================================================================
--- trunk/LedgerSMB/Mailer.pm 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/LedgerSMB/Mailer.pm 2006-09-10 01:41:56 UTC (rev 53)
@@ -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 ..hidden..
#======================================================================
#
# This file has NOT undergone whitespace cleanup.
@@ -123,8 +126,26 @@
sub encode_base64 ($;$) {
# this code is from the MIME-Base64-2.12 package
- # Copyright 1995-1999,2001 Gisle Aas <..hidden..>
+# 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];
$eol = "\n" unless defined $eol;
Modified: trunk/admin.pl
===================================================================
--- trunk/admin.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/admin.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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: ..hidden..
+# 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
Modified: trunk/bin/lynx/aa.pl
===================================================================
--- trunk/bin/lynx/aa.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/aa.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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:
Modified: trunk/bin/lynx/admin.pl
===================================================================
--- trunk/bin/lynx/admin.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/admin.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -75,10 +75,8 @@
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 @@
}
// 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>
Modified: trunk/bin/lynx/am.pl
===================================================================
--- trunk/bin/lynx/am.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/am.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -1,23 +1,12 @@
#=====================================================================
-# LedgerSMB Small Medium Business Accounting
-# Copyright (c) 2001
+# 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 NOT 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.
#======================================================================
#
# 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 @@
<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 @@
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 @@
<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 @@
$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> </th>|;
- $column_data{description} = qq|<th class=listheading>$ca->{description} </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> </th>|;
+ $column_data{description} = qq|<th class="listheading">$ca->{description} </th>|;
$column_data{debit} = qq|<th> </th>|;
$column_data{credit} = qq| <th> </th>|;
$column_data{link} = qq|<th> </th>|;
@@ -369,12 +358,12 @@
} 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> </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> </td>|;
$column_data{description} = qq|<td>$ca->{description} </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} </td>|;
}
@@ -385,7 +374,7 @@
}
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 @@
@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 @@
<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 @@
<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 @@
@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 @@
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -791,7 +780,7 @@
</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 @@
@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 @@
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -903,7 +892,7 @@
$discount = $form->format_amount(\%myconfig, $ref->{discount} * 100, 2, " ");
$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 @@
<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 @@
@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 @@
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -1091,7 +1080,7 @@
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 @@
</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 @@
<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 @@
@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 @@
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -1361,11 +1350,11 @@
</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 @@
@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 @@
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -1722,40 +1711,40 @@
<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 @@
<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 @@
print qq|
<tr>
- <th align=right>|;
+ <th align="right">|;
if ($form->{"taxdescription_$i"} eq $sametax) {
print "";
@@ -2053,7 +2042,7 @@
$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 @@
<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 @@
<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 @@
<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 @@
@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 @@
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "$column_header{$_}\n" }
@@ -2494,7 +2483,7 @@
</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 @@
<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> |.$locale->text('Accrual').qq| <input name=method class=radio type=radio value=cash> |.$locale->text('Cash').qq|</td>
</tr>
</table>
@@ -2657,8 +2646,8 @@
</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 @@
<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 @@
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> </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> </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"> </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"> </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 @@
<tr>
<td>
<table width=100%>
- <tr class=listheading>
+ <tr class="listheading">
|;
for (@column_index) { print "\n$column_header{$_}" }
@@ -2774,7 +2763,7 @@
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 @@
$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};
Modified: trunk/bin/lynx/ap.pl
===================================================================
--- trunk/bin/lynx/ap.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/ap.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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:
Modified: trunk/bin/lynx/ar.pl
===================================================================
--- trunk/bin/lynx/ar.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/ar.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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:
Modified: trunk/bin/lynx/arap.pl
===================================================================
--- trunk/bin/lynx/arap.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/arap.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/arapprn.pl
===================================================================
--- trunk/bin/lynx/arapprn.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/arapprn.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/bp.pl
===================================================================
--- trunk/bin/lynx/bp.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/bp.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/ca.pl
===================================================================
--- trunk/bin/lynx/ca.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/ca.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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:
Modified: trunk/bin/lynx/cp.pl
===================================================================
--- trunk/bin/lynx/cp.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/cp.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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:
Modified: trunk/bin/lynx/ct.pl
===================================================================
--- trunk/bin/lynx/ct.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/ct.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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 <..hidden..>
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors: Reed White <..hidden..>
Modified: trunk/bin/lynx/gl.pl
===================================================================
--- trunk/bin/lynx/gl.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/gl.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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:
Modified: trunk/bin/lynx/hr.pl
===================================================================
--- trunk/bin/lynx/hr.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/hr.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/ic.pl
===================================================================
--- trunk/bin/lynx/ic.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/ic.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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:
Modified: trunk/bin/lynx/io.pl
===================================================================
--- trunk/bin/lynx/io.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/io.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/ir.pl
===================================================================
--- trunk/bin/lynx/ir.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/ir.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/is.pl
===================================================================
--- trunk/bin/lynx/is.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/is.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/jc.pl
===================================================================
--- trunk/bin/lynx/jc.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/jc.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/login.pl
===================================================================
--- trunk/bin/lynx/login.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/login.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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;
-
$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 @@
sub login_screen {
- $form->{stylesheet} = "ledger-smb.css";
- $form->{favicon} = "favicon.ico";
+ $form->{stylesheet} = "ledger-smb.css";
+ $form->{favicon} = "favicon.ico";
- $form->{endsession} = 1;
- $form->header(1);
+ $form->{endsession} = 1;
- if ($form->{login}) {
- $sf = qq|function sf() { document.login.password.focus(); }|;
- } else {
- $sf = qq|function sf() { document.login.login.focus(); }|;
- }
+ if ($form->{login}) {
+ $sf = q|function sf() { document.login.password.focus(); }|;
+ } else {
+ $sf = q|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));
+ 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>
-|;
+ function jsp() {
+ if (is_nav4lo){
+ document.login.js.value = "0";
+ } else {
+ document.login.js.value = "1";
+ }
+ }
- print qq|
+ $sf
+ // End -->
+ </script>|;
-<body class=login onload="jsp(); sf()">
+ $form->header(1, $headeradd)
-<pre>
+ print qq|
-</pre>
+<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>|;
-<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>
+sub selectdataset {
+ my ($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>
+ if (-f "css/ledger-smb.css") {
+ $form->{stylesheet} = "ledger-smb.css";
+ }
- <br>
- <input type=submit name=action value="|.$locale->text('Login').qq|">
- </td>
- </tr>
- </table>
+ $form->header(1);
-</form>
+ 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>|;
- </td>
- </tr>
-</table>
-
+ $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|
+ </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 selectdataset {
- my ($login) = @_;
-
- if (-f "css/ledger-smb.css") {
- $form->{stylesheet} = "ledger-smb.css";
- }
+sub login {
- $form->header(1);
+ $form->{stylesheet} = "ledger-smb.css";
+ $form->{favicon} = "favicon.ico";
- print qq|
-<body class=login onload="document.forms[0].password.focus()" />
+ $form->error($locale->text('You did not enter a name!')) unless ($form->{login});
-<pre>
+ if (! $form->{beenthere}) {
+ open(FH, "$memberfile") or $form->error("$memberfile : $!");
+ @a = <FH>;
+ close(FH);
-</pre>
+ foreach $item (@a) {
-<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>
+ if ($item =~ /^\[(.*?)\]/) {
+ $login = $1;
+ $found = 1;
+ }
-<p>
+ if ($item =~ /^company=/) {
+ if ($login =~ /$form->{login}\@/ && $found) {
+ ($null, $name) = split /=/, $item, 2;
+ $login{$login} = $name;
+ }
+ $found = 0;
+ }
+ }
-<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>|;
-
- $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 = "";
+ if (keys %login > 1) {
+ &selectdataset(\%login);
+ exit;
}
+ }
- print qq|
- </td>
- </tr>
- </table>
- <br>
- <input type=submit name=action value="|.$locale->text('Login').qq|">
- </td>
- </tr>
- </table>
-</form>
+ $user = new User $memberfile, $form->{login};
- </td>
- </tr>
-</table>
-
-</body>
-</html>
-|;
+ # 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->{$_} }
-sub login {
+ $form->{dbpasswd} = unpack 'u', $form->{dbpasswd};
- $form->{stylesheet} = "ledger-smb.css";
- $form->{favicon} = "favicon.ico";
-
- $form->error($locale->text('You did not enter a name!')) unless ($form->{login});
+ $form->{dbupdate} = "db$user->{dbname}";
+ $form->{$form->{dbupdate}} = 1;
- if (! $form->{beenthere}) {
- open(FH, "$memberfile") or $form->error("$memberfile : $!");
- @a = <FH>;
- close(FH);
-
- foreach $item (@a) {
+ $form->header;
+ print qq|<body>|;
+ print $locale->text('Upgrading to Version')." $form->{version} ... ";
- if ($item =~ /^\[(.*?)\]/) {
- $login = $1;
- $found = 1;
- }
+ # required for Oracle
+ $form->{dbdefault} = $sid;
- if ($item =~ /^company=/) {
- if ($login =~ /$form->{login}\@/ && $found) {
- ($null, $name) = split /=/, $item, 2;
- $login{$login} = $name;
- }
- $found = 0;
- }
-
- }
+ $user->dbupdate(\%$form);
- if (keys %login > 1) {
- &selectdataset(\%login);
- exit;
- }
- }
+ # remove lock file
+ unlink "$userspath/nologin";
+ print $locale->text('done');
- $user = new User $memberfile, $form->{login};
+ 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;
+ }
- # if we get an error back, bale out
- if (($errno = $user->login(\%$form, $userspath)) <= -1) {
+ $form->error($err[$errno]);
+ }
- $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($!);
+ # 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->{$_}" }
- for (qw(dbname dbhost dbport dbdriver dbuser dbpasswd)) { $form->{$_} = $user->{$_} }
+ # check for recurring transactions
+ if ($user->{acs} !~ /Recurring Transactions/) {
- $form->{dbpasswd} = unpack 'u', $form->{dbpasswd};
-
- $form->{dbupdate} = "db$user->{dbname}";
- $form->{$form->{dbupdate}} = 1;
+ if ($user->check_recurring(\%$form)) {
+ $form->{callback} .= "&main=recurring_transactions";
+ } else {
+ $form->{callback} .= "&main=company_logo";
+ }
- $form->header;
- print $locale->text('Upgrading to Version')." $form->{version} ... ";
+ } else {
- # required for Oracle
- $form->{dbdefault} = $sid;
+ if ($user->{role} eq 'user') {
+ $form->{callback} .= "&main=company_logo";
+ } else {
- $user->dbupdate(\%$form);
+ if ($user->check_recurring(\%$form)) {
+ $form->{callback} .= "&main=recurring_transactions";
+ } else {
+ $form->{callback} .= "&main=company_logo";
+ }
+ }
+ }
- # remove lock file
- unlink "$userspath/nologin";
+ $form->redirect;
- 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;
-
}
sub logout {
- $form->{callback} = "$form->{script}?path=$form->{path}&login=$form->{login}";
-
- $form->{endsession} = 1;
-
- $form->redirect;
-
+ $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;
}
Modified: trunk/bin/lynx/menu.pl
===================================================================
--- trunk/bin/lynx/menu.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/menu.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -1,8 +1,34 @@
######################################################################
# 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: ..hidden..
+# Web: http://www.sql-ledger.org
+#
+# Contributors: Christopher Browne <..hidden..>
+# Tony Fraser <..hidden..>
+#
+#
+# Portions Copyright (c) 2000
+#
+# Author: Dieter Simader
+# Email: ..hidden..
+# Web: http://www.sql-ledger.org
+#
+#
# 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
Modified: trunk/bin/lynx/oe.pl
===================================================================
--- trunk/bin/lynx/oe.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/oe.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/pe.pl
===================================================================
--- trunk/bin/lynx/pe.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/pe.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/pos.pl
===================================================================
--- trunk/bin/lynx/pos.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/pos.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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 <..hidden..>
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors: Steve Doerr <..hidden..>
Modified: trunk/bin/lynx/ps.pl
===================================================================
--- trunk/bin/lynx/ps.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/ps.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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
Modified: trunk/bin/lynx/pw.pl
===================================================================
--- trunk/bin/lynx/pw.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/pw.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/rc.pl
===================================================================
--- trunk/bin/lynx/rc.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/rc.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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/
#
#
Modified: trunk/bin/lynx/rp.pl
===================================================================
--- trunk/bin/lynx/rp.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/lynx/rp.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -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 <..hidden..>
+# Benjamin Lee <..hidden..>
+#
+#
+# Author: DWS Systems Inc.
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors: Antonio Gallardo <..hidden..>
Modified: trunk/bin/mozilla/admin.pl
===================================================================
--- trunk/bin/mozilla/admin.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/mozilla/admin.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -75,10 +75,8 @@
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 @@
}
// 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>
Modified: trunk/bin/mozilla/login.pl
===================================================================
--- trunk/bin/mozilla/login.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/bin/mozilla/login.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -59,7 +59,6 @@
$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 @@
$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 @@
// End -->
</script>|;
+ $form->header(1, $headeradd)
+
print qq|
<body class="login" onload="jsp(); sf();">
@@ -97,7 +98,7 @@
<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 @@
<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 @@
$form->{$form->{dbupdate}} = 1;
$form->header;
+ print qq|<body>|;
print $locale->text('Upgrading to Version')." $form->{version} ... ";
# required for Oracle
@@ -267,7 +269,8 @@
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;
}
Modified: trunk/locale/it/Num2text
===================================================================
--- trunk/locale/it/Num2text 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/locale/it/Num2text 2006-09-10 01:41:56 UTC (rev 53)
@@ -2,9 +2,9 @@
# LedgerSMB Small Medium Business Accounting
# Copyright (C) 2002
#
-# Author: Dieter Simader
+# Original Author: Dieter Simader
# Email: ..hidden..
-# Web: http://sourceforge.net/projects/ledger-smb/
+# Web: http://sourceforge.net/projects/sql-ledger/
#
# Contributors: Luca Venturini <..hidden..>
#
Modified: trunk/login.pl
===================================================================
--- trunk/login.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/login.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -2,8 +2,27 @@
#
######################################################################
# 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: ..hidden..
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
# Web: http://sourceforge.net/projects/ledger-smb/
#
# Contributors:
Modified: trunk/menu.pl
===================================================================
--- trunk/menu.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/menu.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -2,9 +2,28 @@
#
######################################################################
# 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: ..hidden..
+# Web: http://www.sql-ledger.org
+#
+# Contributors:
+#
+#
+#
# 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
Modified: trunk/setup.pl
===================================================================
--- trunk/setup.pl 2006-09-09 22:44:34 UTC (rev 52)
+++ trunk/setup.pl 2006-09-10 01:41:56 UTC (rev 53)
@@ -2,8 +2,563 @@
#
######################################################################
# 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/
#
#######################################################################
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.