|
209 | 209 | if($serverType == "marzban"){ |
210 | 210 | $uniqid = $token = str_replace("/sub/", "", $response->sub_link); |
211 | 211 | $subLink = $botState['subLinkState'] == "on"?$panelUrl . $response->sub_link:""; |
212 | | - $vraylink = $response->vray_links; |
| 212 | + $vraylink = [$subLink]; |
| 213 | + $vray_link = json_encode($response->vray_links); |
213 | 214 | } |
214 | 215 | else{ |
215 | 216 | $vraylink = getConnectionLink($server_id, $uniqid, $protocol, $remark, $port, $netType, $inbound_id, $rahgozar, $customPath, $customPort, $customSni); |
216 | 217 | $token = RandomString(30); |
217 | 218 | $subLink = $botState['subLinkState']=="on"?$botUrl . "settings/subLink.php?token=" . $token:""; |
| 219 | + $vray_link = json_encode($vraylink); |
218 | 220 | } |
219 | | - |
220 | | - foreach($vraylink as $vray_link){ |
| 221 | + |
| 222 | + foreach($vraylink as $link){ |
221 | 223 | $acc_text = " |
222 | 224 | 😍 سفارش جدید شما |
223 | 225 | 📡 پروتکل: $protocol |
224 | 226 | 🔮 نام سرویس: $remark |
225 | 227 | 🔋حجم سرویس: $volume گیگ |
226 | 228 | ⏰ مدت سرویس: $days روز |
227 | 229 | ". |
228 | | - ($botState['configLinkState'] != "off"? |
| 230 | + ($botState['configLinkState'] != "off" && $serverType != "marzban"? |
229 | 231 | " |
230 | | - 💝 config : <code>$vray_link</code>":""). |
| 232 | + 💝 config : <code>$link</code>":""). |
231 | 233 | ($botState['subLinkState']=="on"? |
232 | 234 | " |
233 | 235 | |
|
243 | 245 | $pixel_Size = 11; |
244 | 246 | $frame_Size = 0; |
245 | 247 |
|
246 | | - QRcode::png($vray_link, $file, $ecc, $pixel_Size, $frame_Size); |
| 248 | + QRcode::png($link, $file, $ecc, $pixel_Size, $frame_Size); |
247 | 249 | addBorderImage($file); |
248 | 250 |
|
249 | 251 | $backgroundImage = imagecreatefromjpeg("../settings/QRCode.jpg"); |
|
258 | 260 | sendPhoto($botUrl . "settings/" . $file, $acc_text,json_encode(['inline_keyboard'=>[[['text'=>"صفحه اصلی 🏘",'callback_data'=>"mainMenu"]]]]),"HTML", $user_id); |
259 | 261 | unlink($file); |
260 | 262 | } |
261 | | - $vray_link = json_encode($vraylink); |
262 | 263 | $date = time(); |
263 | 264 |
|
264 | 265 | $stmt = $connection->prepare("INSERT INTO `orders_list` |
|
0 commit comments