46 lines
1.6 KiB
Smarty
46 lines
1.6 KiB
Smarty
<?php if (count($list_domains) > 0) { ?>
|
|
<div id="overview">
|
|
<form name="viewlog" method="get">
|
|
<select name="domain" onChange="this.form.submit()";>
|
|
<?php
|
|
if (count($list_domains) > 0) {
|
|
foreach ($list_domains as $row) {
|
|
echo '<option value="' . $row['domain'] . '"';
|
|
if ($list_domains[$domain_key]['domain'] == $row['domain']) echo ' selected';
|
|
echo ">" . $row['domain'] . "</option>";
|
|
}
|
|
}
|
|
?>
|
|
</select>
|
|
<input class="button" type="submit" name="go" value="<?php echo $LANG['Viewlog_button']; ?>" />
|
|
</form>
|
|
</div>
|
|
<?php
|
|
if (count($log ?? array()) > 0) {
|
|
echo "<table id=\"log_table\">";
|
|
echo "<tr>";
|
|
echo "<td colspan=\"5\"><h3>" . $LANG['Viewlog_welcome'] . " " . $domain . " (last ". LOG_SIZE . " entries)</h3></td>";
|
|
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>";
|
|
foreach ($log as $row) {
|
|
if (strlen($row['data']) > 40) $row['data'] = substr($row['data'], 0, 40) . " ...";
|
|
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>";
|
|
}
|
|
echo "</table>";
|
|
echo "<p />";
|
|
}
|
|
?>
|
|
<?php } ?>
|