[r568]: kohaReports / trunk / usageByItemType-PreviousYear / usageByItemType.tpl Maximize Restore History

Download this file

usageByItemType.tpl    87 lines (72 with data), 2.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
## Copyright 2006 Kyle Hall
## This file is part of koha-tools.
## koha-tools is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## koha-tools is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with koha-tools; if not, write to the Free Software
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/**
* This report generates a list of patrons by type, displaying the category code, description, and number of patrons.
* This file is a template that displays the data pulled in patronsByType.php.
* @package koha-tools
* @subpackage koha-reports
* @author Kyle Hall
* @copyright 2006
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="../styles.css" rel="stylesheet" type="text/css" />
<title>Usage by Item Types</title>
</head>
<body>
<div align="center">
<h2>Usage by Item Type - 12 Month Analysis</h2>
</div>
<?php
$colors[0] = 'odd';
$colors[1] = 'even';
$color = 1;
$months = array();
?>
<table width="100%" border="0">
<thead>
<tr>
<th>Item Type</th>
<?php foreach ( $stats as $key => $value ) : ?>
<th><?=$key?></th>
<?php $months[] = $key; ?>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach( $itemtypes as $itemtype ) : ?>
<tr class="<?=$colors[$color]?>" >
<td> <?=$itemtype['itemtype']?> </td>
<?php foreach ( $months as $month ): ?>
<td> <?=$stats[ $month ][ $itemtype['itemtype'] ]?> </td>
<?php endforeach; ?>
</tr>
<?php $color = !$color; ?>
<?php endforeach; ?>
</tbody>
<tfoot>
<tr>
<td>Totals</td>
<?php foreach( $months as $month ) : ?>
<td><?=$stats[ $month ][ 'Totals' ]?></td>
<?php endforeach; ?>
</tr>
</tfoot>
</table>
</body>
</html>