X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=modwebsites.pl;h=70f846db805448ac0febb7990794ecc19d3c8c8e;hb=5169e23b54f3310560fa589bcd87d8c3611daa28;hp=f9c231441e64d7b2b43397c53f63fe865c3a54da;hpb=4915ed786c8c275f2e49c19149629242e5bef9ba;p=koha.git diff --git a/modwebsites.pl b/modwebsites.pl index f9c231441e..70f846db80 100755 --- a/modwebsites.pl +++ b/modwebsites.pl @@ -1,10 +1,32 @@ #!/usr/bin/perl + +# Copyright 2000-2002 Katipo Communications +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +# modified by hdl@ifrance.com 12/16/2002, templating + use strict; use C4::Search; use CGI; use C4::Output; +use HTML::Template; +use C4::Auth; my $input = new CGI; my $biblionumber = $input->param('biblionumber'); @@ -14,62 +36,30 @@ if ($biblionumber eq '') { print $input->redirect("/catalogue/"); } # if -print $input->header; -print startpage(); -print startmenu(); +#print $input->header; +#print startpage(); +#print startmenu(); +my ($template, $loggedinuser, $cookie) = get_template_and_user({ + template_name => "modwebsites.tmpl", + query => $input, + type => "intranet", + flagsrequired => {catalogue => 1}, + }); + -print << "EOF"; -

-Return to Details Page -EOF +my @websitesloop; for (my $i = 0; $i < $count; $i++) { - print << "EOF" -

-

- - - - - - - - - - - - - - - -
Title
Description
URL
- -
-EOF + my %website; + $website{'biblionumber'}=$biblionumber; + $website{'websitenumber'}=$websites[$i]->{'websitenumber'}; + $website{'title'}=$websites[$i]->{'title'}; + $website{'description'}=$websites[$i]->{'description'}; + $website{'url'}=$websites[$i]->{'url'}; + push (@websitesloop, \%website); } # for -print << "EOF"; -

-

Add another Website Link

-
- - - - - - - - - - - - - - -
Title
Description
URL
- -
-EOF +$template->param( biblionumber => $biblionumber, + websitesloop => \@websitesloop); -print endmenu(); -print endpage(); +print "Content-Type: text/html\n\n", $template->output;