ZnoteAAC
ZnoteAAC copied to clipboard
[V2] CHANGE UNIX_TIMESTAMP(CURDATE()) TO UNIX_TIMESTAMP(NOW())
Hello,
When making a test purchase, I verified that when using CURDATE(), only 5 hours of premium was added to the account, instead of 24 hours. Switching to NOW() seems to have fixed the problem by adding 24 hours!
Engine->Function->users.php
// Add additional premium days to account id
function user_account_add_premdays($accid, $days) {
$accid = (int)$accid;
$days = (int)$days;
mysql_update("
UPDATE `accounts`
SET `premium_ends_at` = GREATEST(`premium_ends_at`, UNIX_TIMESTAMP(NOW())) + ({$days} * 86400)
WHERE `id`='{$accid}';
");
}
If this error has to do with the webserver, please disregard and I apologize in advance.