Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added magic RCS comment.

Removed trailing whitespace.
  • Loading branch information...
commit 7197a3735b36b22261776f93f3aa2407dcf55ba6 1 parent d5c8d40
arensb authored

Showing 48 changed files with 399 additions and 315 deletions. Show diff stats Hide diff stats

  1. +15 16 C4/Circmain.pm
  2. +4 2 C4/Database.pm
  3. +4 2 C4/Groups.pm
  4. +5 7 C4/Security.pm
  5. +3 1 acqui.simple/addbiblio.pl
  6. +6 4 acqui.simple/addbooks.pl
  7. +8 6 acqui.simple/addbookslccn.pl
  8. +4 3 acqui.simple/additem.pl
  9. +48 44 acqui.simple/marcimport.pl
  10. +7 4 acqui.simple/processz3950queue
  11. +2 1  acqui.simple/saveitem.pl
  12. +19 17 acqui/acquire.pl
  13. +8 6 acqui/basket.pl
  14. +4 2 acqui/newbasket.pl
  15. +6 4 acqui/order.pl
  16. +3 1 acqui/receive.pl
  17. +4 2 acqui/recieveorder.pl
  18. +7 5 acqui/supplier.pl
  19. +4 2 bookcount.pl
  20. +6 4 boraccount.pl
  21. +8 6 currency.pl
  22. +4 2 deletemem.pl
  23. +3 1 groups.pl
  24. +22 21 installer-lite.pl
  25. +12 10 installer.pl
  26. +8 6 koha.upgrade
  27. +4 2 member.pl
  28. +22 20 memberentry.pl
  29. +3 1 modbib.pl
  30. +19 17 modbibitem.pl
  31. +13 11 moditem.pl
  32. +4 3 moredetail.pl
  33. +10 8 moremember.pl
  34. +9 7 newimember.pl
  35. +4 3 overdue.pl
  36. +6 4 pay.pl
  37. +3 1 renewscript.pl
  38. +3 1 reports.pl
  39. +5 3 request.pl
  40. +3 1 showbudget.pl
  41. +7 5 stats.pl
  42. +4 2 stats2.pl
  43. +33 31 subjectsearch.pl
  44. +6 3 tidyaccounts.pl
  45. +7 6 updatebibitem.pl
  46. +4 2 updatecharges.pl
  47. +4 4 updateitem.pl
  48. +2 1  updatewebsite.pl
31 C4/Circmain.pm
... ... @@ -1,6 +1,8 @@
1   -package C4::Circmain; #assumes C4/Circulation
  1 +package C4::Circmain;
2 2
3   -#package to deal with circulation
  3 +# $Id$
  4 +
  5 +#package to deal with circulation
4 6
5 7
6 8 # Copyright 2000-2002 Katipo Communications
@@ -36,10 +38,10 @@ use C4::InterfaceCDK;
36 38 use C4::Security;
37 39
38 40 use vars qw($VERSION @ISA @EXPORT);
39   -
  41 +
40 42 # set the version for version checking
41 43 $VERSION = 0.01;
42   -
  44 +
43 45 @ISA = qw(Exporter);
44 46 @EXPORT = qw(&Start_circ);
45 47
@@ -55,32 +57,29 @@ sub Start_circ{
55 57 my $data;
56 58 while ($donext ne 'Quit') {
57 59 if ($donext eq "Circ") {
58   - #($reason,$data) = menu($env,'console','Circulation',
  60 + #($reason,$data) = menu($env,'console','Circulation',
59 61 # ('Issues','Returns','Borrower Enquiries','Reserves','Log In'));
60 62 #&startint($env,"Menu");
61 63 ($reason,$data) = menu($env,'console','Circulation',
62   - ('Issues','Returns','Select Branch','Select Printer'));
  64 + ('Issues','Returns','Select Branch','Select Printer'));
63 65 } else {
64 66 $data = $donext;
65 67 }
66   - if ($data eq 'Issues') {
67   - $donext=Issue($env); #C4::Circulation::Issues
  68 + if ($data eq 'Issues') {
  69 + $donext=Issue($env); #C4::Circulation::Issues
68 70 } elsif ($data eq 'Returns') {
69   - $donext=Returns($env); #C4::Circulation::Returns
  71 + $donext=Returns($env); #C4::Circulation::Returns
70 72 } elsif ($data eq 'Select Branch') {
71 73 getbranch($env);
72 74 } elsif ($data eq 'Select Printer') {
73   - getprinter($env);
  75 + getprinter($env);
74 76 } elsif ($data eq 'Borrower Enquiries') {
75 77 # $donext=Borenq($env); #C4::Circulation::Borrower - conversion
76 78 } elsif ($data eq 'Reserves'){
77   - $donext=EnterReserves($env); #C4::Reserves
78   - } elsif ($data eq 'Quit') {
  79 + $donext=EnterReserves($env); #C4::Reserves
  80 + } elsif ($data eq 'Quit') {
79 81 $donext = $data;
80 82 }
81 83 }
82   - &endint($env)
  84 + &endint($env)
83 85 }
84   -
85   -
86   -END { } # module clean-up code here (global destructor)
6 C4/Database.pm
... ... @@ -1,5 +1,7 @@
1 1 package C4::Database;
2 2
  3 +# $Id$
  4 +
3 5 # Copyright 2000-2002 Katipo Communications
4 6 #
5 7 # This file is part of Koha.
@@ -21,9 +23,9 @@ use strict;
21 23 require Exporter;
22 24 use DBI;
23 25 use vars qw($VERSION @ISA @EXPORT);
24   -
  26 +
25 27 $VERSION = 0.01;
26   -
  28 +
27 29 @ISA = qw(Exporter);
28 30 @EXPORT = qw( );
29 31
6 C4/Groups.pm
... ... @@ -1,5 +1,7 @@
1 1 package C4::Groups;
2 2
  3 +# $Id$
  4 +
