./inc/libs/user_functions.php:144: // @TODO These two constants are no longer used, maybe we reactivate this code?
./inc/libs/user_functions.php:232:// @TODO Double-check configuration entry here
./inc/libs/user_functions.php:325: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
-./inc/libs/user_functions.php:347: // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
-./inc/libs/user_functions.php:423: // @TODO We should try to rewrite this to fetchUserData() somehow
-./inc/libs/user_functions.php:611: // @TODO Try to rewrite the following unset()
+./inc/libs/user_functions.php:354: // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
+./inc/libs/user_functions.php:432: // @TODO We should try to rewrite this to fetchUserData() somehow
+./inc/libs/user_functions.php:620: // @TODO Try to rewrite the following unset()
./inc/libs/yoomedia_functions.php:114: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script
./inc/load_config.php:75: // @TODO Rewrite them to avoid this else block
./inc/loader/load-extension.php:13: * @TODO Rewrite this whole file *
// So let's continue with probing his points amount
if (($points - getConfig('doubler_left') - postRequestParameter('points') * getConfig('doubler_charge') / 100) >= 0) {
// Enough points are left so let's continue with the doubling process
- // Create doubling "account" width *DOUBLED* points
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')",
+ // Create doubling "account" with *DOUBLED* points
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(), 'N','N')",
array(
getUserData('userid'),
makeDatabaseUserId(determineReferalId()),
- bigintval(postRequestParameter('points') * 2)
+ bigintval(postRequestParameter('points') * 2),
+ detectRemoteAddr()
), __FILE__, __LINE__);
// Subtract entered points
// Add second line for the referal but only when userid != refid
if ((isValidUserId(determineReferalId())) && (determineReferalId() != getUserData('userid'))) {
// Okay add a refid line and apply refid percents
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,0,%s,'%s',UNIX_TIMESTAMP(),'N','Y')",
array(
makeDatabaseUserId(determineReferalId()),
- bigintval(postRequestParameter('points') * 2 * getConfig('doubler_ref') / 100)
+ (postRequestParameter('points') * 2 * getConfig('doubler_ref') / 100),
+ detectRemoteAddr()
), __FILE__, __LINE__);
// And that's why we don't want to you more than one referal level of doubler-points. ^^^
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running
// Configuration entries
- addConfigAddSql('booking_per_page', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
+ addConfigAddSql('booking_page_count', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
addConfigAddSql('booking_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 3));
// Drop/create table for user bookings
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`subject` VARCHAR(255) NOT NULL DEFAULT 'missing',
-`mode` ENUM('add','sub') NOT NULL DEFAULT 'add',
+`mode` ENUM('ADD','SUB') NOT NULL DEFAULT 'add',
`points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.0000,
`comments` TINYTEXT NULL DEFAULT NULL,
`recorded` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
// Init
$scrambled = '';
- // Final check, in case of failture it will return unscrambled string
+ // Final check, in case of failure it will return unscrambled string
if (strlen($str) > 40) {
// The string is to long
return $str;
// No login bonus by default
$GLOBALS['bonus_payed'] = false;
- // Probe for last online timemark
- $probe = time() - getUserData('last_online');
- if (getUserData('last_login') > 0) $probe = time() - getUserData('last_login');
-
- if ((isExtensionInstalledAndNewer('bonus', '0.2.2')) && ($probe >= getConfig('login_timeout'))) {
- // Add login bonus to user's account
- $add = ', `login_bonus`=`login_bonus`+{?login_bonus?}';
- $GLOBALS['bonus_payed'] = true;
-
- // Subtract login bonus from userid's account or jackpot
- if ((isExtensionInstalledAndNewer('bonus', '0.3.5')) && (getBonusMode() != 'ADD')) {
- handleBonusPoints('login_bonus');
+ // Is bonus up-to-date?
+ if (isExtensionInstalledAndNewer('bonus', '0.2.2')) {
+ // Probe for last online timemark
+ $probe = time() - getUserData('last_online');
+ if (getUserData('last_login') > 0) {
+ // Use timestamp from last login
+ $probe = time() - getUserData('last_login');
+ } // END - if
+
+ // Is the timeout reached?
+ if ($probe >= getConfig('login_timeout')) {
+ // Add login bonus to user's account
+ $add = ', `login_bonus`=`login_bonus`+{?login_bonus?}';
+ $GLOBALS['bonus_payed'] = true;
+
+ // Subtract login bonus from userid's account or jackpot
+ if ((isExtensionInstalledAndNewer('bonus', '0.3.5')) && (getBonusMode() != 'ADD')) {
+ handleBonusPoints('login_bonus');
+ } // END - if
} // END - if
} // END - if
$errorCode = getCode('COOKIES_DISABLED');
}
} elseif (isExtensionInstalledAndNewer('sql_patches', '0.6.1')) {
- // Update failture counter
+ // Update failure counter
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `login_failures`=`login_failures`+1,`last_failure`=NOW() WHERE `userid`=%s LIMIT 1",
array($userid), __FUNCTION__, __LINE__);
$url = $errorUrl . $errorCode;
// Extension set? Then add it as well.
- if (!empty($ext)) $url .= '&ext=' . $ext;
+ if (!empty($ext)) {
+ $url .= '&ext=' . $ext;
+ } // END - if
} // END - if
// Return URL
// All fine!
$result = true;
} else {
- // Status failture text
+ // Status failure text
WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
}
// Log the transfer
WERNIS_LOG_TRANSFER($wdsId, $amount, 'IN');
} else {
- // Status failture text
+ // Status failure text
WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
// Log the transfer
// Log the transfer
WERNIS_LOG_TRANSFER($wdsId, $amount, 'OUT');
} else {
- // Status failture text
+ // Status failure text
WERNIS_STATUS_MESSAGE($return['message'], $return['status']);
// Log the transfer