From: Roland Haeder Date: Thu, 17 Apr 2014 21:10:11 +0000 (+0200) Subject: Use upcoming functions loadPageHeader() and loadPageFooter() instead of include X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=96e99262a97d399f98bb92bc11a5fc9c140ca388;p=mailer.git Use upcoming functions loadPageHeader() and loadPageFooter() instead of include files (which made the script slower). Signed-off-by: Roland Häder --- diff --git a/ajax.php b/ajax.php index f0a04892ee..e5808595dd 100644 --- a/ajax.php +++ b/ajax.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : AJAX-Abfragescript * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -63,7 +58,7 @@ loadIncludeOnce('inc/ajax-functions.php'); initAjax(); // Load header here -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // Process only POST requests and that at least 'level' is set if ((getHttpRequestMethod() == 'POST') && (isPostRequestElementSet('level'))) { @@ -84,7 +79,7 @@ if ((getHttpRequestMethod() == 'POST') && (isPostRequestElementSet('level'))) { } // END - if // Footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/api.php b/api.php index a6524ae02c..dedbd9c5f9 100644 --- a/api.php +++ b/api.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Allgemeines API-Script * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -63,12 +58,12 @@ require('inc/config-global.php'); //initApi(); // Load header here -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // @TODO Do stuff here // Footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/autoreg.php b/autoreg.php index aa1f7d8404..38b93cbe4c 100644 --- a/autoreg.php +++ b/autoreg.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : API-Script fuer ext-autoreg * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -57,12 +52,12 @@ require('inc/config-global.php'); setContentType('text/plain'); // Load header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // @TODO Add processing of request here // Load footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/beg.php b/beg.php index e9877f9699..226e198a44 100644 --- a/beg.php +++ b/beg.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Bettel-Link fuer Mitglieder * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -162,7 +157,7 @@ if (isGetRequestElementSet('userid')) { sqlFreeResult($result); // Include header - loadIncludeOnce('inc/header.php'); + loadPageHeader(); // Load final template loadTemplate('beg_link', FALSE, $content); @@ -182,7 +177,7 @@ if (isGetRequestElementSet('userid')) { } // Include footer - loadIncludeOnce('inc/footer.php'); + loadPageFooter(); } elseif ((getUserData('status') != 'CONFIRMED') && (getUserData('status') != 'failed')) { // Maybe locked/unconfirmed account? $errorCode = generateErrorCodeFromUserStatus(); diff --git a/birthday_confirm.php b/birthday_confirm.php index a54278b22a..b8b74210b6 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Geburtstagsgutschrift bestaetigen * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -121,13 +116,13 @@ sqlFreeResult($result); $GLOBALS['__module'] = 'birthday_confirm'; // Include header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // Load final template and output it loadTemplate('birthday_confirm', FALSE, $content); // Include footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/cron.php b/cron.php index acf0639bc6..14721d1e07 100644 --- a/cron.php +++ b/cron.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Cronjob-Script fuer externen/lokalen Aufruf * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -57,12 +52,12 @@ $GLOBALS['__footer_sent'] = 2; require('inc/config-global.php'); // Load header here -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // @TODO Do stuff here // Footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/css.php b/css.php index 08ae246a69..3b8a281387 100644 --- a/css.php +++ b/css.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Ausgabe der Cascading-Style-Sheets (CSS) * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -55,13 +50,13 @@ require('inc/config-global.php'); setContentType('text/css'); // Load header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // Load CSS code loadInclude('inc/stylesheet.php'); // Load footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/doubler.php b/doubler.php index 46f16f9122..a9b0a2ce50 100644 --- a/doubler.php +++ b/doubler.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Punkteverdoppler * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -177,7 +172,7 @@ if (getDoublerSendMode() == 'DIRECT') { } // END - if // Output header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); if (isValidUserData()) { // Transfer userid/nickname to constant @@ -206,7 +201,7 @@ $content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC'); loadTemplate('doubler_index', FALSE, $content); // Output footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/img.php b/img.php index d9780a6b22..aa6fd1f2e7 100644 --- a/img.php +++ b/img.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Code-Bild fuer verschiedene Zwecke * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -49,7 +44,7 @@ $GLOBALS['__output_mode'] = -3; require('inc/config-global.php'); // Load header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // Code set? if (isGetRequestElementSet('code')) { @@ -67,7 +62,7 @@ if (isGetRequestElementSet('code')) { } // Finish generation here -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/inc/footer.php b/inc/footer.php index 37a86adf4b..f551ef47b7 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -1,63 +1,3 @@ diff --git a/inc/header.php b/inc/header.php index 7dbc6b3e32..f551ef47b7 100644 --- a/inc/header.php +++ b/inc/header.php @@ -1,73 +1,3 @@ diff --git a/inc/module-functions.php b/inc/module-functions.php index f7779d051a..49845ac804 100644 --- a/inc/module-functions.php +++ b/inc/module-functions.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Modulfunktionen * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -488,8 +483,8 @@ function doIncludeModule () { // Set content type setContentType('text/html'); - // The header file - loadIncludeOnce('inc/header.php'); + // Load page header + loadPageHeader(); // Modules are by default not valid! $isModuleValid = FALSE; @@ -522,7 +517,7 @@ function doIncludeModule () { } // END - if // Add the footer (this will call doShutdown()) - loadIncludeOnce('inc/footer.php'); + loadPageFooter(); } // "Getter" for menu mode from given module diff --git a/index.php b/index.php index ee98e09d63..329b0c2bcb 100644 --- a/index.php +++ b/index.php @@ -11,11 +11,6 @@ * Kurzbeschreibung : Index-Seite. Eine simple Weiterleitung auf die * * modules.php * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -58,7 +53,7 @@ setWhat(getIndexHome()); // Shall we display 'home' in index.php? if ((isExtensionInstalledAndNewer('sql_patches', '0.8.3')) && (isDisplayHomeInIndexEnabled())) { - // Include module (and exit in inc/footer.php) + // Include module doIncludeModule(); } // END - if @@ -72,7 +67,7 @@ if ((isSessionVariableSet('visited')) || (getIndexDelay() > -1)) { setContentType('text/html'); // Header - loadIncludeOnce('inc/header.php'); + loadPageHeader(); // Is the index page configured for redirect pr not? if (getConfig('index_cookie') > 0) { @@ -97,7 +92,7 @@ if ((isSessionVariableSet('visited')) || (getIndexDelay() > -1)) { } // END - if // Footer (which will call doShutdown() for us) - loadIncludeOnce('inc/footer.php'); + loadPageFooter(); } else { // Redirect to main page redirectToUrl('modules.php?module=index'); diff --git a/install.php b/install.php index 44559e8996..948cbd9af6 100644 --- a/install.php +++ b/install.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Installationsscript. * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -73,7 +68,7 @@ if ((isInstalled()) && (getRequestElement('install_page') != 'finished')) { } // END - if // Load header here -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // Handle fatal errors runFilterChain('handle_fatal_errors'); @@ -110,7 +105,7 @@ if (isGetRequestElementSet('installer')) { } // Footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/js.php b/js.php index 5594b86993..287edd29c3 100644 --- a/js.php +++ b/js.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Code-Bild fuer verschiedene Zwecke * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -66,7 +61,7 @@ setHttpStatus('404 Not Found'); // Is 'js' is provied? if (isGetRequestElementSet('js')) { // Load header - loadIncludeOnce('inc/header.php'); + loadPageHeader(); // Prepare include file for looking $inc = sprintf('inc/js/js-%s.php', getRequestElement('js')); @@ -81,7 +76,7 @@ if (isGetRequestElementSet('js')) { } // END - if // Load footer - loadIncludeOnce('inc/footer.php'); + loadPageFooter(); } // END - if // Shutdown diff --git a/lead-confirm.php b/lead-confirm.php index 34deb6a63f..12b61064b5 100644 --- a/lead-confirm.php +++ b/lead-confirm.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Alles um den Bestaetigungslink * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -55,7 +50,7 @@ setContentType('text/html'); redirectOnUninstalledExtension('lead'); // Header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // Initialize the array for the template $content = array( @@ -76,7 +71,7 @@ if ((isSessionVariableSet('lead_userid')) && (fetchUserData(getSession('lead_use loadTemplate('lead_code', FALSE, $content); // Footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/mailid.php b/mailid.php index a1b85addaa..90a2210fad 100644 --- a/mailid.php +++ b/mailid.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Bestaetigung von Mails * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -89,7 +84,7 @@ if ((isValidId($data['userid'])) && (isValidId($data['id'])) && (!empty($data['t // No image? if ($data['do'] != 'img') { // ... then output header - loadIncludeOnce('inc/header.php'); + loadPageHeader(); } // END - fi // Init result for below sqlNumRows() function @@ -254,7 +249,7 @@ handleMailIdErrorCode($data['error_code']); // Insert footer if no image if ($data['do'] != 'img') { // Write footer - loadIncludeOnce('inc/footer.php'); + loadPageFooter(); } // END - if // Really all done here... ;-) diff --git a/network-delurl.php b/network-delurl.php index c05da152fc..3f51c9f09e 100644 --- a/network-delurl.php +++ b/network-delurl.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : VCheck Script fuer Erweiterung ext-network * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -55,7 +50,7 @@ setHttpStatus('500 Internal Server Error'); setContentType('text/plain'); // Load header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // Is the required extension installed? if ((isExtensionInstalled('network')) && (countRequestGet() > 0)) { @@ -64,7 +59,7 @@ if ((isExtensionInstalled('network')) && (countRequestGet() > 0)) { } // END - if // Load footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/network-vcheck.php b/network-vcheck.php index e18e81a16b..ce7a708a55 100644 --- a/network-vcheck.php +++ b/network-vcheck.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : VCheck Script fuer Erweiterung ext-network * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -55,7 +50,7 @@ setHttpStatus('500 Internal Server Error'); setContentType('text/plain'); // Load header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); // Is the required extension installed? if ((isExtensionInstalled('network')) && (countRequestGet() > 0)) { @@ -64,7 +59,7 @@ if ((isExtensionInstalled('network')) && (countRequestGet() > 0)) { } // END - if // Load footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/show_bonus.php b/show_bonus.php index daffd41d3d..c5812223ef 100644 --- a/show_bonus.php +++ b/show_bonus.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Rankliste fuer Turbo-Bonus anzeigen * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -55,7 +50,7 @@ setContentType('text/html'); redirectOnUninstalledExtension('bonus'); // Include header -loadIncludeOnce('inc/header.php'); +loadPageHeader(); if ((isValidId(getRequestElement('userid'))) && (getRequestElement('d') > 0) && (isGetRequestElementSet('t'))) { // Set row name @@ -132,7 +127,7 @@ LIMIT 1", loadTemplate('show_bonus', FALSE, $content); // Include footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?> diff --git a/surfbar.php b/surfbar.php index d94497b2a0..700bd62c77 100644 --- a/surfbar.php +++ b/surfbar.php @@ -10,11 +10,6 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Die Surfbar selbst * * -------------------------------------------------------------------- * - * $Revision:: $ * - * $Date:: $ * - * $Tag:: 0.2.1-FINAL $ * - * $Author:: $ * - * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * @@ -74,7 +69,7 @@ if (!isMember()) { redirectToUrl($url); } else { // Load header - loadIncludeOnce('inc/header.php'); + loadPageHeader(); // Is there a 'code' provided? if (isGetRequestElementSet('code')) { @@ -89,7 +84,7 @@ if (!isMember()) { $GLOBALS['__header_sent'] = 2; // Load footer - loadIncludeOnce('inc/footer.php'); + loadPageFooter(); } } else { // Redirect @@ -107,7 +102,7 @@ doSurfbarSelfMaintenance(); if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) { // Reload-lock is full, surfbar stopped so... // Load header - loadIncludeOnce('inc/header.php'); + loadPageHeader(); // Load template if (((!isFullPage()) && (getRequestElement('frame') == 'stop2')) || (isFullPage())) { @@ -165,13 +160,13 @@ if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement(' } // END - if // Load header to avoid a bug - loadIncludeOnce('inc/header.php'); + loadPageHeader(); } else { // Reload to stop frame! redirectToSurfbarStopPage(); } - // All done, so fix notice for footer.php + // All done, so fix notice for loadTemplateFooter() $GLOBALS['__footer_sent'] = 1; } else { // Prepare content @@ -203,7 +198,7 @@ if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement(' } // Load header - loadIncludeOnce('inc/header.php'); + loadPageHeader(); // Determine template name $templateName = determineSurfbarTemplateName(); @@ -215,7 +210,7 @@ if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement(' // Load footer $GLOBALS['__footer_sent'] = 3; -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); // [EOF] ?>