3 5 #package to deal with Returns
4 6 #written 3/11/99 by olwen@katipo.co.nz
5 7
@@ -39,10 +41,10 @@ use C4::Stats;
39 41 #use C4::Print;
40 42
41 43 use vars qw($VERSION @ISA @EXPORT);
42   -
  44 +
43 45 # set the version for version checking
44 46 $VERSION = 0.01;
45   -
  47 +
46 48 @ISA = qw(Exporter);
47 49 @EXPORT = qw(&getgroups &groupmembers);
48 50
12 C4/Security.pm
... ... @@ -1,5 +1,6 @@
1   -package C4::Security; #assumes C4/Security
  1 +package C4::Security;
2 2
  3 +# $Id$
3 4
4 5 # Copyright 2000-2002 Katipo Communications
5 6 #
@@ -43,7 +44,7 @@ sub Login {
43 44 my $sth=$dbh->prepare($query);
44 45 $sth->execute;
45 46 while (my $branchrec=$sth->fetchrow_hashref) {
46   - my $branchdet =
  47 + my $branchdet =
47 48 fmtstr($env,$branchrec->{'branchcode'},"L2")." ".$branchrec->{'branchname'};
48 49 push @branches,$branchdet;
49 50 }
@@ -67,7 +68,7 @@ sub Login {
67 68 $env->{'usercode'} = $username;
68 69 $env->{'branchcode'} = $branch;
69 70 }
70   -
  71 +
71 72 } else {
72 73 debug_msg("","not found");
73 74 }
@@ -76,10 +77,7 @@ sub Login {
76 77 }
77 78 &endint();
78 79 }
79   -
  80 +
80 81 sub CheckAccess {
81 82 my ($env)=@_;
82 83 }
83   -
84   -END { } # module clean-up code here (global destructor)
85   -
4 acqui.simple/addbiblio.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #
4 6 # TODO
5 7 #
@@ -38,7 +40,7 @@
38 40
39 41 print << "EOF";
40 42 <FONT SIZE=6><em>Adding a new Biblio</em></FONT><br>
41   -
  43 +
42 44 <table bgcolor="#ffcc00" width="80%" cellpadding="5">
43 45 <tr>
44 46 <td><FONT SIZE=5>Section One: Copyright Information </font></td>
10 acqui.simple/addbooks.pl
... ... @@ -1,10 +1,12 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #
4 6 # Modified saas@users.sf.net 12:00 01 April 2001
5 7 # The biblioitemnumber was not correctly initialised
6 8 # The max(barcode) value was broken - koha 'barcode' is a string value!
7   -# - If left blank, barcode value now defaults to max(biblionumber)
  9 +# - If left blank, barcode value now defaults to max(biblionumber)
