[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha overdue.pl,1.2.2.2,1.2.2.3
From: |
Andrew Arensburger |
Subject: |
[Koha-cvs] CVS: koha overdue.pl,1.2.2.2,1.2.2.3 |
Date: |
Sat, 05 Oct 2002 01:33:31 -0700 |
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv3117
Modified Files:
Tag: arensb-context
overdue.pl
Log Message:
Merged with head.
Index: overdue.pl
===================================================================
RCS file: /cvsroot/koha/koha/overdue.pl,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C2 -r1.2.2.2 -r1.2.2.3
*** overdue.pl 5 Oct 2002 06:10:34 -0000 1.2.2.2
--- overdue.pl 5 Oct 2002 08:33:29 -0000 1.2.2.3
***************
*** 23,33 ****
use C4::Output;
use CGI;
my $input = new CGI;
- print $input->header;
my $type=$input->param('type');
- print startpage();
- print startmenu('report');
my $duedate;
my $bornum;
--- 23,35 ----
use C4::Output;
use CGI;
+ use HTML::Template;
my $input = new CGI;
my $type=$input->param('type');
+ my $theme = $input->param('theme'); # only used if allowthemeoverride is set
+ my %tmpldata = pathtotemplate ( template => 'overdue.tmpl', theme => $theme);
+ my $template = HTML::Template->new( filename => $tmpldata{'path'},
+ die_on_bad_params => 0);
my $duedate;
my $bornum;
***************
*** 45,61 ****
my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d",
($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
- print "<FONT SIZE=6><em>Items Overdue as of $todaysdate</em></FONT><br><P>";
-
- print << "EOF";
- <TABLE cellspacing=0 cellpadding=5 border=0 align=center>
- <TR VALIGN=TOP>
- <TD bgcolor="99cc33" background="/koha/images/background-mem.gif" colspan
><b>Due Date</b></td>
- <TD bgcolor="99cc33" background="/koha/images/background-mem.gif" colspan
><b>Patron</b></td>
- <TD bgcolor="99cc33"
background="/koha/images/background-mem.gif"><b>Phone</b></td>
- <TD bgcolor="99cc33"
background="/koha/images/background-mem.gif"><b>Title</b></td>
- <TD bgcolor="99cc33"
background="/koha/images/background-mem.gif"><b>Author</b></td>
- </tr>
- EOF
-
my $dbh = C4::Context->dbh;
--- 47,50 ----
***************
*** 63,66 ****
--- 52,57 ----
my $sth=$dbh->prepare($query);
$sth->execute;
+
+ my @overduedata;
while (my $data=$sth->fetchrow_hashref) {
$duedate=$data->{'date_due'};
***************
*** 93,108 ****
$author=$data3->{'author'};
$sth3->finish;
- if (!$email){
- print
"<tr><td>$duedate</td><td>$name</td><td>$phone</td><td>$title</td><td>$author</td></tr>";
- } else {
- print "<tr><td>$duedate</td><td><a href=\"mailto:$email?subject=Overdue:
$title\">$name</a></td><td>$phone</td><td>$title</td><td>$author</td></tr>";
- }
}
$sth->finish;
! print "</table>";
!
! print endmenu('report');
! print endpage();
--- 84,105 ----
$author=$data3->{'author'};
$sth3->finish;
+ push (@overduedata, { duedate => $duedate,
+ bornum => $bornum,
+ itemnum => $itemnum,
+ name => $name,
+ phone => $phone,
+ email => $email,
+ biblionumber => $biblionumber,
+ title => $title,
+ author => $author });
}
$sth->finish;
! $template->param( startmenureport => join ('', startmenu('report')),
! endmenureport => join ('', endmenu('report')),
! todaysdate => $todaysdate,
! overdueloop => address@hidden );
!
! print "Content-Type: text/html\n\n", $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha overdue.pl,1.2.2.2,1.2.2.3,
Andrew Arensburger <=