示例#1
0
 public function getService($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(4);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 200);
     $T->setColWidth(4, 200);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isWhat", "S");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     #$AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("isPrinted", "=", "0");
     $AC->addAssocV3("isEMailed", "=", "0");
     $AC->addAssocV3("isPixelLetteredTime", "=", "0");
     #$AC->addAssocV3("status", "=", "delivered");
     $AC->addAssocV3("GRLBMServiceMitarbeiter", "=", Session::currentUser()->getID(), "AND", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter2", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter3", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter4", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addOrderV3("datum", "DESC");
     #$AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $BPDF = new Button("PDF anzeigen");
         $BPDF->className("submitFormButton");
         $BPDF->style("background-color:#DDD;color:grey;float:right;");
         $BPDF->onclick("CustomerPage.popup('Service PDF', 'getPDFViewer', {GRLBMID: '" . $B->getID() . "'}, {width:'800px'});");
         $BOK = "";
         if ($B->A("GRLBMServiceSigAG") != "" and $B->A("GRLBMServiceSigAG") != "[]") {
             $BOK = new Button("Kunde hat unterschrieben", "check", "iconic");
             $BOK->style("font-size:55px;");
         }
         $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(), $BOK, $BPDF));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $event = "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\tCCAuftrag.lastTextbausteinUnten = null;\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\t\$('#frameSelect').hide(); \$('#frameEdit').show();\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}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');";
         if ($B->A("GRLBMServiceSigAG") == "" or $B->A("GRLBMServiceSigAG") == "[]") {
             $T->addCellEvent(1, "click", $event);
             $T->addCellEvent(2, "click", $event);
             $T->addRowStyle("cursor:pointer;");
         } else {
             $T->addRowStyle("cursor:default;");
         }
         $i++;
     }
     $html .= $T;
     return $html;
 }
示例#2
0
 public function browser()
 {
     $BA = new Button("Eintrag\nhinzufügen", "new");
     $BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass()));
     $BA->style("margin:10px;");
     $cols = 3 + count($this->colsLeft) + count($this->colsRight);
     $TE = new HTMLTable($cols, "Einträge");
     $TE->setColWidth(1, 20);
     $TE->setColWidth($cols, 20);
     $TE->useForSelection(false);
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     while ($A = $this->object->getNextEntry()) {
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');");
         $isEmpty = false;
         if ($this->emptyCheckField != null and $A->A($this->emptyCheckField) == "") {
             $autoLoad = $A->getID();
             $isEmpty = true;
         }
         if (!$isEmpty) {
             $div = Util::invokeStaticMethod(get_class($this->object), $this->parsers["main"], array($A));
         } else {
             $div = "Neuer Eintrag";
         }
         $row = array();
         $row[] = $BD;
         $row[] = $div;
         foreach ($this->colsRight as $col) {
             $c = Util::invokeStaticMethod(get_class($this->object), $col[0], array($A));
             $row[] = $c;
         }
         $row[] = $BE;
         $TE->addRow($row);
         $action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });";
         $TE->addCellEvent(2, "click", $action);
         $TE->addCellID(2, "popupEntryID" . $A->getID());
         $TE->addCellEvent(count($row), "click", $action);
     }
     if ($this->object->numLoaded() == 0) {
         $TE->addRow("Keine Einträge");
         $TE->addRowColspan(1, 3);
     }
     return "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#popupEntryID" . $autoLoad . "').trigger(Touch.trigger);") : "");
 }
示例#3
0
 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;
 }
示例#4
0
 public function details($UserID)
 {
     $p = mUserdata::getPluginSpecificData("mStatistik");
     $ps = mUserdata::getPluginSpecificData("mAkquise");
     if (!isset($p["pluginSpecificCanUseControlling"]) and $UserID != Session::currentUser()->getID() and !isset($ps["pluginSpecificCanSeeFrom{$UserID}"])) {
         return "";
     }
     $U = Users::getUsersArray(null, true);
     $AC = $this->data();
     $AC->setOrderV3("anzahl", "DESC");
     $AC->addJoinV3("Adresse", "TodoClassID", "=", "AdresseID");
     $AC->setGroupV3("CONCAT(TodoClass, TodoClassID)");
     $AC->addAssocV3("TodoUserID", "=", $UserID);
     $AC->setFieldsV3(array("firma", "vorname", "nachname", "COUNT(*) AS anzahl", "AdresseID", "TodoClass"));
     $T = new HTMLTable(2, "Termine " . $U[$UserID] . " vom {$this->startDatum} bis {$this->endDatum}");
     $T->setColWidth(1, 30);
     #$T->setColWidth(3, 20);
     $T->addColStyle(1, "text-align:right;");
     #$T->setTableID("termineTable");
     while ($A = $AC->n()) {
         #$B = new Button("Akquise anzeigen", "./images/i2/telephone.png", "icon");
         #$B->onclick("\$j('#termineTable .lastSelected').removeClass('lastSelected'); \$j(this).parent().parent().addClass('lastSelected'); ".Akquise::getWindowAction($A->A("AdresseID"), 0));
         #onclick="Popup.load('Akquise', 'mAkquise', '-1', 'showMinTelPopup', Array('65143','0'), '', 'edit', '{width: 730, top:$j(\'#navTabsWrapper\').outerHeight() + 20, left: contentManager.maxWidth() < 800 + 730 ? contentManager.maxWidth() - 740 : 800}');"
         if ($A->A("TodoClass") != "WAdresse") {
             $T->addRow(array($A->A("anzahl") . "x", "Ohne Adresse"));
             continue;
         }
         if ($A->A("TodoClass") == "WAdresse" and !$A->A("AdresseID")) {
             $T->addRow(array($A->A("anzahl") . "x", "Adresse gelöscht"));
             continue;
         }
         $T->addRow(array($A->A("anzahl") . "x", $A->A("firma") != "" ? $A->A("firma") : $A->A("vorname") . " " . $A->A("nachname")));
     }
     echo $T;
 }
