Merge branch 'new/bug_5277' into kcmaster
[koha.git] / opac / opac-detail.pl
1 #!/usr/bin/perl
2
3 # Copyright 2000-2002 Katipo Communications
4 #
5 # This file is part of Koha.
6 #
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
10 # version.
11 #
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
21 use strict;
22 use warnings;
23
24 use CGI;
25 use C4::Auth;
26 use C4::Branch;
27 use C4::Koha;
28 use C4::Serials;    #uses getsubscriptionfrom biblionumber
29 use C4::Output;
30 use C4::Biblio;
31 use C4::Items;
32 use C4::Circulation;
33 use C4::Tags qw(get_tags);
34 use C4::Dates qw/format_date/;
35 use C4::XISBN qw(get_xisbns get_biblionumber_from_isbn);
36 use C4::External::Amazon;
37 use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes );
38 use C4::Review;
39 use C4::Members;
40 use C4::VirtualShelves;
41 use C4::XSLT;
42 use C4::ShelfBrowser;
43
44 BEGIN {
45         if (C4::Context->preference('BakerTaylorEnabled')) {
46                 require C4::External::BakerTaylor;
47                 import C4::External::BakerTaylor qw(&image_url &link_url);
48         }
49 }
50
51 my $query = new CGI;
52 my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
53     {
54         template_name   => "opac-detail.tmpl",
55         query           => $query,
56         type            => "opac",
57         authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
58         flagsrequired   => { borrow => 1 },
59     }
60 );
61
62 my $biblionumber = $query->param('biblionumber') || $query->param('bib');
63
64 $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
65 $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) );
66
67 my $record       = GetMarcBiblio($biblionumber);
68 if ( ! $record ) {
69     print $query->redirect("/cgi-bin/koha/errors/404.pl");
70     exit;
71 }
72 $template->param( biblionumber => $biblionumber );
73 # XSLT processing of some stuff
74 if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
75     $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, 'Detail', 'opac') );
76 }
77
78 $template->param('OPACShowCheckoutName' => C4::Context->preference("OPACShowCheckoutName") ); 
79 # change back when ive fixed request.pl
80 my @all_items = &GetItemsInfo( $biblionumber, 'opac' );
81 my @items;
82 @items = @all_items unless C4::Context->preference('hidelostitems');
83
84 if (C4::Context->preference('hidelostitems')) {
85     # Hide host items
86     for my $itm (@all_items) {
87         push @items, $itm unless $itm->{itemlost};
88     }
89 }
90 my $dat = &GetBiblioData($biblionumber);
91
92 my $itemtypes = GetItemTypes();
93 # imageurl:
94 my $itemtype = $dat->{'itemtype'};
95 if ( $itemtype ) {
96     $dat->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{$itemtype}->{'imageurl'} );
97     $dat->{'description'} = $itemtypes->{$itemtype}->{'description'};
98 }
99 my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac');
100 my $collections =  GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac');
101
102 #coping with subscriptions
103 my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber);
104 my @subscriptions       = GetSubscriptions( $dat->{title}, $dat->{issn}, $biblionumber );
105
106 my @subs;
107 $dat->{'serial'}=1 if $subscriptionsnumber;
108 foreach my $subscription (@subscriptions) {
109     my $serials_to_display;
110     my %cell;
111     $cell{subscriptionid}    = $subscription->{subscriptionid};
112     $cell{subscriptionnotes} = $subscription->{notes};
113     $cell{missinglist}       = $subscription->{missinglist};
114     $cell{opacnote}          = $subscription->{opacnote};
115     $cell{histstartdate}     = format_date($subscription->{histstartdate});
116     $cell{histenddate}       = format_date($subscription->{histenddate});
117     $cell{branchcode}        = $subscription->{branchcode};
118     $cell{branchname}        = GetBranchName($subscription->{branchcode});
119     $cell{hasalert}          = $subscription->{hasalert};
120     #get the three latest serials.
121     $serials_to_display = $subscription->{opacdisplaycount};
122     $serials_to_display = C4::Context->preference('OPACSerialIssueDisplayCount') unless $serials_to_display;
123         $cell{opacdisplaycount} = $serials_to_display;
124     $cell{latestserials} =
125       GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display );
126     push @subs, \%cell;
127 }
128
129 $dat->{'count'} = scalar(@items);
130
131 # If there is a lot of items, and the user has not decided
132 # to view them all yet, we first warn him
133 # TODO: The limit of 50 could be a syspref
134 my $viewallitems = $query->param('viewallitems');
135 if ($dat->{'count'} >= 50 && !$viewallitems) {
136     $template->param('lotsofitems' => 1);
137 }
138
139 my $biblio_authorised_value_images = C4::Items::get_authorised_value_images( C4::Biblio::get_biblio_authorised_values( $biblionumber, $record ) );
140
141 my $norequests = 1;
142 my $branches = GetBranches();
143 my %itemfields;
144 for my $itm (@items) {
145     $norequests = 0
146        if ( (not $itm->{'wthdrawn'} )
147          && (not $itm->{'itemlost'} )
148          && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'} )
149                  && (not $itemtypes->{$itm->{'itype'}}->{notforloan} )
150          && ($itm->{'itemnumber'} ) );
151
152     if ( defined $itm->{'publictype'} ) {
153         # I can't actually find any case in which this is defined. --amoore 2008-12-09
154         $itm->{ $itm->{'publictype'} } = 1;
155     }
156     $itm->{datedue}      = format_date($itm->{datedue});
157     $itm->{datelastseen} = format_date($itm->{datelastseen});
158
159     # get collection code description, too
160     if ( my $ccode = $itm->{'ccode'} ) {
161         $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) );
162     }
163     if ( defined $itm->{'location'} ) {
164         $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} };
165     }
166     if (exists $itm->{itype} && defined($itm->{itype}) && exists $itemtypes->{ $itm->{itype} }) {
167         $itm->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} );
168         $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{'description'};
169     }
170     foreach (qw(ccode enumchron copynumber itemnotes uri)) {
171         $itemfields{$_} = 1 if ($itm->{$_});
172     }
173
174      # walk through the item-level authorised values and populate some images
175      my $item_authorised_value_images = C4::Items::get_authorised_value_images( C4::Items::get_item_authorised_values( $itm->{'itemnumber'} ) );
176      # warn( Data::Dumper->Dump( [ $item_authorised_value_images ], [ 'item_authorised_value_images' ] ) );
177
178      if ( $itm->{'itemlost'} ) {
179          my $lostimageinfo = List::Util::first { $_->{'category'} eq 'LOST' } @$item_authorised_value_images;
180          $itm->{'lostimageurl'}   = $lostimageinfo->{ 'imageurl' };
181          $itm->{'lostimagelabel'} = $lostimageinfo->{ 'label' };
182      }
183
184      if( $itm->{'count_reserves'}){
185           if( $itm->{'count_reserves'} eq "Waiting"){ $itm->{'waiting'} = 1; }
186           if( $itm->{'count_reserves'} eq "Reserved"){ $itm->{'onhold'} = 1; }
187      }
188     
189      my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber});
190      if ( defined( $transfertwhen ) && $transfertwhen ne '' ) {
191         $itm->{transfertwhen} = format_date($transfertwhen);
192         $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname};
193         $itm->{transfertto}   = $branches->{$transfertto}{branchname};
194      }
195 }
196
197 ## get notes and subjects from MARC record
198 my $dbh              = C4::Context->dbh;
199 my $marcflavour      = C4::Context->preference("marcflavour");
200 my $marcnotesarray   = GetMarcNotes   ($record,$marcflavour);
201 my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour);
202 my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour);
203 my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
204 my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
205 my $subtitle         = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
206
207     $template->param(
208                      MARCNOTES               => $marcnotesarray,
209                      MARCSUBJCTS             => $marcsubjctsarray,
210                      MARCAUTHORS             => $marcauthorsarray,
211                      MARCSERIES              => $marcseriesarray,
212                      MARCURLS                => $marcurlsarray,
213                      norequests              => $norequests,
214                      RequestOnOpac           => C4::Context->preference("RequestOnOpac"),
215                      itemdata_ccode          => $itemfields{ccode},
216                      itemdata_enumchron      => $itemfields{enumchron},
217                      itemdata_uri            => $itemfields{uri},
218                      itemdata_copynumber     => $itemfields{copynumber},
219                      itemdata_itemnotes          => $itemfields{itemnotes},
220                      authorised_value_images => $biblio_authorised_value_images,
221                      subtitle                => $subtitle,
222     );
223
224 foreach ( keys %{$dat} ) {
225     $template->param( "$_" => defined $dat->{$_} ? $dat->{$_} : '' );
226 }
227
228 # some useful variables for enhanced content;
229 # in each case, we're grabbing the first value we find in
230 # the record and normalizing it
231 my $upc = GetNormalizedUPC($record,$marcflavour);
232 my $ean = GetNormalizedEAN($record,$marcflavour);
233 my $oclc = GetNormalizedOCLCNumber($record,$marcflavour);
234 my $isbn = GetNormalizedISBN(undef,$record,$marcflavour);
235 my $content_identifier_exists = 1 if ($isbn or $ean or $oclc or $upc);
236 $template->param(
237         normalized_upc => $upc,
238         normalized_ean => $ean,
239         normalized_oclc => $oclc,
240         normalized_isbn => $isbn,
241         content_identifier_exists =>  $content_identifier_exists,
242 );
243
244 # COinS format FIXME: for books Only
245 $template->param(
246     ocoins => GetCOinSBiblio($biblionumber),
247 );
248
249 my $reviews = getreviews( $biblionumber, 1 );
250 my $loggedincommenter;
251 foreach ( @$reviews ) {
252     my $borrowerData   = GetMember('borrowernumber' => $_->{borrowernumber});
253     # setting some borrower info into this hash
254     $_->{title}     = $borrowerData->{'title'};
255     $_->{surname}   = $borrowerData->{'surname'};
256     $_->{firstname} = $borrowerData->{'firstname'};
257     $_->{userid}    = $borrowerData->{'userid'};
258     $_->{cardnumber}    = $borrowerData->{'cardnumber'};
259     $_->{datereviewed} = format_date($_->{datereviewed});
260     if ($borrowerData->{'borrowernumber'} eq $borrowernumber) {
261                 $_->{your_comment} = 1;
262                 $loggedincommenter = 1;
263         }
264 }
265
266
267 if(C4::Context->preference("ISBD")) {
268         $template->param(ISBD => 1);
269 }
270
271 $template->param(
272     ITEM_RESULTS        => \@items,
273     subscriptionsnumber => $subscriptionsnumber,
274     biblionumber        => $biblionumber,
275     subscriptions       => \@subs,
276     subscriptionsnumber => $subscriptionsnumber,
277     reviews             => $reviews,
278     loggedincommenter   => $loggedincommenter
279 );
280
281 # Lists
282
283 if (C4::Context->preference("virtualshelves") ) {
284    $template->param( 'GetShelves' => GetBibliosShelves( $biblionumber ) );
285 }
286
287
288 # XISBN Stuff
289 if (C4::Context->preference("OPACFRBRizeEditions")==1) {
290     eval {
291         $template->param(
292             XISBNS => get_xisbns($isbn)
293         );
294     };
295     if ($@) { warn "XISBN Failed $@"; }
296 }
297
298 # Serial Collection
299 my @sc_fields = $record->field(955);
300 my @serialcollections = ();
301
302 foreach my $sc_field (@sc_fields) {
303     my %row_data;
304
305     $row_data{text}    = $sc_field->subfield('r');
306     $row_data{branch}  = $sc_field->subfield('9');
307
308     if ($row_data{text} && $row_data{branch}) { 
309         push (@serialcollections, \%row_data);
310     }
311 }
312
313 if (scalar(@serialcollections) > 0) {
314     $template->param(
315         serialcollection  => 1,
316         serialcollections => \@serialcollections);
317 }
318
319 # Amazon.com Stuff
320 if ( C4::Context->preference("OPACAmazonEnabled") ) {
321     $template->param( AmazonTld => get_amazon_tld() );
322     my $amazon_reviews  = C4::Context->preference("OPACAmazonReviews");
323     my $amazon_similars = C4::Context->preference("OPACAmazonSimilarItems");
324     my @services;
325     if ( $amazon_reviews ) {
326         push( @services, 'EditorialReview', 'Reviews' );
327     }
328     if ( $amazon_similars ) {
329         push( @services, 'Similarities' );
330     }
331     my $amazon_details = &get_amazon_details( $isbn, $record, $marcflavour, \@services );
332     my $similar_products_exist;
333     if ( $amazon_reviews ) {
334         my $item = $amazon_details->{Items}->{Item}->[0];
335         my $customer_reviews = \@{ $item->{CustomerReviews}->{Review} };
336         for my $one_review ( @$customer_reviews ) {
337             $one_review->{Date} = format_date($one_review->{Date});
338         }
339         my $editorial_reviews = \@{ $item->{EditorialReviews}->{EditorialReview} };
340         my $average_rating = $item->{CustomerReviews}->{AverageRating} || 0;
341         $template->param( amazon_average_rating    => $average_rating * 20);
342         $template->param( AMAZON_CUSTOMER_REVIEWS  => $customer_reviews );
343         $template->param( AMAZON_EDITORIAL_REVIEWS => $editorial_reviews );
344     }
345     if ( $amazon_similars ) {
346         my $item = $amazon_details->{Items}->{Item}->[0];
347         my @similar_products;
348         for my $similar_product (@{ $item->{SimilarProducts}->{SimilarProduct} }) {
349             # do we have any of these isbns in our collection?
350             my $similar_biblionumbers = get_biblionumber_from_isbn($similar_product->{ASIN});
351             # verify that there is at least one similar item
352             if (scalar(@$similar_biblionumbers)){
353                 $similar_products_exist++ if ($similar_biblionumbers && $similar_biblionumbers->[0]);
354                 push @similar_products, +{ similar_biblionumbers => $similar_biblionumbers, title => $similar_product->{Title}, ASIN => $similar_product->{ASIN}  };
355             }
356         }
357         $template->param( OPACAmazonSimilarItems => $similar_products_exist );
358         $template->param( AMAZON_SIMILAR_PRODUCTS => \@similar_products );
359     }
360 }
361
362 my $syndetics_elements;
363
364 if ( C4::Context->preference("SyndeticsEnabled") ) {
365     $template->param("SyndeticsEnabled" => 1);
366     $template->param("SyndeticsClientCode" => C4::Context->preference("SyndeticsClientCode"));
367         eval {
368             $syndetics_elements = &get_syndetics_index($isbn,$upc,$oclc);
369             for my $element (values %$syndetics_elements) {
370                 $template->param("Syndetics$element"."Exists" => 1 );
371                 #warn "Exists: "."Syndetics$element"."Exists";
372         }
373     };
374     warn $@ if $@;
375 }
376
377 if ( C4::Context->preference("SyndeticsEnabled")
378         && C4::Context->preference("SyndeticsSummary")
379         && ( exists($syndetics_elements->{'SUMMARY'}) || exists($syndetics_elements->{'AVSUMMARY'}) ) ) {
380         eval {
381             my $syndetics_summary = &get_syndetics_summary($isbn,$upc,$oclc, $syndetics_elements);
382             $template->param( SYNDETICS_SUMMARY => $syndetics_summary );
383         };
384         warn $@ if $@;
385
386 }
387
388 if ( C4::Context->preference("SyndeticsEnabled")
389         && C4::Context->preference("SyndeticsTOC")
390         && exists($syndetics_elements->{'TOC'}) ) {
391         eval {
392     my $syndetics_toc = &get_syndetics_toc($isbn,$upc,$oclc);
393     $template->param( SYNDETICS_TOC => $syndetics_toc );
394         };
395         warn $@ if $@;
396 }
397
398 if ( C4::Context->preference("SyndeticsEnabled")
399     && C4::Context->preference("SyndeticsExcerpt")
400     && exists($syndetics_elements->{'DBCHAPTER'}) ) {
401     eval {
402     my $syndetics_excerpt = &get_syndetics_excerpt($isbn,$upc,$oclc);
403     $template->param( SYNDETICS_EXCERPT => $syndetics_excerpt );
404     };
405         warn $@ if $@;
406 }
407
408 if ( C4::Context->preference("SyndeticsEnabled")
409     && C4::Context->preference("SyndeticsReviews")) {
410     eval {
411     my $syndetics_reviews = &get_syndetics_reviews($isbn,$upc,$oclc,$syndetics_elements);
412     $template->param( SYNDETICS_REVIEWS => $syndetics_reviews );
413     };
414         warn $@ if $@;
415 }
416
417 if ( C4::Context->preference("SyndeticsEnabled")
418     && C4::Context->preference("SyndeticsAuthorNotes")
419         && exists($syndetics_elements->{'ANOTES'}) ) {
420     eval {
421     my $syndetics_anotes = &get_syndetics_anotes($isbn,$upc,$oclc);
422     $template->param( SYNDETICS_ANOTES => $syndetics_anotes );
423     };
424     warn $@ if $@;
425 }
426
427 # LibraryThingForLibraries ID Code and Tabbed View Option
428 if( C4::Context->preference('LibraryThingForLibrariesEnabled') ) 
429
430 $template->param(LibraryThingForLibrariesID =>
431 C4::Context->preference('LibraryThingForLibrariesID') ); 
432 $template->param(LibraryThingForLibrariesTabbedView =>
433 C4::Context->preference('LibraryThingForLibrariesTabbedView') );
434
435
436
437 # Babelthèque
438 if ( C4::Context->preference("Babeltheque") ) {
439     $template->param( 
440         Babeltheque => 1,
441     );
442 }
443
444 # Shelf Browser Stuff
445 if (C4::Context->preference("OPACShelfBrowser")) {
446     # pick the first itemnumber unless one was selected by the user
447     my $starting_itemnumber = $query->param('shelfbrowse_itemnumber'); # || $items[0]->{itemnumber};
448     if (defined($starting_itemnumber)) {
449         $template->param( OpenOPACShelfBrowser => 1) if $starting_itemnumber;
450         my $nearby = GetNearbyItems($starting_itemnumber,3);
451
452         $template->param(
453             starting_homebranch => $nearby->{starting_homebranch}->{description},
454             starting_location => $nearby->{starting_location}->{description},
455             starting_ccode => $nearby->{starting_ccode}->{description},
456             starting_itemnumber => $nearby->{starting_itemnumber},
457             shelfbrowser_prev_itemnumber => $nearby->{prev_itemnumber},
458             shelfbrowser_next_itemnumber => $nearby->{next_itemnumber},
459             shelfbrowser_prev_biblionumber => $nearby->{prev_biblionumber},
460             shelfbrowser_next_biblionumber => $nearby->{next_biblionumber},
461             PREVIOUS_SHELF_BROWSE => $nearby->{prev},
462             NEXT_SHELF_BROWSE => $nearby->{next},
463         );
464     }
465 }
466
467 if (C4::Context->preference("BakerTaylorEnabled")) {
468         $template->param(
469                 BakerTaylorEnabled  => 1,
470                 BakerTaylorImageURL => &image_url(),
471                 BakerTaylorLinkURL  => &link_url(),
472                 BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'),
473         );
474         my ($bt_user, $bt_pass);
475         if ($isbn and
476                 $bt_user = C4::Context->preference('BakerTaylorUsername') and
477                 $bt_pass = C4::Context->preference('BakerTaylorPassword')    )
478         {
479                 $template->param(
480                 BakerTaylorContentURL   =>
481                 sprintf("http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y",
482                                 $bt_user,$bt_pass,$isbn)
483                 );
484         }
485 }
486
487 my $tag_quantity;
488 if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail')) {
489         $template->param(
490                 TagsEnabled => 1,
491                 TagsShowOnDetail => $tag_quantity,
492                 TagsInputOnDetail => C4::Context->preference('TagsInputOnDetail')
493         );
494         $template->param(TagLoop => get_tags({biblionumber=>$biblionumber, approved=>1,
495                                                                 'sort'=>'-weight', limit=>$tag_quantity}));
496 }
497
498 if (C4::Context->preference("OPACURLOpenInNewWindow")) {
499     # These values are going to be read by Javascript, at least in the case
500     # of the google covers
501     $template->param(covernewwindow => 'true');
502 } else {
503     $template->param(covernewwindow => 'false');
504 }
505
506 #Search for title in links
507 my $marccontrolnumber   = GetMarcControlnumber   ($record, $marcflavour);
508
509 if (my $search_for_title = C4::Context->preference('OPACSearchForTitleIn')){
510     $dat->{author} ? $search_for_title =~ s/{AUTHOR}/$dat->{author}/g : $search_for_title =~ s/{AUTHOR}//g;
511     $dat->{title} =~ s/\/+$//; # remove trailing slash
512     $dat->{title} =~ s/\s+$//; # remove trailing space
513     $dat->{title} ? $search_for_title =~ s/{TITLE}/$dat->{title}/g : $search_for_title =~ s/{TITLE}//g;
514     $isbn ? $search_for_title =~ s/{ISBN}/$isbn/g : $search_for_title =~ s/{ISBN}//g;
515     $marccontrolnumber ? $search_for_title =~ s/{CONTROLNUMBER}/$marccontrolnumber/g : $search_for_title =~ s/{CONTROLNUMBER}//g;
516  $template->param('OPACSearchForTitleIn' => $search_for_title);
517 }
518
519 # We try to select the best default tab to show, according to what
520 # the user wants, and what's available for display
521 my $opac_serial_default = C4::Context->preference('opacSerialDefaultTab');
522 my $defaulttab = 
523     $opac_serial_default eq 'subscriptions' && $subscriptionsnumber
524         ? 'subscriptions' :
525     $opac_serial_default eq 'serialcollection' && @serialcollections > 0
526         ? 'serialcollection' :
527     $opac_serial_default eq 'holdings' && $dat->{'count'} > 0
528         ? 'holdings' :
529     $subscriptionsnumber
530         ? 'subscriptions' :
531     @serialcollections > 0 
532         ? 'serialcollection' : 'subscription';
533 $template->param('defaulttab' => $defaulttab);
534
535 output_html_with_http_headers $query, $cookie, $template->output;