Skip to content

Commit e4a18f8

Browse files
authored
Update warnusers.php
1 parent de6486f commit e4a18f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

settings/warnusers.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
$notif = $order['notif'];
108108

109109
$response = getJson($server_id)->obj;
110+
$found = false;
110111
foreach($response as $row){
111112
if($inbound_id == 0) {
112113
$clients = json_decode($row->settings)->clients;
@@ -115,6 +116,7 @@
115116
$up = $row->up;
116117
$down = $row->down;
117118
$expiryTime = $row->expiryTime;
119+
$found = true;
118120
break;
119121
}
120122
}else{
@@ -135,12 +137,14 @@
135137
$enable = $clientsStates[$emailKey]->enable;
136138
$down = $clientsStates[$emailKey]->down;
137139
$expiryTime = $clientsStates[$emailKey]->expiryTime;
140+
$found = true;
138141
break;
139142
}
140143
}
141144
}
142145
}
143146
}
147+
if(!$found) continue;
144148
$leftgb = round( ($total - $up - $down) / 1073741824, 2);
145149
$now_microdate = floor(microtime(true) * 1000);
146150
if($expiryTime <= $now_microdate) $send = true; elseif($leftgb <= 0) $send = true;

0 commit comments

Comments
 (0)