|
1 | 1 | <?php |
2 | 2 | include_once 'config.php'; |
3 | 3 | check(); |
| 4 | + |
4 | 5 | $robotState = $botState['botState']??"on"; |
| 6 | + |
5 | 7 | if ($userInfo['step'] == "banned" && $from_id != $admin && $userInfo['isAdmin'] != true) { |
6 | 8 | sendMessage($mainValues['banned']); |
7 | 9 | exit(); |
|
3623 | 3625 | include 'phpqrcode/qrlib.php'; |
3624 | 3626 | $msg = $message_id; |
3625 | 3627 |
|
3626 | | - $agent_bought = false; |
| 3628 | + $agent_bought = $payInfo['agent_bought']; |
3627 | 3629 | $eachPrice = $price / $accountCount; |
3628 | | - if($userInfo['is_agent'] == true && ($match['buyType'] == "one" || $match['buyType'] == "much")) {$agent_bought = true; setUser('', 'temp');} |
3629 | 3630 |
|
3630 | 3631 | alert($mainValues['sending_config_to_user']); |
3631 | 3632 | define('IMAGE_WIDTH',540); |
|
8548 | 8549 | while ($cat = $res->fetch_assoc()){ |
8549 | 8550 | $id = $cat['id']; |
8550 | 8551 | $title = $cat['volume']; |
8551 | | - $price = number_format($cat['price']); |
| 8552 | + $price = $cat['price']; |
8552 | 8553 | if($agentBought == true){ |
8553 | 8554 | $discounts = json_decode($userInfo['discount_percent'],true); |
8554 | 8555 | if($botState['agencyPlanDiscount']=="on") $discount = $discounts['plans'][$orderInfo['fileid']]?? $discounts['normal']; |
8555 | 8556 | else $discount = $discounts['servers'][$orderInfo['server_id']]?? $discounts['normal']; |
8556 | 8557 | $price -= floor($price * $discount / 100); |
8557 | 8558 | } |
8558 | 8559 | if($price == 0) $price = "رایگان"; |
8559 | | - else $price .= " تومان"; |
| 8560 | + else $price = number_format($price) . " تومان"; |
8560 | 8561 | $keyboard[] = ['text' => "$title روز $price", 'callback_data' => "selectPlanDayIncrease{$match[1]}_$id"]; |
8561 | 8562 | } |
8562 | 8563 | $keyboard = array_chunk($keyboard,2); |
|
8902 | 8903 | while($cat = $res->fetch_assoc()){ |
8903 | 8904 | $id = $cat['id']; |
8904 | 8905 | $title = $cat['volume']; |
8905 | | - $price = number_format($cat['price']); |
| 8906 | + $price = $cat['price']; |
8906 | 8907 | if($agentBought == true){ |
8907 | 8908 | $discounts = json_decode($userInfo['discount_percent'],true); |
8908 | 8909 | if($botState['agencyPlanDiscount']=="on") $discount = $discounts['plans'][$orderInfo['fileid']]?? $discounts['normal']; |
8909 | 8910 | else $discount = $discounts['servers'][$orderInfo['server_id']]?? $discounts['normal']; |
8910 | 8911 | $price -= floor($price * $discount / 100); |
8911 | 8912 | } |
8912 | 8913 | if($price == 0) $price = "رایگان"; |
8913 | | - else $price .= ' تومان'; |
| 8914 | + else $price = number_format($price) . ' تومان'; |
8914 | 8915 |
|
8915 | 8916 | $keyboard[] = ['text' => "$title گیگ $price", 'callback_data' => "increaseVolumePlan{$match[1]}_{$id}"]; |
8916 | 8917 | } |
|
0 commit comments