$GLOBALS['module'] = 'beg';
$GLOBALS['refid'] = 0;
$GLOBALS['output_mode'] = -1;
-$msg = null;
+$errorCode = null;
// Load the required file(s)
require('inc/config-global.php');
array(REQUEST_GET('uid')), __FILE__, __LINE__);
} else {
// Nickname entered but nickname is not active
- $msg = getCode('EXTENSION_PROBLEM');
+ $errorCode = getCode('EXTENSION_PROBLEM');
$uid = -1;
}
} else {
// Remember remote address, userid and timestamp for next click
// but only when there is no admin begging.
// Admins shall be able to test it!
- SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_beg_ips` (userid, remote_ip,sid, timeout) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())",
- array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
+ SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_beg_ips` (`userid`, `remote_ip`,`sid`, `timeout`) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())",
+ array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
// Was is successfull?
$pay (SQL_AFFECTEDROWS() == 1);
loadIncludeOnce('inc/footer.php');
} elseif (($status != 'CONFIRMED') && ($status != 'failed')) {
// Maybe locked/unconfirmed account?
- $msg = generateErrorCodeFromUserStatus($status);
+ $errorCode = generateErrorCodeFromUserStatus($status);
} elseif (($uid == '0') || ($status == 'failed')) {
// Inalid or locked account, so let's find out
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
- array(REQUEST_GET('uid')), __FILE__, __LINE__);
+ array(REQUEST_GET('uid')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Locked account
- $msg = getCode('ACCOUNT_LOCKED');
+ $errorCode = getCode('ACCOUNT_LOCKED');
} else {
// Invalid nickname! (404)
- $msg = getCode('USER_404');
+ $errorCode = getCode('USER_404');
}
// Free memory
SQL_FREERESULT($result);
} elseif ($uid == getConfig('beg_uid')) {
// Webmaster's ID cannot beg for points!
- $msg = getCode('BEG_SAME_AS_OWN');
+ $errorCode = getCode('BEG_SAME_AS_OWN');
}
// Reload to index module
- if ((!empty($msg)) && (!empty($msg))) redirectToUrl('modules.php?module=index&msg='.$msg.'&ext=beg');
+ if ((!empty($errorCode)) && (!empty($errorCode))) redirectToUrl('modules.php?module=index&msg=' . $errorCode . '&ext=beg');
} else {
// No userid entered
redirectToUrl('modules.php?module=index');