summaryrefslogtreecommitdiff
path: root/bin/mozilla/pw.pl
blob: a4aa28088f9b204d2d29a2929d7774aca4772ea9 (plain)
  1. #=====================================================================
  2. # LedgerSMB Small Medium Business Accounting
  3. # http://www.ledgersmb.org/
  4. #
  5. # Copyright (C) 2006
  6. # This work contains copyrighted information from a number of sources all used
  7. # with permission.
  8. #
  9. # This file contains source code included with or based on SQL-Ledger which
  10. # is Copyright Dieter Simader and DWS Systems Inc. 2000-2005 and licensed
  11. # under the GNU General Public License version 2 or, at your option, any later
  12. # version. For a full list including contact information of contributors,
  13. # maintainers, and copyright holders, see the CONTRIBUTORS file.
  14. #
  15. # Original Copyright Notice from SQL-Ledger 2.6.17 (before the fork):
  16. # Copyright (c) 2004
  17. #
  18. # Author: DWS Systems Inc.
  19. # Web: http://www.sql-ledger.org
  20. #
  21. #
  22. # This program is free software; you can redistribute it and/or modify
  23. # it under the terms of the GNU General Public License as published by
  24. # the Free Software Foundation; either version 2 of the License, or
  25. # (at your option) any later version.
  26. #
  27. # This program is distributed in the hope that it will be useful,
  28. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  30. # GNU General Public License for more details.
  31. # You should have received a copy of the GNU General Public License
  32. # along with this program; if not, write to the Free Software
  33. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  34. #======================================================================
  35. 1;
  36. # end of main
  37. sub getpassword {
  38. my ($s) = @_;
  39. $form->{endsession} = 1;
  40. $sessionexpired = qq|<b><font color=red><blink>|.$locale->text('Session expired!').qq|</blink></font></b><p>| if $s;
  41. my $headeradd = qq|
  42. <script language="JavaScript" type="text/javascript">
  43. <!--
  44. function sf(){
  45. document.pw.password.focus();
  46. }
  47. // End -->
  48. </script>|;
  49. $form->header(undef, $headeradd);
  50. print qq|
  51. <body onload="sf()">
  52. $sessionexpired
  53. <form method=post action=$form->{script} name=pw>
  54. <table>
  55. <tr>
  56. <th align=right>|.$locale->text('Password').qq|</th>
  57. <td><input type=password name=password size=30></td>
  58. <td><input type=submit value="|.$locale->text('Continue').qq|"></td>
  59. </tr>
  60. </table>
  61. |;
  62. for (qw(script endsession password)) { delete $form->{$_} }
  63. $form->hide_form;
  64. print qq|
  65. </form>
  66. </body>
  67. </html>
  68. |;
  69. }