]> git.mxchange.org Git - mailer.git/blobdiff - surfbar.php
Extension ext-user needs to be installed for ref.php as well
[mailer.git] / surfbar.php
index d65986193579c31409ff9397d53c0c4cabba1839..cb718f47b8a5d525e133e53a5bde3c7c00313dce 100644 (file)
  * $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                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -70,10 +68,10 @@ if (!isMember()) {
                // Is the form sent?
                if ((isFormSent()) && (isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password'))) {
                        // Do the login procedure
-                       $URL = doUserLogin(postRequestParameter('id'), postRequestParameter('password'), basename(__FILE__), basename(__FILE__) . '?code=');
+                       $url = doUserLogin(postRequestParameter('id'), postRequestParameter('password'), basename(__FILE__), basename(__FILE__) . '?code=');
 
                        // And redirect to the URL
-                       redirectToUrl($URL);
+                       redirectToUrl($url);
                } else {
                        // Load header
                        loadIncludeOnce('inc/header.php');
@@ -81,7 +79,7 @@ if (!isMember()) {
                        // Is there a 'code' provided?
                        if (isGetRequestParameterSet('code')) {
                                // Then generate an error message
-                               loadTemplate('admin_settings_saved', false, getMessageFromErrorCode(getRequestParameter('code')));
+                               displayMessage(getMessageFromErrorCode(getRequestParameter('code')));
                        } // END - if
 
                        // Display login form
@@ -122,12 +120,9 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in
                // This makes the footer appear again
                unsetGetRequestParameter('frame');
        } elseif ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'stats')) {
-               // Get total points amount
-               $points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
-
                // Prepare content
                $content = array(
-                       'points' => $points,
+                       'points' => getTotalPoints(getMemberId()),
                        'reload' => (getConfig('surfbar_stats_reload') * 1000)
                );
 
@@ -194,8 +189,8 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in
                if ($nextId > 0) {
                        // Then prepare other content
                        $content = array(
-                               'url_id'      => $nextId,
-                               'xxx'         => str_repeat('X', strlen(SURFBAR_GET_RELOAD_TIME($nextId)))
+                               'url_id' => $nextId,
+                               'xxx'    => str_repeat('X', strlen(SURFBAR_GET_RELOAD_TIME($nextId))),
                        );
 
                        // Update salt (double-call lock!) and statistics
@@ -213,7 +208,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in
        loadIncludeOnce('inc/header.php');
 
        // Load that template
-       //* DEBUG: */ die("templateName={$templateName}<br />\n<strong>content</strong>=<pre>".print_r($content, true)."</pre>");
+       //* DEBUG: */ die('templateName=' . $templateName . '<br /><strong>content</strong>=<pre>' . print_r($content, true) . '</pre>');
        loadTemplate($templateName, false, $content);
 }