Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* M4nifest0 Black Hat Hacking Team https://t.me/M4nifest0 https://t.me/M4ni..

Decoded Output download

<?php 
 
/* 
 M4nifest0 Black Hat Hacking Team  
https://t.me/M4nifest0 
https://t.me/M4nifest0_Video_Archive 
https://t.me/M4nifest0_Black_Hat_Hacking 
*/ 
//----------------------------------------------- 
 
require_once('config.php'); 
require_once('BPT.php'); 
require_once('handler.php'); 
 
$handler =     new handler( 
    $BPTSettings['public'] 
); 
 
class BPT_handler extends BPT  
{ 
    public function __construct( 
        array $settings 
        )  
    { 
        parent::__construct($settings); 
    } 
 
    public function message( 
        $update 
        ) 
    { 
        global      $connect,  
                    $handler,  
                    $keyboard,  
                    $admins,  
                    $time; 
        $from_id =      $update->from->id; 
        $first_name =   $update->from->first_name; 
        $chat_type =    $update->chat->type; 
        $message_id =   $update->message_id; 
        $text =         $update->text; 
        $caption =      (isset($update->caption)) ? $update->caption : null; 
        $user =         $connect->query("SELECT * FROM `user` WHERE `id` = $from_id LIMIT 1;")->fetch_assoc(); 
 
        if ($chat_type != 'private') 
            return ; 
             
        $check = $handler->checkJoin($from_id); 
        if ($check['ok'] == false)  
        { 
            $this->send(['text'=>" To use the free features of this robot, please enter the channels below and then click on 'Done'.", 'reply_markup'=>$this->eKey(['inline'=>$check['keys']]), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML', 'answer'=> null]);     
            return ; 
        } 
        if ($text == '/start' or $text == '')  
        { 
            if (empty($user['id'])) 
                $connect->query("INSERT INTO `user` (`id` , `step` , `time_s`) VALUES ($from_id, 'none', $time);"); 
     
            $this->send(['text'=>"<b> Welcome to  M4nifest0 (M4) !</b> 
 
 Using this robot is completely free. 
 Setting up this robot is completely free. 
 You are responsible for unauthorized use of this robot. 
 
 Black hat hack team M4nifest0 (M4) 
 @M4nifest0", 'reply_markup'=>$this->eKey(['remove']), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML', 'answer'=> null]); 
            $handler->clearCache($from_id);     
            return ; 
        } 
        if ($user['step'] == 'none') 
        { 
            if (preg_match('/\@[a-z|A-Z|0-9|\.|\_]+$/', $text)) 
            { 
                $send =             $this->send(['text'=>"<b>Extracting data, please wait...</b>", 'parse_mode' => 'HTML', 'answer'=> null]); 
                $username =         str_replace('@', '', $text); 
                $result =           $handler->openLink('https://storiesig.info/api/ig/userInfoByUsername/' . $username, 'GET', [], [], true, 15); 
                if (isset($result) and is_array($result) and $result['result']['status'] == 'ok') 
                { 
                    $res =          $result['result']['user']; 
                    $pic =          $res['profile_pic_url']; 
                    $name =         $res['full_name'] ?: 'Unknown'; 
                    $bio =          $res['biography'] ?: 'Unknown'; 
                    $type_page =    ($res['is_private'] == false) ? 'Public' : 'Private'; 
                    $keys =         [[[" Highlights", 'dlhighlights_' . $username], [" Stories", 'dlstory_' . $username]]]; 
                    $txt =          " UserName : <code>$username</code>
 Bio:Bio: <code>$name</code>

 Page Status : <b>$type_page</b>

 Posts Count: <code>{$res['media_count']}</code> 
 Follower Count : <code>{$res['follower_count']}</code> 
 Following Count : <code>{$res['following_count']}</code> 

 Bio : 
<code>$bio</code>

 @" . BOT_USERNAME; 
                    if (!empty($pic)) 
                        $this->sendPhoto(['photo' => $pic, 'caption' => $txt, 'reply_markup'=>$this->eKey(['inline'=>$keys]), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML']); 
                    else 
                        $this->send(['text'=>$txt, 'disable_web_page_preview'=>true, 'reply_markup'=>$this->eKey(['inline'=>$keys]),  'parse_mode' => 'HTML', 'answer'=> null]); 
                    $this->deleteMessage(['message_id' =>$send['result']['message_id'], 'answer'=> null]); 
                } 
                else 
                    $this->editMessagetext(['message_id' =>$send['result']['message_id'], 'text'=>" There was a problem receiving the information
 The sent address may be wrong", 'parse_mode'=>'HTML', 'answer'=> null]); 
                return ; 
            } 
            if ($update->entities[0]->type == 'url')  
            { 
                if ($handler->startsWith($text, 'https://www.instagram.com/reel') or $handler->startsWith($text, 'https://www.instagram.com/p/')) 
                { 
                    $send =             $this->send(['text'=>"please wait ...", 'parse_mode'=>'HTML', 'answer'=>null]); 
                    $params = array( 
                        'key' =>        INSTA_KEY, 
                        'type' =>       'postdownloader', 
                        'link' =>       $text, 
                    ); 
                    $result =           $handler->openLink('https://api.codesazan.ir/Instagram?' . http_build_query($params), 'GET', [], [], true); 
                    if ($result['status'] == 200) 
                    { 
                        $photo_formats =    ['jpg', 'png', 'webp']; 
                        foreach ($result['result']['medias'] as $media) 
                        { 
                            $type = (in_array($media['extension'], $photo_formats)) ? 'photo' : 'video'; 
                            $input_medias[] = ['type' => $type, 'media' => $media['url']]; 
                        } 
                        $chunk = array_chunk($input_medias,10); 
                        foreach ($chunk as $group) 
                        { 
                            $group[0]['caption'] = " Extracted by : @" . BOT_USERNAME; 
                            $this->sendMediaGroup(['chat_id' => $from_id, 'media' => json_encode($group), 'answer'=> null]); 
                        } 
                    } 
                    else 
                        $this->send(['text'=>" Error Downloading...", 'parse_mode'=>'HTML', 'answer'=>null]); 
                     
                    $this->deleteMessage(['message_id' =>$send['result']['message_id'], 'answer'=> null]); 
                    return ; 
                } 
            } 
        } 
        if (in_array($from_id,$admins)) 
        { 
            if ($text == '/panel' or $text == ' Back To Panel')  
            { 
                $this->send(['text'=>"Hi $first_name 
 Welcome to the admin panel.

 Your numeric ID: <code>$from_id</code>

 Please select one of the options below:", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['panel']]), 'parse_mode'=>'HTML', 'answer'=> null]); 
                $handler->clearCache($from_id);     
                return ; 
            } 
            if ($text == ' Statistics')  
            { 
                $users_count = number_format($connect->query("SELECT `id` FROM `user`;")->num_rows); 
                $this->send(['text'=>" General statistics of your bot

The total number of robot members :  <code>$users_count</code>", 'parse_mode'=>'HTML', 'answer'=>null]);     
                return ; 
            } 
            if ($text == ' Public Posting')  
            { 
                if (!$handler->checkSendAll())  
                { 
                    $this->send(['text'=>" Please Send Or Forward Your Message:", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['back_panel']]), 'answer'=>null]); 
                    $handler->saveData($from_id,'sendforall'); 
                } 
                else 
                { 
                    $sendforall =   $connect->query("SELECT * FROM `sfall`")->fetch_assoc(); 
                    $this->send(['text'=>" Error sending public message .

 Another admin has started the public message process and it is not finished yet .
- - -
 You can cancel the public message by clicking on cancel public message.", 'reply_markup'=>$this->eKey(['inline'=>[[[" Cancel and stop public messages",'cancellsenall']],[[" {$sendforall['chat_id']}",'none']],[[" Remaining Time: {$handler->timeleft($sendforall['count'])} Minutes",'none'],[" Posted: {$sendforall['count']}",'none']]]]), 'answer'=>null]); 
                } 
                return ; 
            } 
            if ($text == ' Lock Channels' or $text == ' Return To Channel Management') 
            { 
                $this->send(['text'=>"Welcome to the channel lock management section of your bot.

Please select one of the following options:", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['locks']]), 'answer'=>null]); 
                $handler->clearCache($from_id);     
                return ; 
            } 
            if ($text == ' Add Channel')  
            { 
                $this->send(['text'=>"To add a channel lock
 Please send a numeric ID if your channel is private and a username if your channel is public.

 Private channel sending example:
-123456789
 Example of public channel posting:
@M4nifest0", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['back_channels']]), 'answer'=>null]); 
                $handler->saveData($from_id,'addChannel'); 
                return ; 
            } 
            if ($text == ' Channel Management')  
            { 
                $this->send(['text'=>" Your Bot's channel lock list.

 Delete: immediately remove the channel lock
 Link setting: Setting a new link for joining", 'reply_markup'=>$this->eKey(['inline'=>$handler->CreateChnnelLocksKey()]), 'answer'=>null]); 
                return ; 
            } 
        } 
        if ($user['step'] == 'sendforall' and !$handler->checkSendAll())  
        { 
            $this->send(['text'=>" Please Select The Sending Type:

 Note, after selection, the process of sending public messages will begin.

 Forwarding type: Your message will be forwarded (by name) to the users of your bot.
 Anonymous type: Your message will be sent anonymously (the same as the normal public message).", 'reply_markup'=>$this->eKey(['inline'=>[[["Submit Anonymously",'sendall'],["Forward To All",'forall']],[[" Cancellation And Return",'backpanel']]]]), 'answer'=>null]); 
            $handler->saveData($from_id, ['message_id' => $message_id, 'caption' => $caption]); 
            return ; 
        } 
        if ($user['step'] == 'addChannel')  
        { 
            if ($this->getChatAdministrators(['chat_id' => $text])['ok']) 
            { 
                $ChannelCheck =         $connect->query("SELECT * FROM `channels` WHERE `idoruser` = '$text' LIMIT 1")->fetch_assoc(); 
                if (empty($ChannelCheck['link']))  
                { 
                    $type_channel =     $handler->quickGet($text,'username')?'public':'private'; 
                    if ($type_channel == 'private')  
                    { 
                        $createLink =   $this->createChatInviteLink(['chat_id'=>$text, 'name'=>$this->getMe()['result']['first_name']]); 
                        if (!empty($createLink['result']['creator']['id']))  
                        { 
                            $connect->query("INSERT INTO `channels` (`idoruser` , `link` , `createtime`) VALUES ('".$handler->quickGet($text,'id')."', '".$createLink['result']['invite_link']."', $time)"); 
                            $this->send(['text'=>" Channel ( {$handler->quickGet($text,'title')} ) It has been successfully added to the lock list of bot channels.

 Channel Type: Private
 Channel ID: {$handler->quickGet($text,'id')}
 Channel link {$createLink['result']['invite_link']}", 'disable_web_page_preview'=>true, 'reply_markup'=>$this->eKey(['keyboard'=>[[' Channel Management',' Add Channel'],[' Back To Panel']]]), 'answer'=>null]); 
                            $handler->clearCache($from_id); 
                        } 
                          else  
                            $this->send(['text'=>"Error when creating the membership link

To add a private channel,
 the bot must have access to manage the link in the sent channel.

 Please activate this access for the bot and try to add the channel again.", 'answer'=>null]); 
                    } 
                      else  
                    { 
                        $ChennelRep = str_replace('@','',$text); 
                        $connect->query("INSERT INTO `channels` (`idoruser` , `link` , `createtime`) VALUES ('$text', 'https://t.me/$ChennelRep', $time)"); 
                        $this->send(['text'=>" Channel ( {$handler->quickGet($text,'title')} ) It has been successfully added to the lock list of bot channels.

 Channel Type: Public
 Channel link https://t.me/$ChennelRep", 'reply_markup'=>$this->eKey(['keyboard'=>[[' Channel Management',' Add Channel'],[' Back To Panel']]]), 'disable_web_page_preview'=>true, 'answer'=>null]); 
                        $handler->clearCache($from_id); 
                    } 
                } 
                  else 
                    $this->send(['text'=>" This channel has already been added.", 'answer'=>null]); 
            } 
              else   
                $this->send(['text'=>"The bot is not admin on the posting channel. Or you sent it wrongly!

Please first admin the robot on the sent channel and give management access to the link.", 'answer'=>null]); 
 
            return ; 
        } 
        if ($user['step'] == 'setNewLink')  
        { 
            $Channel = $handler->getData('selectChannel', $from_id); 
            if ($update->entities[0]->type == 'url' and strstr($text,'t.me/') or strstr($text,'telegram.me/'))  
            { 
                if (!empty($Channel)) 
                { 
                    $connect->query("UPDATE `channels` SET `link` = '$text' WHERE `idoruser` = '$Channel' LIMIT 1");	 
                    $ChannelCheck =$connect->query("SELECT * FROM `channels` WHERE `idoruser` = '$Channel' LIMIT 1")->fetch_assoc(); 
                    $this->send(['text'=>" New link successfully Set.

 New link : {$text}", 'reply_markup'=>$this->eKey(['inline'=>[[[' Back','BacktoLocks']]]]), 'disable_web_page_preview'=>true, 'answer'=>null]); 
                    $handler->clearCache($from_id); 
                } 
                  else 
                    $this->send(['text'=>"Unknown Error
 Please try to register a new link again or contact bot support.

 Use the button below to return:", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['back_panel']]), 'answer'=>null]); 
            } 
              else 
                $this->send(['text'=>" Please send only a link to join Telegram ..
 Try Again:", 'reply_markup'=>$this->eKey(['inline'=>[[[' Back','BacktoLocks']]]]), 'answer'=>null]); 
 
            return ; 
        } 
        $this->send(['text'=>" Command Not Found!", 'parse_mode'=>'HTML', 'answer'=> null]); 
    } 
    public function callback_query( 
        $update 
        )  
    { 
        global          $connect,  
                        $handler,  
                        $keyboard,  
                        $admins; 
        $data =         $update->data; 
        $chat_id =      $update->message->chat->id; 
        $from_id =      $update->from->id; 
        $message_id =   $update->message->message_id; 
        $user =         $connect->query("SELECT * FROM `user` WHERE `id` = $from_id LIMIT 1;")->fetch_assoc(); 
 
        if ($data == 'checkJoin')  
        { 
            $check = $handler->checkJoin($from_id); 
            if ($check['ok'] == true)  
            { 
                $this->deleteMessage(['answer'=> null]); 
                $this->send(['text'=>"<b> Welcome to  M4nifest0 (M4) !</b> 
 
 Using this robot is completely free. 
 Setting up this robot is completely free. 
 You are responsible for unauthorized use of this robot. 
 
 Black hat hack team M4nifest0 (M4) 
 @M4nifest0", 'reply_markup'=>$this->eKey(['remove']), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML', 'answer'=> null]); 
                $handler->clearCache($from_id); 
            } 
              else 
                $this->answerCallbackQuery(['text'=>' You are not yet a member of the channels.', 'show_alert'=>true]); 
 
            return ; 
        } 
        $check = $handler->checkJoin($from_id); 
        if ($check['ok'] == false)  
        { 
            $this->editMessagetext(['text'=>" To use the free features of this robot, please enter the channels below and then click on 'Done'.", 'reply_markup'=>$this->eKey(['inline'=>$check['keys']]), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML', 'answer'=> null]);     
            return ; 
        } 
        if ($data == 'none')  
        { 
            $this->answerCallbackQuery(['text'=>' This Button Is For Display Only', 'show_alert'=>true]); 
            return ; 
        } 
        if (strstr($data,'dlstory_'))  
        { 
            $username = str_replace('dlstory_','',$data); 
            $this->answerCallbackQuery(['text'=>'Connecting To The Instagram API Server...', 'show_alert'=>false]); 
            $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[['Connecting To The Instagram API Server...', 'none']]]]), 'answer'=> null]); 
            $params = array( 
                'key' =>        INSTA_KEY, 
                'type' =>       'pagestory', 
                'username' =>    $username, 
            ); 
            $result =           $handler->openLink('https://api.codesazan.ir/Instagram?' . http_build_query($params), 'GET', [], [], true); 
            if ($result['status'] == 200) 
            { 
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[' Downloading stories, please wait...', 'none']]]]), 'answer'=> null]); 
                foreach ($result['result'] as $media) 
                    $input_medias[] = ['type' => $media['type'], 'media' => $media['story']]; 
                 
                $chunk = array_chunk($input_medias,10); 
                foreach ($chunk as $group) 
                { 
                    $group[0]['caption'] = " Extracted by : @" . BOT_USERNAME; 
                    $this->sendMediaGroup(['chat_id' => $from_id, 'media' => json_encode($group), 'answer'=> null]); 
                } 
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[' The download of the stories has been completed', 'none']], [[" Highlights", 'dlhighlights_' . $username]]]]), 'answer'=> null]); 
            } 
            else 
            { 
                $this->answerCallbackQuery(['text'=>' The Yser Has No Stories', 'show_alert'=>false]); 
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[' The Yser Has No Stories', 'none']], [[" Highlights", 'dlhighlights_' . $username]]]]), 'answer'=> null]); 
            } 
            return ; 
        } 
        if (strstr($data,'dlhighlights_'))  
        { 
            $username = str_replace('dlhighlights_','',$data); 
            $this->answerCallbackQuery(['text'=>'Connecting To The Instagram API Server...', 'show_alert'=>false]); 
            $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[['Connecting To The Instagram API Server...', 'none']]]]), 'answer'=> null]); 
            $params = array( 
                'key' =>        INSTA_KEY, 
                'type' =>       'pagehightlight', 
                'username' =>    $username, 
            ); 
            $result =           $handler->openLink('https://api.codesazan.ir/Instagram?' . http_build_query($params), 'GET', [], [], true); 
            if ($result['status'] == 200) 
            { 
                if (count($result['result']) > 0) 
                { 
                    $num =          0; 
                    foreach ($result['result'] as $res) 
                    { 
                        $num +=     1; 
                        $keys[] = ["{$res['Title']}", 'getHighlight@' . $username . '_' . $res['hightlightIDS']]; 
                        if ($num == 25) 
                            break; 
                    } 
                    $keys = array_chunk($keys,2); 
                    $keys = array_merge([[[' Choose one of the page highlights ', 'none']]], $keys); 
                    array_push($keys, [[" Stories", 'dlstory_' . $username]]); 
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>$keys]), 'answer'=> null]); 
                } 
                else 
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" No highlight found", 'none']], [[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]); 
            } 
            else 
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" No highlight found", 'none']], [[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]); 
            return ; 
        } 
        if (strstr($data,'getHighlight@'))  
        { 
            $ex = explode('_', str_replace('getHighlight@','',$data)); 
            $username = $ex[0]; 
            $highlightID = $ex[1]; 
            $this->answerCallbackQuery(['text'=>'Connecting To The Instagram API Server...', 'show_alert'=>false]); 
            $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[['Connecting To The Instagram API Server...', 'none']]]]), 'answer'=> null]); 
            $params = array( 
                'key' =>        INSTA_KEY, 
                'type' =>       'gethightlight', 
                'id' =>         $highlightID, 
            ); 
            $result =           $handler->openLink('https://api.codesazan.ir/Instagram?' . http_build_query($params), 'GET', [], [], true); 
            if ($result['status'] == 200) 
            { 
                if (count($result['result']) > 0) 
                { 
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[' Downloading highlights, please wait...', 'none']]]]), 'answer'=> null]); 
                    foreach ($result['result'] as $media) 
                        $input_medias[] = ['type' => $media['type'], 'media' => $media['highlite']]; 
 
                    $chunk = array_chunk($input_medias,10); 
                    foreach ($chunk as $group) 
                    { 
                        $group[0]['caption'] = " Extracted by : @" . BOT_USERNAME; 
                        $this->sendMediaGroup(['chat_id' => $from_id, 'media' => json_encode($group), 'answer'=> null]); 
                    } 
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" Download Highlights has been completed.", 'none']],[[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]); 
                } 
                else 
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" Error Downloading Highlights", 'none']],[[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]); 
            } 
            else 
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" Error Downloading Highlights", 'none']],[[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]); 
            return ; 
        } 
        if (in_array($from_id,$admins)) 
        { 
            if ($data == 'backpanel')  
            { 
                $this->deleteMessage(['answer'=> null]); 
                $this->send(['text'=>'Return To The Management Panel.', 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['panel']]), 'answer'=> null]); 
                $handler->clearCache($from_id); 
                return ; 
            } 
            if ($data == 'cancellsenall')  
            { 
                $this->editMessagetext(['text'=>"Public posting has been cancelled"]); 
                $connect->query("UPDATE `sfall` SET `forall` = 0, `sendall` = 0, `count` = 0, `msg_id` = 0, `chat_id` = 0, `msg_id2` = 0, `text` = 'none' LIMIT 1");	 
                return ; 
            } 
            if ($data == 'BacktoLocks')  
            { 
                $this->editMessagetext(['text'=>"Back To The Management Menu", 'parse_mode'=>'HTML', 'reply_markup'=>$this->eKey(['inline'=>$handler->CreateChnnelLocksKey()]), 'answer'=> null]); 
                $handler->clearCache($from_id); 
                return ; 
            } 
            if (strstr($data,'deleteChannelLock_'))  
            { 
                $Channel = str_replace('deleteChannelLock_','',$data); 
                $connect->query("DELETE FROM `channels` WHERE `idoruser` = '$Channel' LIMIT 1");	 
                $this->editMessagetext(['text'=>" {$handler->quickGet($Channel,'title')} <i> Removed from the list of locked channels </i>

 The bot left this channel automatically.", 'parse_mode'=>'HTML', 'reply_markup'=>$this->eKey(['inline'=>$handler->CreateChnnelLocksKey()]), 'answer'=> null]); 
                $this->leaveChat(['chat_id'=>$Channel]); 
                return ; 
            } 
            if (strstr($data,'setNewLink_'))  
            { 
                $this->editMessagetext(['text'=>"Please send the new link:", 'reply_markup'=>$this->eKey(['inline'=>[[[' Back','BacktoLocks']]]]), 'answer'=> null]); 
                $handler->saveData($from_id,'setNewLink'); 
                $handler->saveData($from_id, ['selectChannel' => str_replace('setNewLink_', '', $data)]); 
                return ; 
            } 
            if (!$handler->checkSendAll()) 
            { 
                $users_count = $connect->query("SELECT `id` FROM `user`;")->num_rows; 
                if ($data == 'sendall')  
                { 
                    $datas = $handler->getData(['caption', 'message_id'], $from_id); 
                    $caption = $datas['caption']?:'none'; 
                    $connect->query("UPDATE `sfall` SET `sendall` = 1, `count` = 0, `chat_id` = '$chat_id', `msg_id` = '{$datas['message_id']}', `msg_id2` = '$message_id', `text` = '$caption' LIMIT 1");	 
                    $this->editMessagetext(['text'=>" The process of general message (forwarding) has started .
The Number Of Bot Members : : <code>$users_count</code>

 Public Message Information (to be updated)", 'parse_mode'=>'HTML', 'reply_markup'=>$this->eKey(['inline'=>[[["Sent: 0 People",'none']],[[" Estimated Time : {$handler->timeleft($users_count)} Minutes",'none']]]])]); 
                    $this->send(['text'=>'Return To The Management Panel.', 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['panel']]), 'answer'=> null]); 
                    $handler->clearCache($from_id); 
                } 
                if ($data == 'forall') 
                { 
                    $datas = $handler->getData(['caption', 'message_id'], $from_id); 
                    $caption = $datas['caption']?:'none'; 
                    $connect->query("UPDATE `sfall` SET `forall` = 1, `count` = 0, `chat_id` = '$chat_id', `msg_id` = '{$datas['message_id']}', `msg_id2` = '$message_id', `text` = '$caption' LIMIT 1");	 
                    $this->editMessagetext(['text'=>" The process of general message (forwarding) has started .
nThe Number Of Bot Members : <code>$users_count</code>

 Public Message Information (to be updated)", 'parse_mode'=>'HTML', 'reply_markup'=>$this->eKey(['inline'=>[[[" Sent: 0 People",'none']],[[" Estimated Time : {$handler->timeleft($users_count)} Minutes",'none']]]])]); 
                    $this->send(['text'=>'Return To The Management Panel.', 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['panel']]), 'answer'=> null]); 
                    $handler->clearCache($from_id); 
                } 
            } 
        } 
    } 
} 
 
