Skip to content

Commit

Permalink
add log when extend expiraton
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnux committed Apr 15, 2024
1 parent a164b34 commit fb4901b
Show file tree
Hide file tree
Showing 5 changed files with 552 additions and 259 deletions.
3 changes: 2 additions & 1 deletion system/controllers/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
}
// make customer cannot extend again
file_put_contents($path, $m);
_log("Customer $tur[customer_id] $tur[username] extend for $days days", "Customer", $user['id']);
r2(U . 'home', 's', "Extend until $expiration");
}else{
r2(U . 'home', 'e', "Plan is not expired");
Expand Down Expand Up @@ -198,7 +199,7 @@
$bill->expiration = date('Y-m-d');
$bill->time = date('H:i:s');
$bill->save();
_log('User ' . $bill['username'] . ' Deactivate ' . $bill['namebp'], 'User', $bill['customer_id']);
_log('User ' . $bill['username'] . ' Deactivate ' . $bill['namebp'], 'Customer', $bill['customer_id']);
Message::sendTelegram('User u' . $bill['username'] . ' Deactivate ' . $bill['namebp']);
r2(U . 'home', 's', 'Success deactivate ' . $bill['namebp']);
} else {
Expand Down
1 change: 1 addition & 0 deletions system/controllers/plan.php
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@
}
}
}
_log("$admin[fullname] extend Customer $tur[customer_id] $tur[username] for $days days", $admin['user_type'], $admin['id']);
r2(U . 'plan', 's', "Extend until $expiration");
break;
default:
Expand Down
Loading

0 comments on commit fb4901b

Please sign in to comment.