function getHTML($id) { #$p = mUserdata::getPluginSpecificData("mStatistik"); #if(!isset($p["pluginSpecificCanUseControlling"])) # return; $html = ""; #parent::getHTML($id); $tab = new HTMLTable(1); $tab->addRow("<div id=\"my_chartTodo\" style=\"height:200px;width:470px;\"></div>"); $tab->addRowClass("backgroundColor0"); $AC = $this->data(); $U = Users::getUsersArray(null, true); $U[-1] = "Allgemein"; $T = new HTMLTable(6); $T->addColStyle(2, "text-align:right;"); $T->addColStyle(3, "text-align:right;"); $T->addColStyle(4, "text-align:right;"); $T->addColStyle(5, "text-align:right;"); $T->addColStyle(6, "text-align:right;"); $T->addHeaderRow(array("Benutzer", "Gesamt", "Abgesch.", "Kalt", "Erst", "Folge")); while ($A = $AC->n()) { $T->addRow(array(isset($U[$A->A("TodoUserID")]) ? $U[$A->A("TodoUserID")] : "Benutzer ID " . $A->A("TodoUserID"), $A->A("gesamt"), $A->A("gesamtDM") . " (" . Util::CLNumberParserZ($A->A("gesamt") != 0 ? round($A->A("gesamtDM") / $A->A("gesamt") * 100, 2) : 0) . "%)", $A->A("gesamtKalt"), $A->A("gesamtErst"), $A->A("gesamtFolge"))); $T->addRowStyle("cursor:pointer;"); $T->addRowEvent("click", OnEvent::rme($this, "details", array($A->A("TodoUserID")), "function(t){ \$j('#contentScreenLeft').html(t.responseText); }")); } if ($AC->numLoaded() == 0) { $T->addRow(array("Es liegen keine Daten vor")); $T->addRowColspan(1, 4); } return "<p class=\"prettySubtitle\">Termine</p>" . $tab . $html . $T . OnEvent::script("\n\t\t\tvar plot = \$j.plot(\$j('#my_chartTodo'), " . $this->chart() . ", {\n\t\t\tseries: {\n\t\t\t\tpie: { show: true, innerRadius: 0.4 }\n\t\t\t}\n\t\t\t});" . OnEvent::rme($this, "getHeaderCenter", "", "function(transport){ \$j('#contentScreenCenterHeader').html(transport.responseText); }")); }
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 addSettingPopup() { $T = new HTMLTable(2); $T->setColWidth(1, 20); $T->useForSelection(false); $S = new System(1); $B = new Button("Eintrag erstellen", "./images/i2/cart.png", "icon"); foreach ($S->types as $k => $v) { $T->addRow(array($B, $v->name)); $T->addRowEvent("click", OnEvent::rme($this, "addSettingNew", array("'{$k}'"), "function(t){ " . OnEvent::closePopup("mSystem") . OnEvent::reload("Right") . " contentManager.loadFrame('contentLeft', 'System', t.responseText); }")); } echo $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>"; }
function calc($land, $kontonummer, $bankleitzahl, $ibanField, $bicField) { if ($kontonummer == "" or $bankleitzahl == "") { Red::alertD("Bitte tragen Sie Bankleitzahl und Kontonummer ein"); } $url = "http://www.iban.de/iban-berechnen.html"; $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, array('User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0', 'Referer: http://www.iban.de/iban-berechnen.html', 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8', 'X-Requested-With: XMLHttpRequest')); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "ibanrechnerCountry={$land}&ibanrechnerBlz={$bankleitzahl}&ibanrechnerKonto={$kontonummer}&ibanToolkit=ibanrechner"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); $I = new IBAN(trim(str_replace("Die IBAN lautet: ", "", strip_tags($result)))); $iban = $I->MachineFormat(); $url = "https://www.s-bausparkasse.at/portal/if_ajax.asp"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "mode=calc.ibanbic.listofbic&cuid=&alt_iban=&iban={$iban}&rechnername=IBAN%2FBIC-Rechner¤tpageid=87&berechnungsdaten=&autocalc=&getresult=&country={$land}&bank={$bankleitzahl}&account=" . str_pad($kontonummer, 10, "0", STR_PAD_LEFT)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); $ex = explode("&&&", $result); $ex[0] = str_replace("listofbic==", "", strip_tags(trim($ex[0]))); $ex[1] = str_replace("iban==", "", trim($ex[1])); $T = new HTMLTable(3, "Gefundene Ergebnisse"); $T->weight("light"); $T->useForSelection(false); $T->setColWidth(1, 20); $T->addHeaderRow(array("", "BIC", "IBAN")); foreach (explode("\n", $ex[0]) as $bic) { $B = new Button("Diese Kombination verwenden", "arrow_right", "iconic"); $T->addRow(array($B, trim($bic), $ex[1])); $T->addRowEvent("click", "\$j('[name={$ibanField}]').val('{$ex['1']}'); \$j('[name={$bicField}]').val('" . trim($bic) . "'); " . OnEvent::closePopup("IBANCalc")); } echo $T; #echo "<pre>"; #echo htmlentities(print_r($ex, true)); #echo($result); #echo "</pre>"; }
public function searchCity($name) { $data = file_get_contents("http://api.openweathermap.org/data/2.5/find?q=" . urlencode($name) . ",de&type=like&mode=json&APPID=" . $this->apiKey()); $data = json_decode($data); if ($data->count == 0) { die("<p>Kein Ergebnis</p>"); } $T = new HTMLTable(2); $T->weight("light"); $T->useForSelection(); $T->setColWidth(1, 20); foreach ($data->list as $I) { $B = new Button("Übernehmen", "arrow_left", "iconic"); $T->addRow(array($B, $I->name)); $T->addRowEvent("click", "\$j('[name=OpenWeatherMapCityID]').val('{$I->id}');"); } echo $T; #echo "<pre>"; #print_r($data); #echo "</pre>"; }
public function getHTML($id) { // <editor-fold defaultstate="collapsed" desc="Aspect:jP"> try { $MArgs = func_get_args(); return Aspect::joinPoint("around", $this, __METHOD__, $MArgs); } catch (AOPNoAdviceException $e) { } Aspect::joinPoint("before", $this, __METHOD__, $MArgs); // </editor-fold> if ($_SESSION["S"]->isUserAdmin()) { return parent::getHTML($id); } switch ($id) { case "1": $AC = anyC::get("JDownload"); $AC->addOrderV3("JDownloadDate", "DESC"); $AC->setLimitV3(19); $T = new HTMLTable(2); $T->weight("light"); $T->addColStyle(1, "padding:5px;padding-left:10px;"); $T->addColStyle(2, "color:grey;text-align:right;padding:5px;"); while ($D = $AC->getNextEntry()) { $T->addRow(array($D->A("JDownloadRenameto"), Util::formatByte($D->A("JDownloadFilesize"), 2))); if ($D->A("JDownloadRenamed") == 0) { $T->addRowClass("error"); } #$r .= OnEvent::script ("\$j('#BrowsermJDownload".$E->getID()."').css('background-color', '');"); $T->addRowStyle("cursor:pointer;"); $T->addRowEvent("click", "contentManager.loadPlugin('contentRight', 'mJDownload', '', " . $D->getID() . ");"); } return "<p class=\"prettyTitle\">Downloads</p>" . $T; break; case "2": break; case "3": return ""; break; } }
public function getFrozenListTable() { $T = new HTMLTable(2); $T->maxHeight(400); $T->setColWidth(2, 30); $T->weight("light"); $T->useForSelection(false); $AC = anyC::get("Gefrierschrank"); $AC->addAssocV3("GefrierschrankAdded", ">", "0"); while ($E = $AC->getNextEntry()) { $BT = new Button("Löschen", "trash_stroke", "iconicL"); #$BT->onclick(); $T->addRow(array($E->A("GefrierschrankName"), $BT)); $T->addRowStyle("font-size:20px;"); $T->addRowEvent("click", OnEvent::rme($this, "reMoveFrozenItem", $E->getID(), OnEvent::reloadPopup("mGericht"))); #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }")); } if ($AC->numLoaded() == 0) { $T->addRow(array("Die Liste enthält keine Einträge.")); $T->addRowColspan(1, 2); } return $T . OnEvent::script("\$j('#currentList div div').css('max-height', contentManager.maxHeight() - \$j('#headerList').outerHeight());"); }
public function getContextMenuHTML($identifier) { $deTexts = array(); $deTexts["pluginSupport"] = "Bitte beachten Sie, dass ein Plugin diese Einstellungen unterstützen muss, selbst wenn es hier angezeigt wird!"; $deTexts["selectPlugin"] = "Bitte Plugin wählen"; $deTexts["add"] = "hinzufügen"; $deTexts["selectPluginButton"] = "Plugin auswählen"; $deTexts["save"] = "speichern"; $deTexts["select"] = "auswählen"; $deTexts["noPsOptions"] = "keine plugin-spezifischen Optionen vorhanden"; $deTexts["newFieldName"] = "Neuer Feldname"; $deTexts["maybeHidden"] = "Bitte beachten Sie, dass hier interne Namen angezeigt werden, die von der Feldbeschriftung abweichen können!<br />Manche internen Felder werden möglichweise gar nicht angezeigt."; $ac = new anyC(); $singularLanguageClass = $ac->loadLanguageClass("Userdata"); $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : $deTexts; $opts = ""; $ps = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins()); $ms = $_SESSION["CurrentAppPlugins"]->getAllMenuEntries(); #print_r($ms); foreach ($ps as $key => $value) { if ($key == "mUserdata") { continue; } if ($identifier == "4" and !PMReflector::implementsInterface($key, "iPluginSpecificRestrictions")) { continue; } if ($identifier == "4") { $c = new $key(); if (!$c->getPluginSpecificRestrictions()) { continue; } } if ($identifier == "5" and !in_array($key, $ms)) { continue; } if ($value == "Kunde") { continue; } if (!$_SESSION["CurrentAppPlugins"]->getIsAdminOnly($key) and $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) != "") { $opts .= "<option value=\"{$key}:" . $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) . "\">{$value}</option>"; } } $s = explode(":", $identifier); if (isset($s[1])) { $identifier = $s[0]; } switch ($identifier) { case "1": $c = isset($text["kann nicht erstellen"]) ? $text["kann nicht erstellen"] : "kann nicht\nerstellen"; $b = isset($text["kann nicht bearbeiten"]) ? $text["kann nicht bearbeiten"] : "kann nicht\nbearbeiten"; $l = isset($text["kann nicht löschen"]) ? $text["kann nicht löschen"] : "kann nicht\nlöschen"; echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $c . "\" style=\"background-image:url(./images/navi/new.png);\" onclick=\"phynxContextMenu.update('mUserdata','Create','" . str_replace(array("\n", "'"), array(" ", "\\'"), $c) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $b . "\" style=\"background-image:url(./images/navi/editb.png);\" onclick=\"phynxContextMenu.update('mUserdata','Edit','" . str_replace(array("\n", "'"), array(" ", "\\'"), $b) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $l . "\" style=\"background-image:url(./images/navi/trash.png);\" onclick=\"phynxContextMenu.update('mUserdata','Delete','" . str_replace(array("\n", "'"), array(" ", "\\'"), $l) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["pluginSupport"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; break; case "Edit": case "Delete": case "Create": echo "\n\t\t\t\t<input type=\"hidden\" id=\"uRestAction\" value=\"{$identifier}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"cant{$identifier}\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["add"] . "\" onclick=\"addUserRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; break; case "3": case "2": echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["select"] . "\" onclick=\"phynxContextMenu.update('mUserdata','" . ($identifier == "2" ? "relabel" : "hide") . ":'+\$('relabelPlugin').value.split(':')[1], \$('relabelPlugin').value.split(':')[1]);\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["maybeHidden"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; break; case "5": case "4": if ($opts == "") { die("<p>" . $text["noPsOptions"] . "</p>"); } echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == 4 ? "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"phynxContextMenu.update('mUserdata','pS:'+\$('relabelPlugin').value.split(':')[0], \$('relabelPlugin').value.split(':')[0]);\" /></td>\n\t\t\t\t\t</tr>" : "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"addHidePlugin();\" /></td>\n\t\t\t\t\t</tr>") . "\n\t\t\t\t</table>"; break; case "pS": $c = new $s[1](); $pSs = $c->getPluginSpecificRestrictions(); $pSopts = ""; foreach ($pSs as $key => $value) { $pSopts .= "<option value=\"{$key}:{$s['1']}\">{$value}</option>"; } echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"pSSelect\">{$pSopts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"savePluginSpecificRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; break; case "hide": case "relabel": try { $c = new $s[1](-1); $c = $c->newAttributes(); echo "\n\t\t\t\t<input type=\"hidden\" id=\"" . $identifier . "Plugin\" value=\"{$s['1']}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"" . $identifier . "Field\"><option>" . implode("</option><option>", PMReflector::getAttributesArray($c)) . "</option></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == "relabel" ? "<tr>\n\t\t\t\t\t\t<td>" . $text["newFieldName"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input id=\"relabelTo\" type=\"text\" /></td>\n\t\t\t\t\t</tr>" : "") . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"" . ($identifier == "relabel" ? "saveFieldRelabeling();" : "saveFieldHiding();") . "\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>"; } catch (ClassNotFoundException $e) { echo "<p>Diese Option steht bei diesem Plugin leider nicht zur Verfügung</p>"; } break; case "copyFromUser": $T = new HTMLTable(2); $T->useForSelection(); $T->setColWidth(1, 20); $T->maxHeight(200); $G = new Users(); $G->addAssocV3("isAdmin", "=", "0"); $G->setLimitV3("10"); $G->lCV3(); while ($t = $G->getNextEntry()) { $T->addRow(array(new Button("", "./images/i2/copy.png", "icon"), $t->A("username"))); $T->addRowEvent("click", "copyFromOtherUser('" . $t->getID() . "');"); } echo $T; break; case "login": $T = new HTMLTable(2); $T->useForSelection(); $T->setColWidth(1, 20); $T->maxHeight(200); $apps = Applications::getList(); foreach ($apps as $app) { #rme("mUserdata","-1","setUserdata",new Array("hidePlugin"+$('relabelPlugin').value.split(":")[0],$('relabelPlugin').value.split(":")[0], "pHide", lastLoadedLeft),"contentManager.reloadFrameLeft()"); $T->addRow(array(new Button("", "./plugins/Userdata/login18.png", "icon"), "Kann sich nicht an '{$app}' anmelden")); $T->addRowEvent("click", OnEvent::rme(new mUserdata(-1), "setUserdata", array("'loginTo{$app}'", "'0'", "'loginTo'", "lastLoadedLeft"), OnEvent::closeContext() . OnEvent::reload("Left"))); #$T->addRowEvent("click", "copyFromOtherUser('".$t->getID()."');"); } echo $T; break; } }
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; }
public function sidePanelAttachments($filesDir) { $I = new HTMLInput("TBAttachments", "file"); $I->onchange(OnEvent::rme($this, "processAttachmentUpload", array("'{$filesDir}'", "fileName"), " " . OnEvent::reloadSidePanel("tinyMCE"))); echo "<div style=\"padding:5px;height:50px;\">" . $I . "</div></div>"; if (!file_exists(FileStorage::getFilesDir() . "{$filesDir}")) { mkdir(FileStorage::getFilesDir() . "{$filesDir}"); } $T = new HTMLTable(2, "Bilder"); $dir = new DirectoryIterator(FileStorage::getFilesDir() . "{$filesDir}"); foreach ($dir as $file) { if ($file->isDot()) { continue; } if ($file->isDir()) { continue; } $BI = new Button("Datei löschen", "./images/i2/insert.png", "icon"); $BD = new Button("Datei löschen", "./images/i2/delete.gif", "icon"); $BD->style("float:right;margin-left:5px;"); $BD->rmePCR("tinyMCE", "", "deleteAttachment", array("'{$filesDir}'", "'" . $file->getFilename() . "'"), OnEvent::reloadSidePanel("tinyMCE")); $T->addRow(array($BI, "{$BD}<small style=\"color:grey;float:right;margin-top:4px;\">" . Util::formatByte($file->getSize()) . " </small>" . (strlen($file->getFilename()) > 15 ? substr($file->getFilename(), 0, 15) . "..." : $file->getFilename()))); $T->addRowStyle("cursor:pointer;"); $T->addRowEvent("click", "contentManager.tinyMCEAddImage('" . DBImageGUI::imageLink("tinyMCEGUI", $filesDir, $file->getFilename(), true) . "');"); } echo $T; }
function getBrowserHTML($lineWithId = -1) { $this->texts = $this->languageClass->getBrowserTexts(); $singularLanguageClass = $this->loadLanguageClass($this->singularClass); $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $this->singularClass); $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $this->singularClass); $userHiddenFields = mUserdata::getHides($this->singularClass); $defaultTarget = "contentRight"; if ($this->displaySide != "default") { $defaultTarget = "content" . ucfirst($this->displaySide); } if ($this->singularClass == "none") { echo "collectionOf is not set. See message log for further details."; throw new CollectionOfNotSetException(); } if ($this->name == "Noname") { $_SESSION["messages"]->addMessage("There is no name set. You might use setName of HTMLGUI to do that."); } /** * ERROR-TABLE */ $errorTab = new HTMLTable(1); if (isset($_SESSION["phynx_errors"]) and $lineWithId == -1 and ($_SERVER["HTTP_HOST"] == "dev.furtmeier.lan" or strpos(__FILE__, "nemiah") !== false)) { $errorTab->addRow("\n\t\t\t\t\t<img style=\"float:left;margin-right:10px;\" src=\"./images/navi/warning.png\" />\n\t\t\t\t\t<b>Es " . (count($_SESSION["phynx_errors"]) != 1 ? "liegen" : "liegt") . " " . count($_SESSION["phynx_errors"]) . " PHP-Fehler vor:</b><br />\n\t\t\t\t\t<a href=\"javascript:windowWithRme('Util','','showPHPErrors','');\">Fehler anzeigen</a>,<br />\n\t\t\t\t\t<a href=\"javascript:rme('Util','','deletePHPErrors','','contentManager.reloadFrameRight();');\">Fehler löschen</a>"); } /** * RETURN-BUTTON */ $returnTab = new HTMLTable(1); if ($this->isSelection) { $BReturn = new Button("Auswahl\nbeenden", "back"); $BReturn->onclick("contentManager.restoreFrame('content" . ucfirst($this->displaySide) . "','selectionOverlay');"); #return "<input type=\"button\" value=\"zurück zu\n".$p2[$s[0]]."\" style=\"background-image:url(./images/navi/back.png);\" class=\"bigButton backgroundColor3\" onclick=\"loadFrameV2('contentRight','$s[0]');\" />"; $returnTab->addRow($BReturn); } /** * DELETE-BUTTON */ if ((!$this->onlyDisplayMode or $this->deleteInDisplayMode) and $userCanDelete and !$this->isSelection and $this->showDeleteButton) { $this->newColsRight["delete"] = "\n\t\t\t<span class=\"iconic trash_stroke\" onclick=\"deleteClass('" . $this->singularClass . "','%%VALUE%%', " . ($this->JSOnDelete == null ? "function() { " . ($this->displaySide == "left" ? "contentManager.reloadFrameLeft();" : "contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '%%VALUE%%') \$('contentLeft').update('');") . " }" : $this->JSOnDelete) . ",'" . str_replace("%1", $this->singularName, $this->texts["%1 wirklich löschen?"]) . "');\"></span>"; } elseif (!$userCanDelete) { $this->newColsRight["delete"] = "<img src=\"./images/i2/empty.png\" />"; } /** * EDIT-BUTTON */ if (!isset($this->newColsLeft["select"]) and (!$this->onlyDisplayMode or $this->editInDisplayMode) and $this->showEditButton) { $EB = new Button("", "./images/i2/edit.png"); $EB->type("icon"); $EB->className("editButton"); if ($this->JSOnEdit == null) { $EB->onclick("contentManager.selectRow(this); contentManager.loadFrame('contentLeft','" . $this->singularClass . "','%%VALUE%%','0');"); } else { $EB->onclick($this->JSOnEdit); } $this->newColsLeft["select"] = $EB; } $cols = count($this->showAttributes) + count($this->newColsLeft) + count($this->newColsRight); $valuesTab = new HTMLTable($cols, $lineWithId == -1 ? $this->displaySide == "left" ? $this->name : "" : null); $valuesTab->addTableClass("contentBrowser"); /*if(isset($this->newColsRight["delete"]) AND ($this->displaySide == "default" OR $this->displaySide == "right")) $valuesTab->setColClass($cols, "backgroundColor0"); if(isset($this->newColsRight["delete"]) AND $this->displaySide == "left") $valuesTab->setColClass(1, "backgroundColor0");*/ /** * QUICKSEARCH */ #$quickSearchRow = ""; if ($this->quickSearchPlugin != "" and $lineWithId == -1) { list($quickSearchRow, $BSearchInfo) = $this->getQuicksearchField(); if ($this->displaySide == "left") { $insertRow = array($quickSearchRow); for ($i = 1; $i < $cols - 1; $i++) { $insertRow[] = ""; } $insertRow[] = $BSearchInfo; $valuesTab->addRow($insertRow); $valuesTab->addRowColspan(1, $cols - 1); } else { $valuesTab->addRow(array($BSearchInfo, $quickSearchRow)); $valuesTab->addRowColspan(2, $cols - 1); } $valuesTab->addRowClass("backgroundColorHeader"); } if ($this->headerRow != null) { $valuesTab->addHeaderRow($this->headerRow); } /** * PAGE-BROWSER */ #$multiPageRow = ""; $separator = ""; $userDefinedEntriesPerPage = false; $isMultiPageMode = false; if (count($this->multiPageMode) > 0) { $isMultiPageMode = true; $this->multiPageMode[3] = $defaultTarget; if ($this->multiPageMode[2] == 0) { $userDefinedEntriesPerPage = true; #$mU = new mUserdata(); #$this->multiPageMode[2] = $mU->getUDValue("entriesPerPage{$this->multiPageMode[4]}"); #if($this->multiPageMode[2] == null) $this->multiPageMode[2] = 20; } /* if($this->multiPageMode[1] == "undefined") $this->multiPageMode[1] = 0; $pages = ceil($this->multiPageMode[0] / $this->multiPageMode[2]); if($this->multiPageMode[1] != 0) $pageLinks = "<a href=\"javascript:contentManager.loadPage('$defaultTarget', '0');\"> << </a> "; else $pageLinks = " << "; if($this->multiPageMode[1] != 0) $pageLinks .= "<a href=\"javascript:contentManager.backwardOnePage('$defaultTarget');\"> < </a> "; else $pageLinks .= " < "; if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.forwardOnePage('$defaultTarget');\"> > </a> "; else $pageLinks .= " > "; if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget',".($pages-1).");\"> >> </a> | "; else $pageLinks .= " >> | "; $start = $this->multiPageMode[1] - 3; if($start < 0) $start = 0; $end = $this->multiPageMode[1] + 3; if($end > $pages - 1) $end = $pages - 1; for($i=$start; $i<=$end; $i++) if($this->multiPageMode[1] != "$i") $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget','".$i."');\">".($i+1)."</a> "; else $pageLinks .= ($i+1)." "; $pageLinks = "".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": ".$pageLinks; */ if ($this->displaySide == "left") { $pageLinks = "<span style=\"float:right;\">" . $this->getMultiPageButtons() . "</span>"; } else { $pageLinks = $this->getMultiPageButtons(); } /*if($lineWithId == -1) $multiPageRow = " <tr> ".($userDefinedEntriesPerPage ? "<td><img class=\"mouseoverFade\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','multiPageSettings:{$this->multiPageMode[4]}','".$this->texts["Einstellungen"].":');\" /></td>" : "")." <td colspan=\"".($colspan+1+($userDefinedEntriesPerPage ? 0 : 1))."\"><input type=\"text\"onkeydown=\"if(event.keyCode == 13) loadFrameV2('".$this->multiPageMode[3]."','".$this->multiPageMode[4]."','',this.value - 1);\" style=\"width:30px;float:right;text-align:right;\" value=\"".($this->multiPageMode[1]+1)."\" onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\" />".$this->multiPageMode[0]." ".($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"])."<!--, ".$pages." ".($pages != 1 ? $this->texts["Seiten"] : $this->texts["Seite"])."--></td> </tr> <tr> <td colspan=\"$determinedNumberofCols\">".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": $pageLinks</td> </tr>"; */ if ($lineWithId == -1) { $BSettings = $this->getPageOptionsButton(); #$IPage = $this->getPageSelectionField(); #$IPage->style("width:30px;float:right;text-align:right;"); $pageOptions = $this->multiPageMode[0] . " " . ($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"]) . ", {$pageLinks}"; if (!$userDefinedEntriesPerPage) { $valuesTab->addRow(array($pageOptions)); $valuesTab->addRowColspan(1, $cols); } else { if ($this->displaySide == "left") { $insertRow = array($pageOptions); for ($i = 1; $i < $cols - 1; $i++) { $insertRow[] = ""; } $insertRow[] = $BSettings; $valuesTab->addRow($insertRow); #$valuesTab->addRow(array($pageOptions,$BSettings)); $valuesTab->addRowColspan(1, $cols - 1); } else { /*$insertRow = array($BSettings); for($i=1; $i<$cols-1; $i++) $insertRow[] = ""; $insertRow[] = $pageOptions; $valuesTab->addRow($insertRow);*/ $valuesTab->addRow(array($BSettings, $pageOptions)); $valuesTab->addRowColspan(2, $cols - 1); } } $valuesTab->addRowClass("backgroundColorHeader"); #$valuesTab->addRow(array($pageLinks)); #$valuesTab->addRowColspan(1, $cols); #$valuesTab->addRowClass("backgroundColorHeader"); $valuesTab->addRow(""); $valuesTab->addRowColspan(1, $cols); $valuesTab->addRowClass("backgroundColor0 browserSeparatorTop"); } } $filteredCol = null; if ($lineWithId == -1 and $this->showFilteredCategoriesWarning != null and $this->showFilteredCategoriesWarning[0]) { $dB = new Button($this->texts["Filter löschen"], "./images/i2/delete.gif"); $dB->style("float:right;"); $dB->type("icon"); $dB->rme("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->showFilteredCategoriesWarning[1]}'"), "if(checkResponse(transport)) contentManager.reloadFrameRight();"); /*$separator = " <tr> <td class=\"backgroundColor0\"".((isset($this->showFilteredCategoriesWarning[0]) AND $this->showFilteredCategoriesWarning[0] == true) ? "<img src=\"./images/i2/note.png\" /></td><td class=\"backgroundColor0\" colspan=\"".($determinedNumberofCols - 2)."\" style=\"color:grey;\" >".$this->texts["Anzeige wurde gefiltert"]."</td><td class=\"backgroundColor0\">$dB</td>" : " >")."</td> </tr>";*/ $filteredCol = array("<img src=\"./images/i2/note.png\" />", $dB . $this->texts["Anzeige wurde gefiltert"]); $valuesTab->addRow($filteredCol); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowClass("backgroundColor0"); $valuesTab->addRowStyle("color:grey;"); } /** * NEW-BUTTON */ if (!$this->onlyDisplayMode and $userCanCreate and $this->showNewButton and $lineWithId == -1) { $BNew = new Button("", "./images/i2/new.gif"); $BNew->type("icon"); $BNew->id("buttonNewEntry{$this->singularClass}"); #$BNew->onclick($this->JSOnNew == null ? "contentManager.newClassButton('$this->singularClass','');" : $this->JSOnNew); if ($this->displaySide == "left") { #$valuesTab->addRow(array("<b>$this->singularName neu anlegen</b>",$BNew)); #$valuesTab->addRowColspan(1, $cols-1); } else { $valuesTab->addRow(array($BNew, "<b>{$this->singularName} neu anlegen</b>")); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowEvent("click", $this->JSOnNew == null ? "contentManager.newClassButton('{$this->singularClass}','');" : $this->JSOnNew); $valuesTab->addRowStyle("cursor:pointer;"); } #$valuesTab->addRowColspan(2, $cols-1); } /** * TABLE-CONTENT */ $displayGroup = null; for ($i = 0; $i < count($this->attributes); $i++) { $aid = $this->attributes[$i]->getID(); // get the id of an object separately $sc = $this->attributes[$i]->getA(); // get the attributes-object from the object if ($this->displayGroupBy != null) { $displayGroupField = $this->displayGroupBy; if ($sc->{$displayGroupField} != $displayGroup and $i > 0) { $valuesTab->addRow(""); $valuesTab->addRowClass("backgroundColor0"); } } $row = array(); $styles = array(); if ($this->displaySide == "left") { $colsLeft = $this->newColsRight; $colsRight = $this->newColsLeft; } else { $colsLeft = $this->newColsLeft; $colsRight = $this->newColsRight; } if (count($colsLeft) > 0) { foreach ($colsLeft as $key => $value) { $row[] = str_replace("%%VALUE%%", $aid, $value); $valuesTab->setColWidth(count($row), "20px"); } } foreach ($this->showAttributes as $key => $value) { if (isset($userHiddenFields[$value])) { continue; } if (isset($this->parsers[$value])) { $t = $this->invokeParser($this->parsers[$value], $sc->{$value}, $this->makeParameterStringFromArray($this->parserParameters[$value], $sc, $aid)); } else { $t = htmlspecialchars($sc->{$value}); } if ($this->multiEditMode != null and in_array($value, $this->multiEditMode)) { $posInArray = array_search($value, $this->multiEditMode); if ($this->multiEditModeInputs[$posInArray] == null) { $MI = new HTMLInput($value . "ID{$aid}", "multiInput", $sc->{$value}, array($this->singularClass, $aid, $value)); if ($this->multiEditModeStyle != null) { $MI->style($this->multiEditModeStyle[$posInArray]); } } else { $MI = clone $this->multiEditModeInputs[$posInArray]; $MI->setValue($sc->{$value}); $MI->activateMultiEdit($this->singularClass, $aid); } $t = $MI; } #<td id=\"Browser".$value."$aid\" ".(isset($this->colStyles[$value]) ? "style=\"".$this->colStyles[$value]."\"" : "").">".$t."</td>"; $row[] = $t; if (isset($this->colStyles[$value])) { $styles[count($row)] = $this->colStyles[$value]; } } if (count($colsRight) > 0) { foreach ($colsRight as $key => $value) { $row[] = str_replace("%%VALUE%%", $aid, $value); $valuesTab->setColWidth(count($row), "20px"); } } $valuesTab->addRow($row); if (count($styles) > 0) { foreach ($styles as $col => $s) { $valuesTab->addColStyle($col, $s); } } $valuesTab->setRowID("BrowserMain{$aid}"); #foreach($this->showAttributes as $key => $value) { # $valuesTab->addCellID($cellNo, "Browser".$value."$aid"); #} if ($this->displayGroupBy != null) { $displayGroup = $sc->{$displayGroupField}; } } if ($filteredCol !== null) { $valuesTab->addRow($filteredCol); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowClass("backgroundColor0"); $valuesTab->addRowStyle("color:grey;"); } if ($lineWithId == -1 and $isMultiPageMode) { $valuesTab->addRow(""); $valuesTab->addRowColspan(1, $cols); $valuesTab->addRowClass("backgroundColor0 browserSeparatorBottom"); if (!$userDefinedEntriesPerPage) { $valuesTab->addRow(array($pageOptions)); $valuesTab->addRowColspan(1, $cols); } else { if ($this->displaySide == "left") { $valuesTab->addRow(array($pageOptions, $BSettings)); $valuesTab->addRowColspan(1, $cols - 1); } else { $valuesTab->addRow(array($BSettings, $pageOptions)); $valuesTab->addRowColspan(2, $cols - 1); } } $valuesTab->addRowClass("backgroundColorHeader"); #$valuesTab->addRow(array($pageLinks)); #$valuesTab->addRowColspan(1, $cols); #$valuesTab->addRowClass("backgroundColorHeader"); } if (count($this->attributes) == 0) { $valuesTab->addRow(array("keine Einträge")); $valuesTab->addRowColspan(1, $cols); } if ($lineWithId != -1) { $valuesTab = $valuesTab->getHTMLForUpdate(); } return $errorTab . $returnTab . $valuesTab . ($lineWithId == -1 ? $this->tip : ""); }
public function rightFrame($R = null) { if ($R == null) { $R = new GSRaumgruppe($_GET["RGID"]); } $GSTG = anyC::get("GSTaetigkeit", "GSTaetigkeitGSRaumgruppeID", "0"); $GSTG->addOrderV3("GSTaetigkeitName"); $GST = $this->getTaetigkeiten($R); $used = array(); while ($T = $GST->getNextEntry()) { $used[$T->A("GSTaetigkeitParentID")] = true; } $Tab = new HTMLTable(1); $Tab->setColWidth(1, 500); $Tab->maxHeight(300); while ($T = $GSTG->getNextEntry()) { if (isset($used[$T->getID()])) { continue; } $Tab->addRow(array($T->A("GSTaetigkeitName"))); $Tab->setRowID("GST_" . $R->getID() . "_" . $T->getID()); $Tab->addRowEvent("click", "CustomerPage.rme('addTaetigkeit', [" . $R->getID() . ", " . $T->getID() . "], function(transport) { \$('#frameLeft" . $R->getID() . "').html(transport); \$('#GST_" . $R->getID() . "_" . $T->getID() . "').hide(); });"); } $GSTG->resetPointer(); return "<h4>Verfügbare Tätigkeiten</h4>{$Tab}"; }
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); }
function ldapUsersPopup() { $T = ""; try { $AD = new LoginAD(); $AD->getUsers(); $T = new HTMLTable(2); $T->setColWidth(1, 20); $T->maxHeight(400); $T->useForSelection(false); $B = new Button("Eintrag bearbeiten", "./images/i2/edit.png", "icon"); while ($U = $AD->n()) { $T->addRow(array($B, $U->A("name"))); $T->addRowEvent("click", OnEvent::frame("contentLeft", "User", $U->getID())); } } catch (Exception $e) { } echo $T; }
public function popupDesktop($DeviceID) { $O = anyC::getFirst("fheOverview", "fheOverviewDeviceID", $DeviceID); $d = json_decode($O->A("fheOverviewDesktop")); $BD = new Button("Fertig", "bestaetigung"); $BD->onclick("fheOverview.draggableStop(); " . OnEvent::closePopup("mfheOverview")); $BD->style("float:right;margin:10px;"); echo $BD . "<div style=\"clear:both;\"></div>"; $T = new HTMLTable(2, "Plugins"); $T->useForSelection(); $T->weight("light"); while ($callback = Registry::callNext("Overview")) { $c = $callback->className(); $B = new Button("Plugin hinzufügen", "arrow_left", "iconic"); $T->addRow(array($B, $callback->name())); $T->addRowEvent("click", OnEvent::rme("mfheOverview", "pluginLoad", array($DeviceID, "'" . $callback->className() . "'"), "function(t){ \$j('#addPlugin{$c}').hide(); \$j('#OverviewDesktop').append(t.responseText); }")); $T->setRowID("addPlugin{$c}"); if (isset($d->{$c})) { $T->addRowStyle("display:none;"); } } Registry::reset("Overview"); echo $T; echo OnEvent::script("fheOverview.draggableStart({$DeviceID});"); $T = new HTMLTable(1, "Hintergrundbild"); $T->weight("light"); $ID = new Button("Bild löschen", "trash_stroke", "iconicL"); $ID->style("float:right;"); $ID->rmePCR("mfheOverview", "-1", "backgroundDelete", $DeviceID, "function(t){\$j('#OverviewDesktop').append(t.responseText); }"); $I = new HTMLInput("upload", "file", null, array("multiple" => false)); $I->onchange(OnEvent::rme($this, "backgroudUpload", array($DeviceID, "fileName"), "function(t){\$j('#OverviewDesktop').append(t.responseText); }")); $T->addRow($ID . "<div style=\"margin-right:30px;\">" . $I . "</div>"); echo $T; }
public function getListTable() { $T = new HTMLTable(2); $T->maxHeight(400); $T->setColWidth(2, 30); $T->weight("light"); $T->useForSelection(false); $AC = anyC::get("Einkaufszettel", "EinkaufszettelBought", "0"); $AC->addOrderV3("EinkaufszettelTime", "DESC"); while ($E = $AC->getNextEntry()) { $BT = new Button("Löschen", "trash_stroke", "iconicL"); #$BT->onclick(); $T->addRow(array(($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : ""), $BT)); $T->addRowStyle("font-size:20px;"); $T->addRowEvent("click", OnEvent::rme($E, "deleteMe", "", OnEvent::reloadPopup("mEinkaufszettel"))); #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }")); } if ($AC->numLoaded() == 0) { $T->addRow(array("Die Einkaufsliste enthält keine Einträge.")); $T->addRowColspan(1, 2); } return $T . OnEvent::script("\$j('#currentList div div').css('max-height', contentManager.maxHeight() - \$j('#headerList').outerHeight());"); }