opensmtpdadmin/templates/viewlog.tpl

45 lines
1.5 KiB
Smarty
Raw Normal View History

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\">";
echo " <tr>";
echo " <td colspan=\"5\"><h3>".$LANG['Viewlog_welcome']." ".$domain."</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>";
2022-08-18 14:01:52 +02:00
2022-09-04 11:38:47 +02:00
foreach ($log as $row) {
if (strlen($row['data']) > 35) $row['data'] = substr($row['data'], 0, 35) . " ...";
2022-09-05 20:29:41 +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
}
?>