]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_payouts.php
Renamed function so it might be more understandable
[mailer.git] / inc / modules / admin / what-list_payouts.php
index 9a95ae69504833b3ac550d2075d9c7af904d4ff3..ed47e59ea6f151740b1f31e2f49f88ee8571a895 100644 (file)
@@ -14,8 +14,6 @@
  * $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                    *
@@ -43,7 +41,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
 
 if (isGetRequestParameterSet('pid')) {
        // First let's get the member's id
@@ -53,7 +51,7 @@ if (isGetRequestParameterSet('pid')) {
        SQL_FREERESULT($result);
 
        // Obtain some data
-       if (!isGetRequestParameterSet('task') && (!empty($userid)) && ($userid > 0)) {
+       if (!isGetRequestParameterSet('task') && (!empty($userid)) && (isValidUserId($userid))) {
                // Get task id from database
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `userid`=%s AND `task_type`='PAYOUT_REQUEST' AND `task_created`=%s LIMIT 1",
                        array(bigintval($userid), bigintval($tstamp)), __FILE__, __LINE__);
@@ -68,7 +66,7 @@ if (isGetRequestParameterSet('pid')) {
                $taskId = getRequestParameter('task');
        }
 
-       if ((!empty($taskId)) && (!empty($userid)) && ($userid > 0)) {
+       if ((!empty($taskId)) && (!empty($userid)) && (isValidUserId($userid))) {
                // Load user's data
                if (!fetchUserData($userid)) {
                        // Abort here because it is not valid!
@@ -160,7 +158,7 @@ LIMIT 1",
                                        }
                                } else {
                                        // Cannot load payout id
-                                       loadTemplate('admin_settings_saved', false, '<div class="admin_failed">{--ADMIN_PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}</div>');
+                                       loadTemplate('admin_settings_unsaved', false, '{--ADMIN_PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}');
                                }
                        } else {
                                // Prepare content