(html) file generator
[usb-wde1-tools.git] / htmlreport / templates / plain.txt.php
diff --git a/htmlreport/templates/plain.txt.php b/htmlreport/templates/plain.txt.php
new file mode 100644 (file)
index 0000000..0881184
--- /dev/null
@@ -0,0 +1,21 @@
+Zimmer             Temperatur   Luftfeuchte
+-------------------------------------------
+<?php
+plain_line($data[3]);
+echo "\n";
+plain_line($data[1]);
+plain_line($data[5]);
+plain_line($data[2]);
+echo "\n";
+plain_line($data[6]);
+plain_line($data[0]);
+plain_line($data[4]);
+
+
+function plain_line($datum) {
+    echo str_pad($datum['name'], 18, ' ');
+    echo ' ' . str_pad($datum['temperature'] . '°C', 13, ' ');
+    echo ' ' . $datum['humidity'] . '%';
+    echo "\n";
+}
+?>