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?
$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');