Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 117 lines (108 sloc) 3.062 kb
d0374d0 Initial revision
rangi authored
1 #!/usr/bin/perl
2
7197a37 Added magic RCS comment.
arensb authored
3 # $Id$
4
d0374d0 Initial revision
rangi authored
5 #script to display detailed information
6 #written 8/11/99
7
1e67687 Added copyright statement to all .pl and .pm files
tonnesen authored
8
9 # Copyright 2000-2002 Katipo Communications
10 #
11 # This file is part of Koha.
12 #
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
16 # version.
17 #
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
25
d0374d0 Initial revision
rangi authored
26 use strict;
27 #use DBI;
28 use C4::Search;
29 use CGI;
30 use C4::Output;
31
32 my $input = new CGI;
33 print $input->header;
34 my $type=$input->param('type');
35 print startpage();
36 print startmenu($type);
37 my $blah;
38 my $env;
39 my $subject=$input->param('subject');
40 #my $title=$input->param('title');
41
7197a37 Added magic RCS comment.
arensb authored
42 my $main;
43 my $secondary;
44 if ($type eq 'opac'){
45 $main='#99cccc';
46 $secondary='#efe5ef';
47 } else {
48 $main='#99cc33';
49 $secondary='#ffffcc';
50 }
d0374d0 Initial revision
rangi authored
51
52 my @items=subsearch(\$blah,$subject);
53 #print @items;
54 my $count=@items;
55 my $i=0;
56 print center();
57 print mktablehdr;
58 if ($type ne 'opac'){
7197a37 Added magic RCS comment.
arensb authored
59 print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),' ',"/images/background-mem.gif");
d0374d0 Initial revision
rangi authored
60 } else {
7197a37 Added magic RCS comment.
arensb authored
61 print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('BRANCH'),'   ');
d0374d0 Initial revision
rangi authored
62 }
63 my $colour=1;
64 while ($i < $count){
65 my @results=split('\t',$items[$i]);
66 $results[0]=mklink("/cgi-bin/koha/detail.pl?bib=$results[2]&type=$type",$results[0]);
67 my $word=$results[1];
c03f94e Bug fix from rel-1-2
tonnesen authored
68 $word=~ s/ /%20/g;
69 #$word=~ s/\,/\,%20/;
d0374d0 Initial revision
rangi authored
70 $results[1]=mklink("/cgi-bin/koha/search.pl?author=$word&type=$type",$results[1]);
7197a37 Added magic RCS comment.
arensb authored
71 my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]);
72 $results[3]=$count;
73 if ($nacount > 0){
74 $results[4]=$results[4]."On Loan";
d0374d0 Initial revision
rangi authored
75 if ($nacount > 1){
76 $results[4].=" $nacount";
77 }
78 $results[4].=" ";
7197a37 Added magic RCS comment.
arensb authored
79 }
80 if ($lcount > 0){
81 $results[4]=$results[4]." Levin";
d0374d0 Initial revision
rangi authored
82 if ($lcount > 1){
83 $results[4].=" $lcount";
84 }
85 $results[4].=" ";
7197a37 Added magic RCS comment.
arensb authored
86 }
87 if ($fcount > 0){
88 $results[4]=$results[4]." Foxton";
d0374d0 Initial revision
rangi authored
89 if ($fcount > 1){
90 $results[4].=" $fcount";
91 }
92 $results[4].=" ";
7197a37 Added magic RCS comment.
arensb authored
93 }
94 if ($scount > 0){
95 $results[4]=$results[4]." Shannon";
d0374d0 Initial revision
rangi authored
96 if ($scount > 1){
97 $results[4].=" $scount";
98 }
99 $results[4].=" ";
7197a37 Added magic RCS comment.
arensb authored
100 }
d0374d0 Initial revision
rangi authored
101 if ($type ne 'opac'){
102 $results[6]=mklink("/cgi-bin/koha/request.pl?bib=$results[2]","Request");
103 }
7197a37 Added magic RCS comment.
arensb authored
104 if ($colour == 1){
105 print mktablerow(5,$secondary,$results[0],$results[1],$results[3],$results[4],$results[6]);
106 $colour=0;
107 } else{
108 print mktablerow(5,'white',$results[0],$results[1],$results[3],$results[4],$results[6]);
109 $colour=1;
d0374d0 Initial revision
rangi authored
110 }
111 $i++;
112 }
113 print endcenter();
114 print mktableft();
115 print endmenu($type);
116 print endpage();
Something went wrong with that request. Please try again.