import sql-ledger 2.4.4
[freeside.git] / sql-ledger / bin / mozilla / pw.pl
1 #=====================================================================
2 # SQL-Ledger Accounting
3 # Copyright (c) 2004
4 #
5 #  Author: Dieter Simader
6 #     Web: http://www.sql-ledger.org
7 #
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #======================================================================
22
23
24 1;
25 # end of main
26
27
28 sub getpassword {
29   my ($s) = @_;
30
31   $form->{endsession} = 1;
32   $form->header;
33
34   $sessionexpired = qq|<b><font color=red><blink>|.$locale->text('Session expired!').qq|</blink></font></b><p>| if $s;
35   
36   print qq|
37 <script language="JavaScript" type="text/javascript">
38 <!--
39 function sf(){
40     document.pw.password.focus();
41 }
42 // End -->
43 </script>
44
45 <body onload="sf()">
46
47   $sessionexpired
48
49 <form method=post action=$form->{script} name=pw>
50
51 <table>
52   <tr>
53     <th align=right>|.$locale->text('Password').qq|</th>
54     <td><input type=password name=password size=30></td>
55     <td><input type=submit value="|.$locale->text('Continue').qq|"></td>
56   </tr>
57 </table>
58
59 |;
60
61   map { delete $form->{$_} } qw(header script endsession password);
62   $form->hide_form;
63   
64   print qq|
65 </form>
66
67 </body>
68 </html>
69 |;
70
71 }
72
73