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