Пример #1
0
 public function getHTML($id)
 {
     $bps = $this->getMyBPSData();
     $t = new HTMLTable(1);
     $t->setTableStyle("width:160px;float:right;margin-right:10px;");
     if (!isset($bps["ID"])) {
         $F = new mFhemGUI();
         $F->addAssocV3("FhemType", "!=", "FHZ");
         while ($f = $F->getNextEntry()) {
             $B = new Button($f->getA()->FhemName, "./fheME/Fhem/fhem.png");
             $B->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;ID:" . $f->getID() . ";type:D;name:" . $f->getA()->FhemName . "');");
             $t->addRow($B);
             $t->addRowClass("backgroundColor0");
         }
         $t->addRow("");
         $t->addRowClass("backgroundColor1");
         $F = new anyC();
         $F->setCollectionOf("FhemPreset");
         $F->addAssocV3("FhemPresetHide", "=", "0");
         while ($f = $F->getNextEntry()) {
             $B = new Button($f->getA()->FhemPresetName, "./fheME/Fhem/events.png");
             $B->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;ID:" . $f->getID() . ";type:P;name:" . $f->getA()->FhemPresetName . "');");
             $t->addRow($B);
             $t->addRowClass("backgroundColor0");
         }
         return $t;
     }
     if (isset($bps["ID"])) {
         if ($bps["type"] == "D") {
             $F = new Fhem($bps["ID"]);
             $F->loadMe();
             $FF = new Fhem("timer");
             $FF->setA($F->getA());
             $C = new FhemControlGUI();
             $control = $C->getControl($FF);
         } else {
             $control = "";
         }
         $rand = rand(10, 10000000);
         $B = new Button("set timer", "okCatch");
         $B->rme("FhemControl", '', 'setTimer', array($bps["ID"], "'setBPSValue'", "'{$bps['type']}'", "parent.clock4Timer{$rand}.stunden", "parent.clock4Timer{$rand}.minuten", "'{$bps['name']}'"), "contentManager.loadFrame(\\'contentRight\\',\\'mFhem\\',-1,0,\\'\\');");
         $B->style("float:right;");
         $t->addRow("<iframe name=\"clock4Timer{$rand}\" style=\"width:240px;height:330px;border:0px;\" src=\"./libraries/ClockGUI.class.php\"></iframe>");
         $t->addRowClass("backgroundColor0");
         $t->addRow($B);
         $t->addRowClass("backgroundColor0");
         return $control . $t;
     }
 }
Пример #2
0
 public function getOverviewContent($echo = true)
 {
     $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemFhemGUI\"></span><p>Fhem</p></div>\n\t\t\t<div style=\"padding:10px;\">\n\t\t\t<div style=\"\" class=\"borderColor1\">";
     $FC = new FhemControlGUI();
     $ac = $FC->getDevicesFHT(true);
     while ($t = $ac->getNextEntry()) {
         $html .= $FC->getFHTControl($t);
     }
     $html .= "<div style=\"clear:both;\"></div></div><div style=\"\">";
     $ac = $FC->getDevices(true);
     while ($t = $ac->getNextEntry()) {
         $html .= $FC->getControl($t);
     }
     $html .= "</div></div>" . OnEvent::script("contentManager.rmePCR('FhemControl','','updateGUI','','Fhem.updateControls(transport);', '', false);");
     if ($echo) {
         echo $html;
     }
     return $html;
 }