+++ /dev/null
-#!/usr/bin/perl
-# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
-
-# 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
-
-use HTML::Template;
-use strict;
-require Exporter;
-use C4::Context;
-use C4::Output; # contains gettemplate
-use CGI;
-use C4::Auth;
-use C4::Bull;
-use C4::Interface::CGI::Output;
-use C4::Koha;
-
-my $query=new CGI;
-
-my $serialseq=$query->param('serialseq');
-my $subscriptionid=$query->param('subscriptionid');
-my $subscription = getsubscription($subscriptionid);
-$subscription->{'distributedto'} =~ s/\n/<br\/>/g;
-
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "bull/printlist.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {catalogue => 1},
- debug => 1,
- });
-$template->param(serialseq => $serialseq,
- title => $subscription->{bibliotitle},
- branchname => getbranchdetail(C4::Context->userenv->{'branch'})->{branchname},
- branchaddress1 => getbranchdetail(C4::Context->userenv->{'branch'})->{address1},
- branchaddress2 => getbranchdetail(C4::Context->userenv->{'branch'})->{address2},
- branchaddress3 => getbranchdetail(C4::Context->userenv->{'branch'})->{address3},
- branchphone => getbranchdetail(C4::Context->userenv->{'branch'})->{branchphone},
- branchemail => getbranchdetail(C4::Context->userenv->{'branch'})->{branchemail},
- distributedto => $subscription->{'distributedto'},
- );
-output_html_with_http_headers $query, $cookie, $template->output;
-
-
-# Local Variables:
-# tab-width: 8
-# End:
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-my $query = new CGI;
-
-my $op = $query->param('op');
-my $search = $query->param('titleorissn');
-my $startfrom=$query->param('startfrom');
-
-if ($op eq 'search')
-{
- my $total;
- my $results;
- my $dbh = C4::Context->dbh;
- my @marclist = $query->param('marclist');
- my @and_or = $query->param('and_or');
- my @excluding = $query->param('excluding');
- my @operator = $query->param('operator');
- my @value = $query->param('value');
-
- my $resultsperpage= $query->param('resultsperpage');
- $resultsperpage = 19 if(!defined $resultsperpage);
-
-
-
- my $sth = $dbh->prepare("select subscriptionid, biblionumber from subscription");
- $sth->execute();
- my @finalsolution;
- while (my $first_step = $sth->fetchrow_hashref)
- {
- my $sth2 = $dbh->prepare("select b3.title from biblioitems b2, biblio b3 where b3.biblionumber = ? and b2.biblionumber = b3.biblionumber and (b2.issn = ? or b3.title like ?)");
- $sth2->execute($first_step->{'biblionumber'},$search, "%$search%");
- my @answear;
- @answear = $sth2->fetchrow_array;
- $total = scalar @answear;
- if ($total >= 1)
- {
- $first_step->{'serial'} = $answear[0];
- push @finalsolution ,$first_step;
- }
- }
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "bull/receipt-search-result.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {catalogue => 1},
- debug => 1,
- });
- $template->param(subtable => \@finalsolution, total => $total
- ,);
-
- my $displaynext=0;
- my $displayprev=$startfrom;
- if(($total - (($startfrom+1)*($resultsperpage))) > 0 ){
- $displaynext = 1;
- }
-
- my @field_data = ();
-
-
- for(my $i = 0 ; $i <= $#marclist ; $i++)
- {
- push @field_data, { term => "marclist", val=>$marclist[$i] };
- push @field_data, { term => "and_or", val=>$and_or[$i] };
- push @field_data, { term => "excluding", val=>$excluding[$i] };
- push @field_data, { term => "operator", val=>$operator[$i] };
- push @field_data, { term => "value", val=>$value[$i] };
- }
-
- my @numbers = ();
-
- if ($total>$resultsperpage)
- {
- for (my $i=1; $i<$total/$resultsperpage+1; $i++)
- {
- if ($i<16)
- {
- my $highlight=0;
- ($startfrom==($i-1)) && ($highlight=1);
- push @numbers, { number => $i,
- highlight => $highlight ,
- searchdata=> \@field_data,
- startfrom => ($i-1)};
- }
- }
- }
-
- my $from = $startfrom*$resultsperpage+1;
- my $to;
-
- if($total < (($startfrom+1)*$resultsperpage))
- {
- $to = $total;
- } else {
- $to = (($startfrom+1)*$resultsperpage);
- }
- $results = \@finalsolution;
- $template->param(result => $results) if $results;
- $template->param(
- startfrom=> $startfrom,
- displaynext=> $displaynext,
- displayprev=> $displayprev,
- resultsperpage => $resultsperpage,
- startfromnext => $startfrom+1,
- startfromprev => $startfrom-1,
- searchdata=>\@field_data,
- total=>$total,
- from=>$from,
- to=>$to,
- numbers=>\@numbers,
- );
-output_html_with_http_headers $query, $cookie, $template->output;
-
-}
-else{
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "bull/receipt.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {catalogue => 1},
- debug => 1,
- });
-output_html_with_http_headers $query, $cookie, $template->output;
-}
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Koha;
-use C4::Date;
-use C4::Bull;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use HTML::Template;
-
-my $query = new CGI;
-my $op = $query->param('op');
-my $dbh = C4::Context->dbh;
-my $selectview = $query->param('selectview');
-$selectview = C4::Context->preference("SubscriptionHistory") unless $selectview;
-
-my $sth;
-# my $id;
-my ($template, $loggedinuser, $cookie);
-my $biblionumber = $query->param('biblionumber');
-if ($selectview eq "full"){
- my $subscriptions = get_full_subscription_list_from_biblionumber($biblionumber);
-
- my $title = $subscriptions->[0]{bibliotitle};
- my $yearmin=$subscriptions->[0]{year};
- my $yearmax=$subscriptions->[scalar(@$subscriptions)-1]{year};
-
- ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "bull/full-serial-issues.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 1,
- debug => 1,
- });
-
- # replace CR by <br> in librarian note
- # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
-
- $template->param(
- biblionumber => $query->param('biblionumber'),
- years => $subscriptions,
- yearmin => $yearmin,
- yearmax =>$yearmax,
- bibliotitle => $title,
- suggestion => C4::Context->preference("suggestion"),
- virtualshelves => C4::Context->preference("virtualshelves"),
- );
-
-} else {
- my $subscriptions = get_subscription_list_from_biblionumber($biblionumber);
-
- ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "bull/serial-issues.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 1,
- debug => 1,
- });
-
- # replace CR by <br> in librarian note
- # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
-
- $template->param(
- biblionumber => $query->param('biblionumber'),
- subscription_LOOP => $subscriptions,
- suggestion => C4::Context->preference("suggestion"),
- virtualshelves => C4::Context->preference("virtualshelves"),
- );
-}
-output_html_with_http_headers $query, $cookie, $template->output;
+++ /dev/null
-#!/usr/bin/perl
-
-use strict;
-use CGI;
-use C4::Auth;
-use C4::Date;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Context;
-use C4::Bull;
-use HTML::Template;
-
-my $query = new CGI;
-my $op = $query->param('op');
-my $dbh = C4::Context->dbh;
-my $subscriptionid = $query->param('subscriptionid');
-my $auser = $query->param('user');
-my $histstartdate = format_date_in_iso($query->param('histstartdate'));
-my $enddate = format_date_in_iso($query->param('enddate'));
-my $recievedlist = $query->param('recievedlist');
-my $missinglist = $query->param('missinglist');
-my $opacnote = $query->param('opacnote');
-my $librariannote = $query->param('librariannote');
-my @serialids = $query->param('serialid');
-my @serialseqs = $query->param('serialseq');
-my @planneddates = $query->param('planneddate');
-my @notes = $query->param('notes');
-my @status = $query->param('status');
-
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "bull/statecollection.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {catalogue => 1},
- debug => 1,
- });
-
-my $hassubscriptionexpired = hassubscriptionexpired($subscriptionid);
-my $subscription=getsubscription($subscriptionid);
-if ($op eq 'modsubscriptionhistory') {
- modsubscriptionhistory($subscriptionid,$histstartdate,$enddate,$recievedlist,$missinglist,$opacnote,$librariannote);
-}
-# change status except, if subscription has expired, for the "waited" issue.
-if ($op eq 'serialchangestatus') {
- my $sth = $dbh->prepare("select status from serial where serialid=?");
- for (my $i=0;$i<=$#serialids;$i++) {
- $sth->execute($serialids[$i]);
- my ($oldstatus) = $sth->fetchrow;
- if ($serialids[$i]) {
- serialchangestatus($serialids[$i],$serialseqs[$i],format_date_in_iso($planneddates[$i]),$status[$i],$notes[$i]) unless ($hassubscriptionexpired && $oldstatus == 1);
- } else {
- # add a special issue
- if ($serialseqs[$i]) {
- my $subscription=getsubscription($subscriptionid);
- newissue($serialseqs[$i],$subscriptionid,$subscription->{biblionumber},$status[$i], format_date_in_iso($planneddates[$i]));
- }
- }
- }
-}
-my $subs = &getsubscription($subscriptionid);
-my ($totalissues,@serialslist) = getserials($subscriptionid,10);
-
-my $sth=$dbh->prepare("select * from subscriptionhistory where subscriptionid = ?");
-$sth->execute($subscriptionid);
-my $solhistory = $sth->fetchrow_hashref;
-
- $template->param(
- serialslist => \@serialslist,
- biblionumber => $subscription->{biblionumber},
- histstartdate => format_date($solhistory->{'histstartdate'}),
- enddate => format_date($solhistory->{'enddate'}),
- recievedlist => $solhistory->{'recievedlist'},
- missinglist => $solhistory->{'missinglist'},
- opacnote => $solhistory->{'opacnote'},
- librariannote => $solhistory->{'librariannote'},
- subscriptionid => $subscriptionid,
- bibliotitle => $subs->{bibliotitle},
- biblionumber => $subs->{biblionumber},
- hassubscriptionexpired =>$hassubscriptionexpired,
- );
-output_html_with_http_headers $query, $cookie, $template->output;
+++ /dev/null
-#!/usr/bin/perl
-# WARNING: 4-character tab stops here
-
-# 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
-
-use strict;
-require Exporter;
-use CGI;
-use C4::Koha;
-use C4::Auth;
-use C4::Date;
-use HTML::Template;
-use C4::Context;
-use C4::Search;
-use C4::Auth;
-use C4::Output;
-use C4::Interface::CGI::Output;
-use C4::Bull;
-
-my $query = new CGI;
-my $dbh = C4::Context->dbh;
-
-my $op = $query->param('op');
-my $subscriptionid = $query->param('subscriptionid');
-
-my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "bull/subscription-renew.tmpl",
- query => $query,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {catalogue => 1},
- debug => 1,
- });
-if ($op eq "renew") {
- subscriptionrenew($subscriptionid,$loggedinuser,$query->param('startdate'),$query->param('numberlength'),$query->param('weeklength'),$query->param('monthlength'),$query->param('note'));
-}
-
-my $subscription= getsubscription($subscriptionid);
-
-$template->param(startdate => format_date(subscriptionexpirationdate($subscriptionid)),
- numberlength => $subscription->{numberlength},
- weeklength => $subscription->{weeklength},
- monthlength => $subscription->{monthlength},
- subscriptionid => $subscriptionid,
- bibliotitle => $subscription->{bibliotitle},
- $op => 1,
- );
-
-# Print the page
-output_html_with_http_headers $query, $cookie, $template->output;
-
-# Local Variables:
-# tab-width: 4
-# End:
+++ /dev/null
-#!/usr/bin/perl
-
-# $Id$
-
-# 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
-
-use strict;
-use C4::Auth;
-use C4::Context;
-use C4::Output;
-use CGI;
-use C4::Interface::CGI::Output;
-use C4::Interface::CGI::Template;
-use C4::Koha;
-use C4::Letters;
-use C4::Bull;
-
-my $dbh = C4::Context->dbh;
-
-my $input = new CGI;
-my $print = $input->param('print');
-my $template_name;
-
-my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => 'bull/viewalerts.tmpl',
- query => $input,
- type => "intranet",
- authnotrequired => 0,
- flagsrequired => {catalogue => 1},
- debug => 1,
- });
-
-my $subscriptionid=$input->param('subscriptionid');
-
-my $borrowers = getalert('','issue',$subscriptionid);
-my $subscription = getsubscription($subscriptionid);
-
-foreach (@$borrowers) {
- $_->{name} = findrelatedto('borrower',$_->{borrowernumber});
-}
-$template->param(alertloop => $borrowers,
- bibliotitle => $subscription->{bibliotitle},
- subscriptionid => $subscriptionid);
-
-output_html_with_http_headers $input, $cookie, $template->output;