summaryrefslogtreecommitdiff
path: root/bin/pw.pl
blob: 99020906748ca739b4364cd8df2b91d218f0ec13 (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. use LedgerSMB::Template;
  36. 1;
  37. # end of main
  38. sub getpassword {
  39. $form->{sessionexpired} = shift @_;
  40. @{$form->{hidden}};
  41. for (keys %$form){
  42. next if $_ =~ /(^script$|^endsession$|^password$)/;
  43. my $attr = {};
  44. $attr->{name} = $_;
  45. $attr->{value} = $form->{$_};
  46. push @{$form->{hidden}}, $attr;
  47. }
  48. my $template = Template->new(
  49. user => \%myconfig,
  50. locale => $locale,
  51. path => 'UI',
  52. template => 'get_password.html',
  53. format => 'HTML'
  54. );
  55. $template->render($form);
  56. exit;
  57. }