Browse Source

Added magic RCS comment.

Removed trailing whitespace.
3.0.x
arensb 20 years ago
parent
commit
7197a3735b
  1. 31
      C4/Circmain.pm
  2. 6
      C4/Database.pm
  3. 6
      C4/Groups.pm
  4. 12
      C4/Security.pm
  5. 4
      acqui.simple/addbiblio.pl
  6. 10
      acqui.simple/addbooks.pl
  7. 14
      acqui.simple/addbookslccn.pl
  8. 7
      acqui.simple/additem.pl
  9. 92
      acqui.simple/marcimport.pl
  10. 11
      acqui.simple/processz3950queue
  11. 3
      acqui.simple/saveitem.pl
  12. 36
      acqui/acquire.pl
  13. 14
      acqui/basket.pl
  14. 6
      acqui/newbasket.pl
  15. 10
      acqui/order.pl
  16. 4
      acqui/receive.pl
  17. 6
      acqui/recieveorder.pl
  18. 12
      acqui/supplier.pl
  19. 6
      bookcount.pl
  20. 10
      boraccount.pl
  21. 14
      currency.pl
  22. 6
      deletemem.pl
  23. 4
      groups.pl
  24. 43
      installer-lite.pl
  25. 22
      installer.pl
  26. 14
      koha.upgrade
  27. 6
      member.pl
  28. 42
      memberentry.pl
  29. 4
      modbib.pl
  30. 36
      modbibitem.pl
  31. 24
      moditem.pl
  32. 7
      moredetail.pl
  33. 18
      moremember.pl
  34. 16
      newimember.pl
  35. 7
      overdue.pl
  36. 10
      pay.pl
  37. 4
      renewscript.pl
  38. 4
      reports.pl
  39. 8
      request.pl
  40. 4
      showbudget.pl
  41. 12
      stats.pl
  42. 6
      stats2.pl
  43. 64
      subjectsearch.pl
  44. 9
      tidyaccounts.pl
  45. 13
      updatebibitem.pl
  46. 6
      updatecharges.pl
  47. 8
      updateitem.pl
  48. 3
      updatewebsite.pl

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)

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( );

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);

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)

4
acqui.simple/addbiblio.pl

@ -1,5 +1,7 @@
#!/usr/bin/perl
# $Id$
#
# TODO
#
@ -38,7 +40,7 @@ print startmenu('acquisitions');
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>

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 @@ EOF
<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

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 @@ EOF
<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>

7
acqui.simple/additem.pl

@ -1,5 +1,6 @@
#!/usr/bin/perl
# $Id$
# Copyright 2000-2002 Katipo Communications
#
@ -55,11 +56,11 @@ if (! $biblionumber) {
($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 @@ EOF
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>

92
acqui.simple/marcimport.pl

@ -84,7 +84,7 @@ my $menu = $input->param('menu');
#
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 @@ EOT
# 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 @@ EOT
$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 @@ EOT
# 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 @@ EOT
$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 @@ print << "EOF";
<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 @@ script should be run as root, and it will start up the program running with the<
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.

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;

3
acqui.simple/saveitem.pl

@ -1,5 +1,6 @@
#!/usr/bin/perl
# $Id$
# Copyright 2000-2002 Katipo Communications
#
@ -75,7 +76,7 @@ if (! $biblionumber) {
} elsif ((! $newgroup) && (! $biblioitemnumber)) {
print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobiblioitem");
} else {
if ($website) {
&newbiblioitem($biblioitem);
} elsif (&checkitems(1,$barcode)) {

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 $biblio=$input->param('biblio');
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 @@ print <<EOP
<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 @@ print <<EOP
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 @@ Budgeted Cost </td>
</table>
</form>
</center>
<br clear=all>
<br clear=all>
<p> &nbsp; </p>
EOP
@ -277,11 +279,11 @@ EOP
} 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
;

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 @@ Our Reference: $basket<br>
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 @@ $sub_total+=$line_total;
$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 @@ print <<EOP
<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 @@ print <<EOP
<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 @@ print <<EOP
<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
;

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 @@ $date
<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 @@ $booksellers[0]->{'address3'}, $booksellers[0]->{'address4'}
<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>

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 @@ for (my $i=0; $i<$count; $i++) {
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 @@ printend
} 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 @@ printend
<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 @@ printend
<td> &nbsp;</td>
<td>$orders->[$i2]->{'count(*)'}</td><td>$orders->[$i2]->{'authorisedby'} &nbsp; </td>
<td>$orders->[$i2]->{'entrydate'}</td></tr>
printend
;
}

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 @@ print <<EOP
<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>

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 @@ use strict;
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 @@ print <<EOP
<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>

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 @@ use strict;
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 @@ EOP
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 @@ EOP
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 @@ EOP
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 @@ print <<EOP
>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>

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 @@ if (not $lastmove) {
}
# 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;

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 @@ my $data=borrdata('',$bornum);
#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 @@ $template->param( startmenumember => startmenu('member'),
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;

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 @@ if ($type ne 'change'){
<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 @@ printend
# 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 {

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 @@ my $sth=$dbh->prepare($query);
$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){

4
groups.pl

@ -1,5 +1,7 @@
#!/usr/bin/perl
# $Id$
#written 14/1/2000
#script to display reports
@ -132,7 +134,7 @@ EOF
</tr></table>
</td></tr></table>
<p>
Printer:
Printer:
<select name=printer>
$printeroptions
</select>

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 @@ print qq|
*******************************************
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 "\n";
#
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 @@ my $inc_path;
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 @@ do {
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 @@ do {
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 @@ do {
#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 @@ do {
#
# 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 @@ do {
#
# 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 @@ print qq|
* 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 @@ of steps that you will need to complete.
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