<?php
		if ($textmessage == 'پیام همگانی 🔈'  and $commanda == 'none'){
			file_put_contents ("data/admin/commanda.txt",'pmall');
			sendAction ($from_id,'typing');
			Saeed ('sendMessage',[
				'chat_id'=>$from_id,
				'parse_mode'=>'Markdown',
				'text'=>"پیام خود را ارسال کنید.
				(فقط متن باشد.)",
				'reply_markup'=>json_encode([
					'resize_keyboard'=>true,
					'one_time_keyboard'=>true,
					'keyboard'=>[
						[['text'=>'برگشت 🔙']]
					]
				])
			]);
		}
		if ($commanda == "pmall" and $textmessage != 'برگشت 🔙'){
			file_put_contents ("data/admin/msg.txt",$textmessage);
			file_put_contents ("data/admin/commanda.txt","none");
			sendAction ($from_id,'typing');
			Saeed ('sendMessage',[
				'chat_id'=>$from_id,
				'reply_to_message_id'=>$message_id,
				'text'=>"این پیام ارسال شود؟",
				'reply_markup'=>json_encode([
					'inline_keyboard'=>[
						[['text'=>'آره 👍🏻','callback_data'=>'pmall'],['text'=>'نه 👎🏻','callback_data'=>'npmall']]
					]
				])
			]);
		}
		if ($data == 'pmall'){
			$member = file_get_contents ('data/admin/members.txt');
			$members = explode (",",$member);
			$msg = file_get_contents ("data/admin/msg.txt");
			foreach ($members as $chats){
				sendMessage ($chats,$msg);	
			}
			Delfile ("data/admin/msg.txt");
			sendAction ($from_id2,'typing');
			Saeed ('sendMessage',[
				'chat_id'=>$from_id2,
				'text'=>"به همه ارسال شد.",
				'reply_markup'=>json_encode([
					'resize_keyboard'=>true,
					'one_time_keyboard'=>true,
					'keyboard'=>[
						[['text'=>'برگشت 🔙']],
					]
				])
			]);
			file_put_contents ("data/admin/commanda.txt","none");
		}elseif ($data == 'npmall'){
			sendAction ($from_id2,'typing');
			Saeed ('sendMessage',[
			   'chat_id'=>$from_id2,
			   'text'=>"چیزی ارسال نشد.",
			   'reply_markup'=>json_encode([
					'resize_keyboard'=>true,
					'one_time_keyboard'=>true,
					'keyboard'=>[
						[['text'=>'برگشت 🔙']],
					]
				])
			]);
			Delfile ("data/admin/msg.txt");
			file_put_contents ("data/admin/commanda.txt","none");
		}
	
?>