ACIL FM
Dark
Refresh
Current DIR:
/home/fastexsh/public_html/exchange/commands
/
home
fastexsh
public_html
exchange
commands
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
add_new_card.php
5.4 MB
chmod
View
DL
Edit
Rename
Delete
affiliate.php
1.63 MB
chmod
View
DL
Edit
Rename
Delete
authentication.php
21.22 MB
chmod
View
DL
Edit
Rename
Delete
buy_voucher.php
16.43 MB
chmod
View
DL
Edit
Rename
Delete
charge_account.php
19.56 MB
chmod
View
DL
Edit
Rename
Delete
last_transactions.php
22.25 MB
chmod
View
DL
Edit
Rename
Delete
other_button.php
5.9 MB
chmod
View
DL
Edit
Rename
Delete
profile.php
2.96 MB
chmod
View
DL
Edit
Rename
Delete
sell_voucher.php
11.57 MB
chmod
View
DL
Edit
Rename
Delete
start_bot.php
7.73 MB
chmod
View
DL
Edit
Rename
Delete
withdraw.php
11.9 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/fastexsh/public_html/exchange/commands/start_bot.php
<?php if (!$update) { return; } if (!$currentUser && preg_match('/^\/start (\d+)$/', $text, $matches)) { $referrer_id = $matches[1]; if ($referrer_id != $from_id) { $query = "SELECT `id`, `affiliate` FROM `users` WHERE `chat_id` = ?"; $stmt = $db->prepare($query); $stmt->execute([$referrer_id]); $user = $stmt->fetch(); if ($user && $user->affiliate == 1) { $query = "SELECT `user_id` FROM `affiliates` WHERE `user_id` = ?"; $stmt = $db->prepare($query); $stmt->execute([$from_id]); if ($stmt->rowCount() == 0) { $query = "INSERT INTO `affiliates` (`parent_id`, `user_id`) VALUES (?, ?)"; $stmt = $db->prepare($query); $stmt->execute([$referrer_id, $from_id]); } } } } if ($currentUser && $currentUser->is_ban) { $bot->sendMessage($from_id, "🚫 *حساب کاربری مسدود شده*\n\n⚠️ متأسفانه حساب کاربری شما مسدود شده است.\n\n💬 لطفاً برای رفع مشکل با پشتیبانی تماس بگیرید."); die; } $join_force_channel = getSettingsBot('join_channel')->value_ ?? ''; if ($join_force_channel && (!$currentUser || !$currentUser->is_admin)) { $channel_username = str_replace('_', '\_', $join_force_channel); $status = $bot->checkUserJoinedChannel($from_id, '@' . $join_force_channel); if (!$status) { $response_text = "👋 *خوش آمدید*\n\n"; $response_text .= "برای استفاده از خدمات ربات، لطفاً ابتدا در کانال زیر عضو شوید:\n\n"; $response_text .= "📲 @$channel_username\n\n"; $response_text .= "💡 پس از عضویت، دوباره دستور /start را ارسال کنید تا ادامه دهید."; $bot->sendMessage($from_id, $response_text, json_encode([ 'inline_keyboard' => [ [['text' => '📢 عضویت در کانال', 'url' => "https://t.me/$join_force_channel"]] ] ])); die; } } if (!$currentUser) { $stmt = $db->prepare("SELECT `user_id` FROM `affiliates` WHERE `user_id` = ?"); $stmt->execute([$from_id]); if ($stmt->rowCount() == 0) { $stmt = $db->prepare("INSERT INTO `affiliates` (`parent_id`, `user_id`) VALUES (?, ?)"); $stmt->execute([0, $from_id]); } $otp = random_int(10000, 99999); addNewUser($chat_id, $otp); setStep($from_id, 'auth'); } if ($data == 'accept_terms') { $query = "UPDATE `users` SET `accepted_terms` = 1 WHERE `chat_id` = ?"; $stmt = $db->prepare($query); $stmt->execute([$from_id]); $response_text = "✅ *قوانین پذیرفته شد*\n\n"; $response_text .= "شما قوانین و مقررات ربات را مطالعه و پذیرفتید.\n\n"; $response_text .= "⚠️ *توجه:*\n"; $response_text .= "• از این پس موظف به رعایت قوانین هستید\n"; $response_text .= "• در صورت بروز هرگونه تخلف یا سوءاستفاده، تمام مسئولیت بر عهده شما خواهد بود\n\n"; $response_text .= "برای ادامه لطفاً مجدداً دستور /start را ارسال کنید."; $bot->editMessage($from_id, $response_text, $message_id); die; } if ($currentUser->accepted_terms == 0) { $rulesText = getSettingsBot('rules_text')->value_ ?? '🔸 هنوز محتوای قوانین تنظیم نشده است.'; $response_text = "📜 *قوانین و مقررات استفاده از ربات*\n\n"; $response_text .= "$rulesText\n\n"; $response_text .= "✅ استفاده از ربات بهمعنای پذیرش قوانین فوق است.\n\n"; $response_text .= "لطفاً برای ادامه، دکمه زیر را لمس کنید:"; $bot->sendMessage($from_id, $response_text, json_encode([ 'inline_keyboard' => [ [['text' => '✅ پذیرش قوانین و ادامه', 'callback_data' => 'accept_terms']] ] ])); die; } if (preg_match('/^\/start( (\d+))?$/', $text) || $text == 'انصراف' || $text == '🔙 بازگشت به منوی اصلی' || $data == 'cancel-buy') { if ($data == 'cancel-buy') { $bot->editMessage($from_id, "❌ *سفارش لغو شد*\n\nسفارش شما با موفقیت لغو شد.\n\n💡 در صورت تمایل میتوانید دوباره اقدام به ثبت سفارش کنید.", $message_id); $bot->sendMessage($from_id, '✅ به منوی اصلی بازگشتید', $main_keyboard); setStep($from_id, 'home'); die; } if ($currentUser->step == 'auth') { $keyboard = json_encode([ 'resize_keyboard' => true, 'keyboard' => [ [['text' => '📱 ارسال شماره تماس', 'request_contact' => true]] ] ]); $response_text = "👋 *خوش آمدید*\n\n"; $response_text .= "برای استفاده از خدمات ربات ابتدا باید مراحل احراز هویت پایه را تکمیل کنید 🔒\n\n"; $response_text .= "📱 لطفاً برای شروع، شماره تماس خود را از طریق دکمه زیر ارسال کنید:"; $bot->sendMessage($from_id, $response_text, $keyboard); die; } if ($currentUser->auth_level == 0) { setStep($from_id, 'auth'); $keyboard = json_encode([ 'resize_keyboard' => true, 'keyboard' => [ [['text' => '📱 ارسال شماره تماس', 'request_contact' => true]] ] ]); $response_text = "👋 *خوش آمدید*\n\n"; $response_text .= "برای استفاده از خدمات ربات ابتدا باید مراحل احراز هویت پایه را تکمیل کنید 🔒\n\n"; $response_text .= "📱 لطفاً برای شروع، شماره تماس خود را از طریق دکمه زیر ارسال کنید:"; $bot->sendMessage($from_id, $response_text, $keyboard); die; } $start_text = getSettingsBot('start_text')->value_ ?? 'به ربات خوش آمدید.'; $bot->sendMessage($from_id, $start_text, $main_keyboard); setStep($from_id, 'home'); die; } if ($text == 'قیمت') { $loading_msg = $bot->sendMessage($from_id, "⏳ *در حال دریافت قیمت...*"); $loading_msg_id = $loading_msg->result->message_id ?? null; $usdt_irt_price = getUsdtIrtPrice(); if ($usdt_irt_price !== null) { $price_formatted = number_format($usdt_irt_price); $response_text = "💵 *قیمت لحظهای تتر (USDT)*\n\n"; $response_text .= "💰 قیمت: `$price_formatted` تومان\n\n"; $response_text .= "🕐 زمان: " . jdate("Y/m/d - H:i:s", strtotime(date("Y/m/d H:i:s")), tr_num: 'en'); if ($loading_msg_id) { $bot->editMessage($from_id, $response_text, $loading_msg_id); } else { $bot->sendMessage($from_id, $response_text); } } else { $error_text = "❌ *خطا در دریافت قیمت*\n\n"; $error_text .= "⚠️ متأسفانه در حال حاضر امکان دریافت قیمت وجود ندارد.\n\n"; $error_text .= "🔄 لطفاً چند دقیقه دیگر دوباره تلاش کنید."; if ($loading_msg_id) { $bot->editMessage($from_id, $error_text, $loading_msg_id); } else { $bot->sendMessage($from_id, $error_text); } } }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply