Replaced expressions of the form "$x = $x <op> $y" with "$x <op>= $y".
[koha.git] / C4 / Interface / BorrowerCDK.pm
1 package C4::Interface::BorrowerCDK; #asummes C4/Interface/BorrowerCDK
2
3 #uses Newt
4
5 # Copyright 2000-2002 Katipo Communications
6 #
7 # This file is part of Koha.
8 #
9 # Koha is free software; you can redistribute it and/or modify it under the
10 # terms of the GNU General Public License as published by the Free Software
11 # Foundation; either version 2 of the License, or (at your option) any later
12 # version.
13 #
14 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License along with
19 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
20 # Suite 330, Boston, MA  02111-1307 USA
21
22 # FIXME - I'm pretty sure that this, along with the rest of the
23 # CDK-based stuff, is obsolete.
24
25 use C4::InterfaceCDK;
26 use strict;
27 use Cdk;
28
29 require Exporter;
30 use DBI;
31 use vars qw($VERSION @ISA @EXPORT);
32 # set the version for version checking
33 $VERSION = 0.01;
34
35 @ISA = qw(Exporter);
36 @EXPORT = qw(&BorrowerAddress);
37
38 sub BorrowerAddress {
39   my ($env,$bornum,$borrower)=@_;
40   my $titlepanel = titlepanel($env,$env{'sysarea'},"Update Borrower");
41   $titlepanel->draw();
42   my BorrAdd = BorrAddpame
43
44 sub BorrAddpanel {
45   my ($env,$bornum,$borrower)=@_;
46   my $titlepanel = titlepanel($env,$env{'sysarea'},"Update Borrower");
47   my @rowtitl = ("Card Number","Surname","First Name","Other Names","Initials",
48      "Address","Area","Town","Telephone","Email","Fax Number","Alt Address",
49      "Alt Area","Alt Town","Alt Phone","Contact Name");
50   my @coltitles = ("");
51   my @coltypes  = ("UMIXED");
52   my @colwidths = (40);
53   my $entrymatrix = new Cdk::Matrix (
54     'ColTitles'=> \@coltitles,
55     'RowTitles'=> \@rowtitles,
56     'ColWidths'=> \@colwidths,
57     'ColTypes'=>  \@coltypes,
58     'Vrows'=>     16,
59     'Vcols'=>     1,
60     'RowSpace'=>  0);
61   my @data;
62   $data[0] = $borrower{'cardnumber'};
63   $data[1] = $borrower{'surname'};
64   $data[2] = $borrower{'firstname'};
65   $data[3] = $borrower{'
66   $entrymatrix->inject('Input'=>"KEY_DOWN");
67   my $reason;
68   my ($rows,$cols,$info) = $entrymatrix->activate();
69   my @responses;
70   if (!defined $rows) {
71      $reason = "Circ";
72   } else {
73      my $i = 0;
74      while ($i < $numflds) {
75         $responses[$i] =$info->[$i][0];
76         $i++;
77      }
78   }
79   return($reason,@responses);
80 }
81
82 END { }       # module clean-up code here (global destructor)