Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added magic RCS comment.

Removed trailing whitespace.
  • Loading branch information...
commit 7197a3735b36b22261776f93f3aa2407dcf55ba6 1 parent d5c8d40
arensb authored
Showing with 399 additions and 315 deletions.
  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
View
31 C4/Circmain.pm
@@ -1,6 +1,8 @@
-package C4::Circmain; #assumes C4/Circulation
+package C4::Circmain;
-#package to deal with circulation
+# $Id$
+
+#package to deal with circulation
# Copyright 2000-2002 Katipo Communications
@@ -36,10 +38,10 @@ use C4::InterfaceCDK;
use C4::Security;
use vars qw($VERSION @ISA @EXPORT);
-
+
# set the version for version checking
$VERSION = 0.01;
-
+
@ISA = qw(Exporter);
@EXPORT = qw(&Start_circ);
@@ -55,32 +57,29 @@ sub Start_circ{
my $data;
while ($donext ne 'Quit') {
if ($donext eq "Circ") {
- #($reason,$data) = menu($env,'console','Circulation',
+ #($reason,$data) = menu($env,'console','Circulation',
# ('Issues','Returns','Borrower Enquiries','Reserves','Log In'));
#&startint($env,"Menu");
($reason,$data) = menu($env,'console','Circulation',
- ('Issues','Returns','Select Branch','Select Printer'));
+ ('Issues','Returns','Select Branch','Select Printer'));
} else {
$data = $donext;
}
- if ($data eq 'Issues') {
- $donext=Issue($env); #C4::Circulation::Issues
+ if ($data eq 'Issues') {
+ $donext=Issue($env); #C4::Circulation::Issues
} elsif ($data eq 'Returns') {
- $donext=Returns($env); #C4::Circulation::Returns
+ $donext=Returns($env); #C4::Circulation::Returns
} elsif ($data eq 'Select Branch') {
getbranch($env);
} elsif ($data eq 'Select Printer') {
- getprinter($env);
+ getprinter($env);
} elsif ($data eq 'Borrower Enquiries') {
# $donext=Borenq($env); #C4::Circulation::Borrower - conversion
} elsif ($data eq 'Reserves'){
- $donext=EnterReserves($env); #C4::Reserves
- } elsif ($data eq 'Quit') {
+ $donext=EnterReserves($env); #C4::Reserves
+ } elsif ($data eq 'Quit') {
$donext = $data;
}
}
- &endint($env)
+ &endint($env)
}
-
-
-END { } # module clean-up code here (global destructor)
View
6 C4/Database.pm
@@ -1,5 +1,7 @@
package C4::Database;
+# $Id$
+
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
@@ -21,9 +23,9 @@ use strict;
require Exporter;
use DBI;
use vars qw($VERSION @ISA @EXPORT);
-
+
$VERSION = 0.01;
-
+
@ISA = qw(Exporter);
@EXPORT = qw( );
View
6 C4/Groups.pm
@@ -1,5 +1,7 @@
package C4::Groups;
+# $Id$
+
#package to deal with Returns
#written 3/11/99 by olwen@katipo.co.nz
@@ -39,10 +41,10 @@ use C4::Stats;
#use C4::Print;
use vars qw($VERSION @ISA @EXPORT);
-
+
# set the version for version checking
$VERSION = 0.01;
-
+
@ISA = qw(Exporter);
@EXPORT = qw(&getgroups &groupmembers);
View
12 C4/Security.pm
@@ -1,5 +1,6 @@
-package C4::Security; #assumes C4/Security
+package C4::Security;
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
@@ -43,7 +44,7 @@ sub Login {
my $sth=$dbh->prepare($query);
$sth->execute;
while (my $branchrec=$sth->fetchrow_hashref) {
- my $branchdet =
+ my $branchdet =
fmtstr($env,$branchrec->{'branchcode'},"L2")." ".$branchrec->{'branchname'};
push @branches,$branchdet;
}
@@ -67,7 +68,7 @@ sub Login {
$env->{'usercode'} = $username;
$env->{'branchcode'} = $branch;
}
-
+
} else {
debug_msg("","not found");
}
@@ -76,10 +77,7 @@ sub Login {
}
&endint();
}
-
+
sub CheckAccess {
my ($env)=@_;
}
-
-END { } # module clean-up code here (global destructor)
-
View
4 acqui.simple/addbiblio.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#
# TODO
#
@@ -38,7 +40,7 @@
print << "EOF";
<FONT SIZE=6><em>Adding a new Biblio</em></FONT><br>
-
+
<table bgcolor="#ffcc00" width="80%" cellpadding="5">
<tr>
<td><FONT SIZE=5>Section One: Copyright Information </font></td>
View
10 acqui.simple/addbooks.pl
@@ -1,10 +1,12 @@
#!/usr/bin/perl
+# $Id$
+
#
# Modified saas@users.sf.net 12:00 01 April 2001
# The biblioitemnumber was not correctly initialised
# The max(barcode) value was broken - koha 'barcode' is a string value!
-# - If left blank, barcode value now defaults to max(biblionumber)
+# - If left blank, barcode value now defaults to max(biblionumber)
#
# TODO
@@ -126,14 +128,14 @@ sub searchscreen {
<tr valign="center">
<td><FONT SIZE=5>Help</font></td>
</tr>
-</table>
+</table>
<FONT SIZE=5>Koha stores data in three sections</font>
<p />
<h2>Biblio</h2>
The first section records bibliographic data such as title, author and copyright for a particular work.
<p />
-<h2>Group</h2>
-The second records bibliographic data for a particular publication of that work, such as ISBN number, physical description, publisher information, etc
+<h2>Group</h2>
+The second records bibliographic data for a particular publication of that work, such as ISBN number, physical description, publisher information, etc
<p />
<h2>Item</h2>
The third section holds specific item information, such as the bar code number
View
14 acqui.simple/addbookslccn.pl
@@ -1,10 +1,12 @@
#!/usr/bin/perl
+# $Id$
+
#
# Modified saas@users.sf.net 12:00 01 April 2001
# The biblioitemnumber was not correctly initialised
# The max(barcode) value was broken - koha 'barcode' is a string value!
-# - If left blank, barcode value now defaults to max(biblionumber)
+# - If left blank, barcode value now defaults to max(biblionumber)
#
# TODO
@@ -345,13 +347,13 @@ sub newitem {
<input type=hidden name=biblionumber value=$biblionumber>
<input type=hidden name=biblioitemnumber value=$biblioitemnumber>
<table>
-<!-- tr><td>BARCODE</td><td><input name=barcode size=10 value=\$maxbarcode -->
-<tr><td>BARCODE</td><td><input name=barcode size=10 value=$biblionumber>
+<!-- tr><td>BARCODE</td><td><input name=barcode size=10 value=\$maxbarcode -->
+<tr><td>BARCODE</td><td><input name=barcode size=10 value=$biblionumber>
Home Branch: <select name=homebranch>
EOF
-my $branches=getbranches();
- foreach my $key (sort(keys %$branches)) {
- print "<option value=\"$key\">$branches->{$key}->{'branchname'}</option>";
+my $branches=getbranches();
+ foreach my $key (sort(keys %$branches)) {
+ print "<option value=\"$key\">$branches->{$key}->{'branchname'}</option>";
}
print << "EOF";
</select></td></tr>
View
7 acqui.simple/additem.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
@@ -55,11 +56,11 @@
($biblioitemcount, @biblioitems) = &getbiblioitembybiblionumber($biblionumber);
($branchcount, @branches) = &branches;
($itemtypecount, @itemtypes) = &getitemtypes;
-
+
for (my $i = 0; $i < $itemtypecount; $i++) {
$itemtypedescriptions{$itemtypes[$i]->{'itemtype'}} = $itemtypes[$i]->{'description'};
} # for
-
+
for (my $i = 0; $i < $branchcount; $i++) {
$branchnames{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'};
} # for
@@ -104,7 +105,7 @@
for (my $i = 0; $i < $biblioitemcount; $i++) {
if ($biblioitems[$i]->{'itemtype'} eq "WEB") {
-
+
print << "EOF";
<tr valign="top" bgcolor="#CCCC99">
<td background="/images/background-mem.gif"><b>$biblioitems[$i]->{'biblioitemnumber'} GROUP - $itemtypedescriptions{$biblioitems[$i]->{'itemtype'}}</b></td>
View
92 acqui.simple/marcimport.pl
@@ -84,7 +84,7 @@
#
if ($input->param('z3950queue')) {
AcceptZ3950Queue($dbh,$input);
-}
+}
if ($input->param('uploadmarc')) {
AcceptMarcUpload($dbh,$input)
@@ -157,7 +157,7 @@ sub ProcessRecord {
$record,
$data,
);
-
+
if ($file=~/Z-(\d+)/) {
my $id=$1;
my $resultsid=$input->param('resultsid');
@@ -169,7 +169,7 @@ sub ProcessRecord {
$sth->execute;
($data) = $sth->fetchrow;
}
-
+
my $file=MARC::File::USMARC->indata ($data);
my $oldkoha;
# FIXME - This "==" should be "=", right?
@@ -216,7 +216,7 @@ sub ProcessRecord {
$template->param(numrecord => $numrecord);
$template->param(file => $data);
print "Content-Type: text/html\n\n", $template->output;
-}
+}
# lists all records from the MARC file
sub ListFileRecords {
@@ -243,13 +243,13 @@ sub ListFileRecords {
my $record;
my ($numrecords,$resultsid,$data,$startdate,$enddate);
# FIXME - there's already a $data a few lines above.
-
+
$dbh = C4::Context->dbh;
my $template=gettemplate('marcimport/ListFileRecords.tmpl');
# File can be z3950 search query or uploaded MARC data
-
+
# if z3950 results
if (not $file=~/Z-(\d+)/) {
# This is a Marc upload
@@ -261,19 +261,19 @@ sub ListFileRecords {
}
if ($file=~/Z-(\d+)/) {
- # This is a z3950 search
+ # This is a z3950 search
$template->param(IS_Z3950 =>1);
my $id=$1; # search query id number
my $serverstring;
my $starttimer=time();
-
+
$sth=$dbh->prepare("
select z3950results.numrecords,z3950results.id,z3950results.results,
- z3950results.startdate,z3950results.enddate,server
- from z3950queue left outer join z3950results
- on z3950queue.id=z3950results.queryid
+ z3950results.startdate,z3950results.enddate,server
+ from z3950queue left outer join z3950results
+ on z3950queue.id=z3950results.queryid
where z3950queue.id=?
- order by server
+ order by server
");
$sth->execute($id);
if ( $sth->rows ) {
@@ -314,7 +314,7 @@ sub ListFileRecords {
$template->param(numrecords => $numrecords);
$template->param(previous => $previous);
$template->param(next => $next);
- my $stj=$dbh->prepare("update z3950results
+ my $stj=$dbh->prepare("update z3950results
set highestseen=? where id=?");
$stj->execute($startrecord+10,$resultsid);
}
@@ -353,7 +353,7 @@ sub ListFileRecords {
} else {
#
-# This is an uploaded Marc record
+# This is an uploaded Marc record
#
my @loop = ();
my $MARCfile = MARC::File::USMARC->indata($data);
@@ -388,8 +388,8 @@ sub ResultRecordLink {
# $bib=extractmarcfields($record);
- $sth=$dbh->prepare("select *
- from biblioitems
+ $sth=$dbh->prepare("select *
+ from biblioitems
where (isbn=? and isbn!='') or (issn=? and issn!='') or (lccn=? and lccn!='') ");
$sth->execute($oldkoha->{isbn},$oldkoha->{issn},$oldkoha->{lccn});
if ($sth->rows) {
@@ -398,7 +398,7 @@ sub ResultRecordLink {
$donetext="";
}
($oldkoha->{author}) && ($oldkoha->{author}="by $oldkoha->{author}");
-
+
$searchfield="";
foreach $fieldname ( "controlnumber", "lccn", "issn", "isbn") {
if ( defined $oldkoha->{$fieldname} && $oldkoha->{$fieldname} ) {
@@ -439,7 +439,7 @@ sub z3950menu {
$elapsed,
$elapsedtime,
$resultstatus, $statuscolor,
- $id, $term, $type, $done,
+ $id, $term, $type, $done,
$startdate, $enddate, $servers,
$record,$bib,$title,
);
@@ -464,12 +464,12 @@ sub z3950menu {
# Check queued queries
$sth=$dbh->prepare("select id,term,type,done,
- startdate,enddate,servers
- from z3950queue
- order by id desc
+ startdate,enddate,servers
+ from z3950queue
+ order by id desc
limit 20 ");
$sth->execute;
- while ( ($id, $term, $type, $done,
+ while ( ($id, $term, $type, $done,
$startdate, $enddate, $servers) = $sth->fetchrow) {
$type=uc($type);
$term=~s/</&lt;/g;
@@ -478,14 +478,14 @@ sub z3950menu {
$title="";
# See if query produced results
$sti=$dbh->prepare("select id,server,startdate,enddate,numrecords,results
- from z3950results
+ from z3950results
where queryid=?");
$sti->execute($id);
if ($sti->rows) {
$processing=0;
$realenddate=0;
$totalrecords=0;
- while (my ($r_id,$r_server,$r_startdate,$r_enddate,$r_numrecords,$r_marcdata)
+ while (my ($r_id,$r_server,$r_startdate,$r_enddate,$r_numrecords,$r_marcdata)
= $sti->fetchrow) {
if ($r_enddate==0) {
# It hasn't finished yet
@@ -542,8 +542,8 @@ sub z3950menu {
# Search input form
print "<td valign=top width=30%>\n";
- my $sth=$dbh->prepare("select id,name,checked
- from z3950servers
+ my $sth=$dbh->prepare("select id,name,checked
+ from z3950servers
order by rank");
# FIXME - There's already a $sth in this function.
$sth->execute;
@@ -553,7 +553,7 @@ sub z3950menu {
$serverlist.="<input type=checkbox name=S-$id $checked> $name<br>\n";
}
$serverlist.="<input type=checkbox name=S-MAN> <input name=manualz3950server size=25 value=otherserver:210/DATABASE>\n";
-
+
my $rand=rand(1000000000);
print << "EOF";
<form action=$ENV{'SCRIPT_NAME'} method=GET>
@@ -566,10 +566,10 @@ sub z3950menu {
<tr><th bgcolor=#bbbbbb colspan=2>Search for MARC records</th></tr>
<tr><td>Query Term</td><td><input name=query></td></tr>
<tr><td colspan=2 align=center>
- <input type=radio name=type value=isbn checked>&nbsp;ISBN
+ <input type=radio name=type value=isbn checked>&nbsp;ISBN
<input type=radio name=type value=lccn >&nbsp;LCCN<br>
- <input type=radio name=type value=author >&nbsp;Author
- <input type=radio name=type value=title >&nbsp;Title
+ <input type=radio name=type value=author >&nbsp;Author
+ <input type=radio name=type value=title >&nbsp;Title
<input type=radio name=type value=keyword >&nbsp;Keyword</td></tr>
<tr><td colspan=2> $serverlist </td></tr>
<tr><td colspan=2 align=center> <input type=submit> </td></tr>
@@ -652,7 +652,7 @@ sub AcceptZ3950Queue {
}
}
- $error=addz3950queue($dbh,$input->param('query'), $input->param('type'),
+ $error=addz3950queue($dbh,$input->param('query'), $input->param('type'),
$input->param('rand'), @serverlist);
if ( $error ) {
print qq|
@@ -669,7 +669,7 @@ sub AcceptZ3950Queue {
privileges of your apache user. Ideally, this script should be started from a<br>
system init directory so that is running after the machine starts up.
|;
-
+
} # if daemon
print qq|
</td></tr>
@@ -708,8 +708,8 @@ sub AcceptMarcUpload {
}
my $q_marcrecord=$dbh->quote($marcrecord);
my $q_name=$dbh->quote($name);
- my $sth=$dbh->prepare("insert into uploadedmarc
- (marc,name)
+ my $sth=$dbh->prepare("insert into uploadedmarc
+ (marc,name)
values ($q_marcrecord, $q_name)");
$sth->execute;
} # sub AcceptMarcUpload
@@ -757,8 +757,8 @@ sub AcceptBiblioitem {
my $oldkoha = MARCmarc2koha($dbh,$record);
# See if it already exists
# FIXME - There's already a $sth in this context.
- my $sth=$dbh->prepare("select biblionumber,biblioitemnumber
- from biblioitems
+ my $sth=$dbh->prepare("select biblionumber,biblioitemnumber
+ from biblioitems
where isbn=? or issn=? or lccn=?");
$sth->execute($oldkoha->{isbn},$oldkoha->{issn},$oldkoha->{lccn});
if ($sth->rows) {
@@ -776,14 +776,14 @@ sub AcceptBiblioitem {
my $error;
my %biblio;
my %biblioitem;
-
+
# convert to upper case and split on lines
my $subjectheadings=$input->param('subject');
my @subjectheadings=split(/[\r\n]+/,$subjectheadings);
-
+
my $additionalauthors=$input->param('additionalauthors');
my @additionalauthors=split(/[\r\n]+|\|/,uc($additionalauthors));
-
+
# Use individual assignments to hash buckets, in case
# any of the input parameters are empty or don't exist
$biblio{title} =$input->param('title');
@@ -793,7 +793,7 @@ sub AcceptBiblioitem {
$biblio{notes} =$input->param('notes');
$biblio{abstract} =$input->param('abstract');
$biblio{subtitle} =$input->param('subtitle');
-
+
$biblioitem{volume} =$input->param('volume');
$biblioitem{number} =$input->param('number');
$biblioitem{itemtype} =$input->param('itemtype');
@@ -823,10 +823,10 @@ sub AcceptBiblioitem {
# \@subjectheadings,
# \@additionalauthors
# );
-
+
if ( $error ) {
print "<H2>Error adding biblio item</H2> $error\n";
- } else {
+ } else {
$template->param(title => $title);
$template->param(biblionumber => $biblionumber);
$template->param(biblioitemnumber => $biblioitemnumber);
@@ -867,8 +867,8 @@ sub AcceptItemCopy {
my $barcode=$input->param('barcode');
my $replacementprice=($input->param('replacementprice') || 0);
- my $sth=$dbh->prepare("select barcode
- from items
+ my $sth=$dbh->prepare("select barcode
+ from items
where barcode=?");
$sth->execute($barcode);
if ($sth->rows) {
@@ -998,6 +998,10 @@ sub FormatMarcText {
#---------------
# $Log$
+# Revision 1.17 2002/10/13 07:39:26 arensb
+# Added magic RCS comment.
+# Removed trailing whitespace.
+#
# Revision 1.16 2002/10/11 12:45:10 arensb
# Replaced &requireDBI with C4::Context->dbh, thus making the "use
# Fixed muffed quotes in &gettemplate calls.
View
11 acqui.simple/processz3950queue
@@ -1,4 +1,7 @@
#!/usr/bin/perl
+
+# $Id$
+
use C4::Context;
use DBI;
#use strict;
@@ -9,22 +12,22 @@ use Net::Z3950;
if ($< == 0) {
- # Running as root, switch privs
+ # Running as root, switch privs
if (-d "/var/run") {
open PID, ">/var/run/processz3950queue.pid";
print PID $$."\n";
close PID;
}
# Get real apacheuser from koha.conf or reparsing httpd.conf
- my $apacheuser='www-data';
+ my $apacheuser='www-data';
my $uid=0;
- unless ($uid = (getpwnam($apacheuser))[2]) {
+ unless ($uid = (getpwnam($apacheuser))[2]) {
die "Attempt to run daemon as non-existent or superuser\n";
}
$>=$uid;
$<=$uid;
}
-
+
my $dbh = C4::Context->dbh;
View
3  acqui.simple/saveitem.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
@@ -75,7 +76,7 @@
} elsif ((! $newgroup) && (! $biblioitemnumber)) {
print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobiblioitem");
} else {
-
+
if ($website) {
&newbiblioitem($biblioitem);
} elsif (&checkitems(1,$barcode)) {
View
36 acqui/acquire.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to recieve orders
#written by chris@katipo.co.nz 24/2/2000
@@ -44,7 +46,7 @@
my $catview=$input->param('catview');
my $gst=$input->param('gst');
my ($count,@results)=ordersearch($search,$biblio,$catview);
-my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
+my ($count2,@booksellers)=bookseller($results[0]->{'booksellerid'});
#print $count;
my @date=split('-',$results[0]->{'entrydate'});
my $date="$date[2]/$date[1]/$date[0]";
@@ -151,14 +153,14 @@
<td><select name=branch size=1>
EOP
;
-my ($count2,@branches)=branches();
-for (my $i=0;$i<$count2;$i++){
- print "<option value=$branches[$i]->{'branchcode'}";
- if ($results[0]->{'branchcode'} == $branches[$i]->{'branchcode'}){
- print " Selected";
- }
- print ">$branches[$i]->{'branchname'}";
-}
+my ($count2,@branches)=branches();
+for (my $i=0;$i<$count2;$i++){
+ print "<option value=$branches[$i]->{'branchcode'}";
+ if ($results[0]->{'branchcode'} == $branches[$i]->{'branchcode'}){
+ print " Selected";
+ }
+ print ">$branches[$i]->{'branchname'}";
+}
print <<EOP
</select>
</td>
@@ -210,14 +212,14 @@
EOP
;
my @bookfund;
-($count2,@bookfund)=bookfunds();
-for (my $i=0;$i<$count2;$i++){
+($count2,@bookfund)=bookfunds();
+for (my $i=0;$i<$count2;$i++){
print "<option value=$bookfund[$i]->{'bookfundid'}";
if ($bookfund[$i]->{'bookfundid'}==$results[0]->{'bookfundid'}){
print " Selected";
}
print ">$bookfund[$i]->{'bookfundname'}";
-}
+}
my $rrp=$results[0]->{'rrp'};
if ($results[0]->{'quantityreceived'} == 0){
@@ -269,7 +271,7 @@
</table>
</form>
</center>
-<br clear=all>
+<br clear=all>
<p> &nbsp; </p>
EOP
@@ -277,11 +279,11 @@
} else {
print "<center><table>";
print <<EOP
-<tr valign=top bgcolor=#99cc33>
+<tr valign=top bgcolor=#99cc33>
-<td background="/images/background-mem.gif"><b>ISBN</b></td>
-<td background="/images/background-mem.gif"><b>TITLE</b></td>
-<td background="/images/background-mem.gif"><b>AUTHOR</b></td>
+<td background="/images/background-mem.gif"><b>ISBN</b></td>
+<td background="/images/background-mem.gif"><b>TITLE</b></td>
+<td background="/images/background-mem.gif"><b>AUTHOR</b></td>
</tr>
EOP
;
View
14 acqui/basket.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to show display basket of orders
#written by chris@katipo.co.nz 24/2/2000
@@ -49,7 +51,7 @@
Authorised By: $results[0]->{'authorisedby'}<br>
$results[0]->{'entrydate'};
</div>
-<FONT SIZE=6><em>Shopping Basket For: <a href=supplier.pl?id=$results[0]->{'booksellerid'}></a> $booksellers[0]->{'name'}</em></FONT>
+<FONT SIZE=6><em>Shopping Basket For: <a href=supplier.pl?id=$results[0]->{'booksellerid'}></a> $booksellers[0]->{'name'}</em></FONT>
<a href=newbasket.pl?id=$results[0]->{'booksellerid'}&basket=$basket>Add more orders</a>
<CENTER>
<FORM ACTION="/cgi-bin/koha/search.pl" method=post>
@@ -87,7 +89,7 @@
$gist=sprintf("%.2f",$sub_total*0.125);
$grand_total=$sub_total+$gist;
-print <<EOP
+print <<EOP
<tr valign=top bgcolor=#ffffcc>
<td>$results[$i]->{'ordernumber'}</td>
<td>$results[$i]->{'isbn'}</td>
@@ -98,12 +100,12 @@
<td><input type=text name=quantity$i size=6 value=$results[$i]->{'quantity'} onchange='update(this.form)'></td>
<td>\$<input type=text name=total$i size=10 value=$line_total></td>
<input type=hidden name=ordnum$i value=$results[$i]->{'ordernumber'}>
- <input type=hidden name=bibnum$i value=$results[$i]->{'biblionumber'}>
+ <input type=hidden name=bibnum$i value=$results[$i]->{'biblionumber'}>
</tr>
EOP
;
}
-#
+#
print "<input type=hidden name=number value=$count>
<input type=hidden name=basketno value=\"$basket\">";
print <<EOP
@@ -111,7 +113,7 @@
<b>HELP</b><br>
To cancel an order, just change the quantity to 0 and click "save changes".<br>
To change any of the catalogue or accounting information attached to an order, click on the title.<br>
- To add new orders to this supplier, start with a search. </td>
+ To add new orders to this supplier, start with a search. </td>
<td><b>SubTotal</b></td>
<td>\$<input type=text name=subtotal size=10 value=$sub_total></td></tr>
<tr valign=top bgcolor=white>
@@ -128,7 +130,7 @@
<td></td>
<td colspan=3><input type=image name=submit src=/images/save-changes.gif border=0 width=187 height=42 align=right></td></tr>
</table>
-</CENTER>
+</CENTER>
EOP
;
View
6 acqui/newbasket.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to show display basket of orders
#written by chris@katipo.co.nz 24/2/2000
@@ -52,7 +54,7 @@
<FONT SIZE=6><em>Shopping Basket For: <a href=/cgi-bin/koha/acqui/supplier.pl?id=$booksellers[0]->{'id'}>
$booksellers[0]->{'name'}</a></em></FONT><br>
Ph: $booksellers[0]->{'phone'}, Fax: $booksellers[0]->{'fax'},
-$booksellers[0]->{'address1'}, $booksellers[0]->{'address2'},
+$booksellers[0]->{'address1'}, $booksellers[0]->{'address2'},
$booksellers[0]->{'address3'}, $booksellers[0]->{'address4'}
@@ -60,7 +62,7 @@
<FORM ACTION="/cgi-bin/koha/acqui/newbasket2.pl" method=post>
<input type=hidden name=id value="$id">
<input type=hidden name=basket value="$basket">
-<b> Search Keyword or Title: </b><INPUT TYPE="text" SIZE="25" NAME="search">
+<b> Search Keyword or Title: </b><INPUT TYPE="text" SIZE="25" NAME="search">
</form>
View
10 acqui/order.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to show suppliers and orders
#written by chris@katipo.co.nz 23/2/2000
@@ -64,7 +66,7 @@
if ($orders->[0]->{'basketno'}>0) {
print <<printend
<tr valign=top bgcolor=$colour>
- <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>
+ <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>
<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>
<td><a href="supplier.pl?id=$suppliers[$i]->{'id'}">$suppliers[$i]->{'name'}</a></td>
<td><a href="/cgi-bin/koha/acqui/basket.pl?basket=$orders->[0]->{'basketno'}">HLT-$orders->[0]->{'basketno'}</a></td>
@@ -76,7 +78,7 @@
} else {
print <<printend
<tr valign=top bgcolor=$colour>
- <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>
+ <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>
<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>
<td><a href="supplier.pl?id=$suppliers[$i]->{'id'}">$suppliers[$i]->{'name'}</a></td>
<td>&nbsp;</a></td>
@@ -95,7 +97,7 @@
<td><a href="/cgi-bin/koha/acqui/basket.pl?basket=$orders->[$i2]->{'basketno'}">HLT-$orders->[$i2]->{'basketno'}</a></td>
<td>$orders->[$i2]->{'count(*)'}</td><td>$orders->[$i2]->{'authorisedby'} &nbsp; </td>
<td>$orders->[$i2]->{'entrydate'}</td></tr>
-
+
printend
;
} else {
@@ -106,7 +108,7 @@
<td> &nbsp;</td>
<td>$orders->[$i2]->{'count(*)'}</td><td>$orders->[$i2]->{'authorisedby'} &nbsp; </td>
<td>$orders->[$i2]->{'entrydate'}</td></tr>
-
+
printend
;
}
View
4 acqui/receive.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to recieve orders
#written by chris@katipo.co.nz 24/2/2000
@@ -132,7 +134,7 @@
<br>
The total at the bottom of the page should be within a few cents of the total for the invoice.<p>
When you have finished this invoice save the changes.
-</td>
+</td>
<td colspan=2 align=right><b>GST</b></td>
<td>\$$gst</td>
</tr>
View
6 acqui/recieveorder.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to show display basket of orders
#written by chris@katipo.co.nz 24/2/2000
@@ -30,7 +32,7 @@
my $input=new CGI;
print $input->header();
my $id=$input->param('id');
-my ($count,@booksellers)=bookseller($id);
+my ($count,@booksellers)=bookseller($id);
print startpage;
print startmenu('acquisitions');
@@ -47,7 +49,7 @@
<tr valign=top bgcolor=#99cc33><td background="/images/background-mem.gif" colspan=2><B>SUPPLIER INVOICE INFORMATION</B></td></tr>
<TR VALIGN=TOP >
<TD>Supplier Invoice Number</td>
-<td><input type=text size=20 name=invoice>
+<td><input type=text size=20 name=invoice>
</td>
</tr>
<TR VALIGN=TOP>
View
12 acqui/supplier.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to show display basket of orders
#written by chris@katipo.co.nz 24/2/2000
@@ -30,7 +32,7 @@
my $input=new CGI;
print $input->header();
my $id=$input->param('id');
-my ($count,@booksellers)=bookseller($id);
+my ($count,@booksellers)=bookseller($id);
print startpage;
print startmenu('acquisitions');
@@ -210,7 +212,7 @@
if ($booksellers[0]->{'gstreg'}==1){
print " checked";
}
-print ">Yes
+print ">Yes
<input type=radio name=gst value=0";
if ($booksellers[0]->{'gstreg'}==0){
print " checked";
@@ -227,7 +229,7 @@
if ($booksellers[0]->{'listincgst'}==1){
print " checked";
}
-print ">Yes
+print ">Yes
<input type=radio name=list_gst value=0";
if ($booksellers[0]->{'listincgst'}==0){
print " checked";
@@ -244,7 +246,7 @@
if ($booksellers[0]->{'invoiceincgst'}==1){
print " checked";
}
-print ">Yes
+print ">Yes
<input type=radio name=invoice_gst value=0";
if ($booksellers[0]->{'invoiceincgst'}==0){
print " checked";
@@ -253,7 +255,7 @@
>No
</td>
</tr>
-<TR VALIGN=TOP>
+<TR VALIGN=TOP>
<TD>Discount</td>
<td><input type=text size=3 name=discount value=$booksellers[0]->{'discount'}> %
</tr>
View
6 bookcount.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#written 7/3/2002 by Finlay
#script to display reports
@@ -58,7 +60,7 @@
}
-# make the page ...
+# make the page ...
print $input->header;
@@ -133,7 +135,7 @@ sub lastmove {
$sth->execute;
my ($date) = $sth->fetchrow_array;
return(0, "Item has no branch transfers record") if not $date;
- my $var2 = $dbh->quote($date);
+ my $var2 = $dbh->quote($date);
$sth=$dbh->prepare("Select * from branchtransfers where branchtransfers.itemnumber=$var1 and branchtransfers.datearrived=$var2");
$sth->execute;
my ($data) = $sth->fetchrow_hashref;
View
10 boraccount.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#writen 11/1/2000 by chris@katipo.oc.nz
#script to display borrowers account details
@@ -39,8 +41,8 @@
#get account details
my %bor;
-$bor{'borrowernumber'}=$bornum;
-my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
+$bor{'borrowernumber'}=$bornum;
+my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
my @accountrows; # this is for the tmpl-loop
@@ -66,6 +68,6 @@
surname => $data->{'surname'},
bornum => $bornum,
total => $total,
- accounts => \@accountrows );
+ accounts => \@accountrows );
-print "Content-Type: text/html\n\n", $template->output;
+print "Content-Type: text/html\n\n", $template->output;
View
14 currency.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#written by chris@katipo.co.nz
#9/10/2000
#script to display and update currency rates
@@ -40,7 +42,7 @@
<input type=hidden name=type value=change>
<TR VALIGN=TOP>
<TD bgcolor="99cc33" background="/images/background-mem.gif" colspan=2 ><b>EXCHANGE RATES </b></TD></TR>
- <TR VALIGN=TOP>
+ <TR VALIGN=TOP>
<TD>
printend
;
@@ -52,12 +54,12 @@
# print $rates->[$i]->{'currency'};
}
print <<printend
- <p>
+ <p>
<input type=image name=submit src=/images/save-changes.gif border=0 width=187 height=42>
-
- </TD></TR>
- </form>
- </table>
+
+ </TD></TR>
+ </form>
+ </table>
printend
;
} else {
View
6 deletemem.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to delete items
#written 2/5/00
#by chris@katipo.co.nz
@@ -50,9 +52,9 @@
$sth->execute;
my $data=$sth->fetchrow_hashref;
$sth->finish;
-
-if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){
+
+if ($i > 0 || $flags->{'CHARGES'} ne '' || $data ne ''){
print $input->header;
print "<table border=1>";
if ($i > 0){
View
4 groups.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#written 14/1/2000
#script to display reports
@@ -132,7 +134,7 @@
</tr></table>
</td></tr></table>
<p>
-Printer:
+Printer:
<select name=printer>
$printeroptions
</select>
View
43 installer-lite.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl -w # please develop with -w
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
@@ -28,16 +29,16 @@
*******************************************
This installer will guide you through the process of installing Koha.
-It is not a completely automated installation, but a guide for further
+It is not a completely automated installation, but a guide for further
information please read the documentation or visit the Koha website at
http://www.koha.org
To successfully use Koha you need some additional software:
* A webserver (It was built to work with Apache, but there is no reason
-it should not work with any other webserver).
-
-* Mysql (You could intead use postgres, or another sql based database)
+it should not work with any other webserver).
+
+* Mysql (You could intead use postgres, or another sql based database)
* Perl
@@ -98,10 +99,10 @@
#
print qq|
Koha uses a small configuration file that is usually placed in your
-/etc/ files directory (note: if you wish to place the koha.conf in
+/etc/ files directory (note: if you wish to place the koha.conf in
another location you will need to manually edit additional files).
-We will help you to now create your koha.conf file, once this file
+We will help you to now create your koha.conf file, once this file
has been created, please copy it to your destination folder
(note: this may need to be done by your systems administrator).
|;
@@ -115,7 +116,7 @@
print "\n";
print "\n";
print qq|
-Please provide the name of the mysql database that you wish to use
+Please provide the name of the mysql database that you wish to use
for koha. This is normally "Koha".
|;
@@ -129,7 +130,7 @@
print "\n";
print "\n";
print qq|
-Please provide the hostname for mysql. Unless the database is located
+Please provide the hostname for mysql. Unless the database is located
on another machine this is likely to be "localhost".
|;
@@ -143,7 +144,7 @@
print "\n";
print "\n";
print qq|
-Please provide the name of the mysql user, who will have full administrative
+Please provide the name of the mysql user, who will have full administrative
rights to the $dbname database, when authenicating from $hostname.
It is recommended that you do not use your "root" user.
|;
@@ -182,7 +183,7 @@
#Create the configuration file
-open(SITES,">koha.conf") or die "Couldn't create file.
+open(SITES,">koha.conf") or die "Couldn't create file.
Must have write capability.\n";
print SITES <<EOP
database=$dbname
@@ -243,7 +244,7 @@
#
# Update Apache Conf File.
#
-open(SITES,">>koha-apache.conf") or die "Couldn't write to file.
+open(SITES,">>koha-apache.conf") or die "Couldn't write to file.
Must have write capability.\n";
print SITES <<EOP
@@ -293,7 +294,7 @@
#
# Update Apache Conf File.
#
-open(SITES,">>koha-apache.conf") or die "Couldn't write to file.
+open(SITES,">>koha-apache.conf") or die "Couldn't write to file.
Must have write capability.\n";
print SITES <<EOP
@@ -318,19 +319,19 @@
* Koha Installation Guide - Continued *
*******************************************
-In order to finish the installation of Koha, there is still a couple
+In order to finish the installation of Koha, there is still a couple
of steps that you will need to complete.
* Setup mysql
1. Create a new mysql database called for example Koha
- From command line: mysqladmin -uroot -ppassword create Koha
+ From command line: mysqladmin -uroot -ppassword create Koha
2. Set up a koha user and password in mysql
- Log in to mysql: mysql -uroot -ppassword
+ Log in to mysql: mysql -uroot -ppassword
- To create a user called "koha" who has full administrative
- rights to the "Koha" database when authenticating from
- "localhost", enter the following on mysql command line:
+ To create a user called "koha" who has full administrative
+ rights to the "Koha" database when authenticating from
+ "localhost", enter the following on mysql command line:
grant all privileges on Koha.* to koha\@localhost identified by 'kohapassword'\;
@@ -338,10 +339,10 @@
3. Use the mysql script to create the tables
- mysql -uusername -ppassword Koha < koha.mysql
+ mysql -uusername -ppassword Koha < koha.mysql
4. Update your database tables
- perl updatedatabase -I /pathtoC4
+ perl updatedatabase -I /pathtoC4
5. Update your database to use MARC
perl marc/fill_usmarc.pl -I /pathtoC4 to put MARC21 - english datas in parameter table
@@ -349,7 +350,7 @@
* Koha.conf
1. Copy Koha.conf to /etc/
- If you wish to locate the file in another location please read
+ If you wish to locate the file in another location please read
the INSTALL and Hints files.
View
22 installer.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl -w # please develop with -w
+# $Id$
+
#use diagnostics;
# Copyright 2000-2002 Katipo Communications
@@ -102,7 +104,7 @@
your specifications. To accept the default value for any question, simply hit
Enter at the prompt.
-Please be sure to read the documentation, or visit the Koha website at
+Please be sure to read the documentation, or visit the Koha website at
http://www.koha.org for more information.
Are you ready to begin the installation? (Y/[N]):
@@ -115,10 +117,10 @@
print "Great! continuing setup... \n";
} else {
print qq|
-This installer currently does not support a completely automated
+This installer currently does not support a completely automated
setup.
-Please be sure to read the documentation, or visit the Koha website
+Please be sure to read the documentation, or visit the Koha website
at http://www.koha.org for more information.
|;
exit;
@@ -145,7 +147,7 @@
unless (eval {require DBI}) { push @missing,"DBI" };
unless (eval {require Date::Manip}) { push @missing,"Date::Manip" };
unless (eval {require DBD::mysql}) { push @missing,"DBD::mysql" };
-unless (eval {require Net::Z3950}) {
+unless (eval {require Net::Z3950}) {
print qq|
The Net::Z3950 module is missing. This module is necessary if you want to use
@@ -209,8 +211,8 @@
INTRANET/LIBRARIANS DIRECTORY
=============================
-Please supply the directory you want Koha to store its Intranet/Librarians files
-in. Leave off the trailing slash. This directory will be auto-created for you if
+Please supply the directory you want Koha to store its Intranet/Librarians files
+in. Leave off the trailing slash. This directory will be auto-created for you if
it doesn't exist.
|;
@@ -278,7 +280,7 @@
#Get the hostname for the database
print qq|
-Please provide the hostname for mysql. Unless the database is located on another
+Please provide the hostname for mysql. Unless the database is located on another
machine this will be "localhost".
|;
@@ -650,7 +652,7 @@
}
unless (-e "$kohalogdir") {
- my $result = mkdir 0770, "$kohalogdir";
+ my $result = mkdir 0770, "$kohalogdir";
if ($result==0) {
my @dirs = split(m#/#, $kohalogdir);
my $checkdir='';
@@ -800,7 +802,7 @@
$mysqldir='/usr';
}
print qq|
-To allow us to create the koha database please supply the
+To allow us to create the koha database please supply the
mysql\'s root users password
|;
@@ -999,7 +1001,7 @@
http://$servername\:$opacport/
-Be sure to read the INSTALL, and Hints files.
+Be sure to read the INSTALL, and Hints files.
For more information visit http://www.koha.org
View
14 koha.upgrade
@@ -1,5 +1,7 @@
#!/usr/bin/perl -w
+# $Id$
+
#use diagnostics;
use strict; # please develop with the strict pragma
@@ -85,7 +87,7 @@ You are attempting to upgrade from Koha $kohaversion to $newversion.
We recommend that you do a complete backup of all your files before upgrading.
This upgrade script will make a backup copy of your files for you.
-Would you like to proceed? ([Y]/N):
+Would you like to proceed? ([Y]/N):
|;
my $answer = <STDIN>;
@@ -121,7 +123,7 @@ my @missing = ();
unless (eval {require DBI}) { push @missing,"DBI" };
unless (eval {require Date::Manip}) { push @missing,"Date::Manip" };
unless (eval {require DBD::mysql}) { push @missing,"DBD::mysql" };
-unless (eval {require Net::Z3950}) {
+unless (eval {require Net::Z3950}) {
print qq|
The Net::Z3950 module is missing. This module is necessary if you want to use
@@ -154,7 +156,7 @@ if (@missing > 0) {
my $backupdir='/usr/local/koha/backups';
-print "Please specify a backup directory [$backupdir]: ";
+print "Please specify a backup directory [$backupdir]: ";
$answer = <STDIN>;
chomp $answer;
@@ -285,7 +287,7 @@ if (!$opacdir || !$intranetdir) {
$intranetdir='';
$opacdir='';
while (!$intranetdir) {
- print "Please specify the location of your INTRANET files: ";
+ print "Please specify the location of your INTRANET files: ";
$answer = <STDIN>;
chomp $answer;
@@ -299,7 +301,7 @@ if (!$opacdir || !$intranetdir) {
}
}
while (!$opacdir) {
- print "Please specify the location of your OPAC files: ";
+ print "Please specify the location of your OPAC files: ";
$answer = <STDIN>;
chomp $answer;
@@ -440,7 +442,7 @@ unless ($kohalogdir && -e $kohalogdir) {
}
unless (-e "$kohalogdir") {
- my $result = mkdir 0770, "$kohalogdir";
+ my $result = mkdir 0770, "$kohalogdir";
if ($result==0) {
my @dirs = split(m#/#, $kohalogdir);
my $checkdir='';
View
6 member.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to do a borrower enquiery/brin up borrower details etc
#written 20/12/99 by chris@katipo.co.nz
@@ -33,7 +35,7 @@
# only used if allowthemeoverride is set
my %tmpldata = pathtotemplate ( template => 'member.tmpl', theme => $theme, language => 'fi' );
# FIXME - Error-checking
-my $template = HTML::Template->new( filename => $tmpldata{'path'},
+my $template = HTML::Template->new( filename => $tmpldata{'path'},
die_on_bad_params => 0,
loop_context_vars => 1 );
@@ -66,5 +68,5 @@
endmenumember => join ('', endmenu('member')),
member => $member,
resultsloop => \@resultsdata );
-
+
print "Content-Type: text/html\n\n", $template->output;
View
42 memberentry.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to set up screen for modification of borrower details
#written 20/12/99 by chris@katipo.co.nz
@@ -40,7 +42,7 @@
$member=NewBorrowerNumber();
}
my $type=$input->param('type') || '';
-my $modify=$input->param('modify.x');
+my $modify=$input->param('modify.x');
my $delete=$input->param('delete.x');
if ($delete){
print $input->redirect("/cgi-bin/koha/deletemem.pl?member=$member");
@@ -51,15 +53,15 @@
} else {
$template->param( header => 'Add New Member');
}
-
+
my $data=borrdata('',$member);
-
+
if ($type eq 'Add'){
$template->param( updtype => 'I');
} else {
$template->param( updtype => 'M');
}
-
+
my $cardnumber=$data->{'cardnumber'};
my $autonumber_members = C4::Context->preference("autoMemberNum") || 0;
# Find out whether member numbers should be generated
@@ -88,7 +90,7 @@
} else {
$cardnumber = $cardnumber + 1; # FIXME - $cardnumber++;
}
-
+
while ($i <8) { # step from char 1 to 7.
my $temp1 = $weightings[$i]; # read weightings, left to right, 1 char at a time
my $temp2 = substr($cardnumber,$i,1); # sequence left to right, 1 char at a time
@@ -100,16 +102,16 @@
my $rem = ($sum%11); # remainder of sum/11 (eg. 9999999/11, remainder=2)
if ($rem == 10) { # if remainder is 10, use X instead
$rem = "X";
- }
+ }
$cardnumber="V$cardnumber$rem";
} else {
$cardnumber=$data->{'cardnumber'};
}
-
+
if ($data->{'sex'} eq 'F'){
$template->param(female => 1);
- }
-
+ }
+
my @titles = ('Miss', 'Mrs', 'Ms', 'Mr', 'Dr', 'Sir');
# FIXME - Assumes English. This ought to be made part of i18n.
my @titledata;
@@ -124,7 +126,7 @@
}
push(@titledata, \%row);
}
-
+
my ($categories,$labels)=ethnicitycategories();
my $ethnicitycategoriescount=$#{$categories};
my $ethcatpopup;
@@ -135,13 +137,13 @@
-labels=>$labels);
$template->param(ethcatpopup => $ethcatpopup); # bad style, has to be fixed
}
-
+
($categories,$labels)=borrowercategories();
my $catcodepopup = CGI::popup_menu(-name=>'categorycode',
-values=>$categories,
-default=>$data->{'categorycode'},
-labels=>$labels);
-
+
my @areas = ('L','F','S','H','K','O','X','Z','V');
my %arealabels = ('L' => 'Levin',
'F' => 'Foxton',
@@ -152,7 +154,7 @@
'X' => 'Temporary Visitor',
'Z' => 'Interloan Libraries',
'V' => 'Village');
-
+
my @areadata;
while (@areas) {
my %row;
@@ -166,8 +168,8 @@
$row{'area'}=$arealabels{$shortcut};
push(@areadata, \%row);
}
-
-
+
+
my @relationships = ('workplace', 'relative','friend', 'neighbour');
my @relshipdata;
while (@relationships) {
@@ -180,12 +182,12 @@
}
push(@relshipdata, \%row);
}
-
+
# %flags: keys=$data-keys, datas=[formname, HTML-explanation]
my %flags = ('gonenoaddress' => ['gna', 'Gone no address'],
'lost' => ['lost', 'Lost'],
'debarred' => ['debarred', 'Debarred']);
-
+
my @flagdata;
foreach (keys(%flags)) {
my $key = $_;
@@ -205,7 +207,7 @@
if ($modify){
$template->param( modify => 1 );
}
-
+
$template->param( startmenumember => join ('', startmenu('member')),
endmenumember => join ('', endmenu('member')),
member => $member,
@@ -234,8 +236,8 @@
expiry => $data->{'expiry'},
cardnumber => $cardnumber,
dateofbirth => $data->{'dateofbirth'});
-
+
print "Content-Type: text/html\n\n", $template->output;
-
+
}
View
4 modbib.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to modify/delete biblios
#written 8/11/99
# modified 11/11/99 by chris@katipo.co.nz
@@ -39,7 +41,7 @@
my $additional = $addauthor->[0]->{'author'};
my %inputs;
my $dewey;
-my $submit=$input->param('submit.x');
+my $submit=$input->param('submit.x');
if ($submit eq '') {
print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum");
} # if
View
36 modbibitem.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to modify/delete groups
#written 8/11/99
@@ -36,7 +38,7 @@
my $data=bibitemdata($bibitemnum);
my $biblio=$input->param('biblio');
my $submit=$input->param('submit.x');
-if ($submit eq ''){
+if ($submit eq ''){
print $input->redirect("deletebiblioitem.pl?biblioitemnumber=$bibitemnum&biblionumber=$biblio");
}
print $input->header;
@@ -54,14 +56,14 @@
#the value is a tab separated list, the first item being the input type
#$inputs{'Author'}="text\t$data->{'author'}\t0";
#$inputs{'Title'}="text\t$data->{'title'}\t1";
-my $dewey = $data->{'dewey'};
-$dewey =~ s/0+$//;
-if ($dewey eq "000.") { $dewey = "";};
-if ($dewey < 10){$dewey='00'.$dewey;}
-if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
-if ($dewey <= 0){
- $dewey='';
-}
+my $dewey = $data->{'dewey'};
+$dewey =~ s/0+$//;
+if ($dewey eq "000.") { $dewey = "";};
+if ($dewey < 10){$dewey='00'.$dewey;}
+if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
+if ($dewey <= 0){
+ $dewey='';
+}
$dewey=~ s/\.$//;
$inputs{'Class'}="text\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
$inputs{'Item Type'}="text\t$data->{'itemtype'}\t3";
@@ -89,7 +91,7 @@
<BLOCKQUOTE><FONT SIZE=6>
<em><a href=/cgi-bin/koha/detail.pl?bib=$data->{'biblionumber'}&type=intra>$data->{'title'} ($data->{'author'})</a><br>
-Modify Group - $data->{'description'}</em></FONT><br>
+Modify Group - $data->{'description'}</em></FONT><br>
<form action=updatebibitem.pl method=post>
<table border=0 cellspacing=0 cellpadding=5 align=left>
@@ -172,11 +174,11 @@
printend
;
-my (@items)=itemissues($data->{'biblioitemnumber'});
-#print @items;
-my $count=@items;
+my (@items)=itemissues($data->{'biblioitemnumber'});
+#print @items;
+my $count=@items;
for (my $i=0;$i<$count;$i++){
- $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'});
+ $items[$i]->{'datelastseen'} = slashifyDate($items[$i]->{'datelastseen'});
print <<printend
<tr valign=top gcolor=#ffffcc>
<td><input type=checkbox name="check_group_$items[$i]->{'barcode'}"></td>
@@ -203,10 +205,10 @@
<B>HELP:</B> You <b>must</b> click on the appropriate radio button (in the green boxes), and choose to either re-assign the item/s to a record already in the system, or modify this record. IF your changes only apply to some
items, tick the appropriate ones and a new group record will be created automatically for them.
<br clear=all>
-
+
<p> &nbsp; </p>
-
-
+
+
printend
;
View
24 moditem.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to modify/delete biblios
#written 8/11/99
# modified 11/11/99 by chris@katipo.co.nz
@@ -56,14 +58,14 @@
#the value is a tab separated list, the first item being the input type
#$inputs{'Author'}="text\t$data->{'author'}\t0";
#$inputs{'Title'}="text\t$data->{'title'}\t1";
-my $dewey = $data->{'dewey'};
-$dewey =~ s/0+$//;
-if ($dewey eq "000.") { $dewey = "";};
-if ($dewey < 10){$dewey='00'.$dewey;}
-if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
-if ($dewey <= 0){
- $dewey='';
-}
+my $dewey = $data->{'dewey'};
+$dewey =~ s/0+$//;
+if ($dewey eq "000.") { $dewey = "";};
+if ($dewey < 10){$dewey='00'.$dewey;}
+if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
+if ($dewey <= 0){
+ $dewey='';
+}
$dewey=~ s/\.$//;
$inputs{'Barcode'}="text\t$item->{'barcode'}\t0";
$inputs{'Class'}="hidden\t$data->{'classification'}$dewey$data->{'subclass'}\t2";
@@ -140,17 +142,17 @@
}
print <<printend
>No</td></tr>
-<input type=hidden name=bibnum value="$data->{'biblionumber'}">
+<input type=hidden name=bibnum value="$data->{'biblionumber'}">
<input type=hidden name=bibitemnum value="$data->{'biblioitemnumber'}">
<input type=hidden name=itemnumber value="$itemnum">
<tr valign=top bgcolor=white><td></td><td>
-<input type=image name=submit src=/images/save-changes.gif border=0 width=187
+<input type=image name=submit src=/images/save-changes.gif border=0 width=187
height=42></td></tr>
</table>
</form></td></tr>
</table>
-
+
printend
;
View
7 moredetail.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
@@ -25,7 +27,7 @@
use C4::Search;
use C4::Acquisitions;
use C4::Output; # contains gettemplate
-
+
my $query=new CGI;
my $includes = C4::Context->config('includes') ||
@@ -35,7 +37,7 @@
my $template = gettemplate("catalogue/moredetail.tmpl");
-# get variables
+# get variables
my $biblionumber=$query->param('bib');
my $title=$query->param('title');
@@ -87,7 +89,6 @@
} else {
$item->{'issue'}="<b>Currently on issue to:</b> <a href=/cgi-bin/koha/moremember.pl?bornum=$item->{'borrower0'}>$item->{'card'}</a><br>";
}
-
}
$template->param(includesdir => $includes);
View
18 moremember.pl
@@ -1,10 +1,12 @@
#!/usr/bin/perl
+# $Id$
+
# script to do a borrower enquiry/bring up borrower details etc
# Displays all the details about a borrower
# written 20/12/99 by chris@katipo.co.nz
# last modified 21/1/2000 by chris@katipo.co.nz
-# modified 31/1/2001 by chris@katipo.co.nz
+# modified 31/1/2001 by chris@katipo.co.nz
# to not allow items on request to be renewed
#
# needs html removed and to use the C4::Output more, but its tricky
@@ -88,7 +90,7 @@
cardnumber => $guarantees->[$i]->{'cardnumber'}});
}
$template->param(guaranteeloop => \@guaranteedata);
-
+
} else {
my ($guarantor)=findguarantor($data->{'borrowernumber'});
unless ($guarantor->{'borrowernumber'} == 0){
@@ -100,8 +102,8 @@
$bor{'borrowernumber'}=$bornum;
# FIXME
-# it looks like $numaccts is a temp variable and that the
-# for (my $i;$i<$numaccts;$i+++)
+# it looks like $numaccts is a temp variable and that the
+# for (my $i;$i<$numaccts;$i++)
# can be turned into a foreach loop instead
#
my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
@@ -114,7 +116,7 @@
my $amount2= $accts->[$i]{'amountoutstanding'} + 0.00;
my %row = %$accts->[$i];
if ($amount2 != 0){
- my $item=" &nbsp; ";
+ my $item=" &nbsp; ";
$row{'date'} = slashifyDate($accts->[$i]{'date'});
if ($accts->[$i]{'accounttype'} ne 'Res'){
@@ -142,7 +144,7 @@
my $datedue=ParseDate($issue->[$i]{'date_due'});
$issue->[$i]{'date_due'} = slashifyDate($issue->[$i]{'date_due'});
my %row = %{$issue->[$i]};
- if ($datedue < $today){
+ if ($datedue < $today){
$row{'red'}=1; #print "<font color=red>";
}
#find the charge for an item
@@ -172,8 +174,8 @@
my ($rescount,$reserves)=FindReserves('',$bornum); #From C4::Reserves2
# FIXME
-# does it make sense to turn this into a foreach my $i (0..$rescount)
-# kind of loop?
+# does it make sense to turn this into a foreach my $i (0..$rescount)
+# kind of loop?
#
my @reservedata;
for (my $i=0;$i<$rescount;$i++){
View
16 newimember.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl
+# $Id$
+
#script to print confirmation screen, then if accepted calls itself to insert data
@@ -35,9 +37,9 @@
#get rest of data
my %data;
my @names=$input->param;
-foreach my $key (@names){
- $data{$key}=$input->param($key);
-}
+foreach my $key (@names){
+ $data{$key}=$input->param($key);
+}
my $ok=0;
my $string="The following compulsary fields have been left blank. Please push the back button
@@ -72,16 +74,16 @@
if ($valid != 1){
print "Invalid cardnumber";
} else {
-
+
my @inputs;
my $i=0;
while (my ($key, $value) = each %data) {
$value=~ s/\"/%22/g;
$inputs[$i]=["hidden","$key","$value"];
- $i++;
- }
+ $i++;
+ }
$inputs[$i]=["submit","submit","submit"];
- print mkformnotable("/cgi-bin/koha/insertidata.pl",@inputs);
+ print mkformnotable("/cgi-bin/koha/insertidata.pl",@inputs);
}
}
print endmenu('member');
View
7 overdue.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
@@ -29,7 +30,7 @@
my $theme = $input->param('theme'); # only used if allowthemeoverride is set
my %tmpldata = pathtotemplate ( template => 'overdue.tmpl', theme => $theme);
-my $template = HTML::Template->new( filename => $tmpldata{'path'},
+my $template = HTML::Template->new( filename => $tmpldata{'path'},
die_on_bad_params => 0);
my $duedate;
my $bornum;
@@ -57,7 +58,7 @@
$duedate=$data->{'date_due'};
$bornum=$data->{'borrowernumber'};
$itemnum=$data->{'itemnumber'};
-