ACIL FM
Dark
Refresh
Current DIR:
/home/fastexsh/public_html/soodino/commands
/
home
fastexsh
public_html
soodino
commands
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
cards.php
19.18 MB
chmod
View
DL
Edit
Rename
Delete
error_log
836 B
chmod
View
DL
Edit
Rename
Delete
history.php
11.61 MB
chmod
View
DL
Edit
Rename
Delete
start_bot.php
8.48 MB
chmod
View
DL
Edit
Rename
Delete
user_area.php
7.62 MB
chmod
View
DL
Edit
Rename
Delete
user_extra_features.php
5.98 MB
chmod
View
DL
Edit
Rename
Delete
user_features.php
12.01 MB
chmod
View
DL
Edit
Rename
Delete
wallet.php
1.86 MB
chmod
View
DL
Edit
Rename
Delete
withdraw.php
16.17 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/fastexsh/public_html/soodino/commands/user_features.php
<?php // مشاهده درخواستهای برداشت کاربر if (($text == "📋 برداشتهای من" || $text == "📋 درخواستهای برداشت") && $user->logged_in == 1) { $stmt = $pdo->prepare("SELECT * FROM `accounts` WHERE `username` = ?"); $stmt->execute([$user->login_username]); $account = $stmt->fetch(); if (!$account) { $pdo->prepare("UPDATE `users` SET `logged_in` = 0, `login_username` = NULL WHERE `telegram_id` = ?") ->execute([$from_id]); setStep($from_id, "home"); $responseText = "⚠️ *خطا در دسترسی به حساب کاربری*\n\n" . "متأسفانه اطلاعات حساب کاربری شما در سیستم یافت نشد.\n\n" . "🔐 لطفاً برای ادامه کار، مجدداً وارد حساب کاربری خود شوید."; sendMessage($from_id, $responseText, $enterUserKeyboard); die; } $page = 1; $limit = 5; $offset = ($page - 1) * $limit; $username = $user->login_username; $queryCount = "SELECT COUNT(*) AS total FROM `withdraw_requests` WHERE `username` = ?"; $stmt = $pdo->prepare($queryCount); $stmt->execute([$username]); $total = (int) $stmt->fetch()->total; if ($total == 0) { sendMessage($from_id, "❌ *هیچ درخواست برداشتی ثبت نشده است*\n\n💸 میتوانید از بخش *درخواست برداشت جدید* درخواست خود را ثبت کنید.", $walletKeyboard); die; } $totalPages = max(1, ceil($total / $limit)); $queryRows = "SELECT * FROM `withdraw_requests` WHERE `username` = ? ORDER BY `id` DESC LIMIT $limit OFFSET $offset"; $stmt = $pdo->prepare($queryRows); $stmt->execute([$username]); $requests = $stmt->fetchAll(); $textMsg = "📋 *درخواستهای برداشت شما*\n\n"; foreach ($requests as $r) { $statusText = $r->status == "done" ? "تایید شده" : ($r->status == "pending" ? "در انتظار" : "رد شده"); $statusEmoji = $r->status == "approved" ? "✅" : ($r->status == "pending" ? "⏳" : "❌"); $timestamp = strtotime($r->created_at ?? date('Y-m-d H:i:s')); $rTime = jdate("H:i:s - Y/m/d", $timestamp, tr_num: 'en'); $textMsg .= "🆔 کد: `{$r->tracking_code}`\n" . "💰 مبلغ: `" . number_format($r->amount) . "` تومان\n" . "{$statusEmoji} وضعیت: `{$statusText}`\n" . "📅 زمان: {$rTime}\n" . "———————————————\n"; } $textMsg .= "\nصفحه {$page} از {$totalPages}"; $nav = ["inline_keyboard" => []]; $row = []; if ($page < $totalPages) $row[] = ["text" => "بعدی ➡️", "callback_data" => "withdraw_tx_" . ($page + 1)]; if ($row) $nav["inline_keyboard"][] = $row; setStep($from_id, "withdraw_tx_page_$page"); sendMessage($from_id, $textMsg, json_encode($nav)); die; } // مدیریت pagination برای درخواستهای برداشت if (isset($callback_query) && isset($data) && strpos($data, "withdraw_tx_") === 0) { $page = (int) str_replace("withdraw_tx_", "", $data); $limit = 5; $offset = ($page - 1) * $limit; $checkUser = $pdo->prepare("SELECT * FROM `users` WHERE `telegram_id` = ?"); $checkUser->execute([$from_id]); $user = $checkUser->fetch(); if (!$user || $user->logged_in != 1) { answerCallback($callback_query->id, "⚠️ لطفاً مجدداً وارد حساب کاربری شوید.", true); die; } $username = $user->login_username; $queryCount = "SELECT COUNT(*) AS total FROM `withdraw_requests` WHERE `username` = ?"; $stmt = $pdo->prepare($queryCount); $stmt->execute([$username]); $total = (int) $stmt->fetch()->total; $totalPages = max(1, ceil($total / $limit)); $queryRows = "SELECT * FROM `withdraw_requests` WHERE `username` = ? ORDER BY `id` DESC LIMIT $limit OFFSET $offset"; $stmt = $pdo->prepare($queryRows); $stmt->execute([$username]); $requests = $stmt->fetchAll(); $textMsg = "📋 *درخواستهای برداشت شما*\n\n"; foreach ($requests as $r) { $statusText = $r->status == "approved" ? "تایید شده" : ($r->status == "pending" ? "در انتظار" : "رد شده"); $statusEmoji = $r->status == "approved" ? "✅" : ($r->status == "pending" ? "⏳" : "❌"); $timestamp = strtotime($r->created_at ?? date('Y-m-d H:i:s')); $rTime = jdate("H:i:s - Y/m/d", $timestamp, tr_num: 'en'); $textMsg .= "🆔 کد: `{$r->tracking_code}`\n" . "💰 مبلغ: `" . number_format($r->amount) . "` تومان\n" . "{$statusEmoji} وضعیت: `{$statusText}`\n" . "📅 زمان: {$rTime}\n" . "———————————————\n"; } $textMsg .= "\nصفحه {$page} از {$totalPages}"; $nav = ["inline_keyboard" => []]; $row = []; if ($page > 1) $row[] = ["text" => "⬅️ قبلی", "callback_data" => "withdraw_tx_" . ($page - 1)]; if ($page < $totalPages) $row[] = ["text" => "بعدی ➡️", "callback_data" => "withdraw_tx_" . ($page + 1)]; if ($row) $nav["inline_keyboard"][] = $row; setStep($from_id, "withdraw_tx_page_$page"); editMessage($chat_id, $message_id, $textMsg, json_encode($nav)); die; } // مشاهده خلاصه حساب if ($text == "📊 خلاصه حساب" && $user->logged_in == 1) { $stmt = $pdo->prepare("SELECT * FROM `accounts` WHERE `username` = ?"); $stmt->execute([$user->login_username]); $account = $stmt->fetch(); if (!$account) { $pdo->prepare("UPDATE `users` SET `logged_in` = 0, `login_username` = NULL WHERE `telegram_id` = ?") ->execute([$from_id]); setStep($from_id, "home"); $responseText = "⚠️ *خطا در دسترسی به حساب کاربری*\n\n" . "متأسفانه اطلاعات حساب کاربری شما در سیستم یافت نشد.\n\n" . "🔐 لطفاً برای ادامه کار، مجدداً وارد حساب کاربری خود شوید."; sendMessage($from_id, $responseText, $enterUserKeyboard); die; } // آمار تراکنشها $stmtProfit = $pdo->prepare("SELECT COUNT(*) as total, SUM(`amount`) as total_amount FROM `profit_transactions` WHERE `username` = ? AND `amount` > 0"); $stmtProfit->execute([$user->login_username]); $profitStats = $stmtProfit->fetch(); $stmtBase = $pdo->prepare("SELECT COUNT(*) as total, SUM(`amount`) as total_amount FROM `base_investment_transactions` WHERE `username` = ? AND `amount` > 0"); $stmtBase->execute([$user->login_username]); $baseStats = $stmtBase->fetch(); $stmtWithdraw = $pdo->prepare("SELECT COUNT(*) as total, SUM(`amount`) as total_amount FROM `withdraw_requests` WHERE `username` = ? AND `status` = 'approved'"); $stmtWithdraw->execute([$user->login_username]); $withdrawStats = $stmtWithdraw->fetch(); $stmtCards = $pdo->prepare("SELECT COUNT(*) as total FROM `cards` WHERE `username` = ?"); $stmtCards->execute([$user->login_username]); $cardsCount = $stmtCards->fetch()->total; $baseInvestment = number_format($account->base_investment); $currentProfit = number_format($account->current_profit); $totalBalance = number_format($account->base_investment + $account->current_profit); $totalProfitAdded = number_format($profitStats->total_amount ?? 0); $totalBaseAdded = number_format($baseStats->total_amount ?? 0); $totalWithdrawAmount = number_format($withdrawStats->total_amount ?? 0); $responseText = "📊 *خلاصه حساب کاربری*\n\n" . "💼 *وضعیت مالی فعلی*\n\n" . "💰 موجودی کل: *{$totalBalance}* تومان\n" . "💵 سرمایه پایه: *{$baseInvestment}* تومان\n" . "📈 سود فعلی: *{$currentProfit}* تومان\n\n\n" . "📈 *آمار تراکنشها*\n\n" . "➕ جمع سودها: *{$totalProfitAdded}* تومان\n" . "➕ جمع مبالغ پایه: *{$totalBaseAdded}* تومان\n" . "💸 جمع برداشتها: *{$totalWithdrawAmount}* تومان\n\n\n" . "📊 *آمار کلی*\n\n" . "💳 کارتها: *{$cardsCount}*\n" . "📈 تراکنشهای سود: *" . ($profitStats->total ?? 0) . "*\n" . "💰 تراکنشهای پایه: *" . ($baseStats->total ?? 0) . "*\n" . "💸 برداشتهای موفق: *" . ($withdrawStats->total ?? 0) . "*"; sendMessage($from_id, $responseText, $userMainKeyboard); die; } // مشاهده آخرین تراکنشهای کاربر if ($text == "🕐 آخرین تراکنشها" && $user->logged_in == 1) { $stmt = $pdo->prepare("SELECT * FROM `accounts` WHERE `username` = ?"); $stmt->execute([$user->login_username]); $account = $stmt->fetch(); if (!$account) { $pdo->prepare("UPDATE `users` SET `logged_in` = 0, `login_username` = NULL WHERE `telegram_id` = ?") ->execute([$from_id]); setStep($from_id, "home"); $responseText = "⚠️ *خطا در دسترسی به حساب کاربری*\n\n" . "متأسفانه اطلاعات حساب کاربری شما در سیستم یافت نشد.\n\n" . "🔐 لطفاً برای ادامه کار، مجدداً وارد حساب کاربری خود شوید."; sendMessage($from_id, $responseText, $enterUserKeyboard); die; } // ترکیب تراکنشهای سود و پایه $stmtProfit = $pdo->prepare("SELECT 'profit' as type, `tracking_code`, `amount`, `created_at` FROM `profit_transactions` WHERE `username` = ? ORDER BY `id` DESC LIMIT 10"); $stmtProfit->execute([$user->login_username]); $profitTransactions = $stmtProfit->fetchAll(); $stmtBase = $pdo->prepare("SELECT 'base' as type, `tracking_code`, `amount`, `created_at` FROM `base_investment_transactions` WHERE `username` = ? ORDER BY `id` DESC LIMIT 10"); $stmtBase->execute([$user->login_username]); $baseTransactions = $stmtBase->fetchAll(); $allTransactions = array_merge($profitTransactions, $baseTransactions); // مرتبسازی بر اساس تاریخ usort($allTransactions, function($a, $b) { return strtotime($b->created_at) - strtotime($a->created_at); }); $allTransactions = array_slice($allTransactions, 0, 15); if (empty($allTransactions)) { $responseText = "🕐 *آخرین تراکنشها*\n\n" . "❌ هیچ تراکنشی یافت نشد."; sendMessage($from_id, $responseText, $userMainKeyboard); die; } $responseText = "🕐 *آخرین تراکنشها*\n\n"; foreach ($allTransactions as $index => $t) { $amount = (int)$t->amount; $amountFormatted = number_format(abs($amount)); $type = $t->type == 'profit' ? "📈 سود" : "💰 سرمایه پایه"; $emoji = $amount > 0 ? "➕" : "➖"; $timestamp = strtotime($t->created_at); $shamsiTime = jdate('H:i', $timestamp); $shamsiDateOnly = jdate('Y/m/d', $timestamp); $shamsiDate = "{$shamsiTime} - {$shamsiDateOnly}"; $responseText .= "*#" . ($index + 1) . "*\n"; $responseText .= "{$emoji} *{$type}*\n"; $responseText .= "💰 مبلغ: *{$amountFormatted}* تومان\n"; $responseText .= "📌 کد: `{$t->tracking_code}`\n"; $responseText .= "📅 تاریخ: *{$shamsiDate}*\n\n"; } sendMessage($from_id, $responseText, $userMainKeyboard); die; }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply