Commit 61852f1f authored by Nico Schallehn's avatar Nico Schallehn

test

parent 06804089
...@@ -29,6 +29,10 @@ class Media { ...@@ -29,6 +29,10 @@ class Media {
} }
} }
public function config_save(){ public function config_save(){
$dateihandle = fopen($this->configfile,"w");
fwrite($dateihandle, json_encode($this->config, JSON_PRETTY_PRINT));
fclose($dateihandle);
} }
......
...@@ -28,14 +28,18 @@ do{ ...@@ -28,14 +28,18 @@ do{
$Console->clearscreen(); $Console->clearscreen();
//echo "Hallo $name \n"; //echo "Hallo $name \n";
switch ($name){ switch ($name){
case "exit":
$exit = true;
break;
case "filme": case "filme":
echo $Console->getColoredString("Filme", "black", "light_gray") .PHP_EOL; echo $Console->getColoredString("Filme", "black", "light_gray") .PHP_EOL;
break; break;
case "config save":
$Media->config_save();
break;
case "exit":
$exit = true;
break;
default: default:
echo $Console->getColoredString("Ungülter Befehl!", "red", "light_gray") .PHP_EOL;
break; break;
} }
//echo "Weiter mit (ENTER)".PHP_EOL; //echo "Weiter mit (ENTER)".PHP_EOL;
......
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