[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/serials subscription-bib-search.pl
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/serials subscription-bib-search.pl |
Date: |
Wed, 12 Jul 2006 16:42:08 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: Antoine Farnault <toins> 06/07/12 16:42:08
Modified files:
serials : subscription-bib-search.pl
Log message:
POD added.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-bib-search.pl?cvsroot=koha&r1=1.1&r2=1.2
Patches:
Index: subscription-bib-search.pl
===================================================================
RCS file: /sources/koha/koha/serials/subscription-bib-search.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- subscription-bib-search.pl 19 Jan 2006 12:46:58 -0000 1.1
+++ subscription-bib-search.pl 12 Jul 2006 16:42:08 -0000 1.2
@@ -18,6 +18,35 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
+
+=head1 NAME
+
+subscription-bib-search.pl
+
+=head1 DESCRIPTION
+
+this script search among all existing subscriptions.
+
+=head1 PARAMETERS
+
+=over 4
+
+=item op
+op use to know the operation to do on this template.
+ * do_search : to search the subscription.
+
+Note that if op = do_search there are some others params specific to the
search :
+ marclist,and_or,excluding,operator,value
+
+=item startfrom
+to multipage gestion.
+
+
+=back
+
+=cut
+
+
use strict;
require Exporter;
use CGI;
@@ -30,12 +59,12 @@
use C4::SearchMarc;
my $query=new CGI;
-my $type=$query->param('type');
+# my $type=$query->param('type');
my $op = $query->param('op');
my $dbh = C4::Context->dbh;
my $startfrom=$query->param('startfrom');
-$startfrom=0 if(!defined $startfrom);
+$startfrom=0 unless $startfrom;
my ($template, $loggedinuser, $cookie);
my $resultsperpage;
@@ -147,30 +176,23 @@
flagsrequired => {catalogue => 1},
debug => 1,
});
- my $sth=$dbh->prepare("Select itemtype,description from itemtypes order
by description");
- $sth->execute;
- my @itemtype;
- my %itemtypes;
- push @itemtype, "";
- $itemtypes{''} = "";
- while (my ($value,$lib) = $sth->fetchrow_array) {
- push @itemtype, $value;
- $itemtypes{$value}=$lib;
- }
- my $CGIitemtype=CGI::scrolling_list( -name => 'value',
- -values => address@hidden,
- -labels => \%itemtypes,
+ my %itemtypes = GetItemTypes();
+ my @values = values %itemtypes;
+ my @labels = keys %itemtypes;
+ my $CGIitemtype=CGI::scrolling_list(
+ -name => 'value',
+ -values => address@hidden,
+ -labels => address@hidden,
-size => 1,
- -multiple => 0 );
- $sth->finish;
+ -multiple => 0
+ );
$template->param(
CGIitemtype => $CGIitemtype,
);
}
-
# Print the page
output_html_with_http_headers $query, $cookie, $template->output;
- [Koha-cvs] koha/serials subscription-bib-search.pl,
Antoine Farnault <=