Commit 407d54fa authored by Nico Schallehn's avatar Nico Schallehn

test

parent 3e996a2b
<?php
class Colors {
class Console {
private $foreground_colors = array();
private $background_colors = array();
......@@ -61,6 +61,11 @@
public function getBackgroundColors() {
return array_keys($this->background_colors);
}
public function clearscreen($out = TRUE) {
$clearscreen = chr(27)."[H".chr(27)."[2J";
if ($out) print $clearscreen;
else return $clearscreen;
}
}
?>
\ No newline at end of file
<?php include './color.class.php';
$colors = new Colors();
$Console = new Console();
function clearscreen($out = TRUE) {
$clearscreen = chr(27)."[H".chr(27)."[2J";
if ($out) print $clearscreen;
else return $clearscreen;
}
//echo "md5: ".$colors->getColoredString("Fehler!", "white", "red") .PHP_EOL;
//echo "md5: ".$colors->getColoredString("Erfolgreich!", "white", "green") .PHP_EOL;
......@@ -32,7 +28,7 @@ if(isset($argv[1])){
$exit = false;
clearscreen();
$Console->clearscreen();
do{
echo "Bitte Befehl eingeben:";
$name = trim(fgets(STDIN));
......
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