Skip to content

Commit 8a49b3e

Browse files
authored
Update tronChecker.php
1 parent 0d83d1b commit 8a49b3e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

settings/tronChecker.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,25 +209,27 @@
209209
if($serverType == "marzban"){
210210
$uniqid = $token = str_replace("/sub/", "", $response->sub_link);
211211
$subLink = $botState['subLinkState'] == "on"?$panelUrl . $response->sub_link:"";
212-
$vraylink = $response->vray_links;
212+
$vraylink = [$subLink];
213+
$vray_link = json_encode($response->vray_links);
213214
}
214215
else{
215216
$vraylink = getConnectionLink($server_id, $uniqid, $protocol, $remark, $port, $netType, $inbound_id, $rahgozar, $customPath, $customPort, $customSni);
216217
$token = RandomString(30);
217218
$subLink = $botState['subLinkState']=="on"?$botUrl . "settings/subLink.php?token=" . $token:"";
219+
$vray_link = json_encode($vraylink);
218220
}
219-
220-
foreach($vraylink as $vray_link){
221+
222+
foreach($vraylink as $link){
221223
$acc_text = "
222224
😍 سفارش جدید شما
223225
📡 پروتکل: $protocol
224226
🔮 نام سرویس: $remark
225227
🔋حجم سرویس: $volume گیگ
226228
⏰ مدت سرویس: $days روز
227229
".
228-
($botState['configLinkState'] != "off"?
230+
($botState['configLinkState'] != "off" && $serverType != "marzban"?
229231
"
230-
💝 config : <code>$vray_link</code>":"").
232+
💝 config : <code>$link</code>":"").
231233
($botState['subLinkState']=="on"?
232234
"
233235
@@ -243,7 +245,7 @@
243245
$pixel_Size = 11;
244246
$frame_Size = 0;
245247

246-
QRcode::png($vray_link, $file, $ecc, $pixel_Size, $frame_Size);
248+
QRcode::png($link, $file, $ecc, $pixel_Size, $frame_Size);
247249
addBorderImage($file);
248250

249251
$backgroundImage = imagecreatefromjpeg("../settings/QRCode.jpg");
@@ -258,7 +260,6 @@
258260
sendPhoto($botUrl . "settings/" . $file, $acc_text,json_encode(['inline_keyboard'=>[[['text'=>"صفحه اصلی 🏘",'callback_data'=>"mainMenu"]]]]),"HTML", $user_id);
259261
unlink($file);
260262
}
261-
$vray_link = json_encode($vraylink);
262263
$date = time();
263264

264265
$stmt = $connection->prepare("INSERT INTO `orders_list`

0 commit comments

Comments
 (0)