X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=show_bonus.php;h=0615d8517621e86918b67f2acaba27468750635a;hp=5daf345ce89efd1b7874aa4431ec8681adc3645b;hb=24d88ff55d8797b8624ed0efb6cdfb3cd1e2fa68;hpb=0fd6858b423d41e7eee9ffa3d5138d318e08cc1c diff --git a/show_bonus.php b/show_bonus.php index 5daf345ce8..0615d85176 100644 --- a/show_bonus.php +++ b/show_bonus.php @@ -39,10 +39,8 @@ // Load security stuff here require('inc/libs/security_functions.php'); -// Init "action" and "what" +// Init start time $GLOBALS['startTime'] = microtime(true); -$GLOBALS['what'] = ''; -$GLOBALS['action'] = ''; // Set this because we have no module in URI $GLOBALS['module'] = 'show_bonus'; @@ -63,7 +61,7 @@ if (!isInstalled()) { // Include header loadIncludeOnce('inc/header.php'); -if ((REQUEST_GET('uid') > 0) && (REQUEST_GET('d') > 0) && (REQUEST_ISSET_GET(('t')))) { +if ((REQUEST_GET('uid') > 0) && (REQUEST_GET('d') > 0) && (REQUEST_ISSET_GET('t'))) { // Set row name $t = ''; switch (REQUEST_GET('t')) { @@ -83,13 +81,17 @@ if ((REQUEST_GET('uid') > 0) && (REQUEST_GET('d') > 0) && (REQUEST_ISSET_GET(('t // Valid type? if (!empty($t)) { // Check for data - $result = SQL_QUERY_ESC("SELECT DISTINCT d.gender, d.surname, d.family, b.level, b.points -FROM `{!_MYSQL_PREFIX!}_user_data` AS d -RIGHT JOIN `{!_MYSQL_PREFIX!}_bonus_turbo` AS b -ON d.userid=b.userid -WHERE d.`status`='CONFIRMED' AND d.userid=%s AND b.%s=%s + $result = SQL_QUERY_ESC("SELECT d.gender, d.surname, d.family, b.level, b.points +FROM + `{!_MYSQL_PREFIX!}_user_data` AS d +RIGHT JOIN + `{!_MYSQL_PREFIX!}_bonus_turbo` AS b +ON + d.userid=b.userid +WHERE + d.`status`='CONFIRMED' AND d.userid=%s AND b.%s=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid')), $t, bigintval(REQUEST_GET('d'))), __FILE__, __LINE__); + array(bigintval(REQUEST_GET('uid')), $t, bigintval(REQUEST_GET('d'))), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) {