function getHTML($id, $page, $frame = null) { $this->loadMultiPageMode($id, $page); $gui = new HTMLGUIX($this); $tab = ""; if (Session::isPluginLoaded("mAdressBuch") and $id == -1) { $tab = mAdressBuchGUI::getSelectionMenu($this, $frame, false, true); } $gui->displayGroup("KategorieID", "AdressenGUI::DGParser"); $gui->options(true, true, true, true); $gui->parser("firma", "mAdresseGUI::parserFirma"); if ($frame != null) { $gui->targetFrame($frame); } $gui->attributes(array("firma")); return $tab . $gui->getBrowserHTML($id); }
public function getHTML($id, $page) { $TID = BPS::getProperty("mphimGUI", "with", 0); if ($TID[0] != "g") { $this->addAssocV3("phimFromUserID", "=", Session::currentUser()->getID(), "AND", "1"); $this->addAssocV3("phimToUserID", "=", $TID, "AND", "1"); $this->addAssocV3("phimphimGruppeID", "=", "0", "AND", "1"); $this->addAssocV3("phimFromUserID", "=", $TID, "OR", "2"); $this->addAssocV3("phimToUserID", "=", Session::currentUser()->getID(), "AND", "2"); $this->addAssocV3("phimphimGruppeID", "=", "0", "AND", "2"); } else { $this->addAssocV3("phimphimGruppeID", "=", str_replace("g", "", $TID)); } #$this->addJoinV3("User", $field1) #$this->addOrderV3("phimToUserID", "DESC"); #$this->addOrderV3($order) $this->addOrderV3("phimTime", "DESC"); $this->addOrderV3("phimID", "DESC"); $this->setFieldsV3(array("phimRead", "phimFromUserID", "phimMessage", "DATE_FORMAT(FROM_UNIXTIME(phimTime), '%Y-%m-%d') AS grouper")); $this->loadMultiPageMode($id, $page, 0); $gui = new HTMLGUIX($this); $gui->version("mphim"); $gui->colWidth("phimRead", 20); $gui->name("phim"); $gui->displayGroup("grouper", "mphimGUI::parserDG"); $gui->options(true, true, false); $gui->parser("phimRead", "parserRead"); $gui->parser("phimFromUserID", "parserFrom"); $gui->attributes(array("phimRead", "phimFromUserID", "phimMessage")); $B = $gui->addSideButton("Gruppen", "./ubiquitous/phim/group.png"); $B->loadPlugin("contentRight", "mphimGruppe"); $B = $gui->addSideButton("System-\nBenutzer", "./ubiquitous/phim/phimUser.png"); $B->loadPlugin("contentRight", "mphimUser"); $B = $gui->addSideButton("Benutzer\nausblenden", "./ubiquitous/phim/hidden.png"); $B->loadPlugin("contentRight", "mphimUserHidden"); $B = $gui->addSideButton("phim\nanzeigen", "new"); $B->onclick("windowWithRme('mphim', -1, 'chatPopup', [], '', 'window', {height: 300, width:550, left: \$j.jStorage.get('phimX', 20), top: \$j.jStorage.get('phimY', 20), name: 'phim', scroll: false});"); $B = $gui->addSideButton("Config-Datei", "new"); $B->windowRme("mphim", "-1", "getConfigFile"); $users = self::$users = Users::getUsersArray("Alle", true); $T = new HTMLTable(1, "Konversation mit"); $T->setTableStyle("width:100%"); $T->weight("light"); $T->useForSelection(false); foreach ($users as $ID => $U) { $T->addRow(array($U)); $T->addRowEvent("click", OnEvent::frame("contentRight", "mphim", "-1", 0, "", "mphimGUI;with:{$ID}")); if ($ID . "" === $TID . "") { $T->addRowClass("highlight"); } } $AC = anyC::get("phimGruppe"); $AC->addAssocV3("INSTR(phimGruppeMembers, ';" . Session::currentUser()->getID() . ";')", ">", "0"); $TG = new HTMLTable(1, "Gruppen"); $TG->setTableStyle("width:100%"); $TG->weight("light"); $TG->useForSelection(false); while ($G = $AC->n()) { $TG->addRow(array($G->A("phimGruppeName"))); $TG->addRowEvent("click", OnEvent::frame("contentRight", "mphim", "-1", 0, "", "mphimGUI;with:g" . $G->getID())); if ("g" . $G->getID() === $TID . "") { $TG->addRowClass("highlight"); } } $gui->addSideRow($T); $gui->addSideRow($TG); return $gui->getBrowserHTML($id); }
public function getHTML($id) { $bps = $this->getMyBPSData(); $B1 = new Button("Servers", "./fheME/Fhem/fhemServers.png"); $B1->style("float:right;"); $B1->onclick("contentManager.loadFrame('contentRight','mFhemServer'); contentManager.emptyFrame('contentLeft');"); $B2 = new Button("Devices", "./fheME/Fhem/fhem.png"); $B2->style("float:right;"); $B2->onclick("contentManager.loadFrame('contentRight','mFhem', -1, 0,'mFhemGUI;showDevices:true'); contentManager.emptyFrame('contentLeft');"); // $B3 = new Button("Rooms","gutschrift"); // $B3->style("float:right;"); // $B3->onclick("contentManager.loadFrame('contentRight','mGruppe');"); $B6 = new Button("Presets", "./fheME/Fhem/events.png"); $B6->style("float:right;"); $B6->onclick("contentManager.loadFrame('contentRight','mFhemPreset'); contentManager.emptyFrame('contentLeft');"); $BLoc = new Button("Locations", "./fheME/FhemLocation/FhemLocation.png"); $BLoc->style("float:right;"); $BLoc->onclick("contentManager.loadFrame('contentRight','mFhemLocation'); contentManager.emptyFrame('contentLeft');"); if (!Session::isPluginLoaded("mFhemLocation")) { $BLoc = ""; } // $B4 = new Button("Refresh","refresh"); // $B4->style("float:right;"); // $B4->onclick("Fhem.refreshControls();"); #$B5 = new Button("Timers","backup"); #$B5->style("float:right;"); #$B5->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;-'); contentManager.emptyFrame('contentLeft');"); $html = "\n\t\t<script type=\"text/javascript\">\n\t\t\tcontentManager.loadFrame('contentLeft','FhemControl');\n\t\t</script>"; if (isset($bps["noLeft"])) { $html = ""; } $t = new HTMLTable(1); $t->setTableStyle("width:160px;float:right;margin-right:10px;"); #$t->addRow($B5); #$t->addRowClass("backgroundColor0"); #$t->addRow(""); #$t->addRowClass("backgroundColor1"); // $t->addRow($B3); // $t->addRowClass("backgroundColor0"); $t->addRow($B2); $t->addRowClass("backgroundColor0"); $t->addRow($B6); $t->addRowClass("backgroundColor0"); // $t->addRow($B4); // $t->addRowClass("backgroundColor0"); $t->addRow($B1); $t->addRowClass("backgroundColor0"); $t->addRow($BLoc); $t->addRowClass("backgroundColor0"); if (!isset($bps["showDevices"]) and !isset($bps["selectionMode"])) { return $html . $t; } if (isset($bps["selectionMode"])) { $this->addAssocV3("FhemServerID", "=", $_SESSION["BPS"]->getProperty("mFhemSelection", "selectionServerID")); $this->addAssocV3("FhemType", "!=", "FHZ"); } #---------------------------------------------- $this->addOrderV3("FhemServerID"); $this->addOrderV3("FhemType"); $this->addOrderV3("FhemName"); $gui = new HTMLGUIX($this); $gui->displayGroup("FhemServerID", "mFhemGUI::DGParser"); $B = $gui->addSideButton("Load devices\nfrom server", "refresh"); $B->popup("", "Load devices", "mFhem", "-1", "loadDevices"); $B = $gui->addSideButton("Register\nsettings", "./fheME/Fhem/fhem.png"); $B->rme("FhemControl", "", "registerSettings", "", "if(checkResponse(transport)) \$(\\'contentLeft\\').update(transport.responseText);"); $B = $gui->addSideButton("Reset\nServers", "empty"); $B->rme("FhemControl", "", "resetServers", "", "if(checkResponse(transport)) \$(\\'contentLeft\\').update(transport.responseText);"); #$this->lCV3($id); $gui->attributes(array("FhemName", "FhemType")); $gui->name("Device"); if ($bps != -1 and isset($bps["selectionMode"])) { $t2 = ""; } return $gui->getBrowserHTML($id); }