X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fdoubler_functions.php;h=f13c6cb529b0bccdbf0e66ba581cfca815538ad4;hb=5a8c537bc2633402ca515964c9a3a2674f37edc2;hp=1efe4bf30cf5c3fc26b4409d391a437735d30e16;hpb=64c8349613addc3da2242c5cd6b99d64e3fb5f8e;p=mailer.git diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index 1efe4bf30c..f13c6cb529 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -1,7 +1,7 @@ 0) { // Load entries only from a single user - $add = " AND `userid`='".bigintval($userid)."'"; - $mode = 'member'; $COLS = '4'; $DT_MODE = '2'; + $add = sprintf(" AND `userid`=%s", bigintval($userid)); + $mode = 'member'; $COLS = 4; $DT_MODE = 2; $message = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND'); } else { // Guest mode! - $mode = 'guest'; $COLS = '3'; $DT_MODE = '3'; + $mode = 'guest'; $COLS = 3; $DT_MODE = 3; $message = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND'); } @@ -74,7 +74,7 @@ function generateDoublerTable ($userid = '0', $done = 'N', $ref = 'N', $sort = ' FROM `{?_MYSQL_PREFIX?}_doubler` WHERE - `completed`='".$done."' AND is_ref`='".$ref."'".$add." + `completed`='".$done."' AND `is_ref`='".$ref."'".$add." ORDER BY `timemark` ".$sort." LIMIT ".$limit, __FUNCTION__, __LINE__); @@ -92,11 +92,11 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); // Prepare data for the row template $content = array( - 'userid' => $content['userid'], - 'rid' => $content['refid'], - 'points' => translateComma($content['points']), - 'stamp' => generateDateTime($content['timemark'], $DT_MODE), - 'sw' => $SW, + 'userid' => $content['userid'], + 'rid' => $content['refid'], + 'points' => translateComma($content['points']), + 'timemark' => generateDateTime($content['timemark'], $DT_MODE), + 'sw' => $SW, ); // Load template and switch color @@ -109,7 +109,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); } else { // List no entries $OUT = " - + ".loadTemplate('admin_settings_saved', true, $message)." \n"; @@ -122,7 +122,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); // function DOUBLER_GET_TOTAL_POINTS_LEFT() { // Initialize variables - $points = 0; + $points = '0'; if (getConfig('doubler_own') == 'Y') { // Take points from doubler's own account