示例#5
0
 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;
 }
示例#6
0
 public function bricklets()
 {
     $BA = new Button("Bricklet\nhinzufügen", "new");
     $BA->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR("Tinkerforge", $this->getID(), "createNew", "", OnEvent::reloadPopup("Tinkerforge"));
     $BA->style("margin:10px;");
     $TE = new HTMLTable(4, "Bricklets");
     $TE->setColWidth(1, 20);
     $TE->setColWidth(2, 35);
     $TE->setColWidth(4, 20);
     $TE->useForSelection(false);
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     $AC = anyC::get("TinkerforgeBricklet", "TinkerforgeBrickletTinkerforgeID", $this->getID());
     while ($A = $AC->getNextEntry()) {
         $B = new Button("Master", "bars", "iconicL");
         $B->popup("", "Plot", "TinkerforgeBricklet", $A->getID(), "getControls", "", "", "{width:820}");
         $B->style("float:right;");
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('TinkerforgeBricklet','" . $A->getID() . "', function() { Popup.refresh('Tinkerforge'); },'Eintrag wirklich löschen?');");
         if ($A->A("TinkerforgeBrickletUID") == "") {
             $autoLoad = $A->getID();
         }
         $div = "<span id=\"TinkerforgeBrickletUID" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neues Bricklet") . "</span>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"TinkerforgeBrickletType" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletType") != "" ? TinkerforgeBricklet::$types[$A->A("TinkerforgeBrickletType")] : "") . "</small>";
         $TE->addRow(array($BD, $B, $div, $BE));
         $TE->addCellEvent(3, "click", "contentManager.selectRow(this); \$j('#editDetailsTinkerforge').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("editAP", "TinkerforgeBricklet", $A->getID(), "0", "function(){ \$j('#editAP').fadeIn(); }") . " });");
     }
     if ($AC->numLoaded() == 0) {
         $TE->addRow("Keine Bricklets eingetragen");
         $TE->addRowColspan(1, 3);
     }
     echo "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"editAP\"></div>\n\t\t\t<div id=\"listAP\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#TinkerforgeBrickletUID" . $autoLoad . "').parent().trigger(Touch.trigger);") : "");
 }
示例#7
0
 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("mTool");
     $FB = new FileBrowser();
     $FB->addDir("../PM/GoD");
     $files = $FB->getAsLabeledArray("iPMTool", ".class.php", true);
     $tab = new HTMLTable(2, "Tools");
     $tab->setColWidth(1, "20px");
     foreach ($files as $key => $value) {
         $B = new Button("", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("loadFrameV2('contentLeft','{$value}');");
         $tab->addRow(array($B, $key));
     }
     return $tab;
 }
示例#8
0
 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&currentpageid=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->maxHeight(400);
     $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>";
 }
示例#9
0
 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;
 }
示例#10
0
 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)
 {
     $tab = new HTMLTable(3, "Koordinaten");
     $tab->setColWidth(1, "20px");
     for ($i = 0; $i < 200; $i++) {
         $x = round(($i + 1) * 1000 * sin(($i + mt_rand(-0.9, 0.9)) * pi() / 5));
         $y = round(($i + 1) * 1000 * cos(($i + mt_rand(-1.2, 1.2)) * pi() / 3));
         $tab->addRow(array($i . ": ", "{$x}", "{$y}"));
         $tab->addCellStyle(1, "text-align:right");
         $tab->addCellStyle(2, "text-align:right");
         $S = new Starsystem(-1);
         $SA = $S->newAttributes();
         $SA->StarsystemName = "Starsystem " . ($i + 1);
         $SA->StarsystemX = $x;
         $SA->StarsystemY = $y;
         $SA->StarsystemRotation = rand(0, 180);
         $S->setA($SA);
         $S->newMe();
     }
     return $tab;
 }
示例#12
0
 /**
  * Method to display an E-Mail popup for easy E-Mail sending
  * 
  * Requires a method named "getEMailData" in $dataClass which returns an array:
  * array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
  * 
  * Will call $dataClass($dataClassID)::sendEmail afterwards
  * 
  * @param string $dataClass
  * @param string $dataClassID 
  */
 public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null)
 {
     $c = new $dataClass($dataClassID);
     $data = $c->getEMailData($callbackParameter);
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     $tab->addLV("Absender:", "{$data['fromName']}<br /><small>&lt;{$data['fromAddress']}&gt;</small>");
     if (count($data["recipients"]) == 1) {
         $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small>&lt;" . $data["recipients"][0][1] . "&gt;</small>");
     } else {
         $recipients = array();
         foreach ($data["recipients"] as $ID => $Rec) {
             $recipients[$ID] = new HTMLInput($Rec[0] . " &lt;" . $Rec[1] . "&gt;", "option", $ID);
         }
         $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", "0", $recipients);
         $IS->id("EMailRecipient{$dataClassID}");
         $tab->addLV("Empfänger:", $IS);
     }
     $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
     $tab->addRow(array("<textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea>"));
     $tab->addRowColspan(1, 2);
     $tab->addRowClass("backgroundColor0");
     if ($onSuccessFunction == null) {
         $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
     }
     $BAbort = new Button("Abbrechen", "stop");
     $BAbort->onclick("Popup.close('Util', 'edit');");
     $BAbort->style("margin-bottom:10px;margin-top:10px;");
     $BGo = new Button("E-Mail\nsenden", "okCatch");
     $BGo->style("float:right;margin-top:10px;");
     $BGo->rmePCR($dataClass, $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", count($data["recipients"]) == 1 ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
     #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
     $tab->addRow(array($BGo . $BAbort));
     $tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     echo $tab;
 }
示例#13
0
 public function getListTable()
 {
     $T = new HTMLTable(2, "Gerichte");
     $T->maxHeight(480);
     $T->setColWidth(2, 30);
     $T->weight("light");
     $T->useForSelection(false);
     $AC = anyC::get("Gericht");
     $AC->addAssocV3("GerichtAdded", ">", "0");
     while ($E = $AC->getNextEntry()) {
         $BT = new Button("Löschen", "trash_stroke", "iconicL");
         $BT->onclick(OnEvent::rme($this, "reMoveItem", $E->getID(), OnEvent::reloadPopup("mGericht")));
         $T->addRow(array($E->A("GerichtName"), $BT));
         $T->addRowStyle("font-size:20px;");
         #$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;
 }
示例#14
0
 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;
     }
 }
示例#15
0
 function getInfo($time)
 {
     $BE = "";
     $BD = "";
     $BDS = "";
     if ($this->editable != null) {
         if ($this->editable[0] != null) {
             $BE = new Button("Bearbeiten", "edit", "icon");
             $BE->style("margin:10px;float:right;");
             $BE->popup("", "Kalendereintrag bearbeiten", "mKalender", $this->classID, "editInPopup", array("'" . $this->className . "'", $this->classID, "'{$this->editable[0]}'"));
         }
         $BD = new Button("Dieses Event löschen", "trash", "icon");
         $BD->style("float:right;margin:10px;");
         $BD->doBefore("if(confirm('Löschen?')) %AFTER");
         $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentScreen'); Popup.close('mKalender', 'edit');");
         if ($this->repeat() !== false) {
             $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], array($this->classID, $time + Kalender::parseTime($this->time) - 60), "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
             $BDS = new Button("Alle Events Löschen", "./ubiquitous/Kalender/deleteSeries.png", "icon");
             $BDS->style("float:right;margin:10px;");
             $BDS->doBefore("if(confirm('Löschen?')) %AFTER");
             $BDS->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
         }
     }
     $T = new HTMLTable(2, "Eventdetails");
     $T->setColWidth(1, 120);
     $T->addColStyle(1, "vertical-align:top;");
     $T->addLV("Betreff", $this->title);
     $T->addLV("Tag", Util::CLDateParser($time));
     if (!$this->allDay) {
         $T->addLV("Uhrzeit", $this->formatTime($this->time));
     } else {
         $T->addLV("Uhrzeit", "Ganzer Tag");
     }
     $T->addLV("Details", "<div style=\"max-height:300px;overflow:auto;\">" . $this->summary . "</div>");
     if ($this->organizer) {
         $T->addLV("Organisator", $this->organizer);
     }
     if (count($this->values) > 0) {
         $T->insertSpaceAbove();
     }
     foreach ($this->values as $label => $value) {
         $T->addLV($label, $value);
     }
     $BN = "";
     if ($this->canNotify) {
         // TODO: Entfernen sobald Einladungen funktionieren
         $BN = new Button("Terminbestätigung", "mail" . ($this->notified ? "ed" : ""), "icon");
         $BN->style("margin-top:10px;margin-left:10px;");
         $BN->popup("", "Terminbestätigung", "Util", "-1", "EMailPopup", array("'mKalender'", "-1", "'notification::{$this->className}::{$this->classID}::{$time}'", "'function(){ Kalender.refreshInfoPopup(); }'"));
     }
     $BR = "";
     if ($this->isRepeatable and $this->getException() === false) {
         $BR = new Button("Wiederholungen", "refresh", "icon");
         $BR->style("margin:10px;float:right;");
         $BR->rmePCR("mKalender", "-1", "getRepeatable", array("'{$this->className}'", "'{$this->classID}'", "'{$this->isRepeatable}'"), "function(transport){ \$j('#eventSideContent').html(''); \$j('#editDetailsmKalender').animate({'width':'400px'}, 200, 'swing'); \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }");
     }
     $BI = new Button("Teilnehmer", "./ubiquitous/Kalender/einladungen.png", "icon");
     $BI->style("margin: 10px; float: right;");
     $BI->rmePCR("mKalender", "-1", "getInvitees", array("'{$this->className}'", "'{$this->classID}'"), "function(t){ \$j('#eventAdditionalContent').html(''); \$j('#editDetailsmKalender').animate({'width':'800px'}, 200, 'swing', function(){ \$j('#eventSideContent').html(t.responseText).fadeIn(); }); }");
     if (!$this->canInvite) {
         $BI = "";
     }
     $closed = "";
     if ($this->closeable) {
         $BC = new Button("Termin abschließen", "bestaetigung", "icon");
         $BC->style("margin: 10px; float: right;");
         $BC->rmePCR("mKalender", "-1", "getClose", array("'{$this->className}'", "'{$this->classID}'"), "function(t){ \$j('#editDetailsContentmKalender').html(t.responseText); }");
         if ($this->closed[0]) {
             $BC = "";
             $closed = "<p>Termin abgeschlossen am " . Util::CLDateParser($this->closed[0]) . ($this->closed[1] != "" ? ":<br>" . nl2br($this->closed[1]) : "") . "</p>";
         }
     }
     $topButtons = "";
     foreach ($this->topButtons as $B) {
         $B->type("icon");
         $B->style("margin-top:10px;margin-left:10px;");
         $topButtons .= $B;
     }
     return "<div style=\"width:400px;\">" . $BDS . $BD . $BE . $BN . $topButtons . $BR . $BI . $BC . $closed . "</div><div style=\"clear:both;\"></div><div style=\"display:none;\" id=\"eventAdditionalContent\"></div><div style=\"display:none;width:400px;float:right;\" id=\"eventSideContent\"></div><div style=\"width:400px;float:left;\" id=\"eventDefaultContent\"{$T}</div>";
 }
示例#16
0
 public function getArtikel($data)
 {
     $TKategorien = new HTMLTable(2, "Kategorien");
     $TKategorien->setTableStyle("width:100%;");
     $TKategorien->setTableID("tableKategorien");
     $TKategorien->setColWidth(1, 20);
     $B = new Button("Nach Kategorie filtern", "arrow_down", "iconic");
     $B->className("reverse");
     $AC = anyC::get("Kategorie", "type", "2");
     $AC->addOrderV3("name");
     $TKategorien->addRow(array($B, "Alle Kategorien"));
     $TKategorien->addRowClass("selectable");
     $TKategorien->addRowEvent("click", "CustomerPage.rme('getArtikel', {KategorieID: '', query : '{$data['query']}', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     if ($data["KategorieID"] == "") {
         $TKategorien->addRowStyle("text-decoration:underline;");
     }
     while ($K = $AC->getNextEntry()) {
         $B = new Button("Nach Kategorie filtern", "arrow_down", "iconic");
         if ($data["KategorieID"] != $K->getID()) {
             $B->className("reverse");
         }
         $TKategorien->addRow(array($B, $K->A("name")));
         $TKategorien->addRowClass("selectable");
         $TKategorien->addRowEvent("click", "CustomerPage.rme('getArtikel', {KategorieID: '" . $K->getID() . "', query : '{$data['query']}', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
         #if($data["KategorieID"] == $K->getID())
         #	$TKategorien->addRowStyle ("text-decoration:underline;");
     }
     $TArtikel = new HTMLTable(4, "Artikel");
     $TArtikel->setTableStyle("width:100%;");
     $TArtikel->setColWidth(1, 26);
     $TArtikel->setColWidth(2, 100);
     $TArtikel->setColStyle(4, "text-align:right;");
     $BQ = "";
     if ($data["query"] != "") {
         $BQ = new Button("Suche löschen", "x_alt", "iconic");
         $BQ->onclick("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : '', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
         $BQ->style("color:darkred;float:left;");
     } else {
         $BQ = new Button("Suche", "question_mark", "iconic");
     }
     $I = new HTMLInput("query", "text", $data["query"]);
     $I->placeholder("Suche nach Name, Nummer oder Beschreibung");
     $I->style("width:90%;");
     $I->onEnter("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : this.value, GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     $BS = new Button("Los", "arrow_right", "iconic");
     $BS->onclick("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : \$j('[name=query]').val(), GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     $TArtikel->addRow(array($BQ, $I . " " . $BS));
     $TArtikel->addRowColspan(2, 3);
     $AC = anyC::get("Artikel");
     if ($data["KategorieID"] != "") {
         $AC->addAssocV3("KategorieID", "=", $data["KategorieID"], "AND", "1");
     }
     if ($data["query"] != "") {
         $AC->addAssocV3("artikelnummer", "LIKE", "%{$data['query']}%", "AND", "2");
         $AC->addAssocV3("name", "LIKE", "%{$data['query']}%", "OR", "2");
         $AC->addAssocV3("beschreibung", "LIKE", "%{$data['query']}%", "OR", "2");
     }
     $AC->addOrderV3("artikelnummer");
     $AC->addOrderV3("name");
     $AC->setLimitV3(100);
     while ($A = $AC->getNextEntry()) {
         $B = new Button("Artikel hinzufügen", "arrow_left", "iconic");
         $B->className("reverse");
         #$B->onclick("CustomerPage.rme('delPosten', {PostenID: '".$P->getID()."'}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: $data[GRLBMID]}, function(transport){ $('#contentLeft').html(transport); }); });");
         $A->resetParsers();
         $TArtikel->addRow(array($B, $A->A("artikelnummer"), $A->A("name") . ($A->A("bemerkung") != "" ? "<br /><small style=\"color:grey;\">" . $A->A("bemerkung") . "</small>" : ""), $this->showPrices ? Util::CLFormatCurrency($A->getGesamtBruttoVK() * 1, true) . "<br /><small style=\"color:grey;\">" . Util::CLFormatCurrency($A->getGesamtNettoVK() * 1, true) . "</small>" : ""));
         $TArtikel->addRowClass("selectable");
         $TArtikel->addRowEvent("click", "CCAuftrag.lastTextbausteinUnten = \$('[name=textbausteinUnten]').val(); CustomerPage.rme('addArtikel', {ArtikelID: '" . $A->getID() . "', GRLBMID: {$data['GRLBMID']}}, function(transport){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
     }
     if ($AC->numLoaded() == 0) {
         $TArtikel->addRow(array("", "Keine Artikel gefunden"));
         $TArtikel->setColWidth(2, 200);
     }
     $html = "<h1>Artikel</h1>\n\t\t\t\t{$TKategorien}\n\t\t\t\t{$TArtikel}";
     return $html;
 }
示例#17
0
 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());");
 }
示例#18
0
 public static function EMailPopupAttachmentsSP($dataClass, $dataClassID, $callbackParameter = null)
 {
     $c = new $dataClass($dataClassID);
     $data = $c->getEMailData($callbackParameter);
     $T = new HTMLTable(1, "Anhänge");
     foreach ($data["attachmentsAlways"] as $file) {
         $T->addRow("<small>{$file}</small>");
         $T->addCellStyle(1, "max-width: 100px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;");
     }
     echo $T;
     $T = new HTMLTable(2, "Mögliche Anhänge");
     $T->setColWidth(1, 20);
     foreach ($data["attachmentsOptional"] as $k => $file) {
         $I = new HTMLInput("addFile{$k}", "checkbox");
         $I->style("margin:0px;");
         $I->data("value", $file);
         $T->addRow(array($I, "<small>{$file}</small>"));
         $T->addCellStyle(2, "max-width: 100px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;cursor:pointer;");
         $T->addCellEvent(2, "click", "\$j('[name=addFile{$k}]').prop('checked', !\$j('[name=addFile{$k}]').prop('checked'));");
     }
     echo ((isset($data["attachmentsOptional"]) and count($data["attachmentsOptional"])) ? "<div style=\"height:30px;\"></div>" : "") . "<form id=\"UtilEmailFormAttachments\">" . $T . "</form>";
 }
示例#19
0
 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');\">&nbsp;&lt;&lt;&nbsp;</a> ";
         else $pageLinks = "&nbsp;&lt;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != 0) $pageLinks .= "<a href=\"javascript:contentManager.backwardOnePage('$defaultTarget');\">&nbsp;&lt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.forwardOnePage('$defaultTarget');\">&nbsp;&gt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&gt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget',".($pages-1).");\">&nbsp;&gt;&gt;&nbsp;</a> | ";
         else $pageLinks .= "&nbsp;&gt;&gt;&nbsp; | ";
         
         $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 : "");
 }
示例#20
0
 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}";
 }
示例#21
0
 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;
 }
示例#22
0
 public function getInvitees($TodoID)
 {
     $AC = anyC::get("TodoInvitation", "TodoInvitationTodoID", $TodoID);
     $AC->addOrderV3("TodoInvitationID", "DESC");
     $T = new HTMLTable(3, "Teilnehmer");
     $T->setColWidth(1, 20);
     $T->setColWidth(3, 20);
     $T->maxHeight(200);
     while ($I = $AC->n()) {
         $IH = new HTMLInput("TodoInvitationIsHead", "checkbox", $I->A("TodoInvitationIsHead"));
         $IH->activateMultiEdit("TodoInvitation", $I->getID());
         $IH->title("Moderator?");
         $BD = new Button("Teilnehmer entfernen", "trash_stroke", "iconic");
         $BD->rmePCR("mTodo", "-1", "removeInvitee", array($TodoID, $I->getID()), "function(t){ \$j('#eventSideContent').html(t.responseText); }");
         $T->addRow(array($IH, $I->A("TodoInvitationName") . "<br><small style=\"color:grey;\">&lt;" . $I->A("TodoInvitationUserEmail") . "&gt;</small>", $BD));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Keine Teilnehmer"));
         $T->addRowColspan(1, 2);
     }
     #$T->addRow(array("HI", "HO"));
     echo $T;
     $Todo = new Todo($TodoID);
     $BN = new Button("Neuer Teilnehmer", "new", "icon");
     $BN->className("highlight");
     $BN->style("padding:10px;");
     $BN->onclick("\$j('#containerButtons .highlight').removeClass('highlight'); \$j(this).addClass('highlight'); \$j('.teilnehmerContainer').hide(); \$j('#containerNew').show(); ");
     $BS = new Button("Systembenutzer", "users", "icon");
     $BS->style("padding:10px;");
     $BS->onclick("\$j('#containerButtons .highlight').removeClass('highlight'); \$j(this).addClass('highlight'); \$j('.teilnehmerContainer').hide(); \$j('#containerSystem').show(); ");
     $BA = "";
     if (Session::isPluginLoaded("mAnsprechpartner") and $Todo->A("TodoClass") == "WAdresse") {
         $BA = new Button("Ansprechpartner", "./ubiquitous/Ansprechpartner/Ansprechpartner.png", "icon");
         $BA->style("padding:10px;");
         $BA->onclick("\$j('#containerButtons .highlight').removeClass('highlight'); \$j(this).addClass('highlight'); \$j('.teilnehmerContainer').hide(); \$j('#containerAnsprech').show(); ");
     }
     echo "<div style=\"height:30px;\"></div><div id=\"containerButtons\">{$BN}{$BS}{$BA}</div>";
     $F = new HTMLForm("neuerTeilnehmer", array("TodoID", "name", "email"), " Neuer Teilnehmer");
     $F->getTable()->setColWidth(1, 120);
     $F->setValue("TodoID", $TodoID);
     $F->setLabel("email", "E-Mail");
     $F->setType("TodoID", "hidden");
     $F->setSaveRMEPCR("Hinzufügen", "", "mTodo", -1, "addInvitee", "function(t){ \$j('#eventSideContent').html(t.responseText); }");
     echo "<div id=\"containerNew\" class=\"teilnehmerContainer\" style=\"padding-bottom:10px;\">" . $F . "</div>";
     $S = new HTMLList();
     $AC = Users::getUsers();
     while ($U = $AC->n()) {
         $S->addItem("<a href=\"#\" onclick=\"" . OnEvent::rme(new mTodoGUI(-1), "addInvitee", array($TodoID, "'" . $U->A("name") . "'", "'" . $U->A("UserEmail") . "'"), "function(t){ \$j('#eventSideContent').html(t.responseText); }") . " return false;\">" . $U->A("name") . "</a>");
         if ($U->getID() == Session::currentUser()->getID()) {
             $S->addItemClass("confirm");
             $S->addItemStyle("padding-top:5px;padding-bottom:5px;");
         }
     }
     echo "<div id=\"containerSystem\" class=\"teilnehmerContainer\" style=\"display:none;padding-bottom:10px;\">" . $S . "</div>";
     $T = new HTMLTable(1);
     if ($Todo->A("TodoClass") == "WAdresse" and Session::isPluginLoaded("mAnsprechpartner")) {
         $S = new HTMLList();
         $AC = Ansprechpartner::getAllAnsprechpartnerToAdresse($Todo->A("TodoClassID"));
         while ($U = $AC->n()) {
             $S->addItem("<a href=\"#\" onclick=\"" . OnEvent::rme(new mTodoGUI(-1), "addInvitee", array($TodoID, "'" . $U->A("AnsprechpartnerVorname") . " " . $U->A("AnsprechpartnerNachname") . "'", "'" . $U->A("AnsprechpartnerEmail") . "'"), "function(t){ \$j('#eventSideContent').html(t.responseText); }") . " return false;\">" . $U->A("AnsprechpartnerVorname") . " " . $U->A("AnsprechpartnerNachname") . "</a>");
         }
         if ($AC->numLoaded() == 0) {
             $S->addItem("Keine Ansprechpartner");
         }
         echo "<div id=\"containerAnsprech\" class=\"teilnehmerContainer\" style=\"display:none;padding-bottom:10px;\">{$S}</div>";
     }
 }
 public function restoreBackup($name)
 {
     if ($_SESSION["S"]->isUserAdmin() == "0") {
         throw new AccessDeniedException();
     }
     require Util::getRootPath() . "libraries/PMBP.inc.php";
     $DB = new DBStorageU();
     $con = $DB->getConnection();
     $file = fopen(Util::getRootPath() . "system/Backup/{$name}", "r");
     $return = PMBP_exec_sql($file, $con);
     $Tab = new HTMLTable(2);
     $Tab->setColWidth(1, "120px");
     $Tab->addLV("Tabellen", $return["insertQueries"]);
     $Tab->addLV("Datensätze", $return["tableQueries"]);
     $Tab->addLV("Befehle gesamt", $return["totalqueries"]);
     $Tab->addLV("Zeilen", $return["linenumber"]);
     $Tab->addLV("Fehler", $return["error"]);
     echo $Tab;
 }
示例#24
0
 public function getContactPopup($kundennummer)
 {
     $A = new Adresse(Kappendix::getAdresseIDToKundennummer($kundennummer));
     $T = new HTMLTable(2);
     $T->setColWidth(1, 120);
     $T->addRow(array($A->getHTMLFormattedAddress()));
     $T->addRowColspan(1, 2);
     if ($A->getA() == null) {
         die($T);
     }
     if ($A->A("tel") != "") {
         $T->addLV("Telefon:", $A->A("tel"));
     }
     if ($A->A("fax") != "") {
         $T->addLV("Fax:", $A->A("fax"));
     }
     if ($A->A("mobil") != "") {
         $T->addLV("Mobil:", $A->A("mobil"));
     }
     if ($A->A("email") != "") {
         $T->addLV("E-Mail:", $A->A("email"));
     }
     if (!Session::isPluginLoaded("mAnsprechpartner")) {
         die($T);
     }
     $AC = Ansprechpartner::getAnsprechpartner("Adresse", $kundennummer);
     $TAP = new HTMLTable(2);
     $TAP->setColWidth(1, 120);
     while ($AP = $AC->getNextEntry()) {
         if (trim($AP->A("AnsprechpartnerVorname") . " " . $AP->A("AnsprechpartnerNachname")) != "") {
             $TAP->insertSpaceAbove($AP->A("AnsprechpartnerPosition"));
             $TAP->addLV("Name:", $AP->A("AnsprechpartnerVorname") . " " . $AP->A("AnsprechpartnerNachname"));
             if ($AP->A("AnsprechpartnerTel") != "") {
                 $TAP->addLV("Telefon:", $AP->A("AnsprechpartnerTel"));
             }
             if ($AP->A("AnsprechpartnerEmail") != "") {
                 $TAP->addLV("E-Mail:", $AP->A("AnsprechpartnerEmail"));
             }
         }
     }
     echo $T . $TAP;
 }
