function getNetworkSettingsMask() { $tbl = new Table(array("", "")); $rIp = $tbl->createRow(); $rIp->setAttribute(0, new Text("IP:")); $rIp->setAttribute(1, new Textfield("ip", $this->getLocalIp())); $tbl->addRow($rIp); $rMask = $tbl->createRow(); $rMask->setAttribute(0, new Text("Subnet-Mask:")); $rMask->setAttribute(1, new Textfield("mask", $this->getLocalMask())); $tbl->addRow($rMask); $rGate = $tbl->createRow(); $rGate->setAttribute(0, new Text("Gateway:")); $rGate->setAttribute(1, new Textfield("gate", $this->getLocalGate())); $tbl->addRow($rGate); $rDns = $tbl->createRow(); $rDns->setAttribute(0, new Text("DNS-Server:")); $rDns->setAttribute(1, new Textfield("dns", $this->getLocalDns())); $tbl->addRow($rDns); $rOk = $tbl->createRow(); $rOk->setSpawnAll(true); $rOk->setAttribute(0, new Button("saveNetworkSettingsMask", $this->SAVE_BTN_LABEL)); $tbl->addRow($rOk); $f = new Form(); $f->add($tbl); return $f; }
/** * Zeigt das gesamte Panel an */ function show() { $this->CONTENT->setWidth($this->WIDTH - 8 * $this->PANELTITELRIGHTWIDTH); //--------------------------------------------------- // Inhalt //--------------------------------------------------- $cont = new Div(); $cont->setBorder(1); $cont->setWidth($this->WIDTH - 2 * $this->PANELTITELRIGHTWIDTH); if ($this->HEIGHT > 0) { $cont->setHeight($this->HEIGHT - $this->PANELTITELHEIGHT); } $cont->setOverflow("auto"); $cont->setStyle("background-color", $this->BGCOLOR); $cont->setStyle("border-style", "solid"); $cont->setStyle("border-top", "1px"); $cont->setStyle("border-left", "1px"); $cont->setStyle("border-right", "2px"); $cont->setStyle("border-bottom", "2px"); $cont->setStyle("border-color", $_SESSION['config']->COLORS['text']); $cont->add($this->CONTENT); //--------------------------------------------------- $tb = new Table(array("")); $rH = $tb->createRow(); $rH->setAlign("center"); $rH->setBackgroundColor($_SESSION['config']->COLORS['text']); $rH->setFontType($_SESSION['config']->COLORS['text']); $rH->setAttribute(0, $this->NAME); $tb->addRow($rH); $rC = $tb->createRow(); $rC->setAlign("center"); $rC->setAttribute(0, $cont); $tb->addRow($rC); return $tb; }
function show() { $t = new Table(array()); $t->setHeight($this->getHeight()); $r = $t->createRow(); $r->setHeight($this->getHeight()); $t->addRow($r); $t->show(); }
function PublicVarText($dbConnect, $group, $name) { $this->BORDER = 0; $a = getPublicVarArray($dbConnect, $group, $name); $t = new Table(array("")); $t->setBorder($this->BORDER); foreach ($a as $title => $text) { $r1 = $t->createRow(); $r1->setAttribute(0, new Title($title)); $r1->setHeader(true); $t->addRow($r1); $r2 = $t->createRow(); $r2->setAttribute(0, $text); $t->addRow($r2); $t->addSpacer(); } $this->TBL = $t; }
function show() { $t = new Table(array("")); $t->setAlign($this->getAlign()); $r = $t->createRow(); $r->setHeader(true); $txt = new Text($this->TEXT); $txt->setFonttype($this->FONTTYPE); $txt->setFilter($this->getFilter()); $r->setAttribute(0, $txt); $t->addRow($r); $t->show(); }
function showFullname() { $fp = new Text($this->getPath(), 3, true); $btnDel = new Button("clearLog", "Log leeren"); $hdnDel = new Hiddenfield("clearLogFile", $this->FULLPATH); $frmDel = new Form(); $tblTtl = new Table(array("", "")); $tblTtl->setColSizes(array(null, 100)); $tblTtl->setAlignments(array("left", "right")); $rTtl = $tblTtl->createRow(); $rTtl->setAttribute(0, $fp); $rTtl->setAttribute(1, $btnDel); $tblTtl->addRow($rTtl); $frmDel->add($tblTtl); $frmDel->add($hdnDel); $frmDel->show(); }
function Error($title, $text, $backLink = '') { $t = "<font color='red' size='3' ><b>" . $text . "</b></font>"; if (strlen($backLink) > 0) { $t .= " <br><br><a target ='_top' href='" . $backLink . "'>ZurÃÂÃÂÃÂück</a>"; } $text = new Text($t); $text->setFilter(false); $title = array("FEHLER: " . $title); $tbl = new Table($title); $r = $tbl->createRow(); $r->setAttribute(0, $text); $tbl->addRow($r); $tbl->setWidth(500); $tbl->show(); exit; }
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; }
/** * Zeigt das DateTextfield an * Es wird eine Tabelle um das Feld gesetzt um eine * freie Positionierung so wie Tooltips oÃÂÃÂÃÂä zu ermÃÂÃÂÃÂöglichen. * (da der eigentliche Kalender ein Script ist) */ function show() { $tbl = new Table(array("")); $tbl->setWidth(50); $tbl->setAlign("left"); $dtText = "<script>DateInput('" . $this->NAME . "', true"; if (strlen($this->DATEFORMAT) > 7) { $dtText .= ", '" . $this->DATEFORMAT . "'"; if (strlen($this->VALUE) == strlen($this->DATEFORMAT)) { $dtText .= ", '" . $this->VALUE . "'"; } } $dtText .= ")</script>"; $dateTextField = new Text($dtText); $dateTextField->setFilter(false); $r = $tbl->createRow(); $r->setAttribute(0, $dateTextField); $tbl->addRow($r); $tbl->setToolTip($this->getTooltip()); $tbl->show(); }
/** * Zeigt Als erstes die Ordner-Navigation ( showFoldersList() ) an und darunter die Bilder-Liste ( showPicList() ) * wenn angefordert, wird das aktuelle Bild einzeln angezeigt. * setzen des aktuellen Bildes erfolgt in changeHandler(). */ function show() { $this->handleChanges(); $tbl = new Table(array("")); $tbl->setAlignments(array("center")); if ($this->isShowTitle()) { $title = new Title($this->FOLDER->NAME); $rTtl = $tbl->createRow(); $rTtl->setAlign("center"); $rTtl->setAttribute(0, $title); $tbl->addRow($rTtl); } $fl = $this->getFolderslist(); $rFl = $tbl->createRow(); $rFl->setAttribute(0, $fl); $tbl->addRow($rFl); if (isset($_REQUEST['showPic']) && !isset($_REQUEST['BB_BackToList']) && strlen($_REQUEST['showPic']) > 0) { $p = $this->getPicture(); $rP = $tbl->createRow(); $rP->setAlign("center"); $rP->setAttribute(0, $p); $tbl->addRow($rP); } else { $pn = $this->getPageNavigation(); $pl = $this->getPicturelist(); $rPn = $tbl->createRow(); $rPn->setAlign("center"); $rPn->setAttribute(0, $pn); $tbl->addRow($rPn); $rPl = $tbl->createRow(); $rPl->setAlign("center"); $rPl->setAttribute(0, $pl); $tbl->addRow($rPl); } $tbl->show(); }
$frmSelect = new Form(); $timeSelect = new Table(array("", "", "", "")); $rT = $timeSelect->createRow(); $rT->setColSizes(array(130, 100, 63)); $rT->setAlignments(array("left", "left", "center")); $rT->setAttribute(0, new Text("Zeitraum von: ")); $rT->setAttribute(1, $cobStartTime); $rT->setAttribute(2, new Text("bis: ")); $rT->setAttribute(3, $cobEndTime); $timeSelect->addRow($rT); // ------------------------- // Show // ------------------------- $tbl = new Table(array("", "")); $tbl->setColSizes(array(130)); $rTtl = $tbl->createRow(); $rTtl->setSpawnAll(true); $rTtl->setAttribute(0, $ttl); $tbl->addRow($rTtl); $tbl->addSpacer(0, 30); $rSelect = $tbl->createRow(); $rSelect->setAttribute(0, $txtSelect); $rSelect->setAttribute(1, $cboSensorSelect); $tbl->addRow($rSelect); $tbl->addSpacer(0, 10); $rTimeSelect = $tbl->createRow(); $rTimeSelect->setSpawnAll(true); $rTimeSelect->setAttribute(0, $timeSelect); $tbl->addRow($rTimeSelect); $tbl->addSpacer(0, 30); if (isset($_REQUEST['sensorSelectCob']) && strlen($_REQUEST['sensorSelectCob']) > 0) {
/** * Liefert das Userprofil zur klein-Anzeige (neben Posts) * * @param $id ID des Users */ function getUserprofileForUserId($id) { $sql = "SELECT * FROM user where id = '" . $id . "' "; $res = $_SESSION['config']->DBCONNECT->executeQuery($sql); $retRow = mysql_fetch_array($res); $ft = new FontType(); $ft->setBold(true); $ft->setFontsize(3); $picLnk = new Link("includes/user/show_userprofil.php?showUserId=" . $id, getUserImageSourceByPicname($retRow['pic'], 80)); $picLnk->setPopup(true); $status = new Text("<b>Status:</b> " . $retRow['Status']); $status->setFilter(false); $posts = new Text("<b>Posts:</b> " . $retRow['Posts']); $posts->setFilter(false); $tbl = new Table(array("")); $r1 = $tbl->createRow(); $r1->setFonttype($ft); $r1->setAttribute(0, $retRow['Vorname'] . " " . $retRow['Nachname']); $tbl->addRow($r1); $r2 = $tbl->createRow(); $r2->setAttribute(0, $picLnk); $tbl->addRow($r2); $r3 = $tbl->createRow(); $r3->setAttribute(0, $status); $tbl->addRow($r3); $r4 = $tbl->createRow(); $r4->setAttribute(0, $posts); $tbl->addRow($r4); return $tbl; }
/** * Liefert die Bedingung als Table zurück * reine Anzeige */ private function getReadonlyTermItem() { $t = new Table(array("")); $r = $t->createRow(); $r->setAttribute(0, $this->getDescription()); $t->addRow($r); return $t; }
<?php if (isset($_REQUEST['requestNewPW4Mail']) && isset($_REQUEST['em4il']) && strlen($_REQUEST['em4il']) > 3 && strpos($_REQUEST['em4il'], "@") > 0) { $txt = new Text("Es wurde ein neues Passwort generiert.\n" . "Die Email mit den Zugangsdaten wurde versendet an: " . $_REQUEST['em4il']); $_SESSION['config']->CURRENTUSER->needNewPassword($_REQUEST['em4il']); exit; } $txt = new Text("Sie haben ihr Passwort vergessen?\n\n" . "Geben Sie einfach im folgenden Eingabefeld ihre Emailadresse ein und bestätigen " . "Sie ihre Eingabe mit dem Button *Passwort anfordern* "); $eMail = new Textfield("em4il", ""); $eMail->setTooltip("Geben Sie hier ihre Emailadresse ein mit der Sie sich registriert haben."); $btn = new Button("requestNewPW4Mail", "Passwort anfordern"); $eMail->setTooltip("Bestätigen Sie hier ihre Eingabe.\nEs wird ein neues Passwort generiert und die neuen Zugangsdaten an ihre Email gesendet."); $table = new Table(array("")); $r1 = $table->createRow(); $r1->setAttribute(0, $txt); $table->addRow($r1); $r2 = $table->createRow(); $r2->setAttribute(0, $eMail); $table->addRow($r2); $r3 = $table->createRow(); $r3->setAttribute(0, $btn); $table->addRow($r3); $form = new Form($_SERVER['SCRIPT_NAME']); $form->add($table); $form->show();
$currPath = dirname($_SERVER['SCRIPT_NAME']); $currPath = substr($currPath, 1); if (strlen($currPath) > 0) { $currPath = $currPath . "/"; } //Daten holen $userDBTable = new DbTable($_SESSION['config']->DBCONNECT, 'user', array("*"), "", "", "", "id=" . $_REQUEST['showUserId'] . " "); $userDBRow = $userDBTable->getRow(1); //Daten in Table stecken $userTable = new Table(array("", "")); $userTable->setWidth(400); $userTable->setAlign("left"); $ft = new FontType(); $ft->setFontsize(4); //User-Name $userRow = $userTable->createRow(); $userRow->setSpawnAll(true); $userRow->setAlign("center"); $user = new Text($userDBRow->getNamedAttribute("User")); $userRow->setAttribute(0, $user); $user->setFonttype($ft); $userTable->addRow($userRow); $userTable->addSpacer(0); //User-Avatar $userRow1 = $userTable->createRow(); $userRow1->setSpawnAll(true); $userRow1->setAlign("center"); $img = new Image($currPath . "pics/user/" . $userDBRow->getNamedAttribute("pic")); $img->setWidth(250); $userRow1->setAttribute(0, $img); $userTable->addRow($userRow1);
// ------------------------------------------- // Schaltgruppen // ------------------------------------------- $regelItemsDbTable = new DbTable($_SESSION['config']->DBCONNECT, 'homecontrol_regeln_items', array("config_id", "art_id", "zimmer_id", "etagen_id", "on_off", "regel_id", "id"), "Objekt, Objekt-Art, Zimmer, Etage, An/Aus", "regel_id=" . $_SESSION['SelectedRegelToEdit'], "config_id DESC, zimmer_id DESC, etagen_id DESC", "regel_id=" . $_SESSION['SelectedRegelToEdit']); $regelItemsDbTable->setReadOnlyCols(array("id")); $regelItemsDbTable->setNoInsertCols(array("id")); $regelItemsDbTable->setNoUpdateCols(array("regel_id", "id")); $regelItemsDbTable->setDeleteInUpdate(true); $regelItemsDbTable->setHeaderEnabled(true); $itemsTable = new Table(array("", "")); //$itemsTable->setColSizes(array(150)); $itemsTable->setBorder(0); $ttlItems = new Title("Zu schaltende Objekte"); $ttlItems->setAlign("left"); $itemsTable->addSpacer(0, 15); $r1Title = $itemsTable->createRow(); $r1Title->setSpawnAll(true); $r1Title->setAttribute(0, $ttlItems); $itemsTable->addRow($r1Title); // Neuer Eintrag if (isset($_REQUEST['InsertIntoDB' . $regelItemsDbTable->TABLENAME]) && $_REQUEST['InsertIntoDB' . $regelItemsDbTable->TABLENAME] == "Speichern") { $regelItemsDbTable->doInsert(); $regelItemsDbTable->refresh(); } else { if (isset($_REQUEST[$regelItemsDbTable->getNewEntryButtonName()])) { $regelItemsDbTable->setBorder(0); $insMsk = $regelItemsDbTable->getInsertMask(); $hdnFld = $insMsk->getAttribute(1); if ($hdnFld instanceof Hiddenfield) { $insMsk->setAttribute(1, new Hiddenfield($regelItemsDbTable->getNewEntryButtonName(), "-")); }
<?php /* $fTbl = new Table(array("", "")); $fRow = $fTbl->createRow(); $cntr = new Counter(); $fRow->setAttribute(0, $cntr); $fTbl->addRow($fRow); $fTbl->setWidth(940); $fTbl->show(); */ // $t = new Text("Arduino URL: ".$_SESSION['config']->PUBLICVARS['arduino_url'], 2, false, true, false); $versionInfo = "Status-Info"; $t = new Link("http://status.smarthomeyourself.de", $versionInfo, false, "status"); $l = new Link("/?run=logView", "Logs", false); $versionInfo = "Version: " . file_get_contents('version.txt'); $lVersion = new Link("/versionHistory.txt", $versionInfo, false, "versionHist"); $fTbl = new Table(array("", "", "")); $fTbl->setAlignments(array("left", "left", "right")); $fTbl->setColSizes(array("100", "100")); $fTbl->setWidth($bannerWidth + 15); $fRow = $fTbl->createRow(); $fRow->setAttribute(0, $t); $fRow->setAttribute(1, $l); $fRow->setAttribute(2, $lVersion); $fTbl->addRow($fRow); $fTbl->show(); echo "</body>\r\n \r\n </html>\r\n ";
function getShowMask() { $tNames = $this->COLNAMES; if (count($this->LABELS) == count($this->COLNAMES)) { $tNames = $this->LABELS; } $table = new Table($tNames); $table->setAlignments($this->getAlignments()); $table->setBorder($this->BORDER); $table->setHeadEnabled($this->HEAD_ENABLED); $table->setBackgroundColorChange(true); if ($this->WIDTH > 0) { $table->setWidth($this->WIDTH); } if ($this->HEIGHT > 0) { $table->setHeight($this->HEIGHT); } if ($this->BORDER >= 0) { $table->setBorder($this->BORDER); } if ($this->PADDING >= 0) { $table->setPadding($this->PADDING); } else { $table->setPadding(0); } if ($this->SPACING >= 0) { $table->setSpacing($this->SPACING); } else { $table->setSpacing(0); } if ($this->XPOS > 0 && $this->YPOS > 0) { $table->setXPos($this->XPOS); $table->setYPos($this->YPOS); } //--------------------------------------------------- // ROWS in Table aufnehmen //--------------------------------------------------- $bgCtr = 1; for ($ir = 1; $ir <= count($this->ROWS); $ir++) { $r = $table->createRow(); for ($ia = 0; $ia < count($this->COLNAMES); $ia++) { $row = $this->ROWS[$ir]; $val = ""; $t = ""; if (!$this->isInvisibleCol($this->COLNAMES[$ia])) { if (strlen($row->getAttribute($ia)) > 0) { $val = getDbComboValue($this->TABLENAME, $this->COLNAMES[$ia], $row->getAttribute($ia)); } // Wenn DbCombo definiert wurde wird der passende Text zum Code der Spalte angezeigt if (strlen($val) > 0) { $t = $val; } else { $t = $row->getAttribute($ia); } if (strtolower($this->COLNAMES[$ia]) == "email") { $txt = $row->getAttribute($ia); $tmp = new Text($txt); $tmp->setFilter(false); $r->setAttribute($ia, new Link("mailto:" . $txt, $tmp)); } else { $r->setAttribute($ia, new Text($t)); } } else { $r->setAttribute($ia, " "); } } $table->addRow($r); } return $table; }
function show() { //Wenn notwendig Eingabemaske, ansonsten Standard-Anzeige if (!$this->showInsertMaskIfNeeded()) { $rowsToShow = $this->getRowsToShow(); //Tabelle fÃÂÃÂÃÂür gesamte NEWS $tbl = new Table(array("News")); $tbl->setHeadEnabled(false); $tbl->setBorder(0); foreach ($rowsToShow as $row) { $tt = new Text($row['Text']); $tt->setFilter(false); $ta = new Text($row['Autor']); $tblxTitle = new Table(array("", "")); $tblxTitle->setColSizes(array("50")); $tblxTitle->setAlign("left"); $rxtitle = $tblxTitle->createRow(); $t0 = new Title(getFormatedDate($row['Datum'], "standard") . ":"); $t0->setWidth(20); $rxtitle->setAttribute(0, $t0); $t1 = new Title($row['Title']); $rxtitle->setAttribute(1, $t1); $rxtitle->setAlign("left"); $tblxTitle->addRow($rxtitle); //Tabelle fÃÂÃÂÃÂür den jeweiligen Eintrag $tblx = new Table(array("")); if (strlen($row['pic']) > 0) { $tblx = new Table(array("", "")); $tblx->setColSizes(array("180")); } $tblx->setBorder($this->CONFIG->GB_CONFIG['border']); $tblx->setWidth("100%"); //TEXT $rx = $tblx->createRow(); if (strlen($row['pic']) > 0 && !(isset($_REQUEST['removeNewsPicId']) && $_REQUEST['removeNewsPicId'] == $row['id'])) { $img = new Image($row['pic']); $img->setWidth(175); $rx->setAttribute(0, $img); $rx->setAttribute(1, $tt); } else { $rx->setAttribute(0, $tt); } $rx->setAlign("left"); $tblx->addRow($rx); $f = new FontType(); $rx->setFonttypes(array(0 => $f)); $f = new FontType(); $f->setFontsize(1); $f->setItalic(false); $rx->setFonttypes(array(0 => $f)); $r = $tbl->createRow(); $r->setAttribute(0, $tblxTitle); $tbl->addRow($r); $r1 = $tbl->createRow(); $r1->setAttribute(0, $tblx); $tbl->addRow($r1); $ytElem = new YouTubeElement($row['yt_video'], "news", "yt_video", $row['id']); $r1 = $tbl->createRow(); $r1->setAttribute(0, $ytElem); $tbl->addRow($r1); $tbl->addSpacer(0, 7); if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user") { $r2 = $tbl->createRow(); $xDv = new Div(); $xDv->setWidth(450); $xDv->setHeight(40); $txChngePic = new Text("Bild Hochladen/ÃÂÃÂÃÂÃÂndern<br>"); $txChngePic->setFilter(false); $newPicLink = new Link("?popupRunLink=imageUploaderPopup&targetPath=pics/news&DbInsertTable=news&DbInsertCol=pic&DbInsertId=" . $row['id'] . "&stayAlive=ok", $txChngePic); $txRemPic = new Text("Bild Entfernen<br>"); $txRemPic->setFilter(false); $removePicLink = new Link("?removeNewsPicId=" . $row['id'] . "", $txRemPic); $spTx = new Text(" "); $spTx->setFilter(false); $xDv->add($newPicLink); if (strlen($row['pic']) > 0) { if (isset($_REQUEST['removeNewsPicId']) && $_REQUEST['removeNewsPicId'] == $row['id']) { $sql = "UPDATE news SET pic = null WHERE id = " . $_REQUEST['removeNewsPicId']; $_SESSION['config']->DBCONNECT->executeQuery($sql); } else { $xDv->add($removePicLink); } } $newPicLink->setPopup(true); $r2->setAttribute(0, $xDv); $tbl->addRow($r2); } $tbl->addSpacer(0, 35); } if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user") { // Neuer Eintrag- BUTTON //-------------------------------- $insertButton = new Button('dbTableNew', 'News eintragen'); $form = new Form($_SERVER['SCRIPT_NAME']); $form->add($insertButton); $form->show(); } // Tabelle anzeigen //-------------------------------- $tbl->show(); if ($_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user" && $tbl->getRowcount() > 2) { // Neuer Eintrag- BUTTON //-------------------------------- $insertButton = new Button('dbTableNew', 'News eintragen'); $form = new Form($_SERVER['SCRIPT_NAME']); $form->add($insertButton); $form->show(); } } }
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 getTabletView() { $colCount = 4; $layoutTable = new Table(array("", "", "", "")); $layoutTable->setSpacing(20); $this->handleEtage(); $dbTable = new DbTable($_SESSION['config']->DBCONNECT, 'homecontrol_config', array("id", "name", "funk_id", "funk_id2", "beschreibung", "control_art", "etage", "zimmer", "x", "y", "sender_id"), "", "", "etage, name", ""); $currCol = $colCount; $layoutRow = null; $letzteEtage = ""; foreach ($dbTable->ROWS as $row) { if ($letzteEtage != $row->getNamedAttribute("etage")) { $letzteEtage = $row->getNamedAttribute("etage"); $currCol = 0; $layoutTable->addSpacer(0, 25); $ttl = new Title($letzteEtage); $layoutRow = $layoutTable->createRow(); $layoutRow->setSpawnAll(true); $layoutTable->addRow($layoutRow); $layoutRow->setAttribute(0, $ttl); $layoutRow = $layoutTable->createRow(); $layoutTable->addRow($layoutRow); } elseif ($currCol == $colCount) { $currCol = 0; $layoutRow = $layoutTable->createRow(); $layoutTable->addRow($layoutRow); } $hcItem = new HomeControlItem($row, false); $switchComp = $hcItem->getMobileSwitch(); $layoutRow->setAttribute($currCol, $switchComp); $currCol++; } return $layoutTable; }
<?php $tblMain = new Table(array("", "")); $tS = new Title("Sonstige Einstellungen"); $tS->setAlign("left"); $rMainTs = $tblMain->createRow(); $rMainTs->setSpawnAll(true); $rMainTs->setAttribute(0, $tS); $tblMain->addRow($rMainTs); $tblMain->addSpacer(0, 10); $dvMotion = new Table(array("", "")); $fMotion = new Form(); // Dienst aktiv? //echo exec("sudo pgrep -x motion", $output, $return); //echo "/"; //print_r($output); //echo"/".$return."/"; //echo "Ok, Motion-Detection-Process ist gestartet\n"; $fMotion->add(new Hiddenfield("Motion", isset($return) && $return == 0 ? "off" : "on")); $fMotion->add(new Button("ok", "Bewegungserkennung der Kamera " . (isset($return) && $return == 0 ? "deaktivieren" : "aktivieren"))); $rMotion = $tblMain->createRow(); $rMotion->setSpawnAll(true); $rMotion->setAttribute(0, $fMotion); $tblMain->addRow($rMotion); $tblMain->addSpacer(0, 10); $fNoFrame = new Form(); $fNoFrame->add(new Hiddenfield("noFrame", $noFrameExists ? "off" : "on")); $fNoFrame->add(new Button("ok", "Banner auf dieser IP " . ($noFrameExists ? "einblenden" : "ausblenden"))); $rNoFrame = $tblMain->createRow(); $rNoFrame->setSpawnAll(true); $rNoFrame->setAttribute(0, $fNoFrame);
/** * Maske um Urhzeit incl. Bedingung (<>=) zu erzeugen */ private function getWochentagTermEditorMask() { $div = new Div("editWochentag"); $cboMo = new Checkbox("montag", "", "J", $this->TERM_ROW->getNamedAttribute("montag")); $cboDi = new Checkbox("dienstag", "", "J", $this->TERM_ROW->getNamedAttribute("dienstag")); $cboMi = new Checkbox("mittwoch", "", "J", $this->TERM_ROW->getNamedAttribute("mittwoch")); $cboDo = new Checkbox("donnerstag", "", "J", $this->TERM_ROW->getNamedAttribute("donnerstag")); $cboFr = new Checkbox("freitag", "", "J", $this->TERM_ROW->getNamedAttribute("freitag")); $cboSa = new Checkbox("samstag", "", "J", $this->TERM_ROW->getNamedAttribute("samstag")); $cboSo = new Checkbox("sonntag", "", "J", $this->TERM_ROW->getNamedAttribute("sonntag")); $triggerChb = new Checkbox("trigger_jn", "", "J", $this->TERM_ROW->getNamedAttribute("trigger_jn")); $triggerChb->setToolTip("Gibt an, ob Bedingung für Reverse-Schaltungen geprüft werden soll."); $t = new Table(array("Mo", "Di", "Mi", "Do", "Fr", "Sa", "So", "", "")); $t->setAlign("center"); $r = $t->createRow(); $r->setAttribute(0, "Montag"); $r->setAttribute(1, "Dienstag"); $r->setAttribute(2, "Mittwoch"); $r->setAttribute(3, "Donnerstag"); $r->setAttribute(4, "Freitag"); $r->setAttribute(5, "Samstag"); $r->setAttribute(6, "Sonntag"); $r->setAttribute(7, "Trigger?"); $r->setAttribute(8, ""); $t->addRow($r); $r = $t->createRow(); $r->setAttribute(0, $cboMo); $r->setAttribute(1, $cboDi); $r->setAttribute(2, $cboMi); $r->setAttribute(3, $cboDo); $r->setAttribute(4, $cboFr); $r->setAttribute(5, $cboSa); $r->setAttribute(6, $cboSo); $r->setAttribute(7, $triggerChb); $r->setAttribute(8, new Button("saveEditWochentagTerm", " Speichern ")); $t->addRow($r); $rH3 = $t->createRow(); $rH3->setSpawnAll(true); $rH3->setAttribute(0, new Hiddenfield("editTerm", $_REQUEST['editTerm'])); $t->addRow($rH3); $rH4 = $t->createRow(); $rH4->setSpawnAll(true); $rH4->setAttribute(0, new Hiddenfield("editWochentag", "ok")); $t->addRow($rH4); $div->add($t); return $div; }
/** * Maske um Urhzeit incl. Bedingung (<>=) zu erzeugen */ private function getWochentagTermCreatorMask() { $div = new Div("createWochentag"); $cboMo = new Checkbox("montag"); $cboDi = new Checkbox("dienstag"); $cboMi = new Checkbox("mittwoch"); $cboDo = new Checkbox("donnerstag"); $cboFr = new Checkbox("freitag"); $cboSa = new Checkbox("samstag"); $cboSo = new Checkbox("sonntag"); $triggerChb = new Checkbox("trigger_jn", "", "J"); $triggerChb->setToolTip("Gibt an, ob eine Änderung des Wertes einen Schaltvorgang aktiviert oder nur als Bedingung dient."); $t = new Table(array("Mo", "Di", "Mi", "Do", "Fr", "Sa", "So", "", "")); $t->setAlign("center"); $r = $t->createRow(); $r->setAttribute(0, "Montag"); $r->setAttribute(1, "Dienstag"); $r->setAttribute(2, "Mittwoch"); $r->setAttribute(3, "Donnerstag"); $r->setAttribute(4, "Freitag"); $r->setAttribute(5, "Samstag"); $r->setAttribute(6, "Sonntag"); $r->setAttribute(7, "Trigger?"); $t->addRow($r); $r = $t->createRow(); $r->setAttribute(0, $cboMo); $r->setAttribute(1, $cboDi); $r->setAttribute(2, $cboMi); $r->setAttribute(3, $cboDo); $r->setAttribute(4, $cboFr); $r->setAttribute(5, $cboSa); $r->setAttribute(6, $cboSo); $r->setAttribute(7, $triggerChb); $r->setAttribute(8, new Button("saveCreateWochentagTerm", "Bedingung hinzufuegen")); $t->addRow($r); $rH = $t->createRow(); $rH->setSpawnAll(true); $rH->setAttribute(0, new Hiddenfield("dbTableNewhomecontrol_term", "Neuen Eintrag")); $t->addRow($rH); $rH2 = $t->createRow(); $rH2->setSpawnAll(true); $rH2->setAttribute(0, new Hiddenfield("createWochentag", "ok")); $t->addRow($rH2); $div->add($t); return $div; }
/* ------------------------------------ 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); $menu->setMenuType("horizontal"); $menuDiv->add($menu); $contentLayoutRow1 = $layoutTable->createRow(); $contentLayoutRow1->setAttribute(0, $menuDiv); $layoutTable->addRow($contentLayoutRow1); /* --------------------------------- */ /* ------------------------------------ HAUPTPANEL ------------------------------------ */ $MainPanel = new Div(); $MainPanel->setBorder(0); $cont = null; if (file_exists("mobile_" . $_SESSION['mainpage'])) { $cont = new DivByInclude("mobile_" . $_SESSION['mainpage'], false); } else { $cont = new DivByInclude($_SESSION['mainpage'], false); } $cont->setWidth("800");
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(); }
<?php $tblMain = new Table(array("", "")); $t2 = new Title("Benutzer-Einstellungen"); $t2->setAlign("left"); $rMainT1 = $tblMain->createRow(); $rMainT1->setSpawnAll(true); $rMainT1->setAttribute(0, $t2); $tblMain->addRow($rMainT1); $dbTblBenutzer = new DbTable($_SESSION['config']->DBCONNECT, 'user', array("Vorname", "Nachname", "User", "Status", "aktiv", "Pw"), "Vorname, Nachname, Benutzername, Status, Aktiv?, Passwort", "", "Nachname, Vorname"); $dbTblBenutzer->setHeaderEnabled(true); $dbTblBenutzer->setDeleteInUpdate(true); $dbTblBenutzer->setInvisibleCols(array("Pw")); $dbTblBenutzer->setNoUpdateCols(array("Pw")); $dbTblBenutzer->setColSizes(array("200", "40", "60", "90", "50", "50")); $deleteMask = null; if ($dbTblBenutzer->isDeleteInUpdate()) { $deleteMask = !$dbTblBenutzer->doDeleteFromUpdatemask() ? null : $dbTblBenutzer->doDeleteFromUpdatemask(); } if ($deleteMask != null) { $rDel = $tblMain->createRow(); $rDel->setAttribute(0, $deleteMask); $rDel->setSpawnAll(true); $tblMain->addRow($rDel); } $newBenutzerBtn = new Text(""); // Neuer Eintrag if (isset($_REQUEST['InsertIntoDBuser']) && $_REQUEST['InsertIntoDBuser'] == "Speichern") { if (isset($_REQUEST['Pw']) && strlen($_REQUEST['Pw']) > 0) { $_REQUEST['Pw'] = md5($_REQUEST['Pw']); } $dbTblBenutzer->doInsert();
function getDefaultRegisterMask() { $tbl = new Table(array("", "")); $tbl->setSpacing(4); $tbl->setWidth(250); $r = $tbl->createRow(); $r->setAttribute(0, "Vorname:"); $txfUsername = new Textfield("vorname"); $r->setAttribute(1, $txfUsername); $tbl->addRow($r); $r = $tbl->createRow(); $r->setAttribute(0, "Nachname:"); $txfUsername = new Textfield("nachname"); $r->setAttribute(1, $txfUsername); $tbl->addRow($r); $r = $tbl->createRow(); $r->setAttribute(0, "E-Mail:"); $txfUsername = new Textfield("email"); $r->setAttribute(1, $txfUsername); $tbl->addRow($r); $r = $tbl->createRow(); $r->setAttribute(0, "Benutzer:"); $txfUsername = new Textfield("user"); $r->setAttribute(1, $txfUsername); $tbl->addRow($r); $r = $tbl->createRow(); $r->setAttribute(0, "Passwort:"); $txfUsername = new Textfield("passwort"); $r->setAttribute(1, $txfUsername); $tbl->addRow($r); $r = $tbl->createRow(); $r->setAttribute(0, new Button("saveRegister", "Speichern")); $r->setAttribute(1, ""); $tbl->addRow($r); $frm = new Form($_SERVER['SCRIPT_NAME']); $frm->add($tbl); return $frm; }
<?php //Filename: Startseite.php $loginNeed = getPageConfigParam($_SESSION['config']->DBCONNECT, "loginForSwitchNeed") == "J"; $loginExternOnly = getPageConfigParam($_SESSION['config']->DBCONNECT, "loginExternOnly") == "J"; $loginOK = $_SESSION['config']->CURRENTUSER->STATUS == "admin" || $_SESSION['config']->CURRENTUSER->STATUS == "user"; $clientIP = explode(".", $_SERVER['REMOTE_ADDR']); $serverIP = explode(".", $_SERVER['SERVER_ADDR']); if (!$loginNeed || $loginOK || $loginExternOnly && ($serverIP[0] == $clientIP[0] && $serverIP[1] == $clientIP[1] && $serverIP[2] == $clientIP[2])) { $hcMap = new HomeControlMap(false, "MOBILE"); $hcMap->show(); } else { /* ------------------------------------ BENUTZERSTATUS ANZEIGEN ------------------------------------ */ $USR = $_SESSION['config']->CURRENTUSER; $USERSTATUS = new UserStatus($USR, -1, -1); $tbl = new Table(array("")); $tbl->setAlign("center"); $r = $tbl->createRow(); $r->setAttribute(0, $USERSTATUS); $tbl->addRow($r); $tbl->show(); /* --------------------------------- */ }
/** * show-Methode fÃÂÃÂÃÂür TYPE = horizontalbutton */ function showHorizontalButtonMenu() { $userStatus = $this->CONFIG->CURRENTUSER->STATUS; $menuArray = $this->MENUTABLE->getMenuByStatus($userStatus); $count = 0; $c = $this->MENUTABLE->getRowCountByStatus(); $colArr = array(""); //[0] wird hier schon initialisiert! for ($i = 1; $i < $c; $i++) { $colArr[$i] = ""; } $table = new Table($colArr); $table->setStyle("text-align", "center"); $table->setStyle("vertical-align", "middle"); $tblrow = $table->createRow(); $tblrow->setStyle("vertical-align", "middle"); $tblrow->setHeight($this->getHeight()); while ($row = mysql_fetch_array($menuArray)) { if ($row['id'] > 0) { $btn = new HorizontalMenuButton($row['link'], $row['text']); $tblrow->setAttribute($count, $btn); $count++; } } $table->addRow($tblrow); $table->setHeight($this->getHeight()); $table->show(); }