PostfixAdmin - web based virtual user administration interface for Postfix mail servers https://postfixadmin.github.io/postfixadmin/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.2 KiB

  1. <?php if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." ); ?>
  2. <div id="overview">
  3. <form name="overview" method="post">
  4. <select name="fDomain" onChange="this.form.submit();">
  5. <?php
  6. for ($i = 0; $i < sizeof ($list_domains); $i++)
  7. {
  8. if ($fDomain == $list_domains[$i])
  9. {
  10. print "<option value=\"$list_domains[$i]\" selected>$list_domains[$i]</option>\n";
  11. }
  12. else
  13. {
  14. print "<option value=\"$list_domains[$i]\">$list_domains[$i]</option>\n";
  15. }
  16. }
  17. ?>
  18. </select>
  19. <input class="button" type="submit" name="go" value="<?php print $PALANG['pViewlog_button']; ?>" />
  20. </form>
  21. </div>
  22. <?php
  23. if (sizeof ($tLog) > 0)
  24. {
  25. print "<table id=\"log_table\">\n";
  26. print " <tr>\n";
  27. print " <td colspan=\"5\"><h3>".$PALANG['pViewlog_welcome']." ".$fDomain."</h3></td>\n";
  28. print " </tr>\n";
  29. print " <tr class=\"header\">\n";
  30. print " <td>" . $PALANG['pViewlog_timestamp'] . "</td>\n";
  31. print " <td>" . $PALANG['pViewlog_username'] . "</td>\n";
  32. print " <td>" . $PALANG['pViewlog_domain'] . "</td>\n";
  33. print " <td>" . $PALANG['pViewlog_action'] . "</td>\n";
  34. print " <td>" . $PALANG['pViewlog_data'] . "</td>\n";
  35. print " </tr>\n";
  36. for ($i = 0; $i < sizeof ($tLog); $i++)
  37. {
  38. if ((is_array ($tLog) and sizeof ($tLog) > 0))
  39. {
  40. $log_data = $tLog[$i]['data'];
  41. $data_length = strlen ($log_data);
  42. if ($data_length > 35) $log_data = substr ($log_data, 0, 35) . " ...";
  43. print " <tr class=\"hilightoff\" onMouseOver=\"className='hilighton';\" onMouseOut=\"className='hilightoff';\" onclick=\"alert('" . $PALANG['pViewlog_data'] . " = " . $tLog[$i]['data'] . "')\">\n";
  44. print " <td nowrap>" . $tLog[$i]['timestamp'] . "</td>\n";
  45. print " <td nowrap>" . $tLog[$i]['username'] . "</td>\n";
  46. print " <td nowrap>" . $tLog[$i]['domain'] . "</td>\n";
  47. print " <td nowrap>" . $PALANG['pViewlog_action_'.$tLog[$i]['action'] ] . "</td>\n";
  48. print " <td nowrap>" . $log_data . "</td>\n";
  49. print " </tr>\n";
  50. }
  51. }
  52. print "</table>\n";
  53. }
  54. ?>