projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
455f56e
)
Now with more feedback if no payout types are found
author
Roland Häder
<roland@mxchange.org>
Fri, 30 Oct 2009 06:54:50 +0000
(06:54 +0000)
committer
Roland Häder
<roland@mxchange.org>
Fri, 30 Oct 2009 06:54:50 +0000
(06:54 +0000)
inc/modules/member/what-payout.php
patch
|
blob
|
history
diff --git
a/inc/modules/member/what-payout.php
b/inc/modules/member/what-payout.php
index 120c40a65078ede93c35bd07670acf36c781ae05..26edc5353254539e83387e62e20585ae1b680263 100644
(file)
--- a/
inc/modules/member/what-payout.php
+++ b/
inc/modules/member/what-payout.php
@@
-53,7
+53,7
@@
if ((!isExtensionActive('payout')) && (!isAdmin())) {
return;
} // END - if
return;
} // END - if
-$result_depths = SQL_QUERY("SELECT
level, percents
FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
+$result_depths = SQL_QUERY("SELECT
`level`, `percents`
FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
$totalPoints = 0;
while ($content = SQL_FETCHARRAY($result_depths)) {
// Load referal points
$totalPoints = 0;
while ($content = SQL_FETCHARRAY($result_depths)) {
// Load referal points
@@
-71,7
+71,7
@@
while ($content = SQL_FETCHARRAY($result_depths)) {
// Free result
SQL_FREERESULT($result_points);
// Free result
SQL_FREERESULT($result_points);
-}
+}
// END - while
// Free memory
SQL_FREERESULT($result_depths);
// Free memory
SQL_FREERESULT($result_depths);
@@
-87,10
+87,14
@@
if (empty($totalPoints)) $totalPoints = '0.00000';
if (!isGetRequestElementSet('payout')) {
// Load payout types
if (!isGetRequestElementSet('payout')) {
// Load payout types
- $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points, allow_url
-FROM `{?_MYSQL_PREFIX?}_payout_types`
-WHERE %s >= min_points
-ORDER BY type ASC",
+ $result = SQL_QUERY_ESC("SELECT
+ `id`, `type`, `rate`, `min_points`, `allow_url`
+FROM
+ `{?_MYSQL_PREFIX?}_payout_types`
+WHERE
+ %s >= `min_points`
+ORDER BY
+ `type` ASC",
array($totalPoints), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Free memory
array($totalPoints), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Free memory
@@
-160,6
+164,9
@@
ORDER BY
// Output payout list
outputPayoutList($totalPoints);
// Output payout list
outputPayoutList($totalPoints);
+ } else {
+ // No payout types setup
+ loadTemplate('admin_settings_saved', false, geMessage('PAYOUT_NO_PAYOUT_TYPES'));
}
} else {
// Chedk if he can get paid by selected type
}
} else {
// Chedk if he can get paid by selected type