Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

header.php 2.0KB

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