X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=beg.php;h=9aaef503068c988d604f01297c4b3e4846758b0d;hp=9967f3b4365ecdb9415194db37ace2e9fd829bb9;hb=e17685c65d1a48c061b7c4f64c7a23c165430460;hpb=c4823d28fd0bd22250b16d73f2034f36fc54abda diff --git a/beg.php b/beg.php index 9967f3b436..9aaef50306 100644 --- a/beg.php +++ b/beg.php @@ -104,7 +104,7 @@ if (isGetRequestParameterSet('userid')) { array(getUserData('userid')), __FILE__, __LINE__); // Check for last entry for userid w/o IP number - $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (`timeout` > (UNIX_TIMESTAMP() - {?beg_timeout?}) OR (timeout > (UNIX_TIMESTAMP() - {?beg_userid_timeout?}) AND `userid`=%s)) AND (`remote_ip`='%s' OR `sid`='%s') LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_beg_ips` WHERE (`timeout` > (UNIX_TIMESTAMP() - {?beg_timeout?}) OR (`timeout` > (UNIX_TIMESTAMP() - {?beg_userid_timeout?}) AND `userid`=%s)) AND (`remote_ip`='%s' OR `sid`='%s') LIMIT 1", array(getUserData('userid'), detectRemoteAddr(), session_id()), __FILE__, __LINE__); // Entry not found, points set and not logged in? @@ -198,8 +198,10 @@ if (isGetRequestParameterSet('userid')) { $errorCode = getCode('BEG_SAME_AS_OWN'); } - // Reload to index module - if ((!empty($errorCode)) && (!empty($errorCode))) redirectToUrl('modules.php?module=index&code=' . $errorCode . '&ext=beg'); + // Reload to index module if an error happens + if (!empty($errorCode)) { + redirectToUrl('modules.php?module=index&code=' . $errorCode . '&ext=beg'); + } // END - if } else { // No userid entered redirectToUrl('modules.php?module=index');