Esempio n. 1
0
$footMenuDiv->setWidth($bannerWidth);
$footMenuDiv->setBackgroundColor($_SESSION['config']->COLORS['panel_background']);
$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();
// MailSensor
$dbSensorTable = new DbTable($_SESSION['config']->DBCONNECT, 'homecontrol_sensor', array("*"), "", "", "", "id=999999999");
if (count($dbSensorTable->ROWS) > 0) {
    $mailSensorRow = $dbSensorTable->getRow(1);
    $mailSensor = new HomeControlSensor($mailSensorRow, false);
    $x = 15;
    $y = $bannerHeight - 10;
    echo "<div style=\"position:absolute; left:" . $x . "px; top:" . $y . "px; width:26px; height:26px;\">";
    echo $mailSensor->getSensorArtIconSrc();
    echo "</div>";
    if ($mailSensor->getLastValue() != null) {
        echo "<div style=\"background-color:#dedede; position:absolute; left:" . ($x + 5) . "px; top:" . ($y + $mailSensor->getControlImageHeight() / 2 - 3) . "px;\"><center><font size=2><b>" . $mailSensor->getLastValue() . "</b></font></center></div>";
    }
}
Esempio n. 2
0
<?php

$t = new Title("Sensoren");
$t->show();
$sensorDBTbl = new DbTable($_SESSION['config']->DBCONNECT, "homecontrol_sensor", array("*"), "", "", "etage, zimmer, name", "");
$cnt = 0;
$bgCtr = 1;
foreach ($sensorDBTbl->ROWS as $row) {
    $s = new HomeControlSensor($row);
    if ($cnt == 0) {
        $s->setWithHeader(true);
    }
    $s->setBgId($cnt);
    $s->show();
    $cnt++;
}
$spc = new Spacer();
$spc->show();
 function getSensorMap($dbTable)
 {
     $dv = new Div();
     for ($i = 1; $i <= $dbTable->getRowCount(); $i++) {
         $currConfigRow = $dbTable->getRow($i);
         if ($currConfigRow->getNamedAttribute("x") > 0 || $currConfigRow->getNamedAttribute("y") > 0) {
             $ctrlItem = new HomeControlSensor($currConfigRow, $this->EDITMODE);
             $ctrlItem->setIconViewActive(true);
             $dv->add($ctrlItem);
         }
     }
     return $dv;
 }