2022-09-06 13:56:05 +02:00
|
|
|
<?php if (count($list_domains) > 0) { ?>
|
2022-08-18 14:01:52 +02:00
|
|
|
<div id="overview">
|
2022-09-04 11:38:47 +02:00
|
|
|
<form name="viewlog" method="get">
|
|
|
|
<select name="domain" onChange="this.form.submit()";>
|
2022-08-18 14:01:52 +02:00
|
|
|
<?php
|
2022-09-04 11:38:47 +02:00
|
|
|
if (count($list_domains) > 0) {
|
|
|
|
foreach ($list_domains as $row) {
|
|
|
|
echo '<option value="' . $row['domain'] . '"';
|
2022-09-04 13:10:23 +02:00
|
|
|
if ($list_domains[$domain_key]['domain'] == $row['domain']) echo ' selected';
|
2022-09-05 20:29:41 +02:00
|
|
|
echo ">" . $row['domain'] . "</option>";
|
2022-08-18 14:01:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
2022-09-04 11:38:47 +02:00
|
|
|
<input class="button" type="submit" name="go" value="<?php echo $LANG['Viewlog_button']; ?>" />
|
2022-08-18 14:01:52 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<?php
|
2022-09-04 16:04:56 +02:00
|
|
|
if (count($log ?? array()) > 0) {
|
2022-09-05 20:29:41 +02:00
|
|
|
echo "<table id=\"log_table\">";
|
2022-09-06 09:40:45 +02:00
|
|
|
echo "<tr>";
|
2022-09-06 16:57:38 +02:00
|
|
|
echo "<td colspan=\"5\"><h3>" . $LANG['Viewlog_welcome'] . " " . $domain . " (last ". LOG_SIZE . " entries)</h3></td>";
|
2022-09-06 09:40:45 +02:00
|
|
|
echo "</tr>";
|
|
|
|
echo "<tr class=\"header\">";
|
|
|
|
echo "<td>" . $LANG['Viewlog_timestamp'] . "</td>";
|
|
|
|
echo "<td>" . $LANG['Viewlog_username'] . "</td>";
|
|
|
|
echo "<td>" . $LANG['Viewlog_domain'] . "</td>";
|
|
|
|
echo "<td>" . $LANG['Viewlog_action'] . "</td>";
|
|
|
|
echo "<td>" . $LANG['Viewlog_data'] . "</td>";
|
|
|
|
echo "</tr>";
|
2022-09-04 11:38:47 +02:00
|
|
|
foreach ($log as $row) {
|
2022-09-06 16:57:38 +02:00
|
|
|
if (strlen($row['data']) > 40) $row['data'] = substr($row['data'], 0, 40) . " ...";
|
2022-09-06 09:40:45 +02:00
|
|
|
echo "<tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\">";
|
|
|
|
echo "<td nowrap>" . $row['timestamp'] . "</td>";
|
|
|
|
echo "<td nowrap>" . $row['username'] . "</td>";
|
|
|
|
echo "<td nowrap>" . $row['domain'] . "</td>";
|
|
|
|
echo "<td nowrap>" . $row['action'] . "</td>";
|
|
|
|
echo "<td nowrap>" . $row['data'] . "</td>";
|
|
|
|
echo "</tr>";
|
2022-08-18 14:01:52 +02:00
|
|
|
}
|
2022-09-05 20:29:41 +02:00
|
|
|
echo "</table>";
|
|
|
|
echo "<p />";
|
2022-08-18 14:01:52 +02:00
|
|
|
}
|
|
|
|
?>
|
2022-09-06 13:56:05 +02:00
|
|
|
<?php } ?>
|