public function getAngebote($data) { if (!$this->loggedIn) { return "TIMEOUT"; } $html = ""; $T = new HTMLTable(2); #, "Bitte wählen Sie einen Lieferschein"); $T->setTableStyle("width:100%;margin-top:10px;"); $T->setColWidth(1, 130); $T->useForSelection(false); $T->maxHeight(400); $AC = anyC::get("GRLBM", "isA", "1"); $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID"); $AC->addAssocV3("UserID", "=", Session::currentUser()->getID()); $AC->addAssocV3("status", "=", "open"); #$AC->addOrderV3("datum", "DESC"); $AC->addOrderV3("nummer", "DESC"); #$AC->setLimitV3(100); #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID"); $i = 0; while ($B = $AC->n()) { $Adresse = new Adresse($B->A("AdresseID")); $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress())); $T->addCellStyle(1, "vertical-align:top;"); $T->addRowStyle("cursor:pointer;border-bottom:1px solid #ccc;"); #if($i % 2 == 1) # $T->addRowStyle ("background-color:#eee;"); $T->addRowEvent("click", "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');"); $i++; } $html .= $T; return $html; }
public function check($touch = false) { $mbox = $this->connection(); #echo "<h1>Nachrichten in INBOX</h1><div style=\"overflow:auto;max-height:400px;\"><pre>"; $MC = imap_check($mbox); $T = new HTMLTable(1, $touch ? "Mails" : ""); $T->setTableStyle("font-size:11px;"); $T->useForSelection(); $start = $MC->Nmsgs - 10; if ($start < 1) { $start = 1; } $result = imap_fetch_overview($mbox, "{$start}:{$MC->Nmsgs}", 0); $result = array_reverse($result); foreach ($result as $overview) { #print_r($overview); $T->addRow(array("\n\t\t\t\t<small style=\"color:grey;float:right;\">" . Util::CLDateParser($overview->udate) . "</small>\n\t\t\t\t" . str_replace("\"", "", $this->decodeBlubb($overview->from)) . "<br />\n\t\t\t\t<small style=\"color:grey;\">" . substr($this->decodeBlubb($overview->subject), 0, 50) . "</small>")); $T->addCellEvent(1, "click", "\$j('#MailFrame').attr('src', './interface/rme.php?class=MailCheck&constructor=" . $this->getID() . "&method=showMailBody¶meters=\\'{$overview->uid}\\'');"); } imap_close($mbox); #echo "</pre></div>"; $BC = ""; if ($touch) { $BC = new Button("Fenster\nschließen", "stop"); $BC->style("float:right;margin:10px;"); $BC->onclick(OnEvent::closePopup("MailCheck")); } echo "<div style=\"float:right;width:300px;\">"; echo $BC; echo "<p>{$MC->Nmsgs} Nachricht" . ($MC->Nmsgs == 1 ? "" : "en") . "</p><div style=\"clear:both;\"></div>"; echo $T; echo "</div>"; echo "\n\t\t\t<div style=\"border-right-style:solid;border-right-width:1px;width:699px;\" class=\"borderColor1\">\n\t\t\t\t<iframe id=\"MailFrame\" style=\"border:0px;width:699px;height:520px;\" src=\"./fheME/MailCheck/Home/index.html\"></iframe>\n\t\t\t</div>"; echo "<div style=\"clear:both;\"></div>"; }
public static function parserJSONForecast($w) { $data = json_decode($w); $T = new HTMLTable(1); $T->setTableStyle("color:grey;font-size:10px;"); $T->maxHeight(100); foreach ($data->list as $I) { $T->addRow(array(Util::CLDateTimeParser($I->dt) . ": " . $I->main->temp . "°")); } return $T; }
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; } }
public function getHTML($id, $page) { $bps = $this->getMyBPSData(); $LangTab = new HTMLTable(1, "Language selection:"); $LangTab->addRow("German"); $LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:de');"); $LangTab->addRowStyle("cursor:pointer;"); if ($bps != -1 and $bps["lang"] == "de") { $LangTab->addRowClass("backgroundColor1"); } $LangTab->addRow("English"); $LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:en');"); $LangTab->addRowStyle("cursor:pointer;"); if ($bps != -1 and $bps["lang"] == "en") { $LangTab->addRowClass("backgroundColor1"); } if ($bps == -1) { return $LangTab; } $T = new HTMLTable(1); $T->setTableStyle("width:370px;float:left;"); $FeedSerien = array(); $i = 0; $Series = array(); $RSS = new mRSSFilterGUI(); while ($R = $RSS->getNextEntry()) { $new = $R->filterNew(); foreach ($new as $S => $v) { if ($v->language != $bps["lang"]) { continue; } $Series[$v->name] = "rmeP('NewSeries', '-1', 'showInfo', ['{$v->name}', '{$v->language}'], 'if(checkResponse(transport)) { \$(\\'Row{$i}\\').className = \\'backgroundColor1\\'; \$(\\'contentLeft\\').update(transport.responseText); }');"; } } asort($Series); foreach ($Series as $name => $action) { $T->addRow(array($name)); $T->addRowStyle("cursor:pointer;"); $T->addRowEvent("click", $action); $T->setRowID("Row{$i}"); $i++; } return $LangTab . "<div style=\"margin-left:0px;height:500px;overflow:auto;\">" . $T . "</div>"; }
/** * creates a new table for your entries * * @param array $attributes * @param array $colStyles * @return HTMLTable */ public function getTable($attributes, $colStyles = null, $caption = null) { $this->buildReferenceLine($attributes); if ($this->mode == "HTML") { if ($this->tableMode == "CRMSubframeContainer") { $caption = null; } if ($this->tableMode == "popup") { $caption = null; } $T = new HTMLTable(count($this->referenceLine), $caption); $this->table = $T; if ($this->tableMode == "CRMSubframeContainer") { $T->setTableStyle("width:100%;margin-left:0px;"); } if ($this->tableMode == "screen") { $T->setTableStyle("font-size:10px;"); } if ($colStyles != null) { foreach ($colStyles as $k => $v) { $this->setColStyle($k, $v); } } $this->numCols = count($this->referenceLine); if ($this->showTrash) { $this->setColStyle("%TRASH", "width:20px;"); } if ($this->showEdit) { $this->setColStyle("%EDIT", "width:20px;"); } return $T; } }
function showWarenkorb() { $AC = anyC::get("Seminar"); $AC->addAssocV3("SeminarVon", ">=", Util::parseDate("de_DE", Util::formatDate("de_DE", time()))); $count = array(); for ($i = 0; $i < 21; $i++) { $count[$i] = $i; } $T = new HTMLTable(3, "Events"); $T->setTableStyle("width:100%;"); while ($S = $AC->getNextEntry()) { $I = new HTMLInput("AnzahlKarten" . $S->getID(), "select", "0", $count); $I->style("width:80px;text-align:right;"); $I->onchange("CustomerPage.rme('recalc', ['" . $S->getID() . "', this.value], function(response){ \$('#PreisGesamt" . $S->getID() . "').html(response) });"); if (isset($_SESSION["ticketDataSelection"])) { $I->setValue($_SESSION["ticketDataSelection"][$S->getID()]); } $Adresse = new Adresse($S->A("SeminarAdresseID")); $T->addRow(array("<b>" . $S->A("SeminarName") . "</b>, " . Util::CLDateParser($S->A("SeminarVon")) . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr, " . $Adresse->A("ort"))); $T->addRowColspan(1, 3); $T->addRow(array($I, Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * 1, true), Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * $I->getValue(), true))); $T->addCellStyle(1, "text-align:right;"); $T->addCellStyle(2, "text-align:right;"); $T->addCellStyle(3, "text-align:right;"); $T->addCellID(3, "PreisGesamt" . $S->getID()); $T->addRow(array(" ")); $T->addRowColspan(1, 3); } $I = new Button("Weiter", ""); $I->onclick("CustomerPage.rme('handleForm', \$('#ticketShop').serialize(), function(){ document.location.reload(); })"); $I->className("submitFormButton"); $T->addRow($I); $T->addRowColspan(1, 3); $IA = new HTMLInput("action", "hidden", "handleSelection"); return "<form id=\"ticketShop\">" . $T . $IA . "</form>"; }
public function getEditHTML() { if (BPS::getProperty($this->className . "GUI", "edit") == "ok") { return $this->getEditTableHTML(); } ################################################################################ if ($this->name == null) { $this->name = $this->className; } if ($this->attributes == null) { $this->attributes = PMReflector::getAttributesArrayAnyObject($this->object->getA()); } $widths = Aspect::joinPoint("changeWidths", $this, __METHOD__); if ($widths == null) { $widths = array(700, 132, 218); } $tab = new HTMLTable(2); $tab->setTableStyle("width:{$widths['0']}px;margin-left:10px;"); $tab->setColWidth(1, "50%"); $tab->setColWidth(2, "50%"); $A = $this->object->getA(); $TSub = new HTMLTable(2); $TSub->setColWidth(1, 120); $TSub->setColClass(1, ""); $TSub->setColClass(2, ""); $TC = clone $TSub; $row = array(); foreach ($this->attributes as $k => $v) { if (isset($this->types[$v]) and $this->types[$v] == "hidden") { continue; } if (isset($this->parsers[$v])) { $A->{$v} = $this->invokeParser($this->parsers[$v], $A->{$v}, $this->object); } if (isset($this->types[$v]) and $this->types[$v] == "select") { if (isset($this->options[$v]) and isset($this->options[$v][$A->{$v}])) { $A->{$v} = $this->options[$v][$A->{$v}]; } } if (isset($this->spaces[$v]) and $this->spaces[$v] != "") { if ($k > 0) { $row[] = $TC; } if ($this->forceNewRow[$v]) { $row[] = ""; $tab->addRow($row); $tab->addRowClass("backgroundColor0"); $tab->addRowStyle("vertical-align:top;"); $row = array(); } if (count($row) == 2) { $tab->addRow($row); $tab->addRowClass("backgroundColor0"); $tab->addRowStyle("vertical-align:top;"); $row = array(); } $TC = clone $TSub; if (trim($this->spaces[$v]) != "") { $TC->addRow(array($this->spaces[$v])); $TC->addRowClass("backgroundColor2"); $TC->addRowColspan(1, 2); } } if ($A->{$v} != "") { $B = ""; if (isset($this->fieldButtons[$v])) { $B = $this->fieldButtons[$v]; $B->style("float:right;"); } $TC->addLV($this->labels($v) . ":", $B . nl2br($A->{$v})); $TC->addRowStyle("vertical-align:top;"); } /* $label = isset($this->labels[$v]) ? $this->labels[$v] : $v; $row[] = "<label>".($label != "" ? ucfirst($label).":" : "")."</label>"; $row[] = nl2br($A->$v);*/ /*if(count($row) == 4){ $tab->addRow($row); $row = array(); }*/ } $row[] = $TC; if (count($row) == 1) { $row[] = ""; } if (count($row) == 2) { $tab->addRow($row); $tab->addRowClass("backgroundColor0"); $tab->addRowStyle("vertical-align:top;"); } $BE = new Button("Eintrag\nbearbeiten", "edit"); $BE->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionEdit)); $BE->style("float:left;margin-left:10px;"); $BD = new Button("Eintrag\nlöschen", "trash"); $BD->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionDelete)); $BD->style("float:left;margin-left:10px;"); $options = "<div style=\"width:{$widths['0']}px;\">" . $BE . $BD . implode("", $this->topButtons) . "</div><div style=\"clear:left;height:10px;width:{$widths['0']}px;\"></div>"; $appended = ""; if (count($this->appended) > 0) { foreach ($this->appended as $k => $v) { $appended .= $v->getHTML(); } } $prepended = ""; if (count($this->prepended) > 0) { foreach ($this->prepended as $k => $v) { $prepended .= $v->getHTML(); } } /* if(count($this->CRMGUIappendedElements) > 0) foreach($this->CRMGUIappendedElements as $k => $v) $appended .= $v->getHTML();*/ return $options . $prepended . $tab . $appended; }
} if (isset($argv[2])) { $_SERVER["HTTP_HOST"] = $argv[2]; } session_name("ExtConnInstallation"); require_once realpath(dirname(__FILE__) . "/../../system/connect.php"); $absolutePathToPhynx = realpath(dirname(__FILE__) . "/../../") . "/"; $e = new ExtConn($absolutePathToPhynx); $e->addClassPath($absolutePathToPhynx . "/plugins/Installation"); $e->useDefaultMySQLData(); $e->useAdminUser(); $CH = Util::getCloudHost(); $I = new mInstallation(); $data = $I->updateAllTables(); $T = new HTMLTable(2); $T->setTableStyle("font-size:10px;font-family:sans-serif;"); $T->addColStyle(1, "vertical-align:top;"); foreach ($data as $k => $v) { $T->addRow(array($k, "<pre>" . trim($v) . "</pre>")); } $mimeMail2 = new PHPMailer(true, "", true); $mimeMail2->CharSet = "UTF-8"; $mimeMail2->Subject = "Installation Plugin"; $mimeMail2->From = $CH->emailAdmin; $mimeMail2->Sender = $CH->emailAdmin; $mimeMail2->FromName = "Cloud Server Cronjob"; $mimeMail2->Body = "<html><body>" . $T . "</body></html>"; $mimeMail2->IsHTML(); $mimeMail2->AltBody = "Diese Nachricht wird nur als HTML übertragen"; $mimeMail2->AddAddress($CH->emailAdmin); if (!$mimeMail2->Send()) {
public function checkAddressKlickTel($data) { $KT = new klickTel(-1); $Adresse = new Adresse($data["AdresseID"]); Aspect::joinPoint("before", $this, __METHOD__, $data); //call AFTER new Adresse! try { $result = $KT->checkAddress($data["AdresseID"]); } catch (Exception $e) { Aspect::joinPoint("onError", $this, __METHOD__, array($data, $e)); //call AFTER new Adresse! die("<p>" . $e->getMessage() . "</p>"); } $T = new HTMLTable(2, "Gefundene Adressen"); $T->useForSelection(false); $T->setTableStyle("width:100%;"); $i = 0; $found = null; foreach ($result as $k => $A) { $T->addRow(array($A->street . " " . $A->streetnumber, $A->zipcode . " " . $A->city)); $T->addRowEvent("click", "CustomerPage.rme('changeAddressKlickTel', {AdresseID: {$data['AdresseID']}, useNr: {$k}, GRLBMID:{$data['GRLBMID']}}, function(){ CustomerPage.closePopup(); CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); \$('#BCheckKT').css('color', 'green'); }); });"); $T->addRowClass("selectable"); $found = $A; $i++; } echo "<p>" . $Adresse->getHTMLFormattedAddress() . "</p>"; if ($i == 1 and $Adresse->A("strasse") == $found->street and $Adresse->A("nr") == $found->streetnumber and $Adresse->A("plz") == $found->zipcode and $Adresse->A("ort") == $found->city) { Aspect::joinPoint("onSuccess", $this, __METHOD__, array($data, $found)); //call AFTER new Adresse! die("<p style=\"color:green;\">Diese Adresse wurde genau so in der klickTel Datenbank gefunden.</p>" . OnEvent::script("\$('#BCheckKT').css('color', 'green');")); } echo $T; }
function getSetTable($DeviceID, $values) { $controls = new HTMLTable(1); $controls->setTableStyle("width:100%;border:0px;"); $i = 0; foreach ($values as $v => $l) { $controls->addRow(array($l)); $controls->addRowClass("backgroundColor0"); $controls->addCellStyle(1, "padding-top:10px;padding-bottom:10px;cursor:pointer;"); if ($i != count($values) - 1) { $controls->addCellStyle(1, "border-bottom-style:solid;border-bottom-width:1px;"); $controls->addCellClass(1, "borderColor1"); } $controls->addCellEvent(1, "click", OnEvent::rme($this, "setDevice", array(str_replace(array("D", "H"), "", $DeviceID), "'{$v}'"), "function(){ \$j('#controls_{$DeviceID}').hide(); if(Fhem.doAutoUpdate) Fhem.requestUpdate(); }")); $i++; } $controls = "<div id=\"controls_{$DeviceID}\" style=\"display:none;width:50px;position:absolute;margin-left:150px;border-style:solid;border-width:1px;padding:3px;\" class=\"borderColor1 backgroundColor0 fhemeControl\">{$controls}</div>"; return $controls; }
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); }
function getHTML($id) { $U = new mUserdata(); $U = $U->getUDValue("selectedDomain"); if ($id == -1) { $this->A = $this->newAttributes(); $this->A->DomainID = $U; $this->A->header = "leere Seite"; if ($_SESSION["S"]->checkForPlugin("Templates")) { $this->A->TemplateID = TemplatesGUI::getDefault("pageTemplate"); } $id = $this->newMe(); $c = new Content(-1); $cA = $c->newAttributes(); $c->setA($cA); $c->changeA("SeiteID", $id); if ($_SESSION["S"]->checkForPlugin("Templates")) { $c->changeA("TemplateID", TemplatesGUI::getDefault("contentTemplate")); } $c->newMe(); $this->forceReload(); } if ($this->A == null) { $this->loadMe(); } #$this->loadMeOrEmpty(); #if($id == -1 AND $U != null) $this->A->DomainID = $U; $gui = new HTMLGUI(); $gui->setObject($this); $gui->setName("Seite"); $gui->setShowAttributes(array("header", "TemplateID", "name", "metaTagDescription", "permalink")); $gui->insertSpaceAbove("name", "sonstiges", true); $gui->setLabel("header", "Seitenname"); #$gui->insertSpaceAbove("metaTagDescription"); #$gui->setFieldDescription("header","wird auf der Seite angezeigt"); $gui->setFieldDescription("name", "wird nur intern angezeigt"); $gui->setFieldDescription("permalink", "Ein Name, unter der die Seite über ?permalink= erreichbar ist. Darf nur aus Buchstaben (keine Umlaute), Zahlen, _ und - bestehen und muss eindeutig für die Domain sein. Es kann dann mit mod_rewrite auf diesen permalink an Stelle der SeitenID verlinkt werden."); $gui->setLabel("TemplateID", "Vorlage"); $gui->setType("DomainID", "hidden"); $gui->setType("metaTagDescription", "textarea"); $gui->setLabel("metaTagDescription", "Beschreibung für meta tag"); $gui->setInputJSEvent("metaTagDescription", "onkeyup", "\$('charCounter').update(\$('metaTagDescription').value.length)"); $gui->setFieldDescription("metaTagDescription", "<span id=\"charCounter\">" . strlen($this->A("metaTagDescription")) . "</span> Zeichen"); $gui->setInputStyle("metaTagDescription", "font-size:8px;"); if (Session::isPluginLoaded("mMultiLanguage")) { $gui->activateFeature("addAnotherLanguageButton", $this, "header"); } if (Session::isPluginLoaded("Templates")) { $T = new anyC(); $T->setCollectionOf("Template"); $T->addAssocV3("templateType", "=", "pageTemplate", "AND", "1"); $T->addAssocV3("TemplateDomainID", "=", "0", "AND", "2"); $T->addAssocV3("TemplateDomainID", "=", $this->A("DomainID"), "OR", "2"); $gui->selectWithCollection("TemplateID", $T, "name"); } else { $gui->setType("TemplateID", "hidden"); } $gui->setStandardSaveButton($this); $H = ""; $E = ""; $C = new mContentGUI(); $C->addAssocV3("SeiteID", "=", $this->ID); $C->lCV3(); if ($C->numLoaded() == 1) { $content = $C->getNextEntry(); $H = new ContentGUI($content->getID()); $H->singular = true; $H = "<div style=\"height:20px;width:20px;\"></div>" . $H->getHTML($content->getID()); } else { $E = $C->getHTML(-1); } $tab = new HTMLTable(1); $tab->setTableStyle("margin-top:20px;"); $B = new Button("Content\nhinzufügen", "gutschrift"); $B->rmePCR("Seite", $this->ID, "createContent", "", "contentManager.reloadFrame('contentLeft');"); $tab->addRow($B); return $gui->getEditHTML() . $H . $tab . $E; }
public function getBottom($Beleg) { $IV = new HTMLInput("GRLBMServiceVon", "text", Util::CLTimeParserE($Beleg->A("GRLBMServiceVon"))); $IB = new HTMLInput("GRLBMServiceBis", "text", Util::CLTimeParserE($Beleg->A("GRLBMServiceBis"))); $IS = new HTMLInput("GRLBMServiceStunden", "text", Util::CLTimeParserE($Beleg->A("GRLBMServiceStunden"))); $IG = new HTMLInput("GRLBMServiceIsGarantie", "checkbox", $Beleg->A("GRLBMServiceIsGarantie")); $IA = new HTMLInput("GRLBMServiceIsAbgeschlossen", "checkbox", $Beleg->A("GRLBMServiceIsAbgeschlossen")); $IE = new HTMLInput("GRLBMServiceIsBerechnung", "checkbox", $Beleg->A("GRLBMServiceIsBerechnung")); $IID = new HTMLInput("GRLBMID", "hidden", $Beleg->getID()); $I = new Button("Arbeitszeit", "info", "iconic"); $T = new HTMLTable(3, "Details"); $T->addRow(array($I, "<label>Anfang der Arbeitszeit:</label>", $IV)); $T->addRow(array("", "<label>Ende der Arbeitszeit:</label>", $IB)); $T->addRow(array("", "<label>Stunden ges:</label>", $IS)); $T->addRow(array("", "<label>Garantie?:</label>", $IG)); $T->addRow(array("", "<label>Abgeschlossen?:</label>", $IA)); $T->addRow(array("", "<label>Berechnung:</label>", $IE)); $TA = new HTMLTable(1, "Unterschrift Auftragnehmer"); $TA->setTableStyle("width:100%;"); $P = new Button("Unterschrift", "pen_alt2", "iconic"); $P->style("float:left;"); $padAN = $P . ' <div class="sigPadAN" style="margin-left:30px;"> <canvas class="pad" width="300" height="150" style="border:1px solid grey;"></canvas> <input type="hidden" id="sigAN" name="sigAN" class="output"> <br> <span class="clearButton"><a href="#" onclick="return false;">Nochmal</a></span> </div>'; $TA->addRow(array($padAN)); $TK = new HTMLTable(1, "Unterschrift Kunde"); $TK->setTableStyle("width:100%;"); $padKunde = $P . ' <div class="sigPadKunde" style="margin-left:30px;"> <canvas class="pad" width="300" height="150" style="border:1px solid grey;"></canvas> <input type="hidden" id="sigKunde" name="sigKunde" class="output"> <br> <span class="clearButton"><a href="#" onclick="return false;">Nochmal</a></span> </div>'; $TK->addRow(array($padKunde)); return "\n\t\t\t<div style=\"width:50%;\">\n\t\t\t\t{$T}{$IID}\n\t\t\t</div>\n\t\t\t<div style=\"width:50%;display:inline-block;vertical-align:top;\">{$TA}</div><div style=\"width:49%;display:inline-block;vertical-align:top;margin-left:1%;\">{$TK}</div>\n\t\t\t" . OnEvent::script("\$('.sigPadAN').signaturePad({drawOnly:true, lineTop: 100}).regenerate(" . $Beleg->A("GRLBMServiceSigAN") . ");\n\t\t\t\t\$('.sigPadKunde').signaturePad({drawOnly:true, lineTop: 100}).regenerate(" . $Beleg->A("GRLBMServiceSigAG") . ");"); }