X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=surfbar.php;h=2da2cea3a24d336961e972f62e249739ed61c2d0;hb=160c118f767dd39fdef7007c170a5bac4d876b8e;hp=f6092ad36a3d29eb08fb748ab62be17f01a169ee;hpb=2ec9007220186d54f84846871ed1f7638c29baf7;p=mailer.git diff --git a/surfbar.php b/surfbar.php index f6092ad36a..2da2cea3a2 100644 --- a/surfbar.php +++ b/surfbar.php @@ -39,19 +39,24 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init surfbar cache and start time -$GLOBALS['cache_array']['surfbar'] = array(); +// Init start time $GLOBALS['startTime'] = microtime(true); // Set module $GLOBALS['module'] = 'surfbar'; $GLOBALS['refid'] = 0; $GLOBALS['output_mode'] = 0; -$msg = null; +$GLOBALS['header_sent'] = 3; // Load the required file(s) require('inc/config-global.php'); +// Is a frame active? +if (REQUEST_ISSET_GET('frame')) { + // Then we need to set header_sent to 0 + $GLOBALS['header_sent'] = 0; +} // END - if + // Is the script installed? if (!isInstalled()) { // You have to install first! @@ -68,6 +73,9 @@ if (!IS_MEMBER()) { redirectToUrl('modules.php?module=index'); } // END - if +// Initialize the surfbar +SURFBAR_INIT(); + // Handle tasks on self-maintenance SURFBAR_HANDLE_SELF_MAINTENANCE(); @@ -125,7 +133,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( // Load template for stopped surfbar LOAD_TEMPLATE('surfbar_stopped', false, $content); } -} elseif ((REQUEST_ISSET_GET(('check'))) && (REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('salt')))) { +} elseif ((REQUEST_ISSET_GET('check')) && (REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET('salt'))) { // Dummy next id get SURFBAR_DETERMINE_NEXT_ID(REQUEST_GET('id')); @@ -156,6 +164,9 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( // Determine template name $templateName = SURFBAR_DETERMINE_TEMPLATE_NAME(); + // Load header in frameset mode is the default + $isFrameset = true; + // Frame "top" set? if ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'top')) { // Determine next id @@ -168,7 +179,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( 'id' => $nextId, 'check' => SURFBAR_GENERATE_VALIDATION_CODE($nextId), 'salt' => SURFBAR_GET_SALT(), - 'reward' => translateComma(SURFBAR_GET_REWARD($nextId)), + 'points' => translateComma(SURFBAR_GET_REWARD($nextId)), 'url' => SURFBAR_GET_URL($nextId), 'curr_reload' => SURFBAR_GET_USER_LOCKS(), 'max_urls' => SURFBAR_GET_TOTAL_URLS(), @@ -185,9 +196,6 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( } elseif ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'start')) { // Starter frame found so let the footer display REQUEST_UNSET_GET('frame'); - } else { - // Load header in frameset mode - $isFrameset = true; } // Load header @@ -199,6 +207,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array( } // Load footer +$GLOBALS['footer_sent'] = 3; loadIncludeOnce('inc/footer.php'); // [EOF]