8 10
9 11 #
10 12 # TODO
@@ -126,14 +128,14 @@ sub searchscreen {
126 128 <tr valign="center">
127 129 <td><FONT SIZE=5>Help</font></td>
128 130 </tr>
129   -</table>
  131 +</table>
130 132 <FONT SIZE=5>Koha stores data in three sections</font>
131 133 <p />
132 134 <h2>Biblio</h2>
133 135 The first section records bibliographic data such as title, author and copyright for a particular work.
134 136 <p />
135   -<h2>Group</h2>
136   -The second records bibliographic data for a particular publication of that work, such as ISBN number, physical description, publisher information, etc
  137 +<h2>Group</h2>
  138 +The second records bibliographic data for a particular publication of that work, such as ISBN number, physical description, publisher information, etc
137 139 <p />
138 140 <h2>Item</h2>
139 141 The third section holds specific item information, such as the bar code number
14 acqui.simple/addbookslccn.pl
... ... @@ -1,10 +1,12 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #
4 6 # Modified saas@users.sf.net 12:00 01 April 2001
5 7 # The biblioitemnumber was not correctly initialised
6 8 # The max(barcode) value was broken - koha 'barcode' is a string value!
7   -# - If left blank, barcode value now defaults to max(biblionumber)
  9 +# - If left blank, barcode value now defaults to max(biblionumber)
8 10
9 11 #
10 12 # TODO
@@ -345,13 +347,13 @@ sub newitem {
345 347 <input type=hidden name=biblionumber value=$biblionumber>
346 348 <input type=hidden name=biblioitemnumber value=$biblioitemnumber>
347 349 <table>
348   -<!-- tr><td>BARCODE</td><td><input name=barcode size=10 value=\$maxbarcode -->
349   -<tr><td>BARCODE</td><td><input name=barcode size=10 value=$biblionumber>
  350 +<!-- tr><td>BARCODE</td><td><input name=barcode size=10 value=\$maxbarcode -->
  351 +<tr><td>BARCODE</td><td><input name=barcode size=10 value=$biblionumber>
350 352 Home Branch: <select name=homebranch>
351 353 EOF
352   -my $branches=getbranches();
353   - foreach my $key (sort(keys %$branches)) {
354   - print "<option value=\"$key\">$branches->{$key}->{'branchname'}</option>";
  354 +my $branches=getbranches();
  355 + foreach my $key (sort(keys %$branches)) {
  356 + print "<option value=\"$key\">$branches->{$key}->{'branchname'}</option>";
355 357 }
356 358 print << "EOF";
357 359 </select></td></tr>
7 acqui.simple/additem.pl
... ... @@ -1,5 +1,6 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
3 4
4 5 # Copyright 2000-2002 Katipo Communications
5 6 #
@@ -55,11 +56,11 @@
55 56 ($biblioitemcount, @biblioitems) = &getbiblioitembybiblionumber($biblionumber);
56 57 ($branchcount, @branches) = &branches;
57 58 ($itemtypecount, @itemtypes) = &getitemtypes;
58   -
  59 +
59 60 for (my $i = 0; $i < $itemtypecount; $i++) {
60 61 $itemtypedescriptions{$itemtypes[$i]->{'itemtype'}} = $itemtypes[$i]->{'description'};
61 62 } # for
62   -
  63 +
63 64 for (my $i = 0; $i < $branchcount; $i++) {
64 65 $branchnames{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'};
65 66 } # for
@@ -104,7 +105,7 @@
104 105
105 106 for (my $i = 0; $i < $biblioitemcount; $i++) {
106 107 if ($biblioitems[$i]->{'itemtype'} eq "WEB") {
107   -
  108 +
108 109 print << "EOF";
109 110 <tr valign="top" bgcolor="#CCCC99">
110 111 <td background="/images/background-mem.gif"><b>$biblioitems[$i]->{'biblioitemnumber'} GROUP - $itemtypedescriptions{$biblioitems[$i]->{'itemtype'}}</b></td>
92 acqui.simple/marcimport.pl
@@ -84,7 +84,7 @@
84 84 #
85 85 if ($input->param('z3950queue')) {
86 86 AcceptZ3950Queue($dbh,$input);
87   -}
  87 +}
88 88
89 89 if ($input->param('uploadmarc')) {
90 90 AcceptMarcUpload($dbh,$input)
@@ -157,7 +157,7 @@ sub ProcessRecord {
157 157 $record,
158 158 $data,
159 159 );
160   -
  160 +
161 161 if ($file=~/Z-(\d+)/) {
162 162 my $id=$1;
163 163 my $resultsid=$input->param('resultsid');
@@ -169,7 +169,7 @@ sub ProcessRecord {
169 169 $sth->execute;
170 170 ($data) = $sth->fetchrow;
171 171 }
172   -
  172 +
173 173 my $file=MARC::File::USMARC->indata ($data);
174 174 my $oldkoha;
175 175 # FIXME - This "==" should be "=", right?
@@ -216,7 +216,7 @@ sub ProcessRecord {
216 216 $template->param(numrecord => $numrecord);
217 217 $template->param(file => $data);
218 218 print "Content-Type: text/html\n\n", $template->output;
219   -}
  219 +}
220 220
221 221 # lists all records from the MARC file
222 222 sub ListFileRecords {
@@ -243,13 +243,13 @@ sub ListFileRecords {
243 243 my $record;
244 244 my ($numrecords,$resultsid,$data,$startdate,$enddate);
245 245 # FIXME - there's already a $data a few lines above.
246   -
  246 +
247 247 $dbh = C4::Context->dbh;
248 248
249 249 my $template=gettemplate('marcimport/ListFileRecords.tmpl');
250 250
251 251 # File can be z3950 search query or uploaded MARC data
252   -
  252 +
253 253 # if z3950 results
254 254 if (not $file=~/Z-(\d+)/) {
255 255 # This is a Marc upload
@@ -261,19 +261,19 @@ sub ListFileRecords {
261 261 }
262 262
263 263 if ($file=~/Z-(\d+)/) {
264   - # This is a z3950 search
  264 + # This is a z3950 search
265 265 $template->param(IS_Z3950 =>1);
266 266 my $id=$1; # search query id number
267 267 my $serverstring;
268 268 my $starttimer=time();
269   -
  269 +
270 270 $sth=$dbh->prepare("
271 271 select z3950results.numrecords,z3950results.id,z3950results.results,
272   - z3950results.startdate,z3950results.enddate,server
273   - from z3950queue left outer join z3950results
274   - on z3950queue.id=z3950results.queryid
  272 + z3950results.startdate,z3950results.enddate,server
  273 + from z3950queue left outer join z3950results
  274 + on z3950queue.id=z3950results.queryid
275 275 where z3950queue.id=?
276   - order by server
  276 + order by server
277 277 ");
278 278 $sth->execute($id);
279 279 if ( $sth->rows ) {
@@ -314,7 +314,7 @@ sub ListFileRecords {
314 314 $template->param(numrecords => $numrecords);
315 315 $template->param(previous => $previous);
316 316 $template->param(next => $next);
317   - my $stj=$dbh->prepare("update z3950results
  317 + my $stj=$dbh->prepare("update z3950results
318 318 set highestseen=? where id=?");
319 319 $stj->execute($startrecord+10,$resultsid);
320 320 }
@@ -353,7 +353,7 @@ sub ListFileRecords {
353 353
354 354 } else {
355 355 #
356   -# This is an uploaded Marc record
  356 +# This is an uploaded Marc record
357 357 #
358 358 my @loop = ();
359 359 my $MARCfile = MARC::File::USMARC->indata($data);
@@ -388,8 +388,8 @@ sub ResultRecordLink {
388 388
389 389 # $bib=extractmarcfields($record);
390 390
391   - $sth=$dbh->prepare("select *
392   - from biblioitems
  391 + $sth=$dbh->prepare("select *
  392 + from biblioitems
393 393 where (isbn=? and isbn!='') or (issn=? and issn!='') or (lccn=? and lccn!='') ");
394 394 $sth->execute($oldkoha->{isbn},$oldkoha->{issn},$oldkoha->{lccn});
395 395 if ($sth->rows) {
@@ -398,7 +398,7 @@ sub ResultRecordLink {
398 398 $donetext="";
399 399 }
400 400 ($oldkoha->{author}) && ($oldkoha->{author}="by $oldkoha->{author}");
401   -
  401 +
402 402 $searchfield="";
403 403 foreach $fieldname ( "controlnumber", "lccn", "issn", "isbn") {
404 404 if ( defined $oldkoha->{$fieldname} && $oldkoha->{$fieldname} ) {
@@ -439,7 +439,7 @@ sub z3950menu {
439 439 $elapsed,
440 440 $elapsedtime,
441 441 $resultstatus, $statuscolor,
442   - $id, $term, $type, $done,
  442 + $id, $term, $type, $done,
443 443 $startdate, $enddate, $servers,
444 444 $record,$bib,$title,
445 445 );
@@ -464,12 +464,12 @@ sub z3950menu {
464 464
465 465 # Check queued queries
466 466 $sth=$dbh->prepare("select id,term,type,done,
467   - startdate,enddate,servers
468   - from z3950queue
469   - order by id desc
  467 + startdate,enddate,servers
  468 + from z3950queue
  469 + order by id desc
470 470 limit 20 ");
471 471 $sth->execute;
472   - while ( ($id, $term, $type, $done,
  472 + while ( ($id, $term, $type, $done,
473 473 $startdate, $enddate, $servers) = $sth->fetchrow) {
474 474 $type=uc($type);
475 475 $term=~s/</&lt;/g;
@@ -478,14 +478,14 @@ sub z3950menu {
478 478 $title="";
479 479 # See if query produced results
480 480 $sti=$dbh->prepare("select id,server,startdate,enddate,numrecords,results
481   - from z3950results
  481 + from z3950results
482 482 where queryid=?");
483 483 $sti->execute($id);
484 484 if ($sti->rows) {
485 485 $processing=0;
486 486 $realenddate=0;
487 487 $totalrecords=0;
488   - while (my ($r_id,$r_server,$r_startdate,$r_enddate,$r_numrecords,$r_marcdata)
  488 + while (my ($r_id,$r_server,$r_startdate,$r_enddate,$r_numrecords,$r_marcdata)
489 489 = $sti->fetchrow) {
490 490 if ($r_enddate==0) {
491 491 # It hasn't finished yet
@@ -542,8 +542,8 @@ sub z3950menu {
542 542 # Search input form
543 543 print "<td valign=top width=30%>\n";
544 544
545   - my $sth=$dbh->prepare("select id,name,checked
546   - from z3950servers
  545 + my $sth=$dbh->prepare("select id,name,checked
  546 + from z3950servers
547 547 order by rank");
548 548 # FIXME - There's already a $sth in this function.
549 549 $sth->execute;
@@ -553,7 +553,7 @@ sub z3950menu {
553 553 $serverlist.="<input type=checkbox name=S-$id $checked> $name<br>\n";
554 554 }
555 555 $serverlist.="<input type=checkbox name=S-MAN> <input name=manualz3950server size=25 value=otherserver:210/DATABASE>\n";
556   -
  556 +
557 557 my $rand=rand(1000000000);
558 558 print << "EOF";
559 559 <form action=$ENV{'SCRIPT_NAME'} method=GET>
@@ -566,10 +566,10 @@ sub z3950menu {
566 566 <tr><th bgcolor=#bbbbbb colspan=2>Search for MARC records</th></tr>
567 567 <tr><td>Query Term</td><td><input name=query></td></tr>
568 568 <tr><td colspan=2 align=center>
569   - <input type=radio name=type value=isbn checked>&nbsp;ISBN
  569 + <input type=radio name=type value=isbn checked>&nbsp;ISBN
570 570 <input type=radio name=type value=lccn >&nbsp;LCCN<br>
571   - <input type=radio name=type value=author >&nbsp;Author
572   - <input type=radio name=type value=title >&nbsp;Title
  571 + <input type=radio name=type value=author >&nbsp;Author
  572 + <input type=radio name=type value=title >&nbsp;Title
573 573 <input type=radio name=type value=keyword >&nbsp;Keyword</td></tr>
574 574 <tr><td colspan=2> $serverlist </td></tr>
575 575 <tr><td colspan=2 align=center> <input type=submit> </td></tr>
@@ -652,7 +652,7 @@ sub AcceptZ3950Queue {
652 652 }
653 653 }
654 654
655   - $error=addz3950queue($dbh,$input->param('query'), $input->param('type'),
  655 + $error=addz3950queue($dbh,$input->param('query'), $input->param('type'),
656 656 $input->param('rand'), @serverlist);
657 657 if ( $error ) {
658 658 print qq|
@@ -669,7 +669,7 @@ sub AcceptZ3950Queue {
669 669 privileges of your apache user. Ideally, this script should be started from a<br>
670 670 system init directory so that is running after the machine starts up.
671 671 |;
672   -
  672 +
673 673 } # if daemon
674 674 print qq|
675 675 </td></tr>
@@ -708,8 +708,8 @@ sub AcceptMarcUpload {
708 708 }
709 709 my $q_marcrecord=$dbh->quote($marcrecord);
710 710 my $q_name=$dbh->quote($name);
711   - my $sth=$dbh->prepare("insert into uploadedmarc
712   - (marc,name)
  711 + my $sth=$dbh->prepare("insert into uploadedmarc
  712 + (marc,name)
713 713 values ($q_marcrecord, $q_name)");
714 714 $sth->execute;
715 715 } # sub AcceptMarcUpload
@@ -757,8 +757,8 @@ sub AcceptBiblioitem {
757 757 my $oldkoha = MARCmarc2koha($dbh,$record);
758 758 # See if it already exists
759 759 # FIXME - There's already a $sth in this context.
760   - my $sth=$dbh->prepare("select biblionumber,biblioitemnumber
761   - from biblioitems
  760 + my $sth=$dbh->prepare("select biblionumber,biblioitemnumber
  761 + from biblioitems
762 762 where isbn=? or issn=? or lccn=?");
763 763 $sth->execute($oldkoha->{isbn},$oldkoha->{issn},$oldkoha->{lccn});
764 764 if ($sth->rows) {
@@ -776,14 +776,14 @@ sub AcceptBiblioitem {
776 776 my $error;
777 777 my %biblio;
778 778 my %biblioitem;
779   -
  779 +
780 780 # convert to upper case and split on lines
781 781 my $subjectheadings=$input->param('subject');
782 782 my @subjectheadings=split(/[\r\n]+/,$subjectheadings);
783   -
  783 +
784 784 my $additionalauthors=$input->param('additionalauthors');
785 785 my @additionalauthors=split(/[\r\n]+|\|/,uc($additionalauthors));
786   -
  786 +
787 787 # Use individual assignments to hash buckets, in case
788 788 # any of the input parameters are empty or don't exist
789 789 $biblio{title} =$input->param('title');
@@ -793,7 +793,7 @@ sub AcceptBiblioitem {
793 793 $biblio{notes} =$input->param('notes');
794 794 $biblio{abstract} =$input->param('abstract');
795 795 $biblio{subtitle} =$input->param('subtitle');
796   -
  796 +
797 797 $biblioitem{volume} =$input->param('volume');
798 798 $biblioitem{number} =$input->param('number');
799 799 $biblioitem{itemtype} =$input->param('itemtype');
@@ -823,10 +823,10 @@ sub AcceptBiblioitem {
823 823 # \@subjectheadings,
824 824 # \@additionalauthors
825 825 # );
826   -
  826 +
827 827 if ( $error ) {
828 828 print "<H2>Error adding biblio item</H2> $error\n";
829   - } else {
  829 + } else {
830 830 $template->param(title => $title);
831 831 $template->param(biblionumber => $biblionumber);
832 832 $template->param(biblioitemnumber => $biblioitemnumber);
@@ -867,8 +867,8 @@ sub AcceptItemCopy {
867 867 my $barcode=$input->param('barcode');
868 868 my $replacementprice=($input->param('replacementprice') || 0);
869 869
870   - my $sth=$dbh->prepare("select barcode
871   - from items
  870 + my $sth=$dbh->prepare("select barcode
  871 + from items
872 872 where barcode=?");
873 873 $sth->execute($barcode);
874 874 if ($sth->rows) {
@@ -998,6 +998,10 @@ sub FormatMarcText {
998 998
999 999 #---------------
1000 1000 # $Log$
  1001 +# Revision 1.17 2002/10/13 07:39:26 arensb
  1002 +# Added magic RCS comment.
  1003 +# Removed trailing whitespace.
  1004 +#
1001 1005 # Revision 1.16 2002/10/11 12:45:10 arensb
1002 1006 # Replaced &requireDBI with C4::Context->dbh, thus making the "use
1003 1007 # Fixed muffed quotes in &gettemplate calls.
11 acqui.simple/processz3950queue
... ... @@ -1,4 +1,7 @@
1 1 #!/usr/bin/perl
  2 +
  3 +# $Id$
  4 +
2 5 use C4::Context;
3 6 use DBI;
4 7 #use strict;
@@ -9,22 +12,22 @@ use Net::Z3950;
9 12
10 13
11 14 if ($< == 0) {
12   - # Running as root, switch privs
  15 + # Running as root, switch privs
13 16 if (-d "/var/run") {
14 17 open PID, ">/var/run/processz3950queue.pid";
15 18 print PID $$."\n";
16 19 close PID;
17 20 }
18 21 # Get real apacheuser from koha.conf or reparsing httpd.conf
19   - my $apacheuser='www-data';
  22 + my $apacheuser='www-data';
20 23 my $uid=0;
21   - unless ($uid = (getpwnam($apacheuser))[2]) {
  24 + unless ($uid = (getpwnam($apacheuser))[2]) {
22 25 die "Attempt to run daemon as non-existent or superuser\n";
23 26 }
24 27 $>=$uid;
25 28 $<=$uid;
26 29 }
27   -
  30 +
28 31
29 32 my $dbh = C4::Context->dbh;
30 33
3  acqui.simple/saveitem.pl
... ... @@ -1,5 +1,6 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
3 4
4 5 # Copyright 2000-2002 Katipo Communications
5 6 #
@@ -75,7 +76,7 @@
75 76 } elsif ((! $newgroup) && (! $biblioitemnumber)) {
76 77 print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobiblioitem");
77 78 } else {
78   -
  79 +
79 80 if ($website) {
80 81 &newbiblioitem($biblioitem);
81 82 } elsif (&checkitems(1,$barcode)) {
36 acqui/acquire.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #script to recieve orders
4 6 #written by chris@katipo.co.nz 24/2/2000
5 7
@@ -44,7 +46,7 @@
44 46 my $catview=$input->param('catview');
45 47 my $gst=$input->param('gst');
46 48 my ($count,@results)=ordersearch($search,$biblio,$catview);
47   -my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
  49 +my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
48 50 #print $count;
49 51 my @date=split('-',$results[0]->{'entrydate'});
50 52 my $date="$date[2]/$date[1]/$date[0]";
@@ -151,14 +153,14 @@
151 153 <td><select name=branch size=1>
152 154 EOP
153 155 ;
154   -my ($count2,@branches)=branches();
155   -for (my $i=0;$i<$count2;$i++){
156   - print "<option value=$branches[$i]->{'branchcode'}";
157   - if ($results[0]->{'branchcode'} == $branches[$i]->{'branchcode'}){
158   - print " Selected";
159   - }
160   - print ">$branches[$i]->{'branchname'}";
161   -}
  156 +my ($count2,@branches)=branches();
  157 +for (my $i=0;$i<$count2;$i++){
  158 + print "<option value=$branches[$i]->{'branchcode'}";
  159 + if ($results[0]->{'branchcode'} == $branches[$i]->{'branchcode'}){
  160 + print " Selected";
  161 + }
  162 + print ">$branches[$i]->{'branchname'}";
  163 +}
162 164 print <<EOP
163 165 </select>
164 166 </td>
@@ -210,14 +212,14 @@
210 212 EOP
211 213 ;
212 214 my @bookfund;
213   -($count2,@bookfund)=bookfunds();
214   -for (my $i=0;$i<$count2;$i++){
  215 +($count2,@bookfund)=bookfunds();
  216 +for (my $i=0;$i<$count2;$i++){
215 217 print "<option value=$bookfund[$i]->{'bookfundid'}";
216 218 if ($bookfund[$i]->{'bookfundid'}==$results[0]->{'bookfundid'}){
217 219 print " Selected";
218 220 }
219 221 print ">$bookfund[$i]->{'bookfundname'}";
220   -}
  222 +}
221 223
222 224 my $rrp=$results[0]->{'rrp'};
223 225 if ($results[0]->{'quantityreceived'} == 0){
@@ -269,7 +271,7 @@
269 271 </table>
270 272 </form>
271 273 </center>
272   -<br clear=all>
  274 +<br clear=all>
273 275 <p> &nbsp; </p>
274 276
275 277 EOP
@@ -277,11 +279,11 @@
277 279 } else {
278 280 print "<center><table>";
279 281 print <<EOP
280   -<tr valign=top bgcolor=#99cc33>
  282 +<tr valign=top bgcolor=#99cc33>
281 283
282   -<td background="/images/background-mem.gif"><b>ISBN</b></td>
283   -<td background="/images/background-mem.gif"><b>TITLE</b></td>
284   -<td background="/images/background-mem.gif"><b>AUTHOR</b></td>
  284 +<td background="/images/background-mem.gif"><b>ISBN</b></td>
  285 +<td background="/images/background-mem.gif"><b>TITLE</b></td>
  286 +<td background="/images/background-mem.gif"><b>AUTHOR</b></td>
285 287 </tr>
286 288 EOP
287 289 ;
14 acqui/basket.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #script to show display basket of orders
4 6 #written by chris@katipo.co.nz 24/2/2000
5 7
@@ -49,7 +51,7 @@
49 51 Authorised By: $results[0]->{'authorisedby'}<br>
50 52 $results[0]->{'entrydate'};
51 53 </div>
52   -<FONT SIZE=6><em>Shopping Basket For: <a href=supplier.pl?id=$results[0]->{'booksellerid'}></a> $booksellers[0]->{'name'}</em></FONT>
  54 +<FONT SIZE=6><em>Shopping Basket For: <a href=supplier.pl?id=$results[0]->{'booksellerid'}></a> $booksellers[0]->{'name'}</em></FONT>
53 55 <a href=newbasket.pl?id=$results[0]->{'booksellerid'}&basket=$basket>Add more orders</a>
54 56 <CENTER>
55 57 <FORM ACTION="/cgi-bin/koha/search.pl" method=post>
@@ -87,7 +89,7 @@
87 89 $gist=sprintf("%.2f",$sub_total*0.125);
88 90 $grand_total=$sub_total+$gist;
89 91
90   -print <<EOP
  92 +print <<EOP
91 93 <tr valign=top bgcolor=#ffffcc>
92 94 <td>$results[$i]->{'ordernumber'}</td>
93 95 <td>$results[$i]->{'isbn'}</td>
@@ -98,12 +100,12 @@
98 100 <td><input type=text name=quantity$i size=6 value=$results[$i]->{'quantity'} onchange='update(this.form)'></td>
99 101 <td>\$<input type=text name=total$i size=10 value=$line_total></td>
100 102 <input type=hidden name=ordnum$i value=$results[$i]->{'ordernumber'}>
101   - <input type=hidden name=bibnum$i value=$results[$i]->{'biblionumber'}>
  103 + <input type=hidden name=bibnum$i value=$results[$i]->{'biblionumber'}>
102 104 </tr>
103 105 EOP
104 106 ;
105 107 }
106   -#
  108 +#
107 109 print "<input type=hidden name=number value=$count>
108 110 <input type=hidden name=basketno value=\"$basket\">";
109 111 print <<EOP
@@ -111,7 +113,7 @@
111 113 <b>HELP</b><br>
112 114 To cancel an order, just change the quantity to 0 and click "save changes".<br>
113 115 To change any of the catalogue or accounting information attached to an order, click on the title.<br>
114   - To add new orders to this supplier, start with a search. </td>
  116 + To add new orders to this supplier, start with a search. </td>
115 117 <td><b>SubTotal</b></td>
116 118 <td>\$<input type=text name=subtotal size=10 value=$sub_total></td></tr>
117 119 <tr valign=top bgcolor=white>
@@ -128,7 +130,7 @@
128 130 <td></td>
129 131 <td colspan=3><input type=image name=submit src=/images/save-changes.gif border=0 width=187 height=42 align=right></td></tr>
130 132 </table>
131   -</CENTER>
  133 +</CENTER>
132 134 EOP
133 135 ;
134 136
6 acqui/newbasket.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #script to show display basket of orders
4 6 #written by chris@katipo.co.nz 24/2/2000
5 7
@@ -52,7 +54,7 @@
52 54 <FONT SIZE=6><em>Shopping Basket For: <a href=/cgi-bin/koha/acqui/supplier.pl?id=$booksellers[0]->{'id'}>
53 55 $booksellers[0]->{'name'}</a></em></FONT><br>
54 56 Ph: $booksellers[0]->{'phone'}, Fax: $booksellers[0]->{'fax'},
55   -$booksellers[0]->{'address1'}, $booksellers[0]->{'address2'},
  57 +$booksellers[0]->{'address1'}, $booksellers[0]->{'address2'},
56 58 $booksellers[0]->{'address3'}, $booksellers[0]->{'address4'}
57 59
58 60
@@ -60,7 +62,7 @@
60 62 <FORM ACTION="/cgi-bin/koha/acqui/newbasket2.pl" method=post>
61 63 <input type=hidden name=id value="$id">
62 64 <input type=hidden name=basket value="$basket">
63   -<b> Search Keyword or Title: </b><INPUT TYPE="text" SIZE="25" NAME="search">
  65 +<b> Search Keyword or Title: </b><INPUT TYPE="text" SIZE="25" NAME="search">
64 66
65 67 </form>
66 68
10 acqui/order.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #script to show suppliers and orders
4 6 #written by chris@katipo.co.nz 23/2/2000
5 7
@@ -64,7 +66,7 @@
64 66 if ($orders->[0]->{'basketno'}>0) {
65 67 print <<printend
66 68 <tr valign=top bgcolor=$colour>
67   - <td><a href="newbasket.pl?id=$suppliers[$i]->{'id'}"><img src="/images/new-basket-short.gif" alt="New Basket" width=77 height=32 border=0 ></a>
  69 + <td><a href="newbasket.pl?id=$suppliers[$i]->{'id'}"><img src="/images/new-basket-short.gif" alt="New Basket" width=77 height=32 border=0 ></a>
68 70 <a href="recieveorder.pl?id=$suppliers[$i]->{'id'}"><img src="/images/receive-order-short.gif" alt="Receive Order" width=77 height=32 border=0 ></a></td>
69 71 <td><a href="supplier.pl?id=$suppliers[$i]->{'id'}">$suppliers[$i]->{'name'}</a></td>
70 72 <td><a href="/cgi-bin/koha/acqui/basket.pl?basket=$orders->[0]->{'basketno'}">HLT-$orders->[0]->{'basketno'}</a></td>
@@ -76,7 +78,7 @@
76 78 } else {
77 79 print <<printend
78 80 <tr valign=top bgcolor=$colour>
79   - <td><a href="newbasket.pl?id=$suppliers[$i]->{'id'}"><img src="/images/new-basket-short.gif" alt="New Basket" width=77 height=32 border=0 ></a>
  81 + <td><a href="newbasket.pl?id=$suppliers[$i]->{'id'}"><img src="/images/new-basket-short.gif" alt="New Basket" width=77 height=32 border=0 ></a>
80 82 <a href="recieveorder.pl?id=$suppliers[$i]->{'id'}"><img src="/images/receive-order-short.gif" alt="Receive Order" width=77 height=32 border=0 ></a></td>
81 83 <td><a href="supplier.pl?id=$suppliers[$i]->{'id'}">$suppliers[$i]->{'name'}</a></td>
82 84 <td>&nbsp;</a></td>
@@ -95,7 +97,7 @@
95 97 <td><a href="/cgi-bin/koha/acqui/basket.pl?basket=$orders->[$i2]->{'basketno'}">HLT-$orders->[$i2]->{'basketno'}</a></td>
96 98 <td>$orders->[$i2]->{'count(*)'}</td><td>$orders->[$i2]->{'authorisedby'} &nbsp; </td>
97 99 <td>$orders->[$i2]->{'entrydate'}</td></tr>
98   -
  100 +
99 101 printend
100 102 ;
101 103 } else {
@@ -106,7 +108,7 @@
106 108 <td> &nbsp;</td>
107 109 <td>$orders->[$i2]->{'count(*)'}</td><td>$orders->[$i2]->{'authorisedby'} &nbsp; </td>
108 110 <td>$orders->[$i2]->{'entrydate'}</td></tr>
109   -
  111 +
110 112 printend
111 113 ;
112 114 }
4 acqui/receive.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #script to recieve orders
4 6 #written by chris@katipo.co.nz 24/2/2000
5 7
@@ -132,7 +134,7 @@
132 134 <br>
133 135 The total at the bottom of the page should be within a few cents of the total for the invoice.<p>
134 136 When you have finished this invoice save the changes.
135   -</td>
  137 +</td>
136 138 <td colspan=2 align=right><b>GST</b></td>
137 139 <td>\$$gst</td>
138 140 </tr>
6 acqui/recieveorder.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #script to show display basket of orders
4 6 #written by chris@katipo.co.nz 24/2/2000
5 7
@@ -30,7 +32,7 @@
30 32 my $input=new CGI;
31 33 print $input->header();
32 34 my $id=$input->param('id');
33   -my ($count,@booksellers)=bookseller($id);
  35 +my ($count,@booksellers)=bookseller($id);
34 36 print startpage;
35 37
36 38 print startmenu('acquisitions');
@@ -47,7 +49,7 @@
47 49 <tr valign=top bgcolor=#99cc33><td background="/images/background-mem.gif" colspan=2><B>SUPPLIER INVOICE INFORMATION</B></td></tr>
48 50 <TR VALIGN=TOP >
49 51 <TD>Supplier Invoice Number</td>
50   -<td><input type=text size=20 name=invoice>
  52 +<td><input type=text size=20 name=invoice>
51 53 </td>
52 54 </tr>
53 55 <TR VALIGN=TOP>
12 acqui/supplier.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #script to show display basket of orders
4 6 #written by chris@katipo.co.nz 24/2/2000
5 7
@@ -30,7 +32,7 @@
30 32 my $input=new CGI;
31 33 print $input->header();
32 34 my $id=$input->param('id');
33   -my ($count,@booksellers)=bookseller($id);
  35 +my ($count,@booksellers)=bookseller($id);
34 36 print startpage;
35 37
36 38 print startmenu('acquisitions');
@@ -210,7 +212,7 @@
210 212 if ($booksellers[0]->{'gstreg'}==1){
211 213 print " checked";
212 214 }
213   -print ">Yes
  215 +print ">Yes
214 216 <input type=radio name=gst value=0";
215 217 if ($booksellers[0]->{'gstreg'}==0){
216 218 print " checked";
@@ -227,7 +229,7 @@
227 229 if ($booksellers[0]->{'listincgst'}==1){
228 230 print " checked";
229 231 }
230   -print ">Yes
  232 +print ">Yes
231 233 <input type=radio name=list_gst value=0";
232 234 if ($booksellers[0]->{'listincgst'}==0){
233 235 print " checked";
@@ -244,7 +246,7 @@
244 246 if ($booksellers[0]->{'invoiceincgst'}==1){
245 247 print " checked";
246 248 }
247   -print ">Yes
  249 +print ">Yes
248 250 <input type=radio name=invoice_gst value=0";
249 251 if ($booksellers[0]->{'invoiceincgst'}==0){
250 252 print " checked";
@@ -253,7 +255,7 @@
253 255 >No
254 256 </td>
255 257 </tr>
256   -<TR VALIGN=TOP>
  258 +<TR VALIGN=TOP>
257 259 <TD>Discount</td>
258 260 <td><input type=text size=3 name=discount value=$booksellers[0]->{'discount'}> %
259 261 </tr>
6 bookcount.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #written 7/3/2002 by Finlay
4 6 #script to display reports
5 7
@@ -58,7 +60,7 @@
58 60 }
59 61
60 62
61   -# make the page ...
  63 +# make the page ...
62 64 print $input->header;
63 65
64 66
@@ -133,7 +135,7 @@ sub lastmove {
133 135 $sth->execute;
134 136 my ($date) = $sth->fetchrow_array;
135 137 return(0, "Item has no branch transfers record") if not $date;
136   - my $var2 = $dbh->quote($date);
  138 + my $var2 = $dbh->quote($date);
137 139 $sth=$dbh->prepare("Select * from branchtransfers where branchtransfers.itemnumber=$var1 and branchtransfers.datearrived=$var2");
138 140 $sth->execute;
139 141 my ($data) = $sth->fetchrow_hashref;
10 boraccount.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #writen 11/1/2000 by chris@katipo.oc.nz
4 6 #script to display borrowers account details
5 7
@@ -39,8 +41,8 @@
39 41
40 42 #get account details
41 43 my %bor;
42   -$bor{'borrowernumber'}=$bornum;
43   -my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
  44 +$bor{'borrowernumber'}=$bornum;
  45 +my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
44 46
45 47 my @accountrows; # this is for the tmpl-loop
46 48
@@ -66,6 +68,6 @@
66 68 surname => $data->{'surname'},
67 69 bornum => $bornum,
68 70 total => $total,
69   - accounts => \@accountrows );
  71 + accounts => \@accountrows );
70 72
71   -print "Content-Type: text/html\n\n", $template->output;
  73 +print "Content-Type: text/html\n\n", $template->output;
14 currency.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #written by chris@katipo.co.nz
4 6 #9/10/2000
5 7 #script to display and update currency rates
@@ -40,7 +42,7 @@
40 42 <input type=hidden name=type value=change>
41 43 <TR VALIGN=TOP>
42 44 <TD bgcolor="99cc33" background="/images/background-mem.gif" colspan=2 ><b>EXCHANGE RATES </b></TD></TR>
43   - <TR VALIGN=TOP>
  45 + <TR VALIGN=TOP>
44 46 <TD>
45 47 printend
46 48 ;
@@ -52,12 +54,12 @@
52 54 # print $rates->[$i]->{'currency'};
53 55 }
54 56 print <<printend
55   - <p>
  57 + <p>
56 58 <input type=image name=submit src=/images/save-changes.gif border=0 width=187 height=42>
57   -
58   - </TD></TR>
59   - </form>
60   - </table>
  59 +
  60 + </TD></TR>
  61 + </form>
  62 + </table>
61 63 printend
62 64 ;
63 65 } else {
6 deletemem.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #script to delete items
4 6 #written 2/5/00
5 7 #by chris@katipo.co.nz
@@ -50,9 +52,9 @@
50 52 $sth->execute;
51 53 my $data=$sth->fetchrow_hashref;
52 54 $sth->finish;
53   -
54 55
55   -if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){
  56 +
  57 +if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){
56 58 print $input->header;
57 59 print "<table border=1>";
58 60 if ($i > 0){
4 groups.pl
... ... @@ -1,5 +1,7 @@
1 1 #!/usr/bin/perl
2 2
  3 +# $Id$
  4 +
3 5 #written 14/1/2000
4 6 #script to display reports
5 7
@@ -132,7 +134,7 @@
132 134 </tr></table>
133 135 </td></tr></table>
134 136 <p>
135   -Printer:
  137 +Printer:
136 138 <select name=printer>
137 139 $printeroptions
138 140 </select>
43 installer-lite.pl
... ... @@ -1,5 +1,6 @@
1 1 #!/usr/bin/perl -w # please develop with -w
2 2
  3 +# $Id$
3 4
4 5 # Copyright 2000-2002 Katipo Communications
5 6 #
@@ -28,16 +29,16 @@
28 29 *******************************************
29 30
30 31 This installer will guide you through the process of installing Koha.
31   -It is not a completely automated installation, but a guide for further
  32 +It is not a completely automated installation, but a guide for further
32 33 information please read the documentation or visit the Koha website at
33 34 http://www.koha.org
34 35
35 36 To successfully use Koha you need some additional software:
36 37
37 38 * A webserver (It was built to work with Apache, but there is no reason
38   -it should not work with any other webserver).
39   -
40   -* Mysql (You could intead use postgres, or another sql based database)
  39 +it should not work with any other webserver).
  40 +
  41 +* Mysql (You could intead use postgres, or another sql based database)
41 42
42 43 * Perl
43 44
@@ -98,10 +99,10 @@
98 99 #
99 100 print qq|
100 101 Koha uses a small configuration file that is usually placed in your
101   -/etc/ files directory (note: if you wish to place the koha.conf in
  102 +/etc/ files directory (note: if you wish to place the koha.conf in
102 103 another location you will need to manually edit additional files).
103 104
104   -We will help you to now create your koha.conf file, once this file
  105 +We will help you to now create your koha.conf file, once this file
105 106 has been created, please copy it to your destination folder
106 107 (note: this may need to be done by your systems administrator).
107 108 |;
@@ -115,7 +116,7 @@
115 116 print "\n";
116 117 print "\n";
117 118 print qq|
118   -Please provide the name of the mysql database that you wish to use
  119 +Please provide the name of the mysql database that you wish to use
119 120 for koha. This is normally "Koha".
120 121 |;
121 122
@@ -129,7 +130,7 @@
129 130 print "\n";
130 131 print "\n";
131 132 print qq|
132   -Please provide the hostname for mysql. Unless the database is located
  133 +Please provide the hostname for mysql. Unless the database is located
133 134 on another machine this is likely to be "localhost".
134 135 |;
135 136
@@ -143,7 +144,7 @@
143 144 print "\n";
144 145 print "\n";
145 146 print qq|
146   -Please provide the name of the mysql user, who will have full administrative
  147 +Please provide the name of the mysql user, who will have full administrative
147 148 rights to the $dbname database, when authenicating from $hostname.
148 149 It is recommended that you do not use your "root" user.
149 150 |;
@@ -182,7 +183,7 @@
182 183
183 184
184 185 #Create the configuration file
185   -open(SITES,">koha.conf") or die "Couldn't create file.
  186 +open(SITES,">koha.conf") or die "Couldn't create file.
186 187 Must have write capability.\n";
187 188 print SITES <<EOP
188 189 database=$dbname
@@ -243,7 +244,7 @@
243 244 #
244 245 # Update Apache Conf File.
245 246 #
246   -open(SITES,">>koha-apache.conf") or die "Couldn't write to file.