| <?php |
| /******************************************************************************* |
| * Copyright (c) 2004-2015 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Denis Roy (Eclipse Foundation)- initial API and implementation |
| *******************************************************************************/ |
| |
| ob_start(); |
| ?> |
| <link rel="stylesheet" type="text/css" href="../css/stylesheet.css" /> |
| <div id="maincontent" style="padding:8px;"> |
| <h1 style="padding-top:10px;"><?= $pageTitle ?></h1> |
| |
| <?php include("inc/en_stats_criteria.php"); ?> |
| <table width="100%"> |
| <tr class="datahdr"> |
| <td>File</td> |
| <td>Date</td> |
| <td align="right">Count</td> |
| </tr> |
| <?php |
| $i = 0; |
| $dl_count = 0; |
| $file_dl_count = 0; |
| |
| $file = ""; |
| $prev_file = ""; |
| foreach ($objJSON->rows as $row) { |
| $i++; |
| $file = $row->file_name; |
| $dl_count += $row->file_count; |
| |
| if($file == $prev_file) { |
| $file = ""; |
| $file_dl_count += $row->file_count; |
| } |
| else { |
| if($i > 1) { |
| |
| ?> |
| <tr class="datahdr"> |
| <td colspan="2"><b>Total for <?= $prev_file ?></b></td> |
| <td align="right"><b><?= $file_dl_count ?><b></td> |
| </tr> |
| <tr> |
| <td colspan="3"> </td |
| </tr> |
| <?php |
| # sum for this file |
| } |
| $prev_file = $file; |
| $file_dl_count = $row->file_count; |
| |
| } |
| |
| ?> |
| |
| <tr class="data<?= $i % 2 ?>"> |
| <td><?= $file ?></td> |
| <td><?= $row->download_date ?></td> |
| <td align="right"><?= $row->file_count ?></td> |
| </tr> |
| |
| |
| <?php |
| } |
| ?> |
| <tr> |
| <td height="7"></td> |
| <td align="right"></td> |
| </tr> |
| |
| <tr class="datahdr"> |
| <td colspan="2"><?= $i ?> record<?= $i > 1 ? "s" : "" ?> found.</td> |
| <td align="right"><?= $dl_count ?></td> |
| </tr> |
| </table> |
| </div> |