553909355cf5192348cb02f44422d8d11a21f8a9
[kivitendo-erp.git] / bin / mozilla / login.pl
1 #=====================================================================
2 # LX-Office ERP
3 # Copyright (C) 2004
4 # Based on SQL-Ledger Version 2.1.9
5 # Web http://www.lx-office.org
6 #
7 ######################################################################
8 # SQL-Ledger Accounting
9 # Copyright (c) 1998-2002
10 #
11 #  Author: Dieter Simader
12 #   Email: dsimader@sql-ledger.org
13 #     Web: http://www.sql-ledger.org
14 #
15 #
16 # This program is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
20 #
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #######################################################################
29
30 use SL::DB::Default;
31 use SL::Form;
32 use SL::Git;
33
34 require "bin/mozilla/common.pl";
35 require "bin/mozilla/todo.pl";
36
37 use strict;
38
39 our $cgi;
40 our $form;
41 our $auth;
42
43 sub company_logo {
44   $main::lxdebug->enter_sub();
45
46   my %myconfig = %main::myconfig;
47   $form->{todo_list}  =  create_todo_list('login_screen' => 1) if (!$form->{no_todo_list}) and ($main::auth->check_right($::myconfig{login}, 'productivity'));
48
49   $form->{stylesheet} =  $myconfig{stylesheet};
50   $form->{title}      =  $::locale->text('kivitendo');
51   $form->{interface}  = $::dispatcher->interface_type;
52   $form->{client}     = $::auth->client;
53   $form->{defaults}   = SL::DB::Default->get;
54
55   my $git             = SL::Git->new;
56   ($form->{git_head}) = $git->get_log(since => 'HEAD~1', until => 'HEAD') if $git->is_git_installation;
57
58   # create the logo screen
59   $form->header() unless $form->{noheader};
60
61   print $form->parse_html_template('login/company_logo');
62
63   $main::lxdebug->leave_sub();
64 }
65
66 1;
67
68 __END__