|
3 | 3 | include_once '../config.php'; |
4 | 4 | $time = time(); |
5 | 5 |
|
| 6 | +ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); |
| 7 | + |
6 | 8 | $stmt = $connection->prepare("SELECT * FROM `gift_list` LIMIT 1"); |
7 | 9 | $stmt->execute(); |
8 | 10 | $giftList = $stmt->get_result(); |
|
101 | 103 | if($rowCount < $offset) continue; |
102 | 104 | $found = true; |
103 | 105 | $clientRemark = $client['email']; |
104 | | - $uuid = $client['id']; |
| 106 | + $uuid = $client['id']??$client['password']; |
105 | 107 | $clientTotal = $client['totalGB']; |
106 | 108 | $clientUp = $client['up']; |
107 | 109 | $clientDown = $client['down']; |
108 | 110 | $clientExpiry = $client['expiryTime']; |
109 | 111 | $clientEnable = $client['enable']; |
110 | 112 |
|
111 | | - |
112 | | - if(count($clients) > 1 && $clientTotal > 0 && $clientExpiry > 0 && $clientEnable){ |
| 113 | + $responseEdit = null; |
| 114 | + if(count(value: $clients) > 1 && $clientTotal > 0 && $clientExpiry > 0 && $clientEnable){ |
113 | 115 | $responseEdit = editClientTraffic($server_id, $inbound_id, $uuid, ($volume / 1024), $day); |
114 | 116 | $orderExistStmt = $connection->prepare("SELECT * FROM `orders_list` WHERE `server_id` = ? AND `inbound_id` = ? AND `uuid` = ?"); |
115 | 117 | $orderExistStmt->bind_param("iis", $server_id, $inbound_id, $uuid); |
|
154 | 156 | $rowCount++; |
155 | 157 | if($rowCount < $offset) continue; |
156 | 158 | $found = true; |
157 | | - $uuid = $clients[0]['id']; |
| 159 | + $uuid = $clients[0]['id']??$clients[0]['password']; |
158 | 160 | if($total > 0 && $expiry_time > 0 && $inboundEnable){ |
159 | 161 | $responseEdit = editInboundTraffic($server_id, $uuid, ($volume/1024), $day); |
160 | 162 | if(!is_null($responseEdit)){ |
|
0 commit comments