--- a
+++ b/kohaReports/trunk/usageByItemType-PreviousYear/usageByItemType.tpl
@@ -0,0 +1,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>