Subversion Repositories ALCASAR

Rev

Rev 1956 | Rev 2858 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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