X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=surfbar.php;h=1dc43451c404946ce55bc829dcac3d52e915e01b;hp=cacbe4e64fcd13a1a74ae2622475bf57bbcbd05e;hb=fc9a6d12d5143014c74aa0e9ed0810b93f20b118;hpb=c8d76610eb94093d4eed4fcd8a6cb72e74c8f6d8 diff --git a/surfbar.php b/surfbar.php index cacbe4e64f..1dc43451c4 100644 --- a/surfbar.php +++ b/surfbar.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2011 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 * @@ -41,8 +41,8 @@ require('inc/libs/security_functions.php'); // Init start time $GLOBALS['startTime'] = microtime(true); -// Set module -$GLOBALS['module'] = 'surfbar'; +// Set module output mode +$GLOBALS['__module'] = 'surfbar'; $GLOBALS['output_mode'] = '0'; $GLOBALS['header_sent'] = 3; @@ -53,7 +53,7 @@ require('inc/config-global.php'); setContentType('text/html'); // Is a frame active? -if (isGetRequestParameterSet('frame')) { +if (isGetRequestElementSet('frame')) { // Then we need to set header_sent to 0 $GLOBALS['header_sent'] = '0'; } // END - if @@ -66,20 +66,20 @@ if (!isMember()) { // Should we display login window or redirect to main page? if ((getConfig('surfbar_guest_login_form') == 'Y') && (isExtensionActive('user'))) { // Is the form sent? - if ((isFormSent()) && (isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password'))) { + if ((isFormSent()) && (isPostRequestElementSet('id')) && (isPostRequestElementSet('password'))) { // Do the login procedure - $URL = doUserLogin(postRequestParameter('id'), postRequestParameter('password'), basename(__FILE__), basename(__FILE__) . '?code='); + $url = doUserLogin(postRequestElement('id'), postRequestElement('password'), basename(__FILE__), basename(__FILE__) . '?code='); // And redirect to the URL - redirectToUrl($URL); + redirectToUrl($url); } else { // Load header loadIncludeOnce('inc/header.php'); // Is there a 'code' provided? - if (isGetRequestParameterSet('code')) { + if (isGetRequestElementSet('code')) { // Then generate an error message - loadTemplate('admin_settings_saved', false, getMessageFromErrorCode(getRequestParameter('code'))); + displayMessage(getMessageFromErrorCode(getRequestElement('code'))); } // END - if // Display login form @@ -104,13 +104,13 @@ SURFBAR_INIT(); SURFBAR_HANDLE_SELF_MAINTENANCE(); // Is there a check value? -if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in_array(getRequestParameter('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) { +if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestElementSet('frame')) && (in_array(getRequestElement('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) { // Reload-lock is full, surfbar stopped so... // Load header loadIncludeOnce('inc/header.php'); // Load template - if (((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'stop2')) || (!isGetRequestParameterSet('frame'))) { + if (((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'stop2')) || (!isGetRequestElementSet('frame'))) { // Load template for "start" page loadTemplate('surfbar_frame_start'); @@ -118,8 +118,8 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in loadTemplate('surfbar_start_banner'); // This makes the footer appear again - unsetGetRequestParameter('frame'); - } elseif ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'stats')) { + unsetGetRequestElement('frame'); + } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'stats')) { // Prepare content $content = array( 'points' => getTotalPoints(getMemberId()), @@ -128,7 +128,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in // Load template for "stats" page loadTemplate('surfbar_frame_stats', false, $content); - } elseif ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'textlinks')) { + } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'textlinks')) { // Prepare content $content = array( 'reload' => (getConfig('surfbar_stats_reload') * 1000) @@ -146,14 +146,14 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in // Load template for stopped surfbar loadTemplate('surfbar_stopped', false, $content); } -} elseif ((isGetRequestParameterSet('check')) && (isGetRequestParameterSet('id')) && (isGetRequestParameterSet('salt'))) { +} elseif ((isGetRequestElementSet('check')) && (isGetRequestElementSet('id')) && (isGetRequestElementSet('salt'))) { // Dummy next id get - SURFBAR_DETERMINE_NEXT_ID(getRequestParameter('id')); + SURFBAR_DETERMINE_NEXT_ID(getRequestElement('id')); // Check reload lock and validation code - if ((!SURFBAR_CHECK_RELOAD_LOCK(getRequestParameter('id'))) && (SURFBAR_CHECK_VALIDATION_CODE(getRequestParameter('id'), getRequestParameter('check'), getRequestParameter('salt')))) { + if ((!SURFBAR_CHECK_RELOAD_LOCK(getRequestElement('id'))) && (SURFBAR_CHECK_VALIDATION_CODE(getRequestElement('id'), getRequestElement('check'), getRequestElement('salt')))) { // Lock the URL (id) down - SURFBAR_LOCKDOWN_ID(getRequestParameter('id')); + SURFBAR_LOCKDOWN_ID(getRequestElement('id')); // Code is valid so pay points here SURFBAR_PAY_POINTS(); @@ -163,6 +163,9 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in // Then load waiting page SURFBAR_RELOAD_TO_STOP_PAGE(); } // END - if + + // Load header to avoid a bug + loadIncludeOnce('inc/header.php'); } else { // Reload to stop frame! SURFBAR_RELOAD_TO_STOP_PAGE(); @@ -174,16 +177,11 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in // Prepare content $content = ''; - // Determine template name - $templateName = SURFBAR_DETERMINE_TEMPLATE_NAME(); - - // Load header in frameset mode is the default - $isFrameset = true; - // Frame "top" set? - if ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'top')) { + if ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'top')) { // Determine next id $nextId = SURFBAR_DETERMINE_NEXT_ID(); + //* DEBUG: */ die('nextId='.$nextId); // Is there a valid id? if ($nextId > 0) { @@ -199,14 +197,17 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in // Load new URL SURFBAR_RELOAD_TO_STOP_PAGE('stop'); } - } elseif ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'start')) { + } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'start')) { // Starter frame found so let the footer display - unsetGetRequestParameter('frame'); + unsetGetRequestElement('frame'); } // Load header loadIncludeOnce('inc/header.php'); + // Determine template name + $templateName = SURFBAR_DETERMINE_TEMPLATE_NAME(); + // Load that template //* DEBUG: */ die('templateName=' . $templateName . '
content=
' . print_r($content, true) . '
'); loadTemplate($templateName, false, $content);