$BPT = new BPT_handler($BPTSettings['handler']); 
$connect->close(); 
 
?>

Did this file decode correctly?

Original Code

<?php

/*
 M4nifest0 Black Hat Hacking Team 
https://t.me/M4nifest0
https://t.me/M4nifest0_Video_Archive
https://t.me/M4nifest0_Black_Hat_Hacking
*/
//-----------------------------------------------

require_once('config.php');
require_once('BPT.php');
require_once('handler.php');

$handler =     new handler(
    $BPTSettings['public']
);

class BPT_handler extends BPT 
{
    public function __construct(
        array $settings
        ) 
    {
        parent::__construct($settings);
    }

    public function message(
        $update
        )
    {
        global      $connect, 
                    $handler, 
                    $keyboard, 
                    $admins, 
                    $time;
        $from_id =      $update->from->id;
        $first_name =   $update->from->first_name;
        $chat_type =    $update->chat->type;
        $message_id =   $update->message_id;
        $text =         $update->text;
        $caption =      (isset($update->caption)) ? $update->caption : null;
        $user =         $connect->query("SELECT * FROM `user` WHERE `id` = $from_id LIMIT 1;")->fetch_assoc();

        if ($chat_type != 'private')
            return ;
            
        $check = $handler->checkJoin($from_id);
        if ($check['ok'] == false) 
        {
            $this->send(['text'=>" To use the free features of this robot, please enter the channels below and then click on 'Done'.", 'reply_markup'=>$this->eKey(['inline'=>$check['keys']]), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML', 'answer'=> null]);    
            return ;
        }
        if ($text == '/start' or $text == '') 
        {
            if (empty($user['id']))
                $connect->query("INSERT INTO `user` (`id` , `step` , `time_s`) VALUES ($from_id, 'none', $time);");
    
            $this->send(['text'=>"<b> Welcome to  M4nifest0 (M4) !</b>

 Using this robot is completely free.
 Setting up this robot is completely free.
 You are responsible for unauthorized use of this robot.

 Black hat hack team M4nifest0 (M4)
 @M4nifest0", 'reply_markup'=>$this->eKey(['remove']), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML', 'answer'=> null]);
            $handler->clearCache($from_id);    
            return ;
        }
        if ($user['step'] == 'none')
        {
            if (preg_match('/\@[a-z|A-Z|0-9|\.|\_]+$/', $text))
            {
                $send =             $this->send(['text'=>"<b>Extracting data, please wait...</b>", 'parse_mode' => 'HTML', 'answer'=> null]);
                $username =         str_replace('@', '', $text);
                $result =           $handler->openLink('https://storiesig.info/api/ig/userInfoByUsername/' . $username, 'GET', [], [], true, 15);
                if (isset($result) and is_array($result) and $result['result']['status'] == 'ok')
                {
                    $res =          $result['result']['user'];
                    $pic =          $res['profile_pic_url'];
                    $name =         $res['full_name'] ?: 'Unknown';
                    $bio =          $res['biography'] ?: 'Unknown';
                    $type_page =    ($res['is_private'] == false) ? 'Public' : 'Private';
                    $keys =         [[[" Highlights", 'dlhighlights_' . $username], [" Stories", 'dlstory_' . $username]]];
                    $txt =          " UserName : <code>$username</code>\n Bio:Bio: <code>$name</code>\n\n Page Status : <b>$type_page</b>\n\n Posts Count: <code>{$res['media_count']}</code> \n Follower Count : <code>{$res['follower_count']}</code> \n Following Count : <code>{$res['following_count']}</code> \n\n Bio : \n<code>$bio</code>\n\n @" . BOT_USERNAME;
                    if (!empty($pic))
                        $this->sendPhoto(['photo' => $pic, 'caption' => $txt, 'reply_markup'=>$this->eKey(['inline'=>$keys]), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML']);
                    else
                        $this->send(['text'=>$txt, 'disable_web_page_preview'=>true, 'reply_markup'=>$this->eKey(['inline'=>$keys]),  'parse_mode' => 'HTML', 'answer'=> null]);
                    $this->deleteMessage(['message_id' =>$send['result']['message_id'], 'answer'=> null]);
                }
                else
                    $this->editMessagetext(['message_id' =>$send['result']['message_id'], 'text'=>" There was a problem receiving the information\n The sent address may be wrong", 'parse_mode'=>'HTML', 'answer'=> null]);
                return ;
            }
            if ($update->entities[0]->type == 'url') 
            {
                if ($handler->startsWith($text, 'https://www.instagram.com/reel') or $handler->startsWith($text, 'https://www.instagram.com/p/'))
                {
                    $send =             $this->send(['text'=>"please wait ...", 'parse_mode'=>'HTML', 'answer'=>null]);
                    $params = array(
                        'key' =>        INSTA_KEY,
                        'type' =>       'postdownloader',
                        'link' =>       $text,
                    );
                    $result =           $handler->openLink('https://api.codesazan.ir/Instagram?' . http_build_query($params), 'GET', [], [], true);
                    if ($result['status'] == 200)
                    {
                        $photo_formats =    ['jpg', 'png', 'webp'];
                        foreach ($result['result']['medias'] as $media)
                        {
                            $type = (in_array($media['extension'], $photo_formats)) ? 'photo' : 'video';
                            $input_medias[] = ['type' => $type, 'media' => $media['url']];
                        }
                        $chunk = array_chunk($input_medias,10);
                        foreach ($chunk as $group)
                        {
                            $group[0]['caption'] = " Extracted by : @" . BOT_USERNAME;
                            $this->sendMediaGroup(['chat_id' => $from_id, 'media' => json_encode($group), 'answer'=> null]);
                        }
                    }
                    else
                        $this->send(['text'=>" Error Downloading...", 'parse_mode'=>'HTML', 'answer'=>null]);
                    
                    $this->deleteMessage(['message_id' =>$send['result']['message_id'], 'answer'=> null]);
                    return ;
                }
            }
        }
        if (in_array($from_id,$admins))
        {
            if ($text == '/panel' or $text == ' Back To Panel') 
            {
                $this->send(['text'=>"Hi $first_name \n Welcome to the admin panel.\n\n Your numeric ID: <code>$from_id</code>\n\n Please select one of the options below:", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['panel']]), 'parse_mode'=>'HTML', 'answer'=> null]);
                $handler->clearCache($from_id);    
                return ;
            }
            if ($text == ' Statistics') 
            {
                $users_count = number_format($connect->query("SELECT `id` FROM `user`;")->num_rows);
                $this->send(['text'=>" General statistics of your bot\n\nThe total number of robot members :  <code>$users_count</code>", 'parse_mode'=>'HTML', 'answer'=>null]);    
                return ;
            }
            if ($text == ' Public Posting') 
            {
                if (!$handler->checkSendAll()) 
                {
                    $this->send(['text'=>" Please Send Or Forward Your Message:", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['back_panel']]), 'answer'=>null]);
                    $handler->saveData($from_id,'sendforall');
                }
                else
                {
                    $sendforall =   $connect->query("SELECT * FROM `sfall`")->fetch_assoc();
                    $this->send(['text'=>" Error sending public message .\n\n Another admin has started the public message process and it is not finished yet .\n- - -\n You can cancel the public message by clicking on cancel public message.", 'reply_markup'=>$this->eKey(['inline'=>[[[" Cancel and stop public messages",'cancellsenall']],[[" {$sendforall['chat_id']}",'none']],[[" Remaining Time: {$handler->timeleft($sendforall['count'])} Minutes",'none'],[" Posted: {$sendforall['count']}",'none']]]]), 'answer'=>null]);
                }
                return ;
            }
            if ($text == ' Lock Channels' or $text == ' Return To Channel Management')
            {
                $this->send(['text'=>"Welcome to the channel lock management section of your bot.\n\nPlease select one of the following options:", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['locks']]), 'answer'=>null]);
                $handler->clearCache($from_id);    
                return ;
            }
            if ($text == ' Add Channel') 
            {
                $this->send(['text'=>"To add a channel lock\n Please send a numeric ID if your channel is private and a username if your channel is public.\n\n Private channel sending example:\n-123456789\n Example of public channel posting:\n@M4nifest0", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['back_channels']]), 'answer'=>null]);
                $handler->saveData($from_id,'addChannel');
                return ;
            }
            if ($text == ' Channel Management') 
            {
                $this->send(['text'=>" Your Bot's channel lock list.\n\n Delete: immediately remove the channel lock\n Link setting: Setting a new link for joining", 'reply_markup'=>$this->eKey(['inline'=>$handler->CreateChnnelLocksKey()]), 'answer'=>null]);
                return ;
            }
        }
        if ($user['step'] == 'sendforall' and !$handler->checkSendAll()) 
        {
            $this->send(['text'=>" Please Select The Sending Type:\n\n Note, after selection, the process of sending public messages will begin.\n\n Forwarding type: Your message will be forwarded (by name) to the users of your bot.\n Anonymous type: Your message will be sent anonymously (the same as the normal public message).", 'reply_markup'=>$this->eKey(['inline'=>[[["Submit Anonymously",'sendall'],["Forward To All",'forall']],[[" Cancellation And Return",'backpanel']]]]), 'answer'=>null]);
            $handler->saveData($from_id, ['message_id' => $message_id, 'caption' => $caption]);
            return ;
        }
        if ($user['step'] == 'addChannel') 
        {
            if ($this->getChatAdministrators(['chat_id' => $text])['ok'])
            {
                $ChannelCheck =         $connect->query("SELECT * FROM `channels` WHERE `idoruser` = '$text' LIMIT 1")->fetch_assoc();
                if (empty($ChannelCheck['link'])) 
                {
                    $type_channel =     $handler->quickGet($text,'username')?'public':'private';
                    if ($type_channel == 'private') 
                    {
                        $createLink =   $this->createChatInviteLink(['chat_id'=>$text, 'name'=>$this->getMe()['result']['first_name']]);
                        if (!empty($createLink['result']['creator']['id'])) 
                        {
                            $connect->query("INSERT INTO `channels` (`idoruser` , `link` , `createtime`) VALUES ('".$handler->quickGet($text,'id')."', '".$createLink['result']['invite_link']."', $time)");
                            $this->send(['text'=>" Channel ( {$handler->quickGet($text,'title')} ) It has been successfully added to the lock list of bot channels.\n\n Channel Type: Private\n Channel ID: {$handler->quickGet($text,'id')}\n Channel link {$createLink['result']['invite_link']}", 'disable_web_page_preview'=>true, 'reply_markup'=>$this->eKey(['keyboard'=>[[' Channel Management',' Add Channel'],[' Back To Panel']]]), 'answer'=>null]);
                            $handler->clearCache($from_id);
                        }
                          else 
                            $this->send(['text'=>"Error when creating the membership link\n\nTo add a private channel,\n the bot must have access to manage the link in the sent channel.\n\n Please activate this access for the bot and try to add the channel again.", 'answer'=>null]);
                    }
                      else 
                    {
                        $ChennelRep = str_replace('@','',$text);
                        $connect->query("INSERT INTO `channels` (`idoruser` , `link` , `createtime`) VALUES ('$text', 'https://t.me/$ChennelRep', $time)");
                        $this->send(['text'=>" Channel ( {$handler->quickGet($text,'title')} ) It has been successfully added to the lock list of bot channels.\n\n Channel Type: Public\n Channel link https://t.me/$ChennelRep", 'reply_markup'=>$this->eKey(['keyboard'=>[[' Channel Management',' Add Channel'],[' Back To Panel']]]), 'disable_web_page_preview'=>true, 'answer'=>null]);
                        $handler->clearCache($from_id);
                    }
                }
                  else
                    $this->send(['text'=>" This channel has already been added.", 'answer'=>null]);
            }
              else  
                $this->send(['text'=>"The bot is not admin on the posting channel. Or you sent it wrongly!\n\nPlease first admin the robot on the sent channel and give management access to the link.", 'answer'=>null]);

            return ;
        }
        if ($user['step'] == 'setNewLink') 
        {
            $Channel = $handler->getData('selectChannel', $from_id);
            if ($update->entities[0]->type == 'url' and strstr($text,'t.me/') or strstr($text,'telegram.me/')) 
            {
                if (!empty($Channel))
                {
                    $connect->query("UPDATE `channels` SET `link` = '$text' WHERE `idoruser` = '$Channel' LIMIT 1");	
                    $ChannelCheck =$connect->query("SELECT * FROM `channels` WHERE `idoruser` = '$Channel' LIMIT 1")->fetch_assoc();
                    $this->send(['text'=>" New link successfully Set.\n\n New link : {$text}", 'reply_markup'=>$this->eKey(['inline'=>[[[' Back','BacktoLocks']]]]), 'disable_web_page_preview'=>true, 'answer'=>null]);
                    $handler->clearCache($from_id);
                }
                  else
                    $this->send(['text'=>"Unknown Error\n Please try to register a new link again or contact bot support.\n\n Use the button below to return:", 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['back_panel']]), 'answer'=>null]);
            }
              else
                $this->send(['text'=>" Please send only a link to join Telegram ..\n Try Again:", 'reply_markup'=>$this->eKey(['inline'=>[[[' Back','BacktoLocks']]]]), 'answer'=>null]);

            return ;
        }
        $this->send(['text'=>" Command Not Found!", 'parse_mode'=>'HTML', 'answer'=> null]);
    }
    public function callback_query(
        $update
        ) 
    {
        global          $connect, 
                        $handler, 
                        $keyboard, 
                        $admins;
        $data =         $update->data;
        $chat_id =      $update->message->chat->id;
        $from_id =      $update->from->id;
        $message_id =   $update->message->message_id;
        $user =         $connect->query("SELECT * FROM `user` WHERE `id` = $from_id LIMIT 1;")->fetch_assoc();

        if ($data == 'checkJoin') 
        {
            $check = $handler->checkJoin($from_id);
            if ($check['ok'] == true) 
            {
                $this->deleteMessage(['answer'=> null]);
                $this->send(['text'=>"<b> Welcome to  M4nifest0 (M4) !</b>

 Using this robot is completely free.
 Setting up this robot is completely free.
 You are responsible for unauthorized use of this robot.

 Black hat hack team M4nifest0 (M4)
 @M4nifest0", 'reply_markup'=>$this->eKey(['remove']), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML', 'answer'=> null]);
                $handler->clearCache($from_id);
            }
              else
                $this->answerCallbackQuery(['text'=>' You are not yet a member of the channels.', 'show_alert'=>true]);

            return ;
        }
        $check = $handler->checkJoin($from_id);
        if ($check['ok'] == false) 
        {
            $this->editMessagetext(['text'=>" To use the free features of this robot, please enter the channels below and then click on 'Done'.", 'reply_markup'=>$this->eKey(['inline'=>$check['keys']]), 'disable_web_page_preview'=>true, 'parse_mode'=>'HTML', 'answer'=> null]);    
            return ;
        }
        if ($data == 'none') 
        {
            $this->answerCallbackQuery(['text'=>' This Button Is For Display Only', 'show_alert'=>true]);
            return ;
        }
        if (strstr($data,'dlstory_')) 
        {
            $username = str_replace('dlstory_','',$data);
            $this->answerCallbackQuery(['text'=>'Connecting To The Instagram API Server...', 'show_alert'=>false]);
            $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[['Connecting To The Instagram API Server...', 'none']]]]), 'answer'=> null]);
            $params = array(
                'key' =>        INSTA_KEY,
                'type' =>       'pagestory',
                'username' =>    $username,
            );
            $result =           $handler->openLink('https://api.codesazan.ir/Instagram?' . http_build_query($params), 'GET', [], [], true);
            if ($result['status'] == 200)
            {
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[' Downloading stories, please wait...', 'none']]]]), 'answer'=> null]);
                foreach ($result['result'] as $media)
                    $input_medias[] = ['type' => $media['type'], 'media' => $media['story']];
                
                $chunk = array_chunk($input_medias,10);
                foreach ($chunk as $group)
                {
                    $group[0]['caption'] = " Extracted by : @" . BOT_USERNAME;
                    $this->sendMediaGroup(['chat_id' => $from_id, 'media' => json_encode($group), 'answer'=> null]);
                }
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[' The download of the stories has been completed', 'none']], [[" Highlights", 'dlhighlights_' . $username]]]]), 'answer'=> null]);
            }
            else
            {
                $this->answerCallbackQuery(['text'=>' The Yser Has No Stories', 'show_alert'=>false]);
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[' The Yser Has No Stories', 'none']], [[" Highlights", 'dlhighlights_' . $username]]]]), 'answer'=> null]);
            }
            return ;
        }
        if (strstr($data,'dlhighlights_')) 
        {
            $username = str_replace('dlhighlights_','',$data);
            $this->answerCallbackQuery(['text'=>'Connecting To The Instagram API Server...', 'show_alert'=>false]);
            $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[['Connecting To The Instagram API Server...', 'none']]]]), 'answer'=> null]);
            $params = array(
                'key' =>        INSTA_KEY,
                'type' =>       'pagehightlight',
                'username' =>    $username,
            );
            $result =           $handler->openLink('https://api.codesazan.ir/Instagram?' . http_build_query($params), 'GET', [], [], true);
            if ($result['status'] == 200)
            {
                if (count($result['result']) > 0)
                {
                    $num =          0;
                    foreach ($result['result'] as $res)
                    {
                        $num +=     1;
                        $keys[] = ["{$res['Title']}", 'getHighlight@' . $username . '_' . $res['hightlightIDS']];
                        if ($num == 25)
                            break;
                    }
                    $keys = array_chunk($keys,2);
                    $keys = array_merge([[[' Choose one of the page highlights ', 'none']]], $keys);
                    array_push($keys, [[" Stories", 'dlstory_' . $username]]);
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>$keys]), 'answer'=> null]);
                }
                else
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" No highlight found", 'none']], [[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]);
            }
            else
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" No highlight found", 'none']], [[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]);
            return ;
        }
        if (strstr($data,'getHighlight@')) 
        {
            $ex = explode('_', str_replace('getHighlight@','',$data));
            $username = $ex[0];
            $highlightID = $ex[1];
            $this->answerCallbackQuery(['text'=>'Connecting To The Instagram API Server...', 'show_alert'=>false]);
            $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[['Connecting To The Instagram API Server...', 'none']]]]), 'answer'=> null]);
            $params = array(
                'key' =>        INSTA_KEY,
                'type' =>       'gethightlight',
                'id' =>         $highlightID,
            );
            $result =           $handler->openLink('https://api.codesazan.ir/Instagram?' . http_build_query($params), 'GET', [], [], true);
            if ($result['status'] == 200)
            {
                if (count($result['result']) > 0)
                {
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[' Downloading highlights, please wait...', 'none']]]]), 'answer'=> null]);
                    foreach ($result['result'] as $media)
                        $input_medias[] = ['type' => $media['type'], 'media' => $media['highlite']];

                    $chunk = array_chunk($input_medias,10);
                    foreach ($chunk as $group)
                    {
                        $group[0]['caption'] = " Extracted by : @" . BOT_USERNAME;
                        $this->sendMediaGroup(['chat_id' => $from_id, 'media' => json_encode($group), 'answer'=> null]);
                    }
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" Download Highlights has been completed.", 'none']],[[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]);
                }
                else
                    $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" Error Downloading Highlights", 'none']],[[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]);
            }
            else
                $this->editMessageReplyMarkup(['chat_id'=>$from_id, 'message_id'=>$message_id, 'reply_markup'=>$this->eKey(['inline'=>[[[" Error Downloading Highlights", 'none']],[[" Stories", 'dlstory_' . $username]]]]), 'answer'=> null]);
            return ;
        }
        if (in_array($from_id,$admins))
        {
            if ($data == 'backpanel') 
            {
                $this->deleteMessage(['answer'=> null]);
                $this->send(['text'=>'Return To The Management Panel.', 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['panel']]), 'answer'=> null]);
                $handler->clearCache($from_id);
                return ;
            }
            if ($data == 'cancellsenall') 
            {
                $this->editMessagetext(['text'=>"Public posting has been cancelled"]);
                $connect->query("UPDATE `sfall` SET `forall` = 0, `sendall` = 0, `count` = 0, `msg_id` = 0, `chat_id` = 0, `msg_id2` = 0, `text` = 'none' LIMIT 1");	
                return ;
            }
            if ($data == 'BacktoLocks') 
            {
                $this->editMessagetext(['text'=>"Back To The Management Menu", 'parse_mode'=>'HTML', 'reply_markup'=>$this->eKey(['inline'=>$handler->CreateChnnelLocksKey()]), 'answer'=> null]);
                $handler->clearCache($from_id);
                return ;
            }
            if (strstr($data,'deleteChannelLock_')) 
            {
                $Channel = str_replace('deleteChannelLock_','',$data);
                $connect->query("DELETE FROM `channels` WHERE `idoruser` = '$Channel' LIMIT 1");	
                $this->editMessagetext(['text'=>" {$handler->quickGet($Channel,'title')} <i> Removed from the list of locked channels </i>\n\n The bot left this channel automatically.", 'parse_mode'=>'HTML', 'reply_markup'=>$this->eKey(['inline'=>$handler->CreateChnnelLocksKey()]), 'answer'=> null]);
                $this->leaveChat(['chat_id'=>$Channel]);
                return ;
            }
            if (strstr($data,'setNewLink_')) 
            {
                $this->editMessagetext(['text'=>"Please send the new link:", 'reply_markup'=>$this->eKey(['inline'=>[[[' Back','BacktoLocks']]]]), 'answer'=> null]);
                $handler->saveData($from_id,'setNewLink');
                $handler->saveData($from_id, ['selectChannel' => str_replace('setNewLink_', '', $data)]);
                return ;
            }
            if (!$handler->checkSendAll())
            {
                $users_count = $connect->query("SELECT `id` FROM `user`;")->num_rows;
                if ($data == 'sendall') 
                {
                    $datas = $handler->getData(['caption', 'message_id'], $from_id);
                    $caption = $datas['caption']?:'none';
                    $connect->query("UPDATE `sfall` SET `sendall` = 1, `count` = 0, `chat_id` = '$chat_id', `msg_id` = '{$datas['message_id']}', `msg_id2` = '$message_id', `text` = '$caption' LIMIT 1");	
                    $this->editMessagetext(['text'=>" The process of general message (forwarding) has started .\nThe Number Of Bot Members : : <code>$users_count</code>\n\n Public Message Information (to be updated)", 'parse_mode'=>'HTML', 'reply_markup'=>$this->eKey(['inline'=>[[["Sent: 0 People",'none']],[[" Estimated Time : {$handler->timeleft($users_count)} Minutes",'none']]]])]);
                    $this->send(['text'=>'Return To The Management Panel.', 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['panel']]), 'answer'=> null]);
                    $handler->clearCache($from_id);
                }
                if ($data == 'forall')
                {
                    $datas = $handler->getData(['caption', 'message_id'], $from_id);
                    $caption = $datas['caption']?:'none';
                    $connect->query("UPDATE `sfall` SET `forall` = 1, `count` = 0, `chat_id` = '$chat_id', `msg_id` = '{$datas['message_id']}', `msg_id2` = '$message_id', `text` = '$caption' LIMIT 1");	
                    $this->editMessagetext(['text'=>" The process of general message (forwarding) has started .\nnThe Number Of Bot Members : <code>$users_count</code>\n\n Public Message Information (to be updated)", 'parse_mode'=>'HTML', 'reply_markup'=>$this->eKey(['inline'=>[[[" Sent: 0 People",'none']],[[" Estimated Time : {$handler->timeleft($users_count)} Minutes",'none']]]])]);
                    $this->send(['text'=>'Return To The Management Panel.', 'reply_markup'=>$this->eKey(['keyboard'=>$keyboard['panel']]), 'answer'=> null]);
                    $handler->clearCache($from_id);
                }
            }
        }
    }
}

$BPT = new BPT_handler($BPTSettings['handler']);
$connect->close();

?>

Function Calls

None

Variables

None

Stats

MD5 eeb79f496d2f76aeb200966c422f0630
Eval Count 0
Decode Time 111 ms