opensmtpdadmin/templates/viewlog.tpl
2022-09-05 18:29:41 +00:00

45 lines
1.5 KiB
Smarty

<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."</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']) > 35) $row['data'] = substr($row['data'], 0, 35) . " ...";
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 />";
}
?>