Commit 0758ae6c authored by Nico Schallehn's avatar Nico Schallehn

get statstik

parent f23315fc
...@@ -381,6 +381,37 @@ class MediaDBViewerAPI{ ...@@ -381,6 +381,37 @@ class MediaDBViewerAPI{
return $this->error(1007,"Keine Rechte um die Filminfos zu setzen!"); return $this->error(1007,"Keine Rechte um die Filminfos zu setzen!");
} }
} }
public function API_GetStatistics($GET_arr, $POST_arr =""){
if(isset($GET_arr['Statistik'])){
$Query= "SELECT * FROM ".$GET_arr['Statistik'].";";
$entrys = $this->query($Query);
if($this->DB_Objekt->error != ""){ return $this->error(1005, $this->DB_Objekt->error);}
$TitelArray = array();
$finfo = $entrys->fetch_fields();
foreach ($finfo as $val) {
array_push($TitelArray, $val->name);
}
$entryArray = array();
while($entry = $entrys->fetch_array()){
$tempArray = array();
foreach ($finfo as $val) {
if(!(($val->name == "imdbID") AND $NoimdbID)){
$tempArray[$val->name] = utf8_encode($entry[$val->name]);
}
}
array_push($entryArray,$tempArray);
}
return array("Spalten"=>$TitelArray, "Data" =>$entryArray);
}
else{
return $this->error(1004, "Erwartet war Statistik!");
}
}
public function API_serverinfo($GET_arr = "", $POST_arr =""){ public function API_serverinfo($GET_arr = "", $POST_arr =""){
if( ($this->API_Rechte >=3)){ if( ($this->API_Rechte >=3)){
return array( "time" => time(), return array( "time" => time(),
......
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