Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 85 lines (69 sloc) 2.174 kb
a0b06fbe »
2011-03-12 Prepare for perlbrew usage by changing all script magic to "#!/usr/bi…
1 #!/usr/bin/env perl
13f6840c »
2007-03-09 add mainpage
2
3 # This file is part of Koha.
4 #
5 # Koha is free software; you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 2 of the License, or (at your option) any later
8 # version.
9 #
10 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License along with
15 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
16 # Suite 330, Boston, MA 02111-1307 USA
17 #
18
19 use strict;
20
21 use CGI;
3719e652 »
2010-12-03 Fixes to C4::Auth, mainpage.pl, and install.pl so web installer can s…
22
3607caae »
2011-06-09 Add Koha.pm and include it universally
23 use Koha;
3719e652 »
2010-12-03 Fixes to C4::Auth, mainpage.pl, and install.pl so web installer can s…
24 use C4::Context;
25 my $dbh = C4::Context->dbh;
26 $dbh->{RaiseError} = 0;
27
1ca8a9ce »
2007-04-24 I forgot this script.
28 use C4::Output;
13f6840c »
2007-03-09 add mainpage
29 use C4::Auth;
30 use C4::AuthoritiesMarc;
31 use C4::Koha;
32 use C4::NewsChannels;
3719e652 »
2010-12-03 Fixes to C4::Auth, mainpage.pl, and install.pl so web installer can s…
33
13f6840c »
2007-03-09 add mainpage
34 my $query = new CGI;
35 my $authtypes = getauthtypes;
36 my @authtypesloop;
37
2d46b42c »
2007-08-03 Perltidy mainpage.pl
38 foreach my $thisauthtype (
39 sort { $authtypes->{$a} <=> $authtypes->{$b} }
40 keys %$authtypes
41 )
13f6840c »
2007-03-09 add mainpage
42 {
43 my %row = (
44 value => $thisauthtype,
45 authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
46 );
47 push @authtypesloop, \%row;
48 }
49
50 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
51 {
52 template_name => "intranet-main.tmpl",
53 query => $query,
54 type => "intranet",
55 authnotrequired => 0,
56 flagsrequired => {
2d46b42c »
2007-08-03 Perltidy mainpage.pl
57 catalogue => 1,
13f6840c »
2007-03-09 add mainpage
58 },
59 }
60 );
61
3719e652 »
2010-12-03 Fixes to C4::Auth, mainpage.pl, and install.pl so web installer can s…
62 # We've made it past the installer and can expect normal database function
63 $dbh->{RaiseError} = 1;
64
13f6840c »
2007-03-09 add mainpage
65 my $marc_p = C4::Context->boolean_preference("marc");
66
67 $template->param(
68 NOTMARC => !$marc_p,
69 authtypesloop => \@authtypesloop
70 );
71
99796230 »
2010-11-03 Replace "Serials" with "Periodicals"
72 $template->param(
73 UsePeriodicals => C4::Context->boolean_preference('UsePeriodicals')
74 );
75
2d46b42c »
2007-08-03 Perltidy mainpage.pl
76 my $all_koha_news = &GetNewsToDisplay("koha");
13f6840c »
2007-03-09 add mainpage
77 my $koha_news_count = scalar @$all_koha_news;
78
79 $template->param(
80 koha_news => $all_koha_news,
81 koha_news_count => $koha_news_count
82 );
83
84 output_html_with_http_headers $query, $cookie, $template->output;
Something went wrong with that request. Please try again.