summaryrefslogtreecommitdiff
path: root/bin/pw.pl
blob: 4c6f806858b5526115b81d0f5a28b8162408ad61 (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 =
  41. qq|<p><span style="font-weight:bold; color:red;">|
  42. . $locale->text('Session expired!')
  43. . qq|</span></p>|
  44. if $s;
  45. my $headeradd = qq|
  46. <script language="JavaScript" type="text/javascript">
  47. <!--
  48. function sf(){
  49. document.pw.password.focus();
  50. }
  51. // End -->
  52. </script>|;
  53. $form->header( undef, $headeradd );
  54. print qq|
  55. <body onload="sf()">
  56. $sessionexpired
  57. <form method="post" action="$form->{script}" name="pw">
  58. <table>
  59. <tr>
  60. <th align="right">| . $locale->text('Password') . qq|</th>
  61. <td><input type="password" name="password" size="30"></td>
  62. <td><button type="submit" value="continue">|
  63. . $locale->text('Continue')
  64. . qq|</button></td>
  65. </tr>
  66. </table>
  67. |;
  68. for (qw(script endsession password)) { delete $form->{$_} }
  69. $form->hide_form;
  70. print qq|
  71. </form>
  72. </body>
  73. </html>
  74. |;
  75. }