Commit 30306448 authored by Nico Schallehn's avatar Nico Schallehn

fehler...

parent ca420fed
...@@ -70,26 +70,45 @@ class MediaDBAPI{ ...@@ -70,26 +70,45 @@ class MediaDBAPI{
private function SetKeyRights(){ private function SetKeyRights(){
if($this->API_Rechte >= 1){ // Einfacher Zugang nix Technisches... if($this->API_Rechte >= 1){ // Einfacher Zugang nix Technisches...
array_push($this->SpaltenFil,"imdb", "3d", "name", "year", "duration", "rating", "summary", "youtube", "fsk"); array_push($this->SpaltenFil,"imdb", "3d", "name", "year", "duration", "rating", "summary", "youtube", "fsk");
array_push($this->SpaltenEpi,"imdb", "3d"); array_push($this->SpaltenEpi,"episodennumber", "season_nr", "series_nr", "name", "duration");
$this->FilterEinf = array_merge($this->FilterEinf, array("imdbID" => "imdbID")); $this->FilterEinf = array_merge($this->FilterEinf, array("imdbID" => "imdbID"));
$this->FilterKomp = array_merge($this->FilterKomp, array("Jahr" => "year", "Laufzeit" => "duration")); $this->FilterKomp = array_merge($this->FilterKomp, array("Jahr" => "year", "Laufzeit" => "duration"));
//array_push($this->StatiViews, ""); //array_push($this->StatiViews, "");
} }
if($this->API_Rechte >= 2){ // Einfacher Zugang mit einigen Technischen Infos if($this->API_Rechte >= 2){ // Einfacher Zugang mit einigen Technischen Infos
array_push($this->SpaltenFil, "size", "resolution"); array_push($this->SpaltenFil, "size", "resolution");
array_push($this->SpaltenEpi,"imdb", "3d"); array_push($this->SpaltenEpi,"source", "size");
$this->FilterEinf = array_merge($this->FilterEinf, array("resolution" => "resolution")); $this->FilterEinf = array_merge($this->FilterEinf, array("resolution" => "resolution"));
$this->FilterKomp = array_merge($this->FilterKomp, array( "Groesse" => "size")); $this->FilterKomp = array_merge($this->FilterKomp, array( "Groesse" => "size"));
//array_push($this->StatiViews, ""); //array_push($this->StatiViews, "");
} }
if($this->API_Rechte >= 3){ // Einfacher Zugang mit allen Technischen Infos if($this->API_Rechte >= 3){ // Einfacher Zugang mit allen Technischen Infos
array_push($this->SpaltenFil, "md5", "hdd","acodecger", "acodeceng","vcodec","channelsger","channelseng"); array_push($this->SpaltenFil, "md5", "hdd","acodecger", "acodeceng","vcodec","abitrateger","abitrateeng","channelsger","channelseng","width", "height", "totalbitrate");
array_push($this->SpaltenEpi,"imdb", "3d"); array_push($this->SpaltenEpi,"md5", "hdd","acodecger", "acodeceng","vcodec","abitrateger","abitrateeng","channelsger","channelseng","width", "height", "totalbitrate");
$this->FilterEinf = array_merge($this->FilterEinf, array( "acodecger" => "acodecger", "acodeceng" => "acodeceng", "vcodec" => "vcodec", $this->FilterEinf = array_merge($this->FilterEinf, array( "acodecger" => "acodecger", "acodeceng" => "acodeceng", "vcodec" => "vcodec",
"channelsger" => "channelsger", "channelseng" => "channelseng")); "channelsger" => "channelsger", "channelseng" => "channelseng"));
$this->FilterKomp = array_merge($this->FilterKomp, array()); $this->FilterKomp = array_merge($this->FilterKomp, array());
//array_push($this->StatiViews, ""); //array_push($this->StatiViews, "");
} }
if($this->API_Rechte >= 4){ // Einfacher Zugang mit allen Infos Also wann man Welchen FIlm gesehen hat usw.
array_push($this->SpaltenFil, "checked", "views", "comment", "added", "lastView");
array_push($this->SpaltenEpi, "checked", "views", "comment", "added", "lastView");
/*$this->FilterEinf = array_merge($this->FilterEinf, array( "acodecger" => "acodecger", "acodeceng" => "acodeceng", "vcodec" => "vcodec",
"channelsger" => "channelsger", "channelseng" => "channelseng"));*/
$this->FilterKomp = array_merge($this->FilterKomp, array("Hinzugefuegt" => "added", "Gesehen" => "lastView", "Gesehenzaehler" => "views"));
//array_push($this->StatiViews, "");
}
/*
* Platz für irgendwelche sondersachen....*/
if($this->API_Rechte >= 7){ // Einfacher Zugang mit allen Infos Also wann man Welchen FIlm gesehen hat usw.
//array_push($this->SpaltenFil, "checked", "views", "comment", "added", "lastView");
//array_push($this->SpaltenEpi, "checked", "views", "comment", "added", "lastView");
/*$this->FilterEinf = array_merge($this->FilterEinf, array( "acodecger" => "acodecger", "acodeceng" => "acodeceng", "vcodec" => "vcodec",
"channelsger" => "channelsger", "channelseng" => "channelseng"));*/
//$this->FilterKomp = array_merge($this->FilterKomp, array("Hinzugefuegt" => "added", "Gesehen" => "lastView", "Gesehenzaehler" => "views"));
array_push($this->StatiViews, "watchStatistic", "belegterSPeicher");
}
//TODO überprüfen ob es die spalten auch wirklich gibt!!! //TODO überprüfen ob es die spalten auch wirklich gibt!!!
...@@ -126,7 +145,8 @@ class MediaDBAPI{ ...@@ -126,7 +145,8 @@ class MediaDBAPI{
$imdbArrToCompar = 0; $imdbArrToCompar = 0;
$Where = "WHERE "; $Where = "WHERE ";
// = Filter: // = Filter:
foreach ($IstgleichArr as $key => $value) { foreach ($this->FilterEinfach as $key => $value) {
echo $key.PHP_EOL;
if(isset($GET_arr[$key])){ //AND is_numeric($GET_arr[$key]) if(isset($GET_arr[$key])){ //AND is_numeric($GET_arr[$key])
$Where .= ($first?"":" AND ").$value.' = "'.$GET_arr[$key].'"'; $Where .= ($first?"":" AND ").$value.' = "'.$GET_arr[$key].'"';
$first = false; $first = false;
...@@ -154,25 +174,7 @@ class MediaDBAPI{ ...@@ -154,25 +174,7 @@ class MediaDBAPI{
$first = false; $first = false;
} }
if(isset($GET_arr['Suche'])){ if(isset($GET_arr['Suche'])){
/* Work a round für Android 5 Geräte*/ $SucheWort = $GET_arr['Suche'];
$SucheWort = $GET_arr['Suche'];//htmlentities($GET_arr['Suche'], ENT_COMPAT, 'UTF-8');
//htmlentities($string, ENT_COMPAT, 'UTF-8')
/*$SucheWort = str_replace("\u00e4", "ä", $SucheWort);
$SucheWort = str_replace("\u00f6", "ö", $SucheWort);
$SucheWort = str_replace("\u00fc", "ü", $SucheWort);
$SucheWort = str_replace("\u00c4", "Ä", $SucheWort);
$SucheWort = str_replace("\u00d6", "Ö", $SucheWort);
$SucheWort = str_replace("\u00dc", "Ü", $SucheWort);
$SucheWort = str_replace("%C3%A4", "ä", $SucheWort);
$SucheWort = str_replace("%C3%B6", "ö", $SucheWort);
$SucheWort = str_replace("%C3%BC", "ü", $SucheWort);
$SucheWort = str_replace("%C3%84", "Ä", $SucheWort);
$SucheWort = str_replace("%C3%96", "Ö", $SucheWort);
$SucheWort = str_replace("%C3%9C", "Ü", $SucheWort);
*/
$Suche = " (`name` LIKE '%".$SucheWort."%' OR `md5` LIKE '%".$SucheWort."%' OR `comment` LIKE '%".$SucheWort."%')"; $Suche = " (`name` LIKE '%".$SucheWort."%' OR `md5` LIKE '%".$SucheWort."%' OR `comment` LIKE '%".$SucheWort."%')";
//OR `year` = '".$GET_arr['Suche']."' OR `resolution` LIKE '%".$GET_arr['Suche']."%' //OR `year` = '".$GET_arr['Suche']."' OR `resolution` LIKE '%".$GET_arr['Suche']."%'
$this->DebugOut($Suche); $this->DebugOut($Suche);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment