Hello, can you look with me to do with the function of seedbonus vip for 1 hours or more if we increase the number 60.
I modified the code of the file mybonus.php as below but it does not work
the piece of code ( $s -= $t["min"] * 60 ) ); is for 1 hour
at the end of the file cleanup.php I added this
configuration in Staff CP

I modified the code of the file mybonus.php as below but it does not work
case 'VIP':
$days = $row->value;
$vipuntil = ( $CURUSER["vipuntil"] > "0000-00-00 00:00:00" ) ? $vipuntil = get_date_time( strtotime( $CURUSER["vipuntil"] ) + ( $s -= $t["min"] * 60 ) ) : $vipuntil = get_date_time( gmtime() + ( $s -= $t["min"] * 60 ) );
$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;
}the piece of code ( $s -= $t["min"] * 60 ) ); is for 1 hour
at the end of the file cleanup.php I added this
// Start Vipuntil mod vip
$timenow = sqlesc(get_date_time());
$subject = sqlesc("Your VIP class stay has just expired");
$msg = sqlesc("Your VIP class stay has just expired. \nYour status is back to baseline. \nYou can now redeem crazy bonus points for a new VIP class stay. \nYou can also donate if you wish to obtain a longer stay.\n");
$resv = SQL_Query_exec("SELECT id, oldclass FROM users WHERE vipuntil < $timenow AND vipuntil <> '0000-00-00 00:00:00'");
if (mysqli_num_rows($resv)){
$rowv = mysqli_fetch_object($resv);
$id = $rowv->id;
$oldclass = $rowv->oldclass;
SQL_Query_exec("UPDATE users SET class ='1', oldclass='3', vipuntil = '0000-00-00 00:00:00' WHERE vipuntil < $timenow AND vipuntil <> '0000-00-00 00:00:00'");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject, poster) VALUES(0, '.$id.', $subject, $timenow, $msg, 0)");
}
// End Remove Vipuntil mod vip
configuration in Staff CP

Last edited by niki on 2022-07-12 12:03:21