-
Notifications
You must be signed in to change notification settings - Fork 51
/
summaryBrowsersCard.php
32 lines (30 loc) · 2.59 KB
/
summaryBrowsersCard.php
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
<?php
include_once('./inc/browsers.inc.php');
include_once('./inc/browserGeo.inc.php');
require('./vendor/autoload.php');
?>
<?php
$hookedBrowsersList = getHookedBrowsers();
foreach ($hookedBrowsersList as $row) {
$ua_info = parse_user_agent($row['userAgent']);
$geoloc = getGeoloc($row['browserId'], $row['publicIP']);
?>
<tr>
<td class="bg-transparent text-light text-center"><a href="browserDetails.php?browserId=<?php echo htmlspecialchars($row['browserId']) ?>&page=overview" class="clientID"><?php echo htmlspecialchars($row['browserId']) ?></a></td>
<td class="bg-transparent align-middle"><img src="./images/<?php echo (isAlive($row['lastHeatbeat']) ? 'online' : 'offline') ?>_button.png" height="20" width="20"/></td>
<td class="bg-transparent text-light text-center"><?php echo htmlspecialchars(date("d/m/Y H:i:s", strtotime($row['lastHeatbeat']))) ?> (UTC)</td>
<td class="bg-transparent text-light text-center"><?php echo htmlspecialchars(date("d/m/Y H:i:s", strtotime($row['hookedDate']))) ?> (UTC)</td>
<td class="bg-transparent align-middle"><img src="./images/user_agent/platform/<?php echo htmlspecialchars(getPlatformIcon($ua_info['platform'])) ?>.png" height="20" width="20" title="<?php echo htmlspecialchars($ua_info['platform']) ?>"/></td>
<td class="bg-transparent align-middle"><img src="./images/user_agent/browser/<?php echo htmlspecialchars(getBrowserIcon($ua_info['browser'])) ?>.png" height="20" width="20" title="<?php echo htmlspecialchars($ua_info['browser']) ?>"/></td>
<td class="bg-transparent text-light text-center"><?php echo htmlspecialchars($ua_info['version']) ?></td>
<td class="bg-transparent align-middle"><span class="fi fi-<?php echo htmlspecialchars($geoloc['countryCode']) ?> fis" title="<?php echo htmlspecialchars($geoloc['country']) ?>"></span></td>
<td class="bg-transparent text-light text-center"><?php echo htmlspecialchars($row['publicIP']) ?></td>
<td class="bg-transparent text-light text-center"><?php echo htmlspecialchars($row['hostname']) ?></td>
<td class="bg-transparent text-light text-center">
<a class="btn btn-light shadow-none ui-action-icons-details p-1" href="browserDetails.php?browserId=<?php echo htmlspecialchars($row['browserId']) ?>&page=overview" role="button"><i class="bi bi-search"></i></a>
<a class="btn btn-danger shadow-none ui-action-icons-delete p-1" href="index.php?delete=<?php echo htmlspecialchars($row['browserId']) ?>" role="button"><i class="bi bi-trash"></i></a>
</td>
</tr>
<?php
}
?>