#!/usr/bin/perl use CGI qw/:standard/; use C4::Circulation::Circ2; use C4::Output; use C4::Print; use DBI; my %env; my $headerbackgroundcolor='#99cc33'; my $circbackgroundcolor='#ffffcc'; my $circbackgroundcolor='white'; my $linecolor1='#ffffcc'; my $linecolor2='white'; my $backgroundimage="/images/background-mem.gif"; my $query=new CGI; my $branches=getbranches(\%env); my $printers=getprinters(\%env); my $branch=$query->param('branch'); my $printer=$query->param('printer'); ($branch) || ($branch=$query->cookie('branch')); ($printer) || ($printer=$query->cookie('printer')); my ($oldbranch, $oldprinter); if ($query->param('selectnewbranchprinter')) { $oldbranch=$branch; $oldprinter=$printer; $branch=''; $printer=''; } $env{'branchcode'}=$branch; $env{'printer'}=$printer; $env{'queue'}=$printer; my $branchcount=0; my $printercount=0; my $branchoptions; my $printeroptions; foreach (keys %$branches) { (next) unless ($_); (next) if (/^TR$/); $branchcount++; my $selected=''; ($selected='selected') if ($_ eq $oldbranch); $branchoptions.="