]> git.mxchange.org Git - mailer.git/blobdiff - surfbar.php
Fixes for SQL error + missing config
[mailer.git] / surfbar.php
index 9fce26b80c2c3247ac7ddd3d13625f3f195cae91..d94497b2a06c45529d8d1a78d8665c5cbbd1cd2d 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * 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 *
@@ -39,7 +39,7 @@
 require('inc/libs/security_functions.php');
 
 // Init start time
-$GLOBALS['__start_time'] = microtime(true);
+$GLOBALS['__start_time'] = microtime(TRUE);
 
 // Set module output mode
 $GLOBALS['__module']      = 'surfbar';
@@ -127,7 +127,7 @@ if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement('
                );
 
                // Load template for "stats" page
-               loadTemplate('surfbar_frame_stats', false, $content);
+               loadTemplate('surfbar_frame_stats', FALSE, $content);
        } elseif ((!isFullPage()) && (getRequestElement('frame') == 'textlinks')) {
                // Prepare content
                $content = array(
@@ -135,16 +135,16 @@ if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement('
                );
 
                // Load template for "stats" page
-               loadTemplate('surfbar_frame_textlinks', false, $content);
+               loadTemplate('surfbar_frame_textlinks', FALSE, $content);
        } else {
                // Prepare content
                $content = array(
                        'start'     => str_repeat('X', strlen(getSurfbarRestartTime())),
-                       'autostart' => (isSurfbarAutoStartEnbaled()) ? 'true' : 'false'
+                       'autostart' => (isSurfbarAutoStartEnabled()) ? 'true' : 'false'
                );
 
                // Load template for stopped surfbar
-               loadTemplate('surfbar_stopped', false, $content);
+               loadTemplate('surfbar_stopped', FALSE, $content);
        }
 } elseif ((isGetRequestElementSet('check')) && (isGetRequestElementSet('id')) && (isGetRequestElementSet('salt'))) {
        // Dummy next id get
@@ -184,11 +184,11 @@ if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement('
                //* DEBUG: */ exit('nextId='.$nextId);
 
                // Is there a valid id?
-               if ($nextId > 0) {
+               if (isValidId($nextId)) {
                        // Then prepare other content
                        $content = array(
                                'url_id' => $nextId,
-                               'xxx'    => str_repeat('X', strlen(gerSurfbarReloadTime($nextId))),
+                               'xxx'    => str_repeat('X', strlen(getSurfbarWaitingTime($nextId))),
                        );
 
                        // Update salt (double-call lock!) and statistics
@@ -209,8 +209,8 @@ if ((isSurfbarReloadFull()) || ((!isFullPage()) && (in_array(getRequestElement('
        $templateName = determineSurfbarTemplateName();
 
        // Load that template
-       //* DEBUG: */ exit('templateName=' . $templateName . '<br /><strong>content</strong>=<pre>' . print_r($content, true) . '</pre>');
-       loadTemplate($templateName, false, $content);
+       //* DEBUG: */ exit('templateName=' . $templateName . '<br /><strong>content</strong>=<pre>' . print_r($content, TRUE) . '</pre>');
+       loadTemplate($templateName, FALSE, $content);
 }
 
 // Load footer