From finlayt@users.sourceforge.net Wed Mar 13 17:04:05 2002 From: Finlay Thompson To: koha-devel@lists.koha-community.org Subject: [Koha-devel] CVS: koha/circ circulation2.pl,NONE,1.1 circulation.pl,1.21,1.22 Date: Wed, 13 Mar 2002 17:05:02 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6320465059662434530==" --===============6320465059662434530== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Update of /cvsroot/koha/koha/circ In directory usw-pr-cvs1:/tmp/cvs-serv10323 Modified Files: circulation.pl=20 Added Files: circulation2.pl=20 Log Message: This is the begining of a process of dividing up circulation.pl This script deals with the branch and printer selection stuff --- NEW FILE --- #!/usr/bin/perl use strict; use CGI qw/:standard/; use C4::Circulation::Circ2; use C4::Output; use C4::Print; use DBI; # this is a reorganisation of circulation.pl=20 # dividing it up into three scripts...... # this will be the first one that chooses branch and printer settings.... my %env; my $headerbackgroundcolor=3D'#99cc33'; my $circbackgroundcolor=3D'#ffffcc'; my $circbackgroundcolor=3D'white'; my $linecolor1=3D'#ffffcc'; my $linecolor2=3D'white'; my $backgroundimage=3D"/images/background-mem.gif"; my $query=3Dnew CGI; my $branches=3Dgetbranches(\%env); my $printers=3Dgetprinters(\%env); my $branch=3D$query->param('branch'); my $printer=3D$query->param('printer'); ($branch) || ($branch=3D$query->cookie('branch')); ($printer) || ($printer=3D$query->cookie('printer')); my $oldbranch; my $oldprinter; if ($query->param('selectnewbranchprinter')) { $oldbranch=3D$branch; $oldprinter=3D$printer; $branch=3D''; $printer=3D''; } $env{'branchcode'}=3D$branch; $env{'printer'}=3D$printer; $env{'queue'}=3D$printer; # set up select options.... my $branchcount=3D0; my $printercount=3D0; my $branchoptions; my $printeroptions; foreach (keys %$branches) { (next) unless ($_); (next) if (/^TR$/); $branchcount++; my $selected=3D''; ($selected=3D'selected') if ($_ eq $oldbranch); $branchoptions.=3D"