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.

71 lines
2.4 KiB

7 years ago
  1. <?php
  2. if( !defined('POSTFIXADMIN') ) die( "This file cannot be used standalone." );
  3. if( !isset($CONF) || !is_array($CONF) ) {
  4. die("Configuration not loaded. Check " . __FILE__);
  5. }
  6. @header ("Expires: Sun, 16 Mar 2003 05:00:00 GMT");
  7. @header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
  8. @header ("Cache-Control: no-store, no-cache, must-revalidate");
  9. @header ("Cache-Control: post-check=0, pre-check=0", false);
  10. @header ("Pragma: no-cache");
  11. @header ("Content-Type: text/html; charset=UTF-8");
  12. ?>
  13. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  14. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  15. <html xmlns="http://www.w3.org/1999/xhtml">
  16. <head>
  17. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  18. <?php
  19. if (file_exists (realpath ("../".$CONF['theme_favicon']))) {
  20. print "<link rel=\"shortcut icon\" href=\"../".htmlentities($CONF['theme_favicon'])."\" />\n";
  21. } else {
  22. print "<link rel=\"shortcut icon\" href=\"".htmlentities($CONF['theme_favicon'])."\" />\n";
  23. }
  24. if (file_exists (realpath ("../".$CONF['theme_css']))) {
  25. print "<link rel=\"stylesheet\" type=\"text/css\" href=\"../".htmlentities($CONF['theme_css'])."\" />\n";
  26. } else {
  27. print "<link rel=\"stylesheet\" type=\"text/css\" href=\"".htmlentities($CONF['theme_css'])."\" />\n";
  28. }
  29. ?>
  30. <title>Postfix Admin - <?php print $_SERVER['HTTP_HOST']; ?></title>
  31. </head>
  32. <body>
  33. <div id="login_header">
  34. <?php
  35. if (file_exists (realpath ("../".$CONF['theme_logo'])))
  36. {
  37. print "<img id=\"login_header_logo\" src=\"../".htmlentities($CONF['theme_logo'])."\" />\n";
  38. } else {
  39. print "<img id=\"login_header_logo\" src=\"".htmlentities($CONF['theme_logo'])."\" />\n";
  40. }
  41. if (($CONF['show_header_text'] == "YES") and ($CONF['header_text']))
  42. {
  43. print "<h2>" . $CONF['header_text'] . "</h2>\n";
  44. }
  45. ?>
  46. </div>
  47. <?php
  48. if(isset($_SESSION['flash'])) {
  49. if(isset($_SESSION['flash']['info'])) {
  50. echo '<ul class="flash-info">';
  51. foreach($_SESSION['flash']['info'] as $msg) {
  52. echo "<li>$msg</li>";
  53. }
  54. echo '</ul>';
  55. }
  56. if(isset($_SESSION['flash']['error'])) {
  57. echo '<ul class="flash-error">';
  58. foreach($_SESSION['flash']['error'] as $msg) {
  59. echo "<li>$msg</li>";
  60. }
  61. echo '</ul>';
  62. }
  63. /* nuke it from orbit. It's the only way to be sure. */
  64. $_SESSION['flash'] = array();
  65. }
  66. /* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
  67. ?>