master
Abanoub Hany 2024-07-01 17:36:44 +03:00
parent ea0f737219
commit 7c26c9adf3
1 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,10 @@ function generateRandomPassword($length = 12) {
// Get the next available IP address // Get the next available IP address
function getNextIp($users) { function getNextIp($users) {
if (empty($users)) {
return '10.255.10.11';
}
$lastIp = end($users)['ip']; $lastIp = end($users)['ip'];
$lastIpLong = ip2long($lastIp); $lastIpLong = ip2long($lastIp);
$nextIpLong = $lastIpLong + 1; $nextIpLong = $lastIpLong + 1;