X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fheader.php;h=7dbc6b3e324e7825e7828fd7c5285a4f985ab5a1;hb=ec3907de5b6c1ca85da82232707c85d22e197c11;hp=6b265c89d399883ee7ebcb5eecbc98406f7971aa;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60;p=mailer.git diff --git a/inc/header.php b/inc/header.php index 6b265c89d3..7dbc6b3e32 100644 --- a/inc/header.php +++ b/inc/header.php @@ -16,11 +16,10 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -43,44 +42,31 @@ if (!defined('__SECURITY')) { die(); } // END - if -// 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) { - // Determine the page title - $content['header_title'] = determinePageTitle(); - - // Output page header code - loadTemplate('page_header', false, $content); - - // Include meta data in 'guest' module - if (getModule() == 'index') { - // Load meta data template - loadTemplate('metadata'); +// Init header +$GLOBALS['__page_header'] = ''; - // Add meta description to header - if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) { - // Add meta description not in admin and login module and when the script is installed - generateMetaDescriptionCode(getModule(), getWhat()); - } // END - if - } // END - if - - // Include more header data here - loadTemplate('header'); +// Is the header already sent? +if (($GLOBALS['__header_sent'] != 1) && ($GLOBALS['__header_sent'] != 2)) { + // Set default HTTP status to "200 OK" + setHttpStatus('200 OK'); - // Include stylesheet - loadIncludeOnce('inc/stylesheet.php'); + // If not in CSS mode generate the header + if ((!isCssOutputMode()) && (!isAjaxOutputMode()) && (!isImageOutputMode())) { + // Prepare the header for HTML output + loadHtmlHeader(); } // END - if // Closing HEAD tag - if (getOutputMode() != 1) outputHtml(''); - if ($GLOBALS['header_sent'] == '0') $GLOBALS['header_sent'] = 1; + if ($GLOBALS['__header_sent'] == '0') { + $GLOBALS['__header_sent'] = 1; + } // END - if } // END - if // Add BODY tag or not? -if ((getOutputMode() != 1) && (getOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) { +// @TODO Find a way to not use direct module comparison +if ((!isCssOutputMode()) && (!isRawOutputMode()) && ($GLOBALS['__header_sent'] == 1) && (getModule() != 'frametester') && (!isFramesetModeEnabled())) { loadTemplate('page_body'); - $GLOBALS['header_sent'] = 2; + $GLOBALS['__header_sent'] = 2; } // END - if // [EOF]