Subversion Repositories ALCASAR

Rev

Rev 2527 | Rev 2861 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

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