koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/opac opac-membership.pl,NONE,1.1.2.1 opac-reserve.p


From: Finlay Thompson
Subject: [Koha-cvs] CVS: koha/opac opac-membership.pl,NONE,1.1.2.1 opac-reserve.pl,1.1.2.6,1.1.2.7
Date: Wed, 27 Nov 2002 12:55:37 -0800

Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1:/tmp/cvs-serv14734

Modified Files:
      Tag: rel-1-2
        opac-reserve.pl 
Added Files:
      Tag: rel-1-2
        opac-membership.pl 
Log Message:

added opac-membership.pl and working on opac-reserve.pl


--- NEW FILE ---
#!/usr/bin/perl
use strict;
require Exporter;
use CGI;

use C4::Auth;       # get_template_and_user

my $query = new CGI;

my ($template, $borrowernumber, $cookie) 
    = get_template_and_user({template_name => "opac-membership.tmpl",
                             query => $query,
                             type => "opac",
                             authnotrequired => 1,
                             flagsrequired => {borrow => 1},
                         });

print $query->header(-cookie => $cookie), $template->output;

Index: opac-reserve.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-reserve.pl,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -r1.1.2.6 -r1.1.2.7
*** opac-reserve.pl     5 Nov 2002 23:26:25 -0000       1.1.2.6
--- opac-reserve.pl     27 Nov 2002 20:55:35 -0000      1.1.2.7
***************
*** 5,9 ****
  
  use C4::Search;
- use C4::Output;       # gettemplate
  use C4::Auth;         # checkauth, getborrowernumber.
  use C4::Koha;
--- 5,8 ----
***************
*** 15,30 ****
  
  my $query = new CGI;
! 
! 
! my $flagsrequired;
! $flagsrequired->{borrow}=1;
! 
! my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 0, 
$flagsrequired);
! 
! 
! my $template = gettemplate("opac-reserve.tmpl", "opac");
  
  # get borrower information ....
- my $borrowernumber = getborrowernumber($loggedinuser);
  my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
  my @bordat;
--- 14,27 ----
  
  my $query = new CGI;
! my ($template, $borrowernumber, $cookie) 
!     = get_template_and_user({template_name => "opac-reserve.tmpl",
!                            query => $query,
!                            type => "opac",
!                            authnotrequired => 0,
!                            flagsrequired => {borrow => 1},
!                            debug => 1,
!                            });
  
  # get borrower information ....
  my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
  my @bordat;
***************
*** 41,44 ****
--- 38,43 ----
  # get the rank number....
  my ($rank,$reserves) = FindReserves($biblionumber);
+ $template->param(reservecount => $rank);
+ 
  foreach my $res (@$reserves) {
      if ($res->{'found'} eq 'W') {
***************
*** 61,64 ****
--- 60,64 ----
  # make branch selection options...
  my $branchoptions = '';
+ my @branches;
  foreach my $br (keys %$branches) {
      (next) unless $branches->{$br}->{'IS'};
***************
*** 68,79 ****
--- 68,85 ----
      }
      $branchoptions .= "<option value=$br 
$selected>$branches->{$br}->{'branchname'}</option>\n";
+     push @branches, {branchcode => $br, branchname => 
$branches->{$br}->{'branchname'}, selected => $selected};
  }
  $template->param( branchoptions => $branchoptions);
+ $template->param(BRANCHES => address@hidden);
  
  #### THIS IS A BIT OF A HACK BECAUSE THE BIBLIOITEMS DATA IS A LITTLE MESSED 
UP!
  # get the itemtype data....
  my @items = ItemInfo(undef, $biblionumber, 'intra');
+ my $itemcount = @items;
+ $template->param(itemcount => $itemcount);
+ 
  my %types;
  foreach my $itm (@items) {
+     $itm->{'datedue'} = slashifyDate($itm->{'datedue'});
      my $ity = $itm->{'itemtype'};
      unless ($types {$ity}) {
***************
*** 86,89 ****
--- 92,97 ----
  }
  
+ $template->param(ITEMS => address@hidden);
+ 
  foreach my $type (values %types) {
      my $copies = "";
***************
*** 182,185 ****
  
  
! $template->param(loggedinuser => $loggedinuser);
! print "Content-Type: text/html\n\n", $template->output;
--- 190,193 ----
  
  
! 
! print $query->header(-cookie => $cookie), $template->output;




reply via email to

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