koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/admin itemtypes.pl,1.14,1.15


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/admin itemtypes.pl,1.14,1.15
Date: Mon, 13 Sep 2004 08:20:31 -0700

Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8422/admin

Modified Files:
        itemtypes.pl 
Log Message:
fixes for notforloan management

Index: itemtypes.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/itemtypes.pl,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** itemtypes.pl        18 Aug 2004 16:05:14 -0000      1.14
--- itemtypes.pl        13 Sep 2004 15:20:28 -0000      1.15
***************
*** 114,133 ****
  } elsif ($op eq 'add_validate') {
        my $dbh = C4::Context->dbh;
!       my $query = "replace itemtypes 
(itemtype,description,renewalsallowed,rentalcharge,notforloan) values (";
!       $query.= $dbh->quote($input->param('itemtype')).",";
!       $query.= $dbh->quote($input->param('description')).",";
!       if ($input->param('renewalsallowed') ne 1) {
!               $query.= "0,";
!       } else {
!               $query.= "1,";
!       }
!       $query.= $dbh->quote($input->param('rentalcharge')).",";
!       if ($input->param('notforloan') ne 1) {
!               $query.= "0)";
!       } else {
!               $query.= "1)";
!       }
!       my $sth=$dbh->prepare($query);
!       $sth->execute;
        $sth->finish;
        print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; 
URL=itemtypes.pl\"></html>";
--- 114,122 ----
  } elsif ($op eq 'add_validate') {
        my $dbh = C4::Context->dbh;
!       my $sth=$dbh->prepare("replace itemtypes 
(itemtype,description,renewalsallowed,rentalcharge,notforloan) values 
(?,?,?,?,?)");
!       $sth->execute(
!               $input->param('itemtype'),$input->param('description'),
!               $input->param('renewalsallowed'),$input->param('rentalcharge'),
!               $input->param('notforloan')?1:0);
        $sth->finish;
        print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; 
URL=itemtypes.pl\"></html>";




reply via email to

[Prev in Thread] Current Thread [Next in Thread]