+use C4::AuthoritiesMarc;
+use C4::Koha;
+use C4::NewsChannels;
+my $query = new CGI;
+my $authtypes = getauthtypes;
+my @authtypesloop;
+
+foreach my $thisauthtype (
+ sort { $authtypes->{$a} <=> $authtypes->{$b} }
+ keys %$authtypes
+ )
+{
+ my %row = (
+ value => $thisauthtype,
+ authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
+ );
+ push @authtypesloop, \%row;
+}
+
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ {
+ template_name => "intranet-main.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {
+ catalogue => 1,
+ },
+ }
+);
+
+my $marc_p = C4::Context->boolean_preference("marc");
+
+$template->param(
+ NOTMARC => !$marc_p,
+ authtypesloop => \@authtypesloop
+);
+
+my $all_koha_news = &GetNewsToDisplay("koha");
+my $koha_news_count = scalar @$all_koha_news;
+
+$template->param(
+ koha_news => $all_koha_news,
+ koha_news_count => $koha_news_count
+);