Skip to content

Commit

Permalink
exchange add log
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Oct 16, 2024
1 parent 6187789 commit ed10030
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions public/mybonus.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,10 @@ function bonusarray($option = 0){
else {
$upload = $CURUSER['uploaded'];
$up = $upload + $bonusarray['menge'];
do_log(sprintf(
"user: %s going to use %s bonus to exchange uploaded from %s to %s",
$CURUSER['id'], $points, $CURUSER['uploaded'], $up
));
// $bonuscomment = date("Y-m-d") . " - " .$points. " Points for upload bonus.\n " .$bonuscomment;
// sql_query("UPDATE users SET uploaded = ".sqlesc($up).", seedbonus = seedbonus - $points, bonuscomment = ".sqlesc($bonuscomment)." WHERE id = ".sqlesc($userid)) or sqlerr(__FILE__, __LINE__);
$bonusRep->consumeUserBonus($CURUSER['id'], $points, \App\Models\BonusLogs::BUSINESS_TYPE_EXCHANGE_UPLOAD, $points. " Points for uploaded.", ['uploaded' => $up]);
Expand All @@ -618,6 +622,10 @@ function bonusarray($option = 0){
if($art == "traffic_downloaded") {
$downloaded = $CURUSER['downloaded'];
$down = $downloaded + $bonusarray['menge'];
do_log(sprintf(
"user: %s going to use %s bonus to exchange downloaded from %s to %s",
$CURUSER['id'], $points, $CURUSER['downloaded'], $down
));
$bonusRep->consumeUserBonus($CURUSER['id'], $points, \App\Models\BonusLogs::BUSINESS_TYPE_EXCHANGE_DOWNLOAD, $points. " Points for downloaded.", ['downloaded' => $down]);
nexus_redirect("" . get_protocol_prefix() . "$BASEURL/mybonus.php?do=download");
}
Expand Down

0 comments on commit ed10030

Please sign in to comment.