Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 5efd42900bb3cc976dc6878e1b04ffdb7d60d569 (plain) (blame)
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
<?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">&#160;</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>

Back to the top