X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fheader.php;h=8fa1486a728132568023dcc1b5a7b632fee2337d;hb=eb05b523c3f89d39cc4a3307aba7c141e38ab68c;hp=e336ea5b6fe0331a2e58d2ab8c46208511d408c7;hpb=fff3e2abc8ffb5a086fbf0f3a7d6b9f2ff5ddaed;p=mailer.git
diff --git a/inc/header.php b/inc/header.php
index e336ea5b6f..8fa1486a72 100644
--- a/inc/header.php
+++ b/inc/header.php
@@ -1,7 +1,7 @@
\n");
- $header = 1;
- }
-
- // Set unsetted variables
- if (empty($_GET['frame'])) $_GET['frame'] = "";
-
- // Load body or not
- if (((!frameset_active) && ($GLOBALS['module'] != "frametester")) || (($header == "1") && ($GLOBALS['module'] == "frametester") && (!empty($_GET['frame']))) && ($CSS != "1")) {
- // Is the header sent and the script is not the mail confirmation script and not a CSS?
- if (($header == "1") && (basename($_SERVER['PHP_SELF']) != "mailid.php") && ($CSS != "1")) {
- // Add BODY tag
- LOAD_TEMPLATE("page_body");
- $header = 2;
- }
- }
-} else {
- // Something is missing
- die ("Fatal error: You have to define frameset_active!");
-}
-//
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Init header
+$GLOBALS['page_header'] = '';
+
+// Is the header already sent?
+if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) {
+ // If not in CSS mode generate the header
+ if (getOutputMode() != 1) {
+ // Prepare the header for HTML output
+ loadHtmlHeader();
+ } // END - if
+
+ // Closing HEAD tag
+ if ($GLOBALS['header_sent'] == '0') $GLOBALS['header_sent'] = 1;
+} // END - if
+
+// Add BODY tag or not?
+if ((getOutputMode() != 1) && (getOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestParameterSet('frame')))) {
+ loadTemplate('page_body');
+ $GLOBALS['header_sent'] = 2;
+} // END - if
+
+// [EOF]
?>