Removed trailing whitespace.
-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
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);
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)
package C4::Database;
+# $Id$
+
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
require Exporter;
use DBI;
use vars qw($VERSION @ISA @EXPORT);
-
+
$VERSION = 0.01;
-
+
@ISA = qw(Exporter);
@EXPORT = qw( );
package C4::Groups;
+# $Id$
+
#package to deal with Returns
#written 3/11/99 by olwen@katipo.co.nz
#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);
-package C4::Security; #assumes C4/Security
+package C4::Security;
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
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;
}
$env->{'usercode'} = $username;
$env->{'branchcode'} = $branch;
}
-
+
} else {
debug_msg("","not found");
}
}
&endint();
}
-
+
sub CheckAccess {
my ($env)=@_;
}
-
-END { } # module clean-up code here (global destructor)
-
#!/usr/bin/perl
+# $Id$
+
#
# TODO
#
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>
#!/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
<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
#!/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
<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>
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
($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
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>
#
if ($input->param('z3950queue')) {
AcceptZ3950Queue($dbh,$input);
-}
+}
if ($input->param('uploadmarc')) {
AcceptMarcUpload($dbh,$input)
$record,
$data,
);
-
+
if ($file=~/Z-(\d+)/) {
my $id=$1;
my $resultsid=$input->param('resultsid');
$sth->execute;
($data) = $sth->fetchrow;
}
-
+
my $file=MARC::File::USMARC->indata ($data);
my $oldkoha;
# FIXME - This "==" should be "=", right?
$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 {
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
}
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 ) {
$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);
}
} else {
#
-# This is an uploaded Marc record
+# This is an uploaded Marc record
#
my @loop = ();
my $MARCfile = MARC::File::USMARC->indata($data);
# $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) {
$donetext="";
}
($oldkoha->{author}) && ($oldkoha->{author}="by $oldkoha->{author}");
-
+
$searchfield="";
foreach $fieldname ( "controlnumber", "lccn", "issn", "isbn") {
if ( defined $oldkoha->{$fieldname} && $oldkoha->{$fieldname} ) {
$elapsed,
$elapsedtime,
$resultstatus, $statuscolor,
- $id, $term, $type, $done,
+ $id, $term, $type, $done,
$startdate, $enddate, $servers,
$record,$bib,$title,
);
# 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/</</g;
$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
# 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;
$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>
<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> ISBN
+ <input type=radio name=type value=isbn checked> ISBN
<input type=radio name=type value=lccn > LCCN<br>
- <input type=radio name=type value=author > Author
- <input type=radio name=type value=title > Title
+ <input type=radio name=type value=author > Author
+ <input type=radio name=type value=title > Title
<input type=radio name=type value=keyword > Keyword</td></tr>
<tr><td colspan=2> $serverlist </td></tr>
<tr><td colspan=2 align=center> <input type=submit> </td></tr>
}
}
- $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|
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>
}
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
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) {
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');
$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');
# \@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);
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) {
#---------------
# $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.
#!/usr/bin/perl
+
+# $Id$
+
use C4::Context;
use DBI;
#use strict;
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;
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
} elsif ((! $newgroup) && (! $biblioitemnumber)) {
print $input->redirect("additem.pl?biblionumber=$biblionumber&error=nobiblioitem");
} else {
-
+
if ($website) {
&newbiblioitem($biblioitem);
} elsif (&checkitems(1,$barcode)) {
#!/usr/bin/perl
+# $Id$
+
#script to recieve orders
#written by chris@katipo.co.nz 24/2/2000
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]";
<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>
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){
</table>
</form>
</center>
-<br clear=all>
+<br clear=all>
<p> </p>
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
;
#!/usr/bin/perl
+# $Id$
+
#script to show display basket of orders
#written by chris@katipo.co.nz 24/2/2000
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>
$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>
<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
<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>
<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
;
#!/usr/bin/perl
+# $Id$
+
#script to show display basket of orders
#written by chris@katipo.co.nz 24/2/2000
<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'}
<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>
#!/usr/bin/perl
+# $Id$
+
#script to show suppliers and orders
#written by chris@katipo.co.nz 23/2/2000
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>
} 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> </a></td>
<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'} </td>
<td>$orders->[$i2]->{'entrydate'}</td></tr>
-
+
printend
;
} else {
<td> </td>
<td>$orders->[$i2]->{'count(*)'}</td><td>$orders->[$i2]->{'authorisedby'} </td>
<td>$orders->[$i2]->{'entrydate'}</td></tr>
-
+
printend
;
}
#!/usr/bin/perl
+# $Id$
+
#script to recieve orders
#written by chris@katipo.co.nz 24/2/2000
<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>
#!/usr/bin/perl
+# $Id$
+
#script to show display basket of orders
#written by chris@katipo.co.nz 24/2/2000
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');
<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>
#!/usr/bin/perl
+# $Id$
+
#script to show display basket of orders
#written by chris@katipo.co.nz 24/2/2000
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');
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";
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";
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";
>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>
#!/usr/bin/perl
+# $Id$
+
#written 7/3/2002 by Finlay
#script to display reports
}
-# make the page ...
+# make the page ...
print $input->header;
$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;
#!/usr/bin/perl
+# $Id$
+
#writen 11/1/2000 by chris@katipo.oc.nz
#script to display borrowers account details
#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
surname => $data->{'surname'},
bornum => $bornum,
total => $total,
- accounts => \@accountrows );
+ accounts => \@accountrows );
-print "Content-Type: text/html\n\n", $template->output;
\ No newline at end of file
+print "Content-Type: text/html\n\n", $template->output;
#!/usr/bin/perl
+# $Id$
+
#written by chris@katipo.co.nz
#9/10/2000
#script to display and update currency rates
<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
;
# 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 {
#!/usr/bin/perl
+# $Id$
+
#script to delete items
#written 2/5/00
#by chris@katipo.co.nz
$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){
#!/usr/bin/perl
+# $Id$
+
#written 14/1/2000
#script to display reports
</tr></table>
</td></tr></table>
<p>
-Printer:
+Printer:
<select name=printer>
$printeroptions
</select>
#!/usr/bin/perl -w # please develop with -w
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
*******************************************
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
#
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).
|;
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".
|;
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".
|;
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.
|;
#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
#
# 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
#
# 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
* 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'\;
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
* 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.
#!/usr/bin/perl -w # please develop with -w
+# $Id$
+
#use diagnostics;
# Copyright 2000-2002 Katipo Communications
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]):
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;
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
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.
|;
#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".
|;
}
unless (-e "$kohalogdir") {
- my $result = mkdir 0770, "$kohalogdir";
+ my $result = mkdir 0770, "$kohalogdir";
if ($result==0) {
my @dirs = split(m#/#, $kohalogdir);
my $checkdir='';
$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
|;
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
#!/usr/bin/perl -w
+# $Id$
+
#use diagnostics;
use strict; # please develop with the strict pragma
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>;
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
my $backupdir='/usr/local/koha/backups';
-print "Please specify a backup directory [$backupdir]: ";
+print "Please specify a backup directory [$backupdir]: ";
$answer = <STDIN>;
chomp $answer;
$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;
}
}
while (!$opacdir) {
- print "Please specify the location of your OPAC files: ";
+ print "Please specify the location of your OPAC files: ";
$answer = <STDIN>;
chomp $answer;
}
unless (-e "$kohalogdir") {
- my $result = mkdir 0770, "$kohalogdir";
+ my $result = mkdir 0770, "$kohalogdir";
if ($result==0) {
my @dirs = split(m#/#, $kohalogdir);
my $checkdir='';
#!/usr/bin/perl
+# $Id$
+
#script to do a borrower enquiery/brin up borrower details etc
#written 20/12/99 by chris@katipo.co.nz
# 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 );
endmenumember => join ('', endmenu('member')),
member => $member,
resultsloop => \@resultsdata );
-
+
print "Content-Type: text/html\n\n", $template->output;
#!/usr/bin/perl
+# $Id$
+
#script to set up screen for modification of borrower details
#written 20/12/99 by chris@katipo.co.nz
$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");
} 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
} 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
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;
}
push(@titledata, \%row);
}
-
+
my ($categories,$labels)=ethnicitycategories();
my $ethnicitycategoriescount=$#{$categories};
my $ethcatpopup;
-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',
'X' => 'Temporary Visitor',
'Z' => 'Interloan Libraries',
'V' => 'Village');
-
+
my @areadata;
while (@areas) {
my %row;
$row{'area'}=$arealabels{$shortcut};
push(@areadata, \%row);
}
-
-
+
+
my @relationships = ('workplace', 'relative','friend', 'neighbour');
my @relshipdata;
while (@relationships) {
}
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 = $_;
if ($modify){
$template->param( modify => 1 );
}
-
+
$template->param( startmenumember => join ('', startmenu('member')),
endmenumember => join ('', endmenu('member')),
member => $member,
expiry => $data->{'expiry'},
cardnumber => $cardnumber,
dateofbirth => $data->{'dateofbirth'});
-
+
print "Content-Type: text/html\n\n", $template->output;
-
+
}
#!/usr/bin/perl
+# $Id$
+
#script to modify/delete biblios
#written 8/11/99
# modified 11/11/99 by chris@katipo.co.nz
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
#!/usr/bin/perl
+# $Id$
+
#script to modify/delete groups
#written 8/11/99
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;
#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";
<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>
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>
<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> </p>
-
-
+
+
printend
;
#!/usr/bin/perl
+# $Id$
+
#script to modify/delete biblios
#written 8/11/99
# modified 11/11/99 by chris@katipo.co.nz
#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";
}
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
;
#!/usr/bin/perl
+# $Id$
+
# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
use C4::Search;
use C4::Acquisitions;
use C4::Output; # contains gettemplate
-
+
my $query=new CGI;
my $includes = C4::Context->config('includes') ||
my $template = gettemplate("catalogue/moredetail.tmpl");
-# get variables
+# get variables
my $biblionumber=$query->param('bib');
my $title=$query->param('title');
} 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);
#!/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
cardnumber => $guarantees->[$i]->{'cardnumber'}});
}
$template->param(guaranteeloop => \@guaranteedata);
-
+
} else {
my ($guarantor)=findguarantor($data->{'borrowernumber'});
unless ($guarantor->{'borrowernumber'} == 0){
$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);
my $amount2= $accts->[$i]{'amountoutstanding'} + 0.00;
my %row = %$accts->[$i];
if ($amount2 != 0){
- my $item=" ";
+ my $item=" ";
$row{'date'} = slashifyDate($accts->[$i]{'date'});
if ($accts->[$i]{'accounttype'} ne 'Res'){
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
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++){
#!/usr/bin/perl
+# $Id$
+
#script to print confirmation screen, then if accepted calls itself to insert data
#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
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');
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
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;
$duedate=$data->{'date_due'};
$bornum=$data->{'borrowernumber'};
$itemnum=$data->{'itemnumber'};
-
+
my $query="select concat(firstname,' ',surname),phone,emailaddress from borrowers where borrowernumber='$bornum'";
my $sth1=$dbh->prepare($query);
$sth1->execute;
endmenureport => join ('', endmenu('report')),
todaysdate => $todaysdate,
overdueloop => \@overduedata );
-
+
print "Content-Type: text/html\n\n", $template->output;
#!/usr/bin/perl
-#wrriten 11/1/2000 by chris@katipo.oc.nz
+# $Id$
+
+#written 11/1/2000 by chris@katipo.oc.nz
#part of the koha library system, script to facilitate paying off fines
#get account details
my %bor;
-$bor{'borrowernumber'}=$bornum;
+$bor{'borrowernumber'}=$bornum;
my @names=$input->param;
if ($total ne ''){
recordpayment(\%env,$bornum,$total);
}
- my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
+ my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
print startpage();
print startmenu('member');
} else {
# my $quety=$input->query_string;
# print $input->redirect("/cgi-bin/koha/sec/writeoff.pl?$quety");
- my%inp;
+ my%inp;
my @name=$input->param;
for (my $i=0;$i<@name;$i++){
my $test=$input->param($name[$i]);
#!/usr/bin/perl
+# $Id$
+
#written 18/1/2000 by chris@katipo.co.nz
#script to renew items from the web
renewbook(\%env,$bornum,$key);
}
}
-}
+}
print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum");
#!/usr/bin/perl
+# $Id$
+
#script to display reports
#written 8/11/99
print startmenu('issue');
my @data;
if ($type eq 'search'){
- @data=statsreport('search','something');
+ @data=statsreport('search','something');
}
if ($type eq 'issue'){
@data=statsreport('issue','today');
#!/usr/bin/perl
+# $Id$
+
#script to place reserves/requests
#writen 2/1/00 by chris@katipo.oc.nz
$dat->{'dewey'}=~ s/00$//;
my $class="$dat->{'classification'}$dat->{'dewey'}$dat->{'subclass'}";
my $select;
- if (($dat->{'notforloan'})
+ if (($dat->{'notforloan'})
|| ($dat->{'itemlost'} == 1)) {
$select = "Cannot be reserved.";
} else {
<input type=hidden name=type value=str8>
<input type=hidden name=title value="$dat->{'title'}">
<FONT SIZE=6><em>Requesting: <br>
-<a href=/cgi-bin/koha/detail.pl?bib=$bib>$dat->{'title'}</a>
+<a href=/cgi-bin/koha/detail.pl?bib=$bib>$dat->{'title'}</a>
($dat->{'author'})</em></FONT><P>
<p>
<td><select name=pickup>
$branchoptions
</select></td>
-<td><input type=checkbox name=request value=any>Next Available,
+<td><input type=checkbox name=request value=any>Next Available,
<br>(or choose from list below)</td>
</tr></table>
#!/usr/bin/perl
+# $Id$
+
#script to show list of budgets and bookfunds
#written 4/2/00 by chris@katipo.co.nz
#called as an include by the acquisitions index page
my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd);
print <<EOP
<tr><td>
-$results[$i]->{'bookfundname'} </TD>
+$results[$i]->{'bookfundname'} </TD>
<TD>$results[$i]->{'budgetamount'}</TD> <TD>
EOP
;
#!/usr/bin/perl
+# $Id$
+
#written 14/1/2000
#script to display reports
my $temptotalr=0;
my $temptotalres=0;
my $temptotalren=0;
- my $temptotalw=0;
+ my $temptotalw=0;
for (my $i2=0;$i2<$count;$i2++){
$charge+=$charges[$i2]->{'amount'};
print mktablerow(6,'red',$charges[$i2]->{'description'},$charges[$i2]->{'accounttype'},$charges[$i2]->{'timestamp'},
if ($charges[$i2]->{'accounttype'} eq 'R'){
$temptotalren+=$charges[$i2]->{'amount'}-$charges[$i2]->{'amountoutstanding'};
}
- }
+ }
}
# my $branch=
my $time="$hour:$min:$sec";
my $time2="$payments[$i]{'date'}";
my $branch=Getpaidbranch($time2,$payments[$i]{'borrowernumber'});
-
+
if ($payments[$i]{'accounttype'} eq 'W'){
$totalw+=$payments[$i]{'amount'};
} else {
}
# my $time2="$payments[$i]{'date'} $time";
-
+
print mktablerow(6,'white',"$payments[$i]{'firstname'} <b>$payments[$i]{'surname'}</b>",
,$payments[$i]{'accounttype'},"$payments[$i]{'date'} $time",$payments[$i]{'amount'}
,$branch);
$oldtime=$payments[$i]{'timestamp'};
$bornum=$payments[$i]{'borrowernumber'};
$i++;
-
+
}
print mktablerow('6','white','','','','','','');
}
#!/usr/bin/perl
+# $Id$
+
#written 14/1/2000
#script to display reports
$date2=UnixDate($date2,'%Y-%m-%d');
my $dbh = C4::Context->dbh;
-my $query="select *
+my $query="select *
from accountlines,accountoffsets,borrowers where
accountlines.borrowernumber=accountoffsets.borrowernumber and
(accountlines.accountno=accountoffsets.accountno or accountlines.accountno
-=accountoffsets.offsetaccount) and accountlines.timestamp >=20000621000000
+=accountoffsets.offsetaccount) and accountlines.timestamp >=20000621000000
and borrowers.borrowernumber=accountlines.borrowernumber
group by accountlines.borrowernumber,accountlines.accountno";
my $sth=$dbh->prepare($query);
#!/usr/bin/perl
+# $Id$
+
#script to display detailed information
#written 8/11/99
my $subject=$input->param('subject');
#my $title=$input->param('title');
-my $main;
-my $secondary;
-if ($type eq 'opac'){
- $main='#99cccc';
- $secondary='#efe5ef';
-} else {
- $main='#99cc33';
- $secondary='#ffffcc';
-}
+my $main;
+my $secondary;
+if ($type eq 'opac'){
+ $main='#99cccc';
+ $secondary='#efe5ef';
+} else {
+ $main='#99cc33';
+ $secondary='#ffffcc';
+}
my @items=subsearch(\$blah,$subject);
#print @items;
print center();
print mktablehdr;
if ($type ne 'opac'){
- print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),' ',"/images/background-mem.gif");
+ print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('LOCATION'),' ',"/images/background-mem.gif");
} else {
- print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('BRANCH'),' ');
+ print mktablerow(5,$main,bold('TITLE'),bold('AUTHOR'),bold('COUNT'),bold('BRANCH'),' ');
}
my $colour=1;
while ($i < $count){
$word=~ s/ /%20/g;
#$word=~ s/\,/\,%20/;
$results[1]=mklink("/cgi-bin/koha/search.pl?author=$word&type=$type",$results[1]);
- my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]);
- $results[3]=$count;
- if ($nacount > 0){
- $results[4]=$results[4]."On Loan";
+ my ($count,$lcount,$nacount,$fcount,$scount)=itemcount($env,$results[2]);
+ $results[3]=$count;
+ if ($nacount > 0){
+ $results[4]=$results[4]."On Loan";
if ($nacount > 1){
$results[4].=" $nacount";
}
$results[4].=" ";
- }
- if ($lcount > 0){
- $results[4]=$results[4]." Levin";
+ }
+ if ($lcount > 0){
+ $results[4]=$results[4]." Levin";
if ($lcount > 1){
$results[4].=" $lcount";
}
$results[4].=" ";
- }
- if ($fcount > 0){
- $results[4]=$results[4]." Foxton";
+ }
+ if ($fcount > 0){
+ $results[4]=$results[4]." Foxton";
if ($fcount > 1){
$results[4].=" $fcount";
}
$results[4].=" ";
- }
- if ($scount > 0){
- $results[4]=$results[4]." Shannon";
+ }
+ if ($scount > 0){
+ $results[4]=$results[4]." Shannon";
if ($scount > 1){
$results[4].=" $scount";
}
$results[4].=" ";
- }
+ }
if ($type ne 'opac'){
$results[6]=mklink("/cgi-bin/koha/request.pl?bib=$results[2]","Request");
}
- if ($colour == 1){
- print mktablerow(5,$secondary,$results[0],$results[1],$results[3],$results[4],$results[6]);
- $colour=0;
- } else{
- print mktablerow(5,'white',$results[0],$results[1],$results[3],$results[4],$results[6]);
- $colour=1;
+ if ($colour == 1){
+ print mktablerow(5,$secondary,$results[0],$results[1],$results[3],$results[4],$results[6]);
+ $colour=0;
+ } else{
+ print mktablerow(5,'white',$results[0],$results[1],$results[3],$results[4],$results[6]);
+ $colour=1;
}
$i++;
}
#!/usr/bin/perl
+
+# $Id$
+
#
# written 31/5/00 by chris@katipo.co.nz to make a way to fix account mistakes
#
foreach my $key (@name){
if ($key ne 'bornum'){
my $temp=$input->param($key);
-
+
# print $temp,$key;
if ($temp ne ''){
fixaccounts($bornum,$key,$temp);
-
+
}
}
}
-
+
print $input->redirect("boraccount.pl?bornum=$bornum");
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
} # else
my (@items) = &itemissues($bibitemnum);
-#print @items;
+#print @items;
my $count = @items;
#print $count;
my @barcodes;
});
}
}
-
+
} elsif ($flag2 eq 'leastone') {
&modbibitem({
biblioitemnumber => $bibitemnum,
} else {
$loan=0;
}
- for (my $i=0;$i<$count;$i++){
- if ($barcodes[$i] ne ''){
+ for (my $i=0;$i<$count;$i++){
+ if ($barcodes[$i] ne ''){
moditem( {biblionumber => $bibnum,
loan => $loan,
itemnumber => $items[$i]->{'itemnumber'},
bibitemnum => $bibitemnum
});
- }
+ }
}
-
+
} else {
&modbibitem({
biblioitemnumber => $bibitemnum,
#!/usr/bin/perl
+# $Id$
+
#script to update charges for overdue in database
#updates categoryitem
# is called by charges.pl
my @names=$input->param();
foreach my $key (@names){
-
+
my $bor=substr($key,0,1);
my $cat=$key;
$cat =~ s/[A-Z]//i;
my $data=$input->param($key);
my @dat=split(',',$data);
# print "$bor $cat $dat[0] $dat[1] $dat[2] <br> ";
- my $sth=$dbh->prepare("Update categoryitem set fine=$dat[0],startcharge=$dat[1],chargeperiod=$dat[2] where
+ my $sth=$dbh->prepare("Update categoryitem set fine=$dat[0],startcharge=$dat[1],chargeperiod=$dat[2] where
categorycode='$bor' and itemtype='$cat'");
$sth->execute;
$sth->finish;
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
}
print $input->redirect("moredetail.pl?type=intra&bib=$bibnum&bi=$bibitemnum");
} else {
-
+
# print "marking cancelled";
#need to check if it is on reserve or issued
my $dbh = C4::Context->dbh;
- my $flag=0;
+ my $flag=0;
my ($resbor,$resrec)=C4::Circulation::Circ2::checkreserve($env,$dbh,$itemnum);
# print $resbor;
if ($resbor){
print "The biblio or biblioitem this item belongs to has a reserve on it";
$flag=1;
}
- my $sth=$dbh->prepare("Select * from issues where (itemnumber='$itemnum') and (returndate is null)");
+ my $sth=$dbh->prepare("Select * from issues where (itemnumber='$itemnum') and (returndate is null)");
$sth->execute;
my $data=$sth->fetchrow_hashref;
if ($data->{'borrowernumber'} ne '') {
}
#sub checkissue{
-
#!/usr/bin/perl
+# $Id$
# Copyright 2000-2002 Katipo Communications
#
} elsif (! $biblionumber) {
print $input->redirect("/catalogue/");
-
+
} elsif (! $websitenumber) {
print $input->redirect("modwebsites.pl?biblionumber=$biblionumber");