示例#25
0
 function getInfo($time)
 {
     $BE = "";
     $BD = "";
     $BDS = "";
     if ($this->editable != null) {
         if ($this->editable[0] != null) {
             $BE = new Button("Bearbeiten", "edit", "icon");
             $BE->style("margin:10px;float:right;");
             $BE->popup("", "Kalendereintrag bearbeiten", "mKalender", $this->classID, "editInPopup", array("'" . $this->className . "'", $this->classID, "'{$this->editable[0]}'"));
         }
         $BD = new Button("Dieses Event Löschen", "trash", "icon");
         $BD->style("float:right;margin:10px;");
         $BD->onclick("if(confirm('Löschen?')) ");
         $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
         if ($this->repeat() !== false) {
             $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], array($this->classID, $time + Kalender::parseTime($this->time) - 60), "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
             $BDS = new Button("Alle Events Löschen", "./ubiquitous/Kalender/deleteSeries.png", "icon");
             $BDS->style("float:right;margin:10px;");
             $BDS->onclick("if(confirm('Löschen?')) ");
             $BDS->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');");
         }
     }
     $T = new HTMLTable(2, "Eventdetails");
     $T->setColWidth(1, 120);
     $T->addColStyle(1, "vertical-align:top;");
     $T->addLV("Betreff", $this->title);
     $T->addLV("Tag", Util::CLDateParser($time));
     if (!$this->allDay) {
         $T->addLV("Uhrzeit", $this->formatTime($this->time));
     } else {
         $T->addLV("Uhrzeit", "Ganzer Tag");
     }
     $T->addLV("Details", "<div style=\"max-height:300px;overflow:auto;\">" . $this->summary . "</div>");
     if ($this->organizer) {
         $T->addLV("Organisator", $this->organizer);
     }
     if (count($this->values) > 0) {
         $T->insertSpaceAbove();
     }
     foreach ($this->values as $label => $value) {
         $T->addLV($label, $value);
     }
     $BN = "";
     if ($this->canNotify) {
         // TODO: Entfernen sobald Einladungen funktionieren
         $BN = new Button("Termin-\nbestätigung", "mail" . ($this->notified ? "ed" : ""), "icon");
         $BN->style("margin-top:10px;margin-left:10px;");
         $BN->popup("", "Terminbestätigung", "Util", "-1", "EMailPopup", array("'mKalender'", "-1", "'notification::{$this->className}::{$this->classID}::{$time}'", "'function(){ Kalender.refreshInfoPopup(); }'"));
     }
     $BR = "";
     if ($this->isRepeatable and $this->getException() === false) {
         $BR = new Button("Wiederholungen", "refresh", "icon");
         $BR->style("margin:10px;float:right;");
         $BR->rmePCR("mKalender", "-1", "getRepeatable", array("'{$this->className}'", "'{$this->classID}'", "'{$this->isRepeatable}'"), "function(transport){ \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }");
     }
     // TODO: Flag für Teilnehmer erstellen
     // nur anzeigen, wenn es sich um eine ToDo handelt
     //		$buttonInvite = new Button("Teilnehmer einladen", "refresh", "icon");
     //		$buttonInvite->style("margin: 10px; float: right;");
     //		$buttonInvite->rmePCR("mKalender", "-1", "getInviteForm", array("'$this->className'", "'$this->classID'", "'getInviteForm'"), "function(transport){ \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }");
     $topButtons = "";
     foreach ($this->topButtons as $B) {
         $B->type("icon");
         $B->style("margin-top:10px;margin-left:10px;");
         $topButtons .= $B;
     }
     return $BDS . $BD . $BE . $BN . $topButtons . $BR . $buttonInvite . "<div style=\"clear:both;\"></div><div style=\"display:none;\" id=\"eventAdditionalContent\"></div>" . $T;
 }
示例#26
0
 function getInfo($time)
 {
     $T = new HTMLTable(2);
     $T->setColWidth(1, 120);
     $T->addLV("Name", $this->title);
     $T->addLV("Erster Tag", $this->formatDay($this->firstDay));
     $T->addLV("Letzter Tag", $this->formatDay($this->lastDay));
     $T->addLV("Beschreibung", $this->summary);
     if (count($this->values) > 0) {
         $T->insertSpaceAbove();
     }
     foreach ($this->values as $label => $value) {
         $T->addLV($label, $value);
     }
     return $T;
 }
示例#27
0
 /**
  * Method to display an E-Mail popup for easy E-Mail sending
  * 
  * Requires a method named "getEMailData" in $dataClass which returns an array:
  * array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
  * 
  * Will call $dataClass($dataClassID)::sendEmail afterwards
  * 
  * @param string $dataClass
  * @param string $dataClassID 
  */
 public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null, $onAbortFunction = null, $return = false)
 {
     $c = new $dataClass($dataClassID);
     $data = $c->getEMailData($callbackParameter);
     $html = "";
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     $tab->addLV("Absender:", "{$data['fromName']}<br /><small>&lt;{$data['fromAddress']}&gt;</small>");
     if (is_array($data["recipients"])) {
         if (count($data["recipients"]) == 1) {
             $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small>&lt;" . $data["recipients"][0][1] . "&gt;</small>");
         } else {
             $recipients = array();
             foreach ($data["recipients"] as $ID => $Rec) {
                 $recipients[$ID] = new HTMLInput($Rec[0] . " &lt;" . $Rec[1] . "&gt;", "option", $ID);
             }
             $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", isset($data["default"]) ? $data["default"] : "0", $recipients);
             $IS->id("EMailRecipient{$dataClassID}");
             $tab->addLV("Empfänger:", $IS);
         }
     } else {
         $IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]);
         $IS->id("EMailRecipient{$dataClassID}");
         $tab->addLV("Empfänger:", $IS);
     }
     $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
     $html .= $tab;
     $html .= "<div style=\"width:94%;margin:auto;\"><textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>";
     #$tab->addRow(array(""));
     #$tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     if ($onSuccessFunction == null) {
         $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
     }
     $BAbort = new Button("Abbrechen", "stop");
     if ($onAbortFunction == null) {
         $BAbort->onclick("Popup.close('Util', 'edit');");
     } else {
         $BAbort->onclick($onAbortFunction);
     }
     $BAbort->style("margin-bottom:10px;margin-top:10px;");
     $BGo = new Button("E-Mail\nsenden", "okCatch");
     $BGo->style("float:right;margin-top:10px;");
     if (strpos($data["body"], "<p") !== false) {
         $BGo->doBefore("nicEditors.findEditor('EMailBody{$dataClassID}').saveContent(); %AFTER");
     }
     $BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", (is_array($data["recipients"]) and count($data["recipients"]) == 1) ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
     #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
     $tab->addRow(array($BGo . $BAbort));
     $tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     $html .= $tab;
     if (strpos($data["body"], "<p") !== false) {
         echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\tnew nicEditor({\n\t\t\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\t\t\tbuttonList : ['bold','italic','underline'],\n\t\t\t\tmaxHeight : 400\n\t\t\t}).panelInstance('EMailBody{$dataClassID}');}, 100);");
     }
     if ($return) {
         return $html;
     } else {
         echo $html;
     }
 }
示例#28
0
 public function browser()
 {
     $BA = new Button("Eintrag\nhinzufügen", "new");
     $BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass()));
     $BA->style("margin:10px;");
     if (!$this->showNew) {
         $BA = "";
     }
     $cols = ($this->showTrash ? 1 : 0) + ($this->showEdit ? 1 : 0) + 1 + count($this->colsLeft) + count($this->colsRight);
     $TE = new HTMLTable($cols, "Einträge");
     if ($this->showTrash) {
         $TE->setColWidth(1, 20);
     }
     if ($this->showEdit) {
         $TE->setColWidth($cols, 20);
         $TE->useForSelection(false);
     }
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     while ($A = $this->object->getNextEntry()) {
         $action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });";
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');");
         $isEmpty = false;
         if ($this->emptyCheckField != null and !is_array($this->emptyCheckField) and $A->A($this->emptyCheckField) == $this->emptyCheckValue) {
             $autoLoad = $action;
             $isEmpty = true;
         }
         if ($this->emptyCheckField != null and is_array($this->emptyCheckField)) {
             $ec = 0;
             foreach ($this->emptyCheckField as $field) {
                 if ($A->A($field) != "") {
                     continue;
                 }
                 $autoLoad = $action;
                 $isEmpty = true;
                 $ec++;
             }
             $isEmpty = $ec == count($this->emptyCheckField);
         }
         if (!$isEmpty) {
             $obj = get_class($this->object);
             $meth = $this->parsers["main"];
             if (strpos($this->parsers["main"], "::")) {
                 $ex = explode("::", $this->parsers["main"]);
                 $obj = $ex[0];
                 $meth = $ex[1];
             }
             $div = Util::invokeStaticMethod($obj, $meth, array($A));
             #($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neuer Eintrag");
         } else {
             $div = "Neuer Eintrag";
         }
         $row = array();
         if ($this->showTrash) {
             $row[] = $BD;
         }
         $row[] = $div;
         foreach ($this->colsRight as $col) {
             $obj = get_class($this->object);
             $meth = $col[0];
             if (strpos($col[0], "::")) {
                 $ex = explode("::", $col[0]);
                 $obj = $ex[0];
                 $meth = $ex[1];
             }
             $row[] = Util::invokeStaticMethod($obj, $meth, array($A));
         }
         if ($this->showEdit) {
             $row[] = $BE;
         }
         $TE->addRow($row);
         if ($this->showTrash) {
             $TE->addCellStyle(1, "vertical-align:top;");
         }
         #$TE->addCellEvent(2, "click", $action);
         if ($this->showEdit) {
             $TE->addCellID(count($row), "popupEntryID" . $A->getID());
             $TE->addCellStyle(count($row), "vertical-align:top;");
             $TE->addCellEvent(count($row), "click", $action);
         }
     }
     if ($this->object->numLoaded() == 0) {
         $TE->addRow("Keine Einträge");
         $TE->addRowColspan(1, $cols);
     }
     return "{$BA}\n\t\t\t<div style=\"float:right;width:calc(100% - 400px);height:500px;display:none;background-color:#f4f4f4;overflow:auto;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script($autoLoad) : "");
 }