404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.117.252.141: ~ $
<?php
// use function Google\Cloud\Samples\PubSub\publish_message;
include "tools/simple_html_dom.php";
include "DatabaseHandler.php";
include 'MiniCurl.php';

class FillConjuction {
	public $url;
	public $conjuction;
	function __construct($verb) {
// 		$this->connect ();
		$this->conjuction["infinitive"] = ["none"=>$verb];
		$this->url = "https://www.verbformen.com/search/eingabe/?w=$verb";
		
	}
		
public function findConjuctions($verb) {
	// 		if($word)
	if ($verb) {
		echo $contents = file_get_contents ( $url );
		exit();	
		$regex = '/Participio:<\/b> <span class="normal">(.*?)<\/span>/';
		preg_match ( $regex, $contents, $treffer, PREG_OFFSET_CAPTURE, 3 );

		$regex = '/Participio:<\/b> <span class="irregular">(.*?)<\/span>/';
		preg_match ( $regex, $contents, $trefferIre, PREG_OFFSET_CAPTURE, 3 );
			
		if (! empty ( $treffer [1] [0] ) || ! empty ($trefferIre [1] [0])){
			$perfect = $treffer [1] [0];
			if(empty($perfect))
				$perfect= $trefferIre [1] [0];
			$perfect = str_replace("&auml;", "�", $perfect);
			$perfect = str_replace("&uuml;", "�", $perfect);
			$perfect = str_replace("&ouml;", "�", $perfect);
		}
		else
			$perfect = "-";
			
		$this->updatePerfect($word,$perfect);
	}
	return $perfect;
	}
}

class ConjDatabase extends DatabaseHandler{
	public $var;
	function __construct(){
		parent::__construct("conjuct");
		
	}
	public function conjucateVerbs(){
		$i=0;
 		$verbs = $this->getVerbsFromDatabse();
//		$verbs = [['word' => 'möchten']];
		foreach ($verbs as $verb){
			if(!empty($verb)){
				$i++;
				$this->addVerbRelection($verb['word']);
				echo $i."-".$verb['word'].PHP_EOL;
			}
			
		}
	}
	public function getVerbsFromDatabse(){
		$sql = "SELECT word FROM `dictionary` WHERE LENGTH(perfect) >1 AND translationrate = 1 GROUP BY word";
		$this->connection->query ( "SET NAMES utf8" );
		$result = $this->connection->query ( $sql ) or die ( $this->connection->error );
		while ($wordArrayResult[] = mysqli_fetch_assoc($result));
		return $wordArrayResult;
	}
	public function addVerbConjuctions($verb){
		$conjuctor = new FillConjuction($verb);
	}
	public function updateVerb($form,$person,$cVerb, $infinitive){
			$sql = "";
			$this->connection->query ( "SET NAMES utf8" );
			$result = $this->connection->query ( $sql ) or die( $this->connection->error );
			
			$sql = "UPDATE `".DatabaseHandler::$databaseName."`.`dictionary` SET translationrate = 1 where word='$infinitive'";
			$this->connection->query ( "SET NAMES utf8" );
			$result = $this->connection->query ( $sql ) or die( $this->connection->error );
			return 1;
	}
	
}
$conjDb = new ConjDatabase();
$conjDb->conjucateVerbs();




?>

Filemanager

Name Type Size Permission Actions
FillConjuctions.php File 5.67 KB 0755
FillPlurals.php File 1.94 KB 0755
FillReflexiveVerbs.php File 2.59 KB 0755
MiniCurl.php File 2.47 KB 0755