404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.140.192.22: ~ $
<?php

class ContributionService extends BaseSerevice {
    public function sendContributionMessageg($userActivityId, $word){
		$userArray = $this->getTG()->getDB()->getSomeUsers($this->chat_id);
		foreach ($userArray as $user){
			if(isset($user['userid'])){
				$this->getTG()->getDB()->setUserStep($user['userid'], EnumSteps::USER_ASKED_FOR_CONTRIBUTION);
				// $this->suggestContribution($userActivityId, $user['userid'], $word);
// 				$this->suggestContribution($userActivityId, $this->adminId, $word);
			}
		}
    }
    
    public function getTranslationFromContributions($word, $noHtmlTag=False){
		$text ="";
		$transArray = $this->getTG()->getDB()->lookForWordInContributionTable($word);
		$transArray2 = $this->getTG()->getDB()->lookForRelatedWordInContributionTable($word);
		if(is_array($transArray) && !empty($transArray[0])){
			$this->getTG()->contributedTranslation = true;
			$this->getTG()->translated = true;
			$this->getTG()->lookForSound = FALSE;
		}
		if(is_array($transArray2) && !empty($transArray2[0])){
			$this->getTG()->translated = true;
			$this->getTG()->lookForSound = FALSE;
		}
		foreach ($transArray as $word){
			if(!empty($word))
				$text .= $word['word'].": ".$word['translation'].PHP_EOL;
		}
		
		foreach ($transArray2 as $word2){
// 				$contId = $word['id'];
			$related = $word2['relatedWord'];
			$contId = $word2['id'];
			if(!empty($related))
				$answerArray [] = ['text'=>$related, 'id'=>"get:$contId"];
		}
		if(is_array($transArray2)){
			$this->getTG()->askUserMultipleChoiceQuestion("کدوم کلمه منظورت بود؟", $answerArray, $this->chat_id);
		}
		if($this->getTG()->contributedTranslation)
			return  $text.PHP_EOL."☺️".PHP_EOL."@TranslateGerman_bot";
// 			else
// 				return "یک کلمه انتخاب کن";
	}

}

?>

Filemanager

Name Type Size Permission Actions
invite Folder 0755
translate Folder 0755
BaseMessageService.class.php File 268 B 0644
BaseService.class.php File 364 B 0644
ButtonService.class.php File 4.15 KB 0644
CallbackService.class.php File 2.41 KB 0644
ContributionService.class.php File 1.76 KB 0644
IntentService.class.php File 7.19 KB 0644
SearchService.class.php File 811 B 0644
TTSService.class.php File 797 B 0644