Subversion Repositories ALCASAR

Rev

Rev 1846 | Rev 2527 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
324 richard 1
<form action="stats.php" method="get">
2
<table border=0 width=600 cellpadding=2 cellspacing=0>
3
<tr>
4
	<td align=left>
5
	<table border=0 cellspacing=0 cellpadding=2>
6
	<tr valign=bottom>
7
		<td><small><b>De </td>
8
		<td><small><b>&agrave; </td>
9
		<td><small><b>usager</td>
10
		<td><small><b>sur le serveur</td>
11
		<td>&nbsp;</td>
12
		</tr>
13
	<tr valign=middle>
14
<?php
1831 raphael.pi 15
if(!isset($login))
16
{
17
	$login = "";
18
}
324 richard 19
echo <<<EOM
20
		<td valign=middle><input type="text" name="after"  size="12" value="$after" ></td>
21
		<td valign=middle><input type="text" name="before" size="12" value="$before"></td>
22
		<td valign=middle><input type="text" name="login"  size="12" value="$login" ></td>
23
		<td valign=middle><select name="server" size=1>
24
EOM;
25
foreach($servers as $key => $val)
26
	echo <<<EOM
27
	<option value="$val">$key
28
EOM;
29
?>
30
		</select></td>
31
		<td valign=middle><input type="submit" class=button value="Go"></td>
32
		</tr>
33
	</table>
34
	</td>
35
</tr>
36
<tr>
37
<td><hr size=1 noshade></td>
38
</tr>
39
<tr>
40
	<td valign=top>
1956 raphael.pi 41
	<tr>	<td align=center valign=top width=100"%">
324 richard 42
		<small>
43
		<font color="darkblue"><b><?php echo $date ?></b></font>
44
		</td>
45
		<td align=center valign=top width="10%">&nbsp;</td>
46
		<td align=center valign=top width="45%"><small>
47
		P&eacute;riode observ&eacute;e :<br>
48
<?php
49
echo <<<EOM
50
		<b>$after</b>  &agrave;  <b>$before</b>
51
EOM;
52
?>
53
		</td>
54
		</tr>
55
	</table>
56
	</td>
57
</tr>
58
<tr>
59
	<td align=center><h1><b>Statistiques d'utilisation journali&egrave;re</td>
60
</tr>
61
<tr>
62
	<td valign=top>
63
	<table border=0 width="100%">
64
	<tr>
65
		<td colspan=2>
66
		<center>
67
		Statistiques pour 
68
<?php
69
if ($login == '')
70
	echo <<<EOM
71
<b><font color="darkblue">tous</font></b> les usagers
72
EOM;
73
else
74
	echo <<<EOM
75
l'usager <b><font color="darkblue">$login</font></b>
76
EOM;
77
?>
78
	</td>
79
	</tr>
80
	</table>
81
	</td>
82
</tr>
83
 
84
<tr>
85
	<td>
86
	<table border=0 cellpadding=0 cellspacing=0 width="100%">
87
	<tr>	<td colspan=2><hr size=1 noshade>
88
		</td>
89
		</tr>
90
 
91
	</table>
92
	</td>
93
	</tr>
94
<tr>
95
	<td align="center">
1831 raphael.pi 96
 
97
 
98
 
324 richard 99
	<tr>
100
		<td>Champs affich&eacute;s :</td><td colspan=10 align=center nowrap><select name="column1">
1846 raphael.pi 101
		<option <?php if(isset($selected1['sessions'])){print($selected1['sessions']);} ?> value="sessions">Nbre de sessions
102
		<option <?php if(isset($selected1['usage'])){print($selected1['usage']);} ?> value="usage">Temps d'utilisation total
324 richard 103
		<option value="upload">------------------
1846 raphael.pi 104
		<option <?php if(isset($selected1['upload'])){print($selected1['upload']);} ?> value="upload">uploads
105
		<option <?php if(isset($selected1['download'])){print($selected1['download']);} ?> value="download">downloads
324 richard 106
	</select> <select name="column2">
1846 raphael.pi 107
		<option <?php if(isset($selected2['sessions'])){print($selected2['sessions']);} ?> value="sessions">Nbre de sessions
108
		<option <?php if(isset($selected2['usage'])){print($selected2['usage']);} ?> value="usage">Temps d'utilisation total
324 richard 109
		<option	value="upload">------------------
1846 raphael.pi 110
		<option <?php if(isset($selected2['upload'])){print($selected2['upload']);} ?> value="upload">uploads
111
		<option <?php if(isset($selected2['download'])){print($selected2['download']);} ?> value="download">downloads
324 richard 112
	</select> <select name="column3">
1846 raphael.pi 113
		<option <?php if(isset($selected3['sessions'])){print($selected3['sessions']);} ?> value="sessions">Nbre de sessions
114
		<option <?php if(isset($selected3['usage'])){print($selected3['usage']);} ?> value="usage">Temps d'utilisation total
324 richard 115
		<option value="upload">------------------
1846 raphael.pi 116
		<option <?php if(isset($selected3['upload'])){print($selected3['upload']);} ?> value="upload">uploads
117
		<option <?php if(isset($selected3['download'])){print($selected3['download']);} ?> value="download">downloads
1831 raphael.pi 118
 
119
 
324 richard 120
		</select>
121
		</td>
122
	</tr>
123
	<tr>
124
		<td colspan=10 align=center valign=middle>
125
		<table border=0 width="100%">
126
		<tr>
1956 raphael.pi 127
			<td width=100% align=left>
324 richard 128
			<table border=0 cellpadding=0 cellspacing=0>
129
			<tr>
