private function getTypeChooseDialog() { $sensorWertOption = new Div("createSensorWert", 250, 40); $sensorWertOption->setToolTip("Sensoren die einen Messwert liefern<br><br>z.b. <br>- Helligkeitssensor<br>- Temperatursensor<br>- Abstandssensor"); $sensorStatusOption = new Div("createSensorStatus", 250, 40); $sensorStatusOption->setToolTip("Sensoren die nur 1 oder 0 als Wert liefern<br><br>z.b. <br>- Bewegungsmelder<br>- Regensensor<br>- Lichtschranke"); $zeitOption = new Div("createZeit", 250, 40); $wochentagOption = new Div("createWochentag", 250, 40); $sensorWertOption->setStyle("line-height", "40px"); $sensorStatusOption->setStyle("line-height", "40px"); $zeitOption->setStyle("line-height", "40px"); $wochentagOption->setStyle("line-height", "40px"); $sensorWertOption->setAlign("center"); $sensorWertOption->setVAlign("middle"); $sensorStatusOption->setAlign("center"); $sensorStatusOption->setVAlign("middle"); $zeitOption->setAlign("center"); $zeitOption->setVAlign("middle"); $wochentagOption->setAlign("center"); $wochentagOption->setVAlign("middle"); $sensorWertOption->add(new Text("Sensor Wert", 4, true)); $sensorStatusOption->add(new Text("Sensor Status", 4, true)); $zeitOption->add(new Text("Uhrzeit", 4, true)); $wochentagOption->add(new Text("Wochentag", 4, true)); $sensorWertOption->setBackgroundColor($_SESSION['config']->COLORS['button_background']); $sensorStatusOption->setBackgroundColor($_SESSION['config']->COLORS['button_background']); $zeitOption->setBackgroundColor($_SESSION['config']->COLORS['button_background']); $wochentagOption->setBackgroundColor($_SESSION['config']->COLORS['button_background']); $sensorWertLink = new Link("?createSensorWert=ok" . ($this->URL_PARAMS != "" ? "&" . $this->URL_PARAMS : "") . "#createSensorWert", $sensorWertOption, false, "", "", true, false); $sensorStatusLink = new Link("?createSensorStatus=ok" . ($this->URL_PARAMS != "" ? "&" . $this->URL_PARAMS : "") . "#createSensorStatus", $sensorStatusOption, false, "", "", true, false); $zeitLink = new Link("?createZeit=ok" . ($this->URL_PARAMS != "" ? "&" . $this->URL_PARAMS : "") . "#createZeit", $zeitOption, false, "", "", true, false); $wochentagLink = new Link("?createWochentag=ok" . ($this->URL_PARAMS != "" ? "&" . $this->URL_PARAMS : "") . "#createWochentag", $wochentagOption, false, "", "", true, false); $t = new Table(array("", "", "")); $t->setColSizes(array(null, 5, null)); $t->setAlignments(array("center", "center", "center")); $r = $t->createRow(); $r->setSpawnAll(true); $r->setAttribute(0, new Title("Art der neuen Bedingung auswaehlen", true, 4)); $t->addRow($r); $t->addSpacer(0, 5); $r1 = $t->createRow(); $r1->setAttribute(0, $sensorStatusLink); $r1->setAttribute(1, ""); $r1->setAttribute(2, $sensorWertLink); $t->addRow($r1); $t->addSpacer(0, 5); $r2 = $t->createRow(); $r2->setAttribute(0, $zeitLink); $r2->setAttribute(1, ""); $r2->setAttribute(2, $wochentagLink); $t->addRow($r2); return $t; }
function getMobileSwitch() { $tbl = new Table(array("", "", "", "")); $tbl->setAlignments(array("center", "left", "left", "right")); $tbl->setColSizes(array(60, "", 170, 150)); $tbl->setBorder(0); $rowTtl = $tbl->createRow(); $rowTtl->setVAlign("middle"); $txtAn = new Text("AN", 7, true); $txtAus = new Text("AUS", 7, true); $divAn = new Div(); $divAn->add($txtAn); $divAn->setWidth(150); $divAn->setHeight(50); $divAn->setAlign("center"); $divAn->setVAlign("middle"); $divAn->setStyle("line-height", "50px"); $divAn->setBorder(1); $divAn->setBackgroundColor("green"); $divAus = new Div(); $divAus->setWidth(150); $divAus->setHeight(50); $divAus->setAlign("center"); $divAus->setVAlign("middle"); $divAus->setStyle("line-height", "50px"); $divAus->add($txtAus); $divAus->setBorder(1); $divAus->setBackgroundColor("red"); $txtName = new Text($this->OBJNAME, 6, true); $img = $this->getControlArtIcon(false); $lnkAn = new Link("http://" . $this->IP . "?schalte=on", $divAn, false, "arduinoSwitch"); $lnkAus = new Link("http://" . $this->IP . "?schalte=-" . $this->FUNK_ID, $divAus, false, "arduinoSwitch"); $rowTtl->setAttribute(0, $img); $rowTtl->setAttribute(1, $txtName); $rowTtl->setAttribute(2, $lnkAn); $rowTtl->setAttribute(3, $lnkAus); $tbl->addRow($rowTtl); return $tbl; }
$cont = new DivByInclude($_SESSION['mainpage'], false); } $cont->setWidth("800"); $cont->setStyle("padding-left", "4px"); $cont->setStyle("padding-right", "4px"); $MainPanel->add($cont); $contentLayoutRow = $layoutTable->createRow(); $contentLayoutRow->setAttribute(0, $MainPanel); $layoutTable->addRow($contentLayoutRow); /* --------------------------------- */ /* ------------------------------------ FUSS-MENU ------------------------------------ */ $footMenuDiv = new Div(); $footMenuDiv->setWidth(810); $footMenuDiv->setBorder(0); $footMenuDiv->setAlign("center"); $footMenu = new DbMenu("Fussmenue"); $footMenu->setHeight(14); $footMenu->setMenuType("horizontal"); $footMenu->setAlign("center"); $footMenu->setFontsize(1); $footMenuDiv->add($footMenu); $fussLayoutRow = $layoutTable->createRow(); $fussLayoutRow->setAttribute(0, $footMenuDiv); $layoutTable->addRow($fussLayoutRow); /* --------------------------------- */ $layoutTable->show(); $arduinoFrame = new IFrame($_SESSION['config'], "arduinoSwitch", -1, -1, 1, 1, 0); $arduinoFrame->show(); echo "Diese Tablet-Version befindet sich im Aufbau;)";
function getMobileSwitch() { $tbl = new Table(array("", "", "", "", "")); $tbl->setAlignments(array("center", "left", "left", "left", "right")); $tbl->setColSizes(array(60, "", 100, 160, 150)); $tbl->setBorder(0); $rowTtl = $tbl->createRow(); $rowTtl->setVAlign("middle"); $txtAn = new Text("AN", 7, true); $txtAus = new Text("AUS", 7, true); switch ($this->ART) { case 1: // Steckdosen // Steckdosen case 3: // Glühbirne $txtAn = new Text("AN", 7, true); $txtAus = new Text("AUS", 7, true); break; case 2: // Jalousien $txtAn = new Text("AUF", 7, true); $txtAus = new Text("ZU", 7, true); break; case 4: // Heizung $txtAn = new Text("WARM", 7, true); $txtAus = new Text("KALT", 7, true); break; default: $txtAn = new Text("AN", 7, true); $txtAus = new Text("AUS", 7, true); } $divAn = new Div(); $divAn->add($txtAn); $divAn->setWidth(150); $divAn->setHeight(50); $divAn->setAlign("center"); $divAn->setVAlign("middle"); $divAn->setStyle("line-height", "50px"); $divAn->setBorder(1); $divAn->setBackgroundColor("green"); $divAn->setOverflow("hidden"); $divAus = new Div(); $divAus->setWidth(150); $divAus->setHeight(50); $divAus->setAlign("center"); $divAus->setVAlign("middle"); $divAus->setStyle("line-height", "50px"); $divAus->add($txtAus); $divAus->setBorder(1); $divAus->setBackgroundColor("red"); $divAus->setOverflow("hidden"); $txtName = new Text($this->OBJNAME, 6, true); $img = $this->getControlArtIcon(false); $lnkAn = new Link("?switchShortcut=" . $this->FUNK_ID . "-on", $divAn, false, "arduinoSwitch"); $lnkAus = new Link("?switchShortcut=" . $this->FUNK_ID . "-off", $divAus, false, "arduinoSwitch"); $fDimmLvl = ""; if ($this->isDimmable()) { $fDimmLvl = new Form(); $cobDimmLvl = new Combobox("dimmer", getNumberComboArray(1, 16), "", " "); $cobDimmLvl->setDirectSelect(true); $cobDimmLvl->setStyle("font-size", "40px"); $fDimmLvl->add($cobDimmLvl); $fDimmLvl->add(new Hiddenfield("schalte", $this->FUNK_ID)); } $rowTtl->setAttribute(0, $img); $rowTtl->setAttribute(1, $txtName); $rowTtl->setAttribute(2, $fDimmLvl); $rowTtl->setAttribute(3, $lnkAn); $rowTtl->setAttribute(4, $lnkAus); $tbl->addRow($rowTtl); return $tbl; }
function postHandleControlEdit($dbTable) { // Neuen Eintrag anlegen if (isset($_REQUEST['InsertNewControl']) && $_REQUEST['InsertNewControl'] == "do" && isset($_REQUEST['X']) && isset($_REQUEST['Y'])) { if (!(isset($_REQUEST['Name']) && isset($_REQUEST['FunkId']) && isset($_REQUEST['Art']))) { $mask = $this->getInsertMask($_REQUEST['X'], $_REQUEST['Y'] - $_SESSION['additionalLayoutHeight']); $mask->show(); $dv = new Div(); $dv->setVAlign("middle"); $dv->setAlign("center"); $dv->setBorder(3); $dv->setStyle("border-color", "#ff2200"); $dv->setStyle("background-color", "#aacc00"); $dv->setXPos($_REQUEST['X']); $dv->setYPos($_REQUEST['Y']); $dv->setWidth($this->CONTROL_IMAGE_WIDTH); $dv->setHeight($this->CONTROL_IMAGE_HEIGHT); $dv->add(new Text("Neu", 3, true, false, false, false)); $dv->show(); } } // Neuen Sensor anlegen if (isset($_REQUEST['InsertNewSensorControl']) && $_REQUEST['InsertNewSensorControl'] == "do") { if (!(isset($_REQUEST['name']) && isset($_REQUEST['id']) && isset($_REQUEST['sensor_art']))) { $mask = $this->getInsertSensorMask($_REQUEST['X'], $_REQUEST['Y'] - $_SESSION['additionalLayoutHeight']); $mask->show(); $dv = new Div(); $dv->setVAlign("middle"); $dv->setAlign("center"); $dv->setBorder(3); $dv->setStyle("border-color", "#ff2200"); $dv->setStyle("background-color", "#aacc00"); $dv->setXPos($_REQUEST['X']); $dv->setYPos($_REQUEST['Y']); $dv->setWidth($this->SENSOR_IMAGE_WIDTH); $dv->setHeight($this->SENSOR_IMAGE_HEIGHT); $dv->add(new Text("Neu", 2, true, false, false, false)); $dv->show(); } } // Existierenden Eintrag bearbeiten if (isset($_REQUEST['editControl']) && strlen($_REQUEST['editControl']) > 0) { if (!(isset($_REQUEST['RowId']) && isset($_REQUEST['Name']) && isset($_REQUEST['FunkId']) && isset($_REQUEST['Art']))) { $mask = $this->getEditMask($_REQUEST['editControl']); $mask->show(); } } // Existierenden Eintrag bearbeiten if (isset($_REQUEST['editSensorControl']) && strlen($_REQUEST['editSensorControl']) > 0) { if (!(isset($_REQUEST['RowId']) && isset($_REQUEST['name']) && isset($_REQUEST['sensor_art']) && isset($_REQUEST['sensor_art']))) { $mask = $this->getEditSensorMask($_REQUEST['editSensorControl']); $mask->show(); } } }
/** * show-Methode fÃÂÃÂÃÂür TYPE = horizontal */ function showHorizontalMenu() { $div = new Div(); $div->setHeight($this->getHeight()); $div->setWidth($this->getWidth()); if (strlen($this->getAlign()) > 0) { $div->setAlign($this->getAlign()); } $div->setXPos($this->XPOS); $div->setYPos($this->YPOS); $div->setBorder($this->BORDER); $userStatus = $this->CONFIG->CURRENTUSER->STATUS; $menuArray = $this->MENUTABLE->getMenuByStatus($userStatus); $spacer = $this->SPACER; $spacer->setFonttype($this->getFonttype()); $rowCtr = mysql_num_rows($menuArray); $entryCount = mysql_num_rows($menuArray); $ctr = 0; //prÃÂÃÂÃÂüfvariable zum Rows mitzÃÂÃÂÃÂählen while ($row = mysql_fetch_array($menuArray)) { if ($row['id'] > 0) { // Spacer ( | oder ÃÂÃÂÃÂübergebener Spacer ) $lnk = $row['link']; if (strlen($row['parent']) > 0 && !strpos($lnk, "menuParent")) { $lnk .= "&menuParent=" . $row['parent']; } if ($ctr != 0 && $ctr != $entryCount) { $lSpacer = new Link($lnk, $spacer, false, $row['target']); //$lSpacer->setToolTip($row['tooltip']); $div->add($lSpacer); } // Link $txt = new Text($row['text']); $txt->setFonttype($this->getFonttype()); if (ltrim($txt->getText()) == $_SESSION['MENU_PARENT'] || ltrim($txt->getText()) == $this->getLabelByRunlink($_SESSION['runLink'], $_SESSION['MENU_PARENT'])) { $txt->setText("<font color='" . $_SESSION['config']->COLORS['hover'] . "' >" . $txt->getText() . "</font>"); $txt->setFilter(false); } $l = new Link($lnk, $txt, false, $row['target']); $l->setStyleclass("menulink"); //$l->setToolTip($row['tooltip']); $div->add($l); } $ctr++; //prÃÂÃÂÃÂüfvariable zum Rows mitzÃÂÃÂÃÂählen } $div->show(); }