<?php /** * @filename layout_apple.php * @author Daniel Scheidler * @copyright November 2012 */ echo "NO APPLE!!!"; exit; $layoutTable = new Table(array("")); $layoutTable->setWidth(600); $layoutTable->setAlign("left"); $layoutTable->setBORDER(0); $layoutTable->setBackgroundColor("#ffdddd"); // $_SESSION['config']->COLORS['panel_background']); $layoutTable->setSpacing(0); $layoutTable->setPadding(0); /* ------------------------------------ HAUPT-MENU ------------------------------------ */ $menuDiv = new Div(); $menuDiv->setWidth(600); $menuDiv->setBorder(0); $menuDiv->setOverflow("hidden"); $menuDiv->setAlign("center"); $menuDiv->setStyle("padding-left", "2px"); $menuDiv->setBackgroundColor($_SESSION['config']->COLORS['panel_background']); $spc = new Text(" | "); $menu = new DbMenu("Hauptmenue"); $menu->setAlign("center"); $menu->setFontsize(2);
<?php /** * @filename layout_tablet.php * @author Daniel Scheidler * @copyright November 2012 */ echo "Tablet-Version:<br>"; $topSpaceTable = new Table(array("")); $topSpaceTable->show(); $layoutTable = new Table(array("")); $layoutTable->setWidth(820); $layoutTable->setHeight(400); $layoutTable->setAlign("left"); $layoutTable->setBORDER(0); $layoutTable->setBackgroundColor($_SESSION['config']->COLORS['panel_background']); $layoutTable->setSpacing(0); $layoutTable->setPadding(0); /* ------------------------------------ HAUPT-MENU ------------------------------------ */ $menuDiv = new Div(); $menuDiv->setWidth(810); $menuDiv->setBorder(0); $menuDiv->setOverflow("hidden"); $menuDiv->setAlign("center"); $menuDiv->setStyle("padding-left", "2px"); $spc = new Text(" | "); $menu = new DbMenu("Hauptmenue"); $menu->setAlign("center"); $menu->setFontsize(3);
function show() { if ($this->isIconViewActive()) { $this->showAsIcon(); return; } $active = true; if (time() - 24 * 60 * 60 * 1000 > $this->LASTSIGNAL) { $active = false; } $tbl = new Table(array("Name", "ID", "letztes Signal", "letzter Wert")); $tbl->setBackgroundColorChange(false); $tbl->setHeadEnabled($this->isWithHeader()); $tbl->setColSizes(array(null, 100, 150, 120)); $tbl->setStyle("padding-left", "5px"); $tbl->setStyle("padding-right", "25px"); $tbl->setStyle("padding-top", "5px"); $tbl->setStyle("padding-bottom", "5px"); $tbl->setBackgroundColor($_SESSION['config']->COLORS['Tabelle_Hintergrund_' . ($this->BGID % 2 == 0 ? "1" : "2")]); $r = $tbl->createRow(); $r->setAlignments(array("left", "left", "left", "right")); $r->setAttribute(0, new Text($this->SENSORNAME, 3)); $r->setAttribute(1, new Text($this->ID, 3)); $r->setAttribute(2, $active ? new Text(date("D d.m.Y H:i:s", $this->LASTSIGNAL), 3) : "-"); $r->setAttribute(3, $active ? new Text($this->LASTVALUE, 3) : "-"); $tbl->addRow($r); $tbl->show(); }