130
			<td align=right><input type="submit" class=button value="Rafra&icirc;chir"></td>
131
			</tr>
132
			</table>
133
			</td>
134
		</tr>
135
		</table>
136
		</td>
137
	</tr>
138
	</table>
139
	</td>
140
	<tr>
141
	<td colspan=10 height=20><img src="images/pixel.gif"></td>
142
	</tr>
143
	<tr>
144
		<td colspan=10 height=20 align=center>
145
		<tr valign=top>
1956 raphael.pi 146
				<td width=100%></td>
324 richard 147
				<td bgcolor="black" width=200>
148
					<table border=0 width=100% cellpadding=2 cellspacing=0>
1956 raphael.pi 149
					<tr bgcolor="#666666" align=center valign=top><th>
324 richard 150
							<font color="white">Analyse journali&egrave;re</font>&nbsp;
151
					</table>
152
				</td></tr>
153
		<tr valign=top><td colspan=2>
154
			<tr><td>
155
				<p>
156
				<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ffffe0" valign=top>
157
				<tr bgcolor="#d0ddb0">
158
					<th>date</th>
159
<?php
160
echo <<<EOM
161
	<th colspan=3>$message[$column1]</th>
162
	<th colspan=3>$message[$column2]</th>
163
	<th colspan=3>$message[$column3]</th>
164
EOM;
165
?>
166
				</tr>
167
<?php
168
	for($i = 0; $i <= $num_days; $i++){
169
		$day = $days[$i];
170
		$trcolor = ($i % 2) ? "#f7f7e4" : "#efefe4";
171
		echo <<<EOM
172
	<tr align=center bgcolor="$trcolor">
173
		<td>$day</td>
174
		<td>{$data[$day][1]}</td>
175
		<td>{$perc[$day][1]}</td>
176
		<td align=left height=14>
177
			<table border=0 cellpadding=0>
178
			<tr>
179
				<td bgcolor="{$color[$day][1]}" width={$width[$day][1]}><img border=0 height=14 width={$width[$day][1]} src="images/pixel.gif" alt="the $message[$column1] for $day is {$data[$day][1]}"></td>
180
			</tr>
181
			</table>
182
		</td>
183
		<td>{$data[$day][2]}</td>
184
		<td>{$perc[$day][2]}</td>
185
		<td align=left height=14>
186
			<table border=0 cellpadding=0>
187
			<tr>
188
				<td bgcolor="{$color[$day][2]}" width={$width[$day][2]}><img border=0 height=14 width={$width[$day][2]} src="images/pixel.gif" alt="the $message[$column3] for $day is {$data[$day][2]}"></td>
189
			</tr>
190
			</table>
191
		</td>
192
		<td>{$data[$day][3]}</td>
193
		<td>{$perc[$day][3]}</td>
194
		<td align=left height=14>
195
			<table border=0 cellpadding=0>
196
			<tr>
197
			<td bgcolor="{$color[$day][3]}" width={$width[$day][3]}><img border=0 height=14 width={$width[$day][3]} src="images/pixel.gif" alt="the $message[$column3] for $day is {$data[$day][3]}"></td>
198
			</tr>
199
			</table>
200
		</td>
201
		</tr>
202
EOM;
203
}
204
?>
205
</table>
206
</td></tr>
207
</table>
208
</td></tr>
209
</table>
210
</td></tr>
211
</table>
212
<p>
1956 raphael.pi 213
<table border=0 width=100% cellpadding=1 cellspacing=1>
324 richard 214
<tr valign=top>
215
<td width=440></td>
1956 raphael.pi 216
	<tr bgcolor="#666666" align=center valign=top><th>
324 richard 217
	<font color="white">R&eacute;capitulatif journalier</font>&nbsp;
218
	</th></tr>
219
	</table>
220
</td></tr>
221
<tr bgcolor="black" valign=top><td colspan=2>
222
	<table border=0 width=100% cellpadding=12 cellspacing=0 bgcolor="#ffffd0" valign=top>
223
	<tr><td>
224
<p>
225
	<table border=1 bordercolordark=#ffffe0 bordercolorlight=#000000 width=100% cellpadding=2 cellspacing=0 bgcolor="#ff
226
ffe0" valign=top>
227
	<tr bgcolor="#d0ddb0">
228
	<th>&nbsp;</th>
229
<?php
230
echo <<<EOM
231
	<th>$message[$column1]</th>
232
	<th>$message[$column2]</th>
233
	<th>$message[$column3]</th>
234
EOM;
235
?>
236
	</tr>
237
<?php
238
echo <<<EOM
239
		<tr align=center bgcolor="#efefe4">
240
			<td>maximum</td>
1831 raphael.pi 241
			<td>{$data['max'][1]}</td>
242
			<td>{$data['max'][2]}</td>
243
			<td>{$data['max'][3]}</td>
324 richard 244
			</tr>
245
		<tr align=center bgcolor="#f7f7e4">
246
			<td>moyenne</td>
1831 raphael.pi 247
			<td>{$data['avg'][1]}</td>
248
			<td>{$data['avg'][2]}</td>
249
			<td>{$data['avg'][3]}</td>
324 richard 250
			</tr>
251
		<tr align=center bgcolor="#efefe4">
252
			<td>r&eacute;capitulatif</td>
1831 raphael.pi 253
			<td>{$data['sum'][1]}</td>
254
			<td>{$data['sum'][2]}</td>
255
			<td>{$data['sum'][3]}</td>
324 richard 256
			</tr>
257
EOM;
258
?>
259
</table>
260
		</table>
261
		</td></tr>
262
	</table>
263
	</td></tr>
264
</table>
265
</form>
266
</center>
267
</body>
268
</html>