$uid = 0;
// Validate if it is not a number
- if (bigintval($_GET['uid']) !== "".$_GET['uid']."") {
+ if ("".bigintval($_GET['uid'])."" !== "".$_GET['uid']."") {
if (EXT_IS_ACTIVE("nickname")) {
// Maybe we have found a nickname?
$result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1",
if (IS_MEMBER()) {
// Logged in user detected!
$login = true;
- }
+ } // END - if
// Check if account was found
if ((SQL_NUMROWS($result) == 1) && ($result != false)) {
$uid = bigintval($uid);
// Calculate beg points
- srand((double)microtime() * 10000000000 / time());
+ mt_srand((double)microtime() * 10000000000 / time());
// Multiply configured values with 100000 and divide with 100000 so we can also handle small values
// If we need more number behind the decimal dot then we just need to increase all these three
// numbers matching to the numbers behind the decimal dot. Simple! ;-)
- $points = rand(($_CONFIG['beg_points'] * 100000), ($_CONFIG['beg_points_max'] * 100000)) / 100000;
+ $points = mt_rand(($_CONFIG['beg_points'] * 100000), ($_CONFIG['beg_points_max'] * 100000)) / 100000;
// Set nickname / userid for the template(s
define('__BEG_UID' , $_GET['uid']);
}
// Reload to index module
- die("-".$msg."-");
- if ((!empty($msg)) && (!empty($msg))) LOAD_URL("modules.php?module=index&msg=".$msg);
+ if ((!empty($msg)) && (!empty($msg))) LOAD_URL("modules.php?module=index&msg=".$msg."&ext=beg");
} else {
// No userid entered
LOAD_URL("modules.php?module=index");
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "372");
+define('CURR_SVN_REVISION', "373");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
case CODE_USER_404 : $msg = USER_NOT_FOUND; break;
case CODE_STATS_404 : $msg = MAIL_STATS_404; break;
case CODE_ALREADY_CONFIRMED: $msg = MAIL_ALREADY_CONFIRMED; break;
- case CODE_ERROR_MAILID : if (EXT_IS_ACTIVE("mailid", true)) { $msg = ERROR_CONFIRMING_MAIL; } else { $msg = sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid"); } break;
- case CODE_EXTENSION_PROBLEM: $msg = sprintf(EXTENSION_PROBLEM_EXT_INACTIVE, "mailid"); break;
+
+ case CODE_ERROR_MAILID:
+ if (EXT_IS_ACTIVE($ext, true)) { $msg = ERROR_CONFIRMING_MAIL; } else { $msg = sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid"); }
+ break;
+
+ case CODE_EXTENSION_PROBLEM:
+ // Default extension is "unknown"
+ $ext = "unknown";
+
+ // Is extension given?
+ if (!empty($_GET['ext'])) $ext = SQL_ESCAPE($_GET['ext']);
+ $msg = sprintf(EXTENSION_PROBLEM_EXT_INACTIVE, $ext);
+ break;
+
case CODE_COOKIES_DISABLED : $msg = LOGIN_NO_COOKIES; break;
case CODE_BEG_SAME_AS_OWN : $msg = BEG_SAME_UID_AS_OWN; break;
case CODE_LOGIN_FAILED : $msg = LOGIN_FAILED_GENERAL; break;
// Is the extension active
if (!EXT_IS_ACTIVE("mailid", true)) {
// Is not activated/installed yet!
- LOAD_URL("modules.php?module=index&msg=".CODE_EXTENSION_PROBLEM);
+ LOAD_URL("modules.php?module=index&msg=".CODE_EXTENSION_PROBLEM."&ext=mailid");
} // END - if
// Init
// Is the bonus extension active?
if (!EXT_IS_ACTIVE("bonus")) {
// Abort here
- LOAD_URL("modules.php?module=index&msg=".CODE_EXTENSION_PROBLEM);
+ LOAD_URL("modules.php?module=index&msg=".CODE_EXTENSION_PROBLEM."&ext=mailid");
} // END - if
// Bonus-Mails
if (!empty($msg)) {
switch ($_CONFIG['mailid_error_redirect']) {
case "INDEX": // Redirect to index page
- LOAD_URL("modules.php?module=index&msg=".$msg);
+ LOAD_URL("modules.php?module=index&msg=".$msg."&ext=mailid");
break;
case "REJECT": // Redirect to rejection page
LOAD_URL(URL."/modules.php?module=index");
} elseif (!EXT_IS_ACTIVE("surfbar")) {
// Surfbar deactivated
- LOAD_URL(URL."/modules.php?module=login&msg=".CODE_EXTENSION_PROBLEM);
+ LOAD_URL(URL."/modules.php?module=login&msg=".CODE_EXTENSION_PROBLEM."&ext=surfbar");
}
// Is there a check value?