X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=birthday_confirm.php;h=f72b7a7195edd20c61a75ee27ce82232fc4e6271;hb=50b91687d7e7201f6c596a9ad40e8ff35c995074;hp=003c93fbd186e359dbf95f9e477f5d7720b250ff;hpb=0fd6858b423d41e7eee9ffa3d5138d318e08cc1c;p=mailer.git
diff --git a/birthday_confirm.php b/birthday_confirm.php
index 003c93fbd1..f72b7a7195 100644
--- a/birthday_confirm.php
+++ b/birthday_confirm.php
@@ -39,9 +39,8 @@
// Load security stuff here
require('inc/libs/security_functions.php');
-// Init "action" and "what"
-$GLOBALS['what'] = '';
-$GLOBALS['action'] = '';
+// Init start time
+$GLOBALS['startTime'] = microtime(true);
// Set module
$GLOBALS['module'] = 'birthday_confirm';
@@ -67,12 +66,17 @@ $chk = bigintval(REQUEST_GET('check'), false);
// Check if link is not clicked so far
$result = SQL_QUERY_ESC("SELECT b.points, d.gender, d.surname, d.family, d.status, d.ref_payout
-FROM `{!_MYSQL_PREFIX!}_user_birthday` AS b
-INNER JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
-ON b.userid=d.userid
-WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
-array($uid, $chk), __FILE__, __LINE__);
-//* DEBUG: */ echo "uid=".$uid.",chk=".$chk." (".strlen($chk).'/'.strlen(REQUEST_GET('check')).'/'.SQL_NUMROWS($result).")
\n";
+FROM
+ `{!_MYSQL_PREFIX!}_user_birthday` AS b
+INNER JOIN
+ `{!_MYSQL_PREFIX!}_user_data` AS d
+ON
+ b.userid=d.userid
+WHERE
+ b.userid=%s AND b.chk_value='%s'
+LIMIT 1",
+ array($uid, $chk), __FILE__, __LINE__);
+//* DEBUG: */ OUTPUT_HTML("uid=".$uid.",chk=".$chk." (".strlen($chk).'/'.strlen(REQUEST_GET('check')).'/'.SQL_NUMROWS($result).")
");
// Prepare content
$content = array();
@@ -99,7 +103,7 @@ if (SQL_NUMROWS($result) == 1) {
} // END - if
// Remove entry from table
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1",
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE `userid`=%s AND `chk_value`='%s' LIMIT 1",
array($uid, $chk), __FILE__, __LINE__);
// "Translate" some data