Subversion Repositories ALCASAR

Rev

Rev 2979 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 2979 Rev 3028
Line 149... Line 149...
149
<meta http-equiv="Content-Type" content="text/html; charset=<?= $config['general_charset'] ?>">
149
<meta http-equiv="Content-Type" content="text/html; charset=<?= $config['general_charset'] ?>">
150
<title>Activity</title>
150
<title>Activity</title>
151
<link rel="stylesheet" type="text/css" href="/css/acc.css">
151
<link rel="stylesheet" type="text/css" href="/css/acc.css">
152
</head>
152
</head>
153
<body>
153
<body>
-
 
154
<div id="ldoverlay" class="overlay">
-
 
155
	<div class="lds-spinner" id="spinner"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div>
-
 
156
</div>
154
<table width="100%" border="0" cellspacing="0" cellpadding="0">
157
<table width="100%" border="0" cellspacing="0" cellpadding="0">
155
<tr><th><?= $l_activity ?></th></tr>
158
<tr><th><?= $l_activity ?></th></tr>
156
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
159
<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
157
</table>
160
</table>
158
<table width="100%" border=1 cellspacing=0 cellpadding=1>
161
<table width="100%" border=1 cellspacing=0 cellpadding=1>
Line 218... Line 221...
218
						echo "</td><td>";
221
						echo "</td><td>";
219
						echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
222
						echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
220
						echo "<input type=\"hidden\" name=\"mac_addr\" value=\"$detail[0]\">";
223
						echo "<input type=\"hidden\" name=\"mac_addr\" value=\"$detail[0]\">";
221
						if($IoT_capture == "on"){
224
						if($IoT_capture == "on"){
222
							if(exec('sudo /usr/local/bin/alcasar-iot_capture.sh -i '.$detail[0]) == "CaptureON"){
225
							if(exec('sudo /usr/local/bin/alcasar-iot_capture.sh -i '.$detail[0]) == "CaptureON"){
223
								echo "<input type=\"submit\" name=\"action\" value=\"$l_stop_capture_disconnect\">";
226
								echo "<input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_stop_capture_disconnect\">";
224
								echo "<input type=\"submit\" name=\"action\" value=\"$l_captureoff\">";
227
								echo "<input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_captureoff\">";
225
							}
228
							}
226
 							else {
229
 							else {
227
								echo "<input type=\"submit\" name=\"action\" value=\"$l_disconnect\">";
230
								echo "<input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_disconnect\">";
228
								echo "<br><input type=\"submit\" name=\"action\" value=\"$l_captureonly_on\">";
231
								echo "<br><input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_captureonly_on\">";
229
								$file = '/var/Save/iot_captures/'.$detail[0].'.pcap';
232
								$file = '/var/Save/iot_captures/'.$detail[0].'.pcap';
230
								if (file_exists($file))	{
233
								if (file_exists($file))	{
231
									echo "<br><center><a href=\"/save/iot_captures/$detail[0].pcap\">$detail[0].pcap</a> (";echo taille_fichier("/var/Save/iot_captures/".$detail[0].".pcap");echo ")</center>";
234
									echo "<br><center><a href=\"/save/iot_captures/$detail[0].pcap\">$detail[0].pcap</a> (";echo taille_fichier("/var/Save/iot_captures/".$detail[0].".pcap");echo ")</center>";
232
								}
235
								}
233
							}	
236
							}	
234
						}
237
						}
235
						else echo "<input type=\"submit\" name=\"action\" value=\"$l_disconnect\">";
238
						else echo "<input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_disconnect\">";
236
						echo "</form></td>";
239
						echo "</form></td>";
237
					}
240
					}
238
				}
241
				}
239
				else { // The user is a humanoide ;-)
242
				else { // The user is a humanoide ;-)
240
					if ($cn != '-') { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5] ($cn)</a>";}
243
					if ($cn != '-') { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5] ($cn)</a>";}
241
					else { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5]</a>";}
244
					else { echo "<a href=\"/acc/manager/htdocs/user_admin.php?login=$detail[5]\" title=\"$l_edit_user $detail[5]\">$detail[5]</a>";}
242
					echo "<td>";
245
					echo "<td>";
243
					echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
246
					echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
244
					echo "<input type=\"hidden\" name=\"mac_addr\" value=\"$detail[0]\">";
247
					echo "<input type=\"hidden\" name=\"mac_addr\" value=\"$detail[0]\">";
245
					echo "<input type=\"submit\" name=\"action\" value=\"$l_disconnect\">";
248
					echo "<input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_disconnect\">";
246
					echo "</form></td>";
249
					echo "</form></td>";
247
				}
250
				}
248
			}
251
			}
249
			// equipment without authenticated user
252
			// equipment without authenticated user
250
			else if (($detail[0] == $intif_mac_addr) || ($detail[1] == $private_ip)){ 
253
			else if (($detail[0] == $intif_mac_addr) || ($detail[1] == $private_ip)){ 
Line 259... Line 262...
259
				echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
262
				echo "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"POST\">";
260
				# Dissociate user (... or other) who is not connected yet
263
				# Dissociate user (... or other) who is not connected yet
261
				echo "<input type=\"hidden\" name=\"mac_addr\" value=\"$detail[0]\">";
264
				echo "<input type=\"hidden\" name=\"mac_addr\" value=\"$detail[0]\">";
262
				exec ("grep $detail[0] /usr/local/etc/alcasar-ethers-info", $mac_in_ether_file);
265
				exec ("grep $detail[0] /usr/local/etc/alcasar-ethers-info", $mac_in_ether_file);
263
				if (empty($mac_in_ether_file[1])){
266
				if (empty($mac_in_ether_file[1])){
264
					echo "<input type=\"submit\" name=\"action\" value=\"$l_dissociate\">"; // Dissociate only MAC not in ether file (dhcp)
267
					echo "<input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_dissociate\">"; // Dissociate only MAC not in ether file (dhcp)
265
				}
268
				}
266
				echo "<input type=\"submit\" name=\"action\" value=\"$l_connect\">"; // Enable temporarily @MAC access
269
				echo "<input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_connect\">"; // Enable temporarily @MAC access
267
				if($IoT_capture == "on"){
270
				if($IoT_capture == "on"){
268
					if(exec('sudo /usr/local/bin/alcasar-iot_capture.sh -i '.$detail[0]) == "CaptureON"){
271
					if(exec('sudo /usr/local/bin/alcasar-iot_capture.sh -i '.$detail[0]) == "CaptureON"){
269
						echo "<br><input type=\"submit\" name=\"action\" value=\"$l_captureoff\">";
272
						echo "<br><input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_captureoff\">";
270
					}
273
					}
271
					else {
274
					else {
272
						echo "<br><input type=\"submit\" name=\"action\" value=\"$l_captureon\">";
275
						echo "<br><input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_captureon\">";
273
						echo "<input type=\"submit\" name=\"action\" value=\"$l_captureonly_on\">";
276
						echo "<input type=\"submit\" onClick=\"document.getElementById('ldoverlay').style.display='block';\" name=\"action\" value=\"$l_captureonly_on\">";
274
						$file = '/var/Save/iot_captures/'.$detail[0].'.pcap';
277
						$file = '/var/Save/iot_captures/'.$detail[0].'.pcap';
275
						if (file_exists($file)) {
278
						if (file_exists($file)) {
276
							echo "<br><center><a href=\"/save/iot_captures/$detail[0].pcap\">$detail[0].pcap</a> (";echo taille_fichier("/var/Save/iot_captures/".$detail[0].".pcap");echo ")</center>";
279
							echo "<br><center><a href=\"/save/iot_captures/$detail[0].pcap\">$detail[0].pcap</a> (";echo taille_fichier("/var/Save/iot_captures/".$detail[0].".pcap");echo ")</center>";
277
						}
280
						}
278
					}
281
					}