Skip to content

Commit f5af738

Browse files
authored
Update bot.php
1 parent b7d7445 commit f5af738

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

bot.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?php
22
include_once 'config.php';
33
check();
4+
45
$robotState = $botState['botState']??"on";
6+
57
if ($userInfo['step'] == "banned" && $from_id != $admin && $userInfo['isAdmin'] != true) {
68
sendMessage($mainValues['banned']);
79
exit();
@@ -3623,9 +3625,8 @@
36233625
include 'phpqrcode/qrlib.php';
36243626
$msg = $message_id;
36253627

3626-
$agent_bought = false;
3628+
$agent_bought = $payInfo['agent_bought'];
36273629
$eachPrice = $price / $accountCount;
3628-
if($userInfo['is_agent'] == true && ($match['buyType'] == "one" || $match['buyType'] == "much")) {$agent_bought = true; setUser('', 'temp');}
36293630

36303631
alert($mainValues['sending_config_to_user']);
36313632
define('IMAGE_WIDTH',540);
@@ -8548,15 +8549,15 @@
85488549
while ($cat = $res->fetch_assoc()){
85498550
$id = $cat['id'];
85508551
$title = $cat['volume'];
8551-
$price = number_format($cat['price']);
8552+
$price = $cat['price'];
85528553
if($agentBought == true){
85538554
$discounts = json_decode($userInfo['discount_percent'],true);
85548555
if($botState['agencyPlanDiscount']=="on") $discount = $discounts['plans'][$orderInfo['fileid']]?? $discounts['normal'];
85558556
else $discount = $discounts['servers'][$orderInfo['server_id']]?? $discounts['normal'];
85568557
$price -= floor($price * $discount / 100);
85578558
}
85588559
if($price == 0) $price = "رایگان";
8559-
else $price .= " تومان";
8560+
else $price = number_format($price) . " تومان";
85608561
$keyboard[] = ['text' => "$title روز $price", 'callback_data' => "selectPlanDayIncrease{$match[1]}_$id"];
85618562
}
85628563
$keyboard = array_chunk($keyboard,2);
@@ -8902,15 +8903,15 @@
89028903
while($cat = $res->fetch_assoc()){
89038904
$id = $cat['id'];
89048905
$title = $cat['volume'];
8905-
$price = number_format($cat['price']);
8906+
$price = $cat['price'];
89068907
if($agentBought == true){
89078908
$discounts = json_decode($userInfo['discount_percent'],true);
89088909
if($botState['agencyPlanDiscount']=="on") $discount = $discounts['plans'][$orderInfo['fileid']]?? $discounts['normal'];
89098910
else $discount = $discounts['servers'][$orderInfo['server_id']]?? $discounts['normal'];
89108911
$price -= floor($price * $discount / 100);
89118912
}
89128913
if($price == 0) $price = "رایگان";
8913-
else $price .= ' تومان';
8914+
else $price = number_format($price) . ' تومان';
89148915

89158916
$keyboard[] = ['text' => "$title گیگ $price", 'callback_data' => "increaseVolumePlan{$match[1]}_{$id}"];
89168917
}

0 commit comments

Comments
 (0)