Hello to all the team, I am looking to modify this piece of code in the file mybonus.php so that when a member changes points to get a vip account, and I would like the upgrade of the ratio in download is reset to 0 on his account at the same time as his vip account when we click on update.
thank you in advance for your help
I tried to add this piece of code below but it doesn't work
thank you in advance for your help
case 'VIP':
$days = $row->value;
$vipuntil = ( $CURUSER["vipuntil"] > "0000-00-00 00:00:00" ) ? $vipuntil = get_date_time( strtotime( $CURUSER["vipuntil"] ) + ( $days*86400 ) ) : $vipuntil = get_date_time( gmtime() + ( $days*86400 ) );
$oldclass = ( $CURUSER["vipuntil"] > "0000-00-00 00:00:00" ) ? $oldclass = $CURUSER["oldclass"] : $oldclass = $CURUSER["class"];
SQL_Query_exec("UPDATE `users` SET `class` = '3', `oldclass`='$oldclass', `vipuntil` = '$vipuntil' WHERE `id` = '$CURUSER[id]'");
break;
}I tried to add this piece of code below but it doesn't work
SQL_Query_exec("UPDATE `users` SET `class` = '3' WHERE `downloaded` = `0`;
Last edited by niki on 2021-08-29 13:55:11
