コード例 #1
1
ファイル: HTMLForm.class.php プロジェクト: nemiah/fheME
 private function getInput($v)
 {
     if (!isset($this->types[$v]) or $this->types[$v] != "parser") {
         if (isset($this->types[$v]) and ($this->types[$v] == "tinyMCE" or $this->types[$v] == "TextEditor" or $this->types[$v] == "nicEdit")) {
             $options = array($this->id, $v);
             if (isset($this->options[$v])) {
                 foreach ($this->options[$v] as $ov) {
                     $options[] = $ov;
                 }
             }
             $this->options[$v] = $options;
         }
         $Input = new HTMLInput($v, isset($this->types[$v]) ? $this->types[$v] : "text", isset($this->values[$v]) ? $this->values[$v] : null, isset($this->options[$v]) ? $this->options[$v] : null);
         if (isset($this->onChange[$v])) {
             $Input->onchange($this->onChange[$v]);
         }
         if (isset($this->onBlur[$v])) {
             $Input->onblur($this->onBlur[$v]);
         }
         if (isset($this->onFocus[$v])) {
             $Input->onfocus($this->onFocus[$v]);
         }
         if (isset($this->onKeyup[$v])) {
             $Input->onkeyup($this->onKeyup[$v]);
         }
         if (isset($this->inputStyle[$v])) {
             $Input->style($this->inputStyle[$v]);
         }
         if (isset($this->autocomplete[$v])) {
             $Input->autocomplete($this->autocomplete[$v][0], $this->autocomplete[$v][1], false, $this->autocomplete[$v][2]);
         }
         if (isset($this->placeholders[$v])) {
             $Input->placeholder($this->placeholders[$v]);
         }
         $Input->isDisplayMode(!$this->editable);
     } else {
         $method = explode("::", $this->options[$v][0]);
         $Input = Util::invokeStaticMethod($method[0], $method[1], array(isset($this->values[$v]) ? $this->values[$v] : null, "", isset($this->options[$v][1]) ? $this->options[$v][1] : null));
     }
     return $Input;
 }
コード例 #2
0
ファイル: phimGruppeGUI.class.php プロジェクト: nemiah/fheME
 public static function parserMembers($w, $l, $E)
 {
     $Users = Users::getUsersArray();
     $r = "";
     foreach ($Users as $ID => $U) {
         $I = new HTMLInput("user_{$ID}", "checkbox", strpos($w, ";{$ID};") !== false ? "1" : "0");
         $I->onchange("if(this.checked) \$j('[name=phimGruppeMembers]').val(\$j('[name=phimGruppeMembers]').val()+';{$ID};'); else  \$j('[name=phimGruppeMembers]').val(\$j('[name=phimGruppeMembers]').val().replace(';{$ID};', ''));");
         $r .= $I . " " . $U . "<br>";
     }
     $I = new HTMLInput("phimGruppeMembers", "hidden", $w);
     return $r . $I;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 function showWarenkorb()
 {
     $AC = anyC::get("Seminar");
     $AC->addAssocV3("SeminarVon", ">=", Util::parseDate("de_DE", Util::formatDate("de_DE", time())));
     $count = array();
     for ($i = 0; $i < 21; $i++) {
         $count[$i] = $i;
     }
     $T = new HTMLTable(3, "Events");
     $T->setTableStyle("width:100%;");
     while ($S = $AC->getNextEntry()) {
         $I = new HTMLInput("AnzahlKarten" . $S->getID(), "select", "0", $count);
         $I->style("width:80px;text-align:right;");
         $I->onchange("CustomerPage.rme('recalc', ['" . $S->getID() . "', this.value], function(response){ \$('#PreisGesamt" . $S->getID() . "').html(response) });");
         if (isset($_SESSION["ticketDataSelection"])) {
             $I->setValue($_SESSION["ticketDataSelection"][$S->getID()]);
         }
         $Adresse = new Adresse($S->A("SeminarAdresseID"));
         $T->addRow(array("<b>" . $S->A("SeminarName") . "</b>, " . Util::CLDateParser($S->A("SeminarVon")) . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr, " . $Adresse->A("ort")));
         $T->addRowColspan(1, 3);
         $T->addRow(array($I, Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * 1, true), Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * $I->getValue(), true)));
         $T->addCellStyle(1, "text-align:right;");
         $T->addCellStyle(2, "text-align:right;");
         $T->addCellStyle(3, "text-align:right;");
         $T->addCellID(3, "PreisGesamt" . $S->getID());
         $T->addRow(array("&nbsp;"));
         $T->addRowColspan(1, 3);
     }
     $I = new Button("Weiter", "");
     $I->onclick("CustomerPage.rme('handleForm', \$('#ticketShop').serialize(), function(){ document.location.reload(); })");
     $I->className("submitFormButton");
     $T->addRow($I);
     $T->addRowColspan(1, 3);
     $IA = new HTMLInput("action", "hidden", "handleSelection");
     return "<form id=\"ticketShop\">" . $T . $IA . "</form>";
 }
コード例 #5
0
ファイル: CCAuftrag.class.php プロジェクト: nemiah/poolPi
 public function getAuftrag($data)
 {
     $Beleg = new GRLBM($data["GRLBMID"]);
     #$this->createAuftrag(new Adresse(1), "W");
     $TSumme = new HTMLTable(3);
     $TSumme->setTableStyle("width:100%;border-top:1px solid #AAA;margin-top:30px;");
     $TSumme->setColWidth(1, 26);
     $TSumme->addColStyle(3, "text-align:right;");
     $TSumme->addRow(array("", "Netto: <b>" . Util::CLFormatCurrency($Beleg->A("nettobetrag") * 1, true) . "</b>", "Brutto: <b>" . Util::CLFormatCurrency($Beleg->A("bruttobetrag") * 1, true) . "</b>"));
     $IZahlungsart = new HTMLInput("zahlungsart", "select", $Beleg->A("GRLBMpayedVia"), GRLBM::getPaymentVia(null, array("transfer", "debit")));
     $IZahlungsart->onchange("if(this.value == 'debit') \$('#rowZahlungsart').show(); else \$('#rowZahlungsart').hide(); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IBankleitzahl = new HTMLInput("bankleitzahl", "text", $Beleg->A("GRLBMBankleitzahl"));
     $IBankleitzahl->placeholder("Bankleitzahl");
     $IBankleitzahl->style("margin-top:10px;text-align:right;width:130px;");
     $IBankleitzahl->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IKontonummer = new HTMLInput("kontonummer", "text", $Beleg->A("GRLBMKontonummer"));
     $IKontonummer->placeholder("Kontonummer");
     $IKontonummer->style("margin-top:10px;text-align:right;margin-left:10px;width:130px;");
     $IKontonummer->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     #$IBIC = new HTMLInput("bic");
     #$IIBAN = new HTMLInput("iban");
     $BCheck = new Button("Prüfung", "question_mark", "iconic");
     $BCheck->id("ktoCheck");
     $BCheck->style("margin-left:8px;");
     $TZahlungsart = new HTMLTable(2, "Zahlungsart");
     $TZahlungsart->setTableStyle("width:100%;");
     $TZahlungsart->setColWidth(1, 26);
     $TZahlungsart->addRow(array(new Button("Zahlungsart", "pin", "iconic"), $IZahlungsart));
     $TZahlungsart->addRowColspan(2, 2);
     $TZahlungsart->addCellStyle(1, "vertical-align:top;");
     $TZahlungsart->addRow(array("", $IBankleitzahl . " " . $IKontonummer . "{$BCheck} <div id=\"bankMessage\" style=\"margin-top:6px;\">&nbsp;</div>"));
     $TZahlungsart->setRowID("rowZahlungsart");
     if ($Beleg->A("GRLBMpayedVia") != "debit") {
         $TZahlungsart->addRowStyle("display:none;");
     } else {
         echo OnEvent::script("CustomerPage.saveKontodaten();");
     }
     $IBemerkung = new HTMLInput("bemerkung", "textarea", $Beleg->A("textbausteinUnten"));
     $IBemerkung->style("width:100%;height:100px;margin-top:40px;");
     $IBemerkung->placeholder("Bemerkungen");
     #$IBemerkung->onblur("");
     $IBemerkung->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveBemerkung, 300);");
     $TZahlungsart->addRow(array(new Button("Bemerkung", "document_alt_stroke", "iconic"), $IBemerkung));
     $TZahlungsart->addCellStyle(1, "vertical-align:top;padding-top:40px;");
     #$TZahlungsart->addCellStyle(3, "padding-top:50px;");
     $TFinish = new HTMLTable(1);
     $TFinish->setTableStyle("width:100%;");
     $TFinish->addRow(array($this->buttonCancel($data) . $this->buttonDone($data)));
     $TFinish->addCellStyle(1, "padding-top:50px;");
     $html = "<h1>Auftrag " . $Beleg->A("prefix") . $Beleg->A("nummer") . "</h1>";
     $html .= $this->getAdresse($Beleg);
     if ($this->showPosten) {
         $html .= $this->getPosten($Beleg);
     }
     if ($this->showPrices) {
         $html .= $TSumme;
     }
     if ($this->showZahlungsart) {
         $html .= $TZahlungsart;
     }
     $html .= $this->getBottom($Beleg);
     $html .= $TFinish;
     return $html . OnEvent::script("\n\t\t\tCustomerPage.timeout = null;\n\t\t\tCustomerPage.saveBemerkung  = function(){ CustomerPage.rme('setBemerkung', {GRLBMID: {$data['GRLBMID']}, bemerkung: \$('textarea[name=bemerkung]').val() }); };\n\t\t\tCustomerPage.saveKontodaten = function(){ CustomerPage.rme('setKontodaten', {\n\t\t\t\tGRLBMID: {$data['GRLBMID']},\n\t\t\t\tzahlungsart: \$('select[name=zahlungsart]').val(),\n\t\t\t\tkontonummer: \$('input[name=kontonummer]').val(),\n\t\t\t\tbankleitzahl: \$('input[name=bankleitzahl]').val()\n\t\t\t}, function(t){ \$('#bankMessage').html(t); }); };");
 }
コード例 #6
0
ファイル: tinyMCEGUI.class.php プロジェクト: nemiah/poolPi
 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;
 }
コード例 #7
0
ファイル: SpellbookGUI.class.php プロジェクト: nemiah/fheME
 public function getHTML($id, $page)
 {
     $entries = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
     $icons = $_SESSION["CurrentAppPlugins"]->getIcons();
     $targets = $_SESSION["CurrentAppPlugins"]->getMenuTargets();
     $appMenuDisplayed = MenuGUI::getAppMenuOrder("appMenuDisplayed");
     if ($appMenuDisplayed != "") {
         $appMenuDisplayed = explode(";", $appMenuDisplayed);
     } else {
         $appMenuDisplayed = $entries;
     }
     ksort($entries);
     $request = array_values($entries);
     $xml = self::getSpell($request);
     #$AP3 = new AppPlugins("customer");
     #$plugins = array_merge($plugins, $AP3->getAllPlugins());
     #$menu = array_merge($menu, array_flip($AP3->getAllMenuEntries()));
     #$icons = array_merge($icons, $AP3->getIcons());
     #$plugins3 = array_flip($AP3->getAllPlugins());
     #print_r($plugins3);
     $AP = new AppPlugins(Applications::activeApplication());
     $plugins = array_flip($AP->getAllPlugins());
     $html = "";
     $html .= "<div style=\"float:right;width:160px;padding-top:20px;\" id=\"containerSortTabs\">" . $this->getSortable(false) . "</div>\n\t\t\t<div style=\"margin-right:160px;\">";
     $U = new mUserdata();
     $U->addAssocV3("typ", "=", "TTP");
     $collapsedTabs = Environment::getS("collapsedTabs", "0") == "1";
     foreach ($entries as $key => $value) {
         $text = "";
         if ($xml !== false) {
             foreach ($xml->plugin as $xmlp) {
                 if ($xmlp->name == $value) {
                     $text = $xmlp->description;
                 }
             }
         }
         if (isset($plugins[$value])) {
             unset($plugins[$value]);
         }
         $BG = new Button("Plugin {$key} öffnen", "navigation", "icon");
         $BG->onclick("contentManager.loadPlugin('" . (isset($targets[$value]) ? $targets[$value] : "contentRight") . "', '{$value}', '{$value}GUI;-');");
         $BG->style("float:right;margin-top:-7px;");
         $B = new Button($key, $icons[$value], "icon");
         $B->style("float:left;margin-right:10px;margin-top:-7px;margin-left:-5px;");
         $I = new HTMLInput("usePlugin{$value}", "checkbox", in_array($value, $appMenuDisplayed) ? "1" : "0");
         $I->id("usePlugin{$value}");
         $I->onchange("if(this.checked) { Menu.showTab('{$value}'); \$j('#minPlugin{$value}').prop('disabled', ''); } else { Menu.hideTab('{$value}'); \$j('#minPlugin{$value}').prop('disabled', 'disabled'); }");
         $t = !$_SESSION["S"]->isUserAdmin() ? $U->getUDValueCached("ToggleTab{$value}") : "big";
         if ($t == null and $collapsedTabs) {
             $t = "small";
         }
         if ($t == null) {
             $t = "big";
         }
         $IM = new HTMLInput("minPlugin{$value}", "checkbox", $t == "big" ? "0" : "1");
         $IM->id("minPlugin{$value}");
         $IM->onchange("toggleTab('{$value}');");
         if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "vertical" or $_COOKIE["phynx_layout"] == "desktop")) {
             $IM->isDisabled(true);
         }
         if (!in_array($value, $appMenuDisplayed)) {
             $IM->isDisabled(true);
         }
         #border-width:1px;border-style:solid;
         $html .= "\n\t\t\t<div style=\"width:33%;float:left;\">\n\t\t\t\t<div style=\"margin:10px;\" class=\"borderColor1 spell\">\n\t\t\t\t\t<div class=\"backgroundColor2\" style=\"padding:10px;padding-bottom:5px;\">\n\t\t\t\t\t\t{$BG}{$B}<h2 style=\"margin-bottom:0px;margin-top:0px;\">{$key}</h2>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"padding:7px;\">\n\t\t\t\t\t\t{$I}<label style=\"float:none;width:200px;text-align:left;display:inline;margin-left:10px;font-wight:normal;\" for=\"usePlugin{$value}\">Plugin verwenden</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"padding:7px;padding-top:0px;\">\n\t\t\t\t\t\t{$IM}<label style=\"float:none;width:200px;text-align:left;display:inline;margin-left:10px;font-wight:normal;\" for=\"minPlugin{$value}\">Reiter minimiert</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t" . ($xml !== false ? "<div style=\"padding:7px;height:115px;overflow:auto;\">{$text}</div>" : "") . "\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     $html .= "</div><h2 style=\"clear:both;padding-top:50px;\">Admin-Plugins und Plugins ohne eigenen Reiter</h2><div style=\"margin-right:160px;\">";
     $icons = $AP->getIcons();
     $plugins = array_flip($plugins);
     $menu = array_flip($AP->getAllMenuEntries());
     $AP2 = new AppPlugins("plugins");
     $plugins = array_merge($plugins, $AP2->getAllPlugins());
     $menu = array_merge($menu, array_flip($AP2->getAllMenuEntries()));
     $icons = array_merge($icons, $AP2->getIcons());
     $plugins2 = array_flip($AP2->getAllPlugins());
     $request = array_values($plugins);
     $xml = self::getSpell($request);
     ksort($plugins);
     foreach ($plugins as $key => $value) {
         if (isset($menu[$value])) {
             $key = $menu[$value];
         }
         $text = "";
         if ($xml !== false) {
             foreach ($xml->plugin as $xmlp) {
                 if ($xmlp->name == $value) {
                     $text = $xmlp->description;
                 }
             }
         }
         if ($text == "" or $text == "-") {
             continue;
         }
         if (!isset($plugins2[$value]) and substr($AP->getFolderOfPlugin($value), 0, 3) == "../") {
             continue;
         }
         if (isset($plugins2[$value]) and substr($AP2->getFolderOfPlugin($value), 0, 3) == "../") {
             continue;
         }
         if (!isset($plugins2[$value])) {
             $isAdmin = $AP->getIsAdminOnly($value);
         }
         if (isset($plugins2[$value])) {
             $isAdmin = $AP2->getIsAdminOnly($value);
         }
         $B = new Button($key, $icons[$value], "icon");
         $B->style("float:left;margin-right:10px;margin-top:-7px;margin-left:-5px;");
         #border-width:1px;border-style:solid;
         $html .= "\n\t\t\t<div style=\"width:33%;float:left;\">\n\t\t\t\t<div style=\"margin:10px;border-radius:5px;\" class=\"borderColor1 spell\">\n\t\t\t\t\t<div class=\"backgroundColor2\" style=\"padding:10px;padding-bottom:5px;\">\n\t\t\t\t\t\t{$B}<span style=\"float:right;margin-top:7px;\">" . ($isAdmin ? "Admin!" : "") . "</span><h2  style=\"margin-bottom:0px;margin-top:0px;\">{$key}</h2>\n\t\t\t\t\t</div>\n\t\t\t\t\t" . ($xml !== false ? "<div style=\"padding:7px;height:115px;overflow:auto;\">{$text}</div>" : "") . "\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     $html .= "</div>";
     #echo "<pre>";
     #print_r($menu);
     #echo "</pre>";
     return $html;
 }
コード例 #8
0
ファイル: mFileGUI.class.php プロジェクト: nemiah/trinityDB
 public static function parserDefault($w, $E)
 {
     $I = new HTMLInput("isDefault", "checkbox", $E->getID() == self::$fieldDefaultFile[1] ? "1" : "0");
     $I->onchange(OnEvent::rme(self::$fieldDefaultFile[0], "saveMultiEditField", array("'" . self::$fieldDefaultFile[2] . "'", "this.checked ? '" . $E->getID() . "' : ''"), OnEvent::reloadPopup("mFile"), "", OnEvent::reloadPopup("mFile")));
     return $I;
 }
コード例 #9
0
ファイル: HTMLInput.class.php プロジェクト: nemiah/poolPi
 public function __toString()
 {
     #$style = "";
     if ($this->type == "date" and strpos($this->style, "width:") === false) {
         $this->style .= "width:calc(100% - 28px)%;";
     }
     #if($this->style != null) $style = " style=\"$this->style\"";
     switch ($this->type) {
         /*case "JSONMultiText":
         			$data = json_decode($this->value);
         			
         			print_r($data);
         			
         			$L = new HTMLList();
         			$L->noDots();
         			$L->addListStyle("padding:0px;");
         			
         			foreach($data AS $k => $v){
         				$IL = new HTMLInput($this->name."_$k", "text", $v);
         				$BL = new Button("Element hinzufügen");
         				$L->addItem($IL);
         				$L->addItemStyle("margin-left:0px;");
         			}
         			
         			$I = new HTMLInput($this->name, "textarea", $this->value);
         			$I->id($this->name);
         			
         			return $L.$I;
         		break;*/
         case "audio":
             return "<audio controls preload=\"auto\" autobuffer style=\"{$this->style}\"><source src=\"{$this->value}\"></audio>";
             break;
         case "search":
             $currentId = $this->id != null ? $this->id : $this->name . rand(100, 100000000);
             $enter = "if(\$j('#{$currentId}').val() != ''){ \$j('#SB{$currentId}').fadeOut(200, function(){ \$j('#SA{$currentId}').fadeIn();}); } else { \$j('#SA{$currentId}').fadeOut(200, function(){ \$j('#SB{$currentId}').fadeIn(); }); }";
             $I = new HTMLInput($this->name, "text", $this->value, $this->options);
             $I->style($this->style);
             $I->placeholder($this->placeholder);
             $I->onEnter($this->onenter . $enter);
             #$I->onEnter(" ");
             $I->id($currentId);
             $BSearch = new Button("Suchen", "question_mark", "iconicG");
             $BSearch->style("margin-left:5px;");
             $BSearch->id("SB{$currentId}");
             $BSearch->onclick($this->onenter . $enter);
             #$BSearch->id("searchMailsInfo");
             $BSearchClear = new Button("Suche beenden", "x_alt", "iconicR");
             $BSearchClear->style("margin-left:5px;display:none;");
             $BSearchClear->id("SA{$currentId}");
             $BSearchClear->onclick("\$j('#{$currentId}').val('').trigger('blur'); {$this->onenter}{$enter}");
             #$BSearchClear->id("searchMailsClear");
             return $I . $BSearch . $BSearchClear . $this->requestFocus;
             break;
         case "HTMLEditor":
             $B = new Button("in HTML-Editor\nbearbeiten", "editor");
             $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->className("backgroundColor2");
             return $B->__toString();
             break;
         case "TextEditor":
             #return "<input ".(isset($this->events[$as]) ? $eve : "")." style=\"background-image:url(./images/navi/editor.png);".(isset($this->inputStyle[$as]) ? "".$this->inputStyle[$as]."" : "")."\" type=\"button\" class=\"bigButton backgroundColor2\" onclick=\"TextEditor.show('$as','$this->FormID');\" value=\"".$this->texts["in Editor bearbeiten"]."\" /><textarea style=\"display:none;\" name=\"".$as."\" id=\"".$as."\">".$this->attributes->$as."</textarea>";
             $B = new Button("in Editor\nbearbeiten", "editor");
             $B->className("backgroundColor2");
             $B->onclick("TextEditor.show('{$this->name}','{$this->options[0]}');");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             $ITA->id($this->name);
             $ITA->style("display:none;");
             return $B->__toString() . $ITA;
             break;
         case "nicEdit":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->doBefore("Overlay.showDark(); %AFTER");
             $B->popup("", "Editor", "nicEdit", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "hidden", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "tinyMCE":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             if (isset($this->options[3])) {
                 $BO[] = "'{$this->options[3]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->doBefore("Overlay.showDark(); %AFTER");
             $B->popup("", "Editor", "tinyMCE", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "hidden", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "multiInput":
             return "<input\n\t\t\t\t\tclass=\"multiEditInput2\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tvalue=\"" . htmlspecialchars($this->value) . "\"\n\t\t\t\t\tonfocus=\"oldValue = this.value;\"\n\t\t\t\t\tid=\"" . $this->options[2] . "ID" . $this->options[1] . "\"\n\t\t\t\t\tonblur=\"if(oldValue != this.value) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"\n\t\t\t\t\tonkeydown=\"if(event.keyCode == 13) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"/>";
             break;
             /*case "customSelection":
             				$B = new Button("Eintrag auswählen...", "gutschrift");
             				$B->type("LPBig");
             				$B->style("float:right;margin-left:10px;");
             				#				 "contentRight"		"callingPluginID"  "selectPlugin"
             				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
             
             				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
             			break;*/
         /*case "customSelection":
         				$B = new Button("Eintrag auswählen...", "gutschrift");
         				$B->type("LPBig");
         				$B->style("float:right;margin-left:10px;");
         				#				 "contentRight"		"callingPluginID"  "selectPlugin"
         				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
         
         				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
         			break;*/
         case "textarea":
             if ($this->isDisplayMode) {
                 return nl2br($this->value);
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 $this->onfocus .= " contentManager.oldValue = this.value;";
                 $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->onblur .= "if(contentManager.oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 if ($this->hasFocusEvent) {
                     $this->onfocus .= "focusMe(this);";
                     $this->onblur .= "blurMe(this);";
                 }
                 $this->hasFocusEvent = false;
             }
             return "<textarea\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . (!$this->autocorrect ? "autocorrect=\"off\"" : "") . "\n\t\t\t\t\t" . (!$this->spellcheck ? "spellcheck=\"false\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\t" . ($this->hasFocusEvent ? "onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">{$this->value}</textarea>";
             break;
         case "file":
             $physion = Session::physion();
             $currentId = ($this->id != null ? $this->id : $this->name) . rand(100, 100000000);
             if (isset($this->options["autoUpload"]) and !$this->options["autoUpload"]) {
                 $this->callback = "QQUploader{$currentId}.uploadStoredFiles();";
             }
             return "\n\t\t\t\t\t<div id=\"progress_{$currentId}\" style=\"height:10px;width:95%;display:none;\" class=\"\">\n\t\t\t\t\t\t<div id=\"progressBar_{$currentId}\" style=\"height:10px;width:0%;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"{$currentId}\" style=\"width:100%;{$this->style}\"></div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tQQUploader{$currentId} = new qq.FileUploader({\n\t\t\t\t\t\t\tmaxSizePossible: '" . ini_get("upload_max_filesize") . "B',\n\t\t\t\t\t\t\tsizeLimit: " . Util::toBytes(ini_get("upload_max_filesize")) . ",\n\t\t\t\t\t\t\telement: \$j('#{$currentId}')[0],\n\t\t\t\t\t\t\taction: '" . (($this->options != null and isset($this->options["action"])) ? $this->options["action"] : "./interface/set.php") . "',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\t'class': '" . (($this->options == null or !isset($this->options["class"])) ? "TempFile" : $this->options["class"]) . "'\n\t\t\t\t\t\t\t\t,'id':'-1'\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["path"])) ? ",'path':'" . $this->options["path"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["targetFilename"])) ? ",'targetFilename':'" . $this->options["targetFilename"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . ($physion ? ",'physion':'{$physion['0']}'" : "") . "\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t" . (isset($this->options["autoUpload"]) ? "autoUpload: " . ($this->options["autoUpload"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\t" . (isset($this->options["multiple"]) ? "multiple: " . ($this->options["multiple"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\tonSubmit: function(id, fileName){ \$j('#progress_{$currentId}').css('display', 'block');},\n\t\t\t\t\t\t\tonComplete: function(id, fileName, transport){ \$j('progress_{$currentId}').css('display', 'none'); {$this->onchange} },\n\t\t\t\t\t\t\tonProgress: function(id, fileName, loaded, total){ \$j('#progressBar_{$currentId}').css('width', Math.ceil((loaded / total) * 100)+'%'); }});\n\t\t\t\t\t</script>";
             break;
         case "time":
             $this->type = "text";
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             if (!$this->id) {
                 $this->id = rand(100000, 9999999) . $this->name;
             }
             #$this->onkeyup .= "if(\$j(this).val().length == 2 && \$j(this).val().lastIndexOf(':') == -1) \$j(this).val(\$j(this).val()+':'); ";
             if ($this->connectTo) {
                 $this->onkeyup .= "contentManager.connectedTimeInput(event, '{$this->id}', '{$this->connectTo}'); ";
             } else {
                 $this->onkeyup .= "contentManager.timeInput(event, '{$this->id}'); ";
             }
         case "time2":
             if ($this->type == "time2") {
                 $this->type = "time";
             }
         case "radio1":
         case "date":
         case "email":
         case "text":
         case "hidden":
         case "submit":
         case "number":
         case "button":
         case "password":
         case "checkbox":
         case "readonly":
         case "fileold":
         case "color":
             $JS = "";
             if ($this->type == "radio1") {
                 $this->type = "radio";
             }
             if ($this->type == "fileold") {
                 $this->type = "file";
             }
             if ($this->isDisplayMode) {
                 if ($this->type == "checkbox") {
                     return Util::catchParser($this->value);
                 }
                 if ($this->type == "hidden") {
                     return "";
                 }
                 if ($this->type == "password") {
                     return str_repeat("*", mb_strlen($this->value));
                 }
                 return $this->value . "";
             }
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 if ($this->type == "checkbox") {
                     $this->onchange = "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 } else {
                     $this->onfocus .= " oldValue = this.value;";
                     $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                     $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
                 if ($this->type == "date") {
                     $this->onchange .= "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
             }
             $cal = "";
             $B2 = "";
             if ($this->type == "date") {
                 if ($this->id == null) {
                     $this->id = rand(10000, 90000);
                 }
                 $cal = new Button("Kalender anzeigen", "calendar", "iconic");
                 $cal->onclick("\$j('#{$this->id}').focus();");
                 $cal->style("float:right;");
                 $JS = "<script type=\"text/javascript\">\$j('#{$this->id}').datepicker();</script>";
                 $this->type = "text";
             }
             $value = "value=\"" . htmlspecialchars($this->value) . "\"";
             if ($this->type == "checkbox") {
                 $value = $this->value == "1" ? "checked=\"checked\"" : "";
             }
             $data = "";
             foreach ($this->data as $k => $v) {
                 $data .= " data-{$k}=\"{$v}\"";
             }
             if ($this->autocomplete != null) {
                 if ($this->id == null) {
                     $this->id = $this->name;
                 }
                 /*$this->onfocus .= " ACInputHasFocus=true; AC.start(this);";
                 		$this->onblur .= " ACInputHasFocus = false; AC.end(this);";
                 		$this->onkeyup .= " AC.update(event.keyCode, this, '".$this->autocomplete[0]."');";*/
                 $this->autocompleteBrowser = false;
                 $cal = $this->autocomplete[5];
                 #new Button("Suche", "./images/i2/details.png");
                 $cal->onclick("\$('{$this->id}').style.display = ''; \$('{$this->id}').value = ''; \$('{$this->id}').focus();");
                 if ($cal->getStyle() == "") {
                     $cal->style("float:right;");
                 }
                 if ($this->autocomplete[4] != null) {
                     $B2 = $this->autocomplete[4];
                     $B2->style("float:right;margin-left:5px;");
                     if (strpos($this->style, "width") === false) {
                         $this->style .= "width:80%";
                     }
                 } else {
                     if (strpos($this->style, "width") === false) {
                         $this->style .= "width:90%";
                     }
                 }
                 if ($this->autocomplete[1] == null) {
                     $cal->onclick("\$('{$this->id}Display').style.display = ''; \$('{$this->id}Display').value = ''; \$('{$this->id}').value = ''; \$('{$this->id}Display').focus();");
                     $IN = new HTMLInput($this->name, "hidden", htmlspecialchars($this->value));
                     $IN->id($this->name);
                     if ($this->onchange) {
                         $IN->onchange($this->onchange);
                         $this->onchange = "";
                     }
                     $JS .= $IN;
                     $this->autocomplete[1] = "function(selection){ if(!selection) return false; var oldVal = \$j('#{$this->id}').val(); \$j('#{$this->id}').val(selection.value); if(\$j('#{$this->id}').val() != oldVal) \$j('#{$this->id}').trigger('change'); \$('{$this->id}Display').value = selection.label; return false; }";
                     if ($this->value != "") {
                         $C = substr($this->autocomplete[0], 1) . "GUI";
                         $C = new $C($this->value);
                         $value = "value=\"" . htmlspecialchars($C->ACLabel($this->value, is_array($this->autocomplete[3]) ? $this->autocomplete[3] : array($this->autocomplete[3]))) . "\"";
                     }
                     $this->onkeyup .= "if(\$j('[name={$this->name}Display]').val() == '') {  \$j('[name={$this->name}]').val(''); } ";
                     $this->id .= "Display";
                     $this->name .= "Display";
                     $this->onkeyup .= "\$j('[name={$this->name}]').val(this.value);";
                 }
                 $JS .= OnEvent::script("var OnSelectCallback{$this->id} = " . $this->autocomplete[1] . "; \$j(\"input#{$this->id}\").autocomplete({\n\t\t\t\t\t\tsource: function(request, response){ \n\t\t\t\t\t\t\t " . OnEvent::rme($this->autocomplete[0], "getACData", array("'{$this->name}'", "request.term", is_array($this->autocomplete[3]) ? "'" . json_encode($this->autocomplete[3]) . "'" : $this->autocomplete[3]), "function(transport){ response(jQuery.parseJSON(transport.responseText)); }") . "\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item, event); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; },\n\t\t\t\t\t\tchange: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item, event); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; }\n\t\t\t\t\t}).data(\"ui-autocomplete\")._renderItem = function( ul, item ) {\n\t\t\t\t\t\treturn \$j( \"<li>\" )\n\t\t\t\t\t\t\t.data( \"item.ui-autocomplete\", item )\n\t\t\t\t\t\t\t.append( \"<a>\" + item.label + (item.description ? \"<br /><small>\"+item.description+\"</small>\" : \"\")+\"</a>\" )\n\t\t\t\t\t\t\t.appendTo( ul );\n\t\t\t\t\t};");
             }
             return "{$B2}{$cal}<input\n\t\t\t\t\t" . ($this->maxlength != null ? " maxlength=\"{$this->maxlength}\"" : "") . "\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\t" . (!$this->autocompleteBrowser ? "autocomplete=\"off\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onclick != null ? "onclick=\"{$this->onclick}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeydown != null ? "onkeydown=\"{$this->onkeydown}\"" : "") . "\n\t\t\t\t\t" . ($this->tabindex != null ? "tabindex=\"{$this->tabindex}\"" : "") . "\n\t\t\t\t\t" . ($this->title != null ? "title=\"{$this->title}\"" : "") . "\n\t\t\t\t\t" . ($this->isSelected ? "checked=\"checked\"" : "") . "\n\t\t\t\t\t" . ($this->type == "file" ? "size=\"1\"" : "") . "\n\t\t\t\t\t" . ($this->type == "readonly" ? "readonly=\"readonly\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t{$data}\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\ttype=\"" . ($this->type != "readonly" ? $this->type : "text") . "\"\n\t\t\t\t\t" . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . "\n\t\t\t\t\t{$value} />{$this->requestFocus}{$JS}";
             break;
         case "option":
             $data = "";
             foreach ($this->data as $k => $v) {
                 $data .= " data-{$k}=\"{$v}\"";
             }
             return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " {$data} " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>";
             break;
         case "optgroup":
             $html = "<optgroup label=\"" . htmlentities($this->name) . "\">";
             foreach ($this->options as $k => $v) {
                 if (is_object($v)) {
                     $v->isSelected(false);
                     if ($this->parentValue == $k or $v->getValue() == $this->parentValue) {
                         $v->isSelected(true);
                     }
                 }
                 $html .= $v;
             }
             $html .= "</optgroup>";
             return $html;
             break;
         case "radio":
             $html = "";
             foreach ($this->options as $k => $v) {
                 $html .= "<div style=\"margin-bottom:5px;\"><input name=\"{$this->name}\" value=\"{$k}\" " . ($k == $this->value ? "checked=\"checked\"" : "") . " style=\"float:left;margin-right:5px;\" type=\"radio\">{$v}</div>";
             }
             return $html;
             break;
         case "select":
         case "select-multiple":
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             if ($this->type == "select-multiple") {
                 $values = trim($this->value) != "" ? explode(";:;", $this->value) : array();
             }
             if ($this->isDisplayMode) {
                 return is_object($this->options[$this->value]) ? $this->options[$this->value]->__toString() : $this->options[$this->value];
             }
             if ($this->multiEditOptions != null) {
                 $this->onchange .= "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             $html = "<select " . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . " " . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . " " . ($this->size ? "size=\"{$this->size}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->type == "select-multiple" ? " multiple=\"multiple\"" : "") . "" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . " name=\"{$this->name}\" " . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">";
             if ($this->options != null and is_array($this->options)) {
                 foreach ($this->options as $k => $v) {
                     if (!is_object($v)) {
                         if ($this->type == "select") {
                             $isThisIt = $this->value == $k;
                             if ($this->value . "" === "" and $k . "" === "0") {
                                 $isThisIt = false;
                             }
                         } else {
                             $isThisIt = in_array($k, $values);
                         }
                         $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>";
                     } else {
                         if ($v->getType() == "optgroup") {
                             $v->parentValue($this->value);
                         }
                         $v->isSelected(false);
                         if ($this->value == $k or $v->getValue() == $this->value) {
                             $v->isSelected(true);
                         }
                         $html .= $v;
                     }
                 }
             }
             $html .= "</select>";
             return $html;
             break;
     }
 }
コード例 #10
0
ファイル: CCAuftrag.class.php プロジェクト: nemiah/trinityDB
 public function getAuftrag($data)
 {
     $Beleg = new GRLBM($data["GRLBMID"]);
     #$this->createAuftrag(new Adresse(1), "W");
     $Auftrag = new Auftrag($Beleg->A("AuftragID"));
     $Adresse = new Adresse($Auftrag->A("AdresseID"));
     $BCheckK = "";
     if (Session::isPluginLoaded("mklickTel")) {
         $BCheckK = new Button("Adresse mit klickTel prüfen", "compass", "iconic");
         $BCheckK->style("float:right;font-size:30px;margin-right:15px;");
         $BCheckK->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressKlickTel', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
         $BCheckK->id("BCheckKT");
         Aspect::joinPoint("modButtonKlickTel", $this, __METHOD__, array($BCheckK, $Auftrag));
     }
     $BUpdate = new Button("Adresse ändern", "pen_alt2", "iconic");
     $BUpdate->style("float:right;font-size:30px;margin-right:15px;");
     $BUpdate->onclick("CustomerPage.popup('Adresse ändern', 'alterAddress', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
     $BCheckG = new Button("Adresse mit Google prüfen", "compass", "iconic");
     $BCheckG->style("float:right;font-size:30px;");
     $BCheckG->onclick("CustomerPage.popup('Adressprüfung', 'checkAddressGoogle', {AdresseID: {$Adresse->getID()}, GRLBMID: {$data['GRLBMID']}}, {modal: true, width: 500, resizable: false, position: ['center', 40]});");
     $BCheckG->id("BCheckG");
     Aspect::joinPoint("modButtonGoogle", $this, __METHOD__, array($BCheckG, $Auftrag));
     $TAdresse = new HTMLTable(2, "Kundenadresse");
     $TAdresse->setColWidth(1, 26);
     $TAdresse->setTableStyle("width:100%;");
     $TAdresse->addRow(array(new Button("Adresse", "home", "iconic"), $BCheckG . $BCheckK . $BUpdate . $Adresse->getHTMLFormattedAddress()));
     $TAdresse->setColStyle(1, "vertical-align:top;");
     $TPosten = new HTMLTable(7, "Auftragspositionen");
     $TPosten->setTableStyle("width:100%;");
     #$TPosten->addColStyle(3, "text-align:right;");
     $TPosten->addColStyle(4, "text-align:right;");
     $TPosten->addColStyle(5, "text-align:right;");
     $TPosten->addColStyle(6, "text-align:right;color:grey;");
     $TPosten->setColWidth(1, 26);
     $TPosten->setColWidth(2, 80);
     $TPosten->setColWidth(4, 80);
     $TPosten->setColWidth(5, 80);
     $TPosten->setColWidth(6, 80);
     $TPosten->setColWidth(7, 20);
     $AC = anyC::get("Posten", "GRLBMID", $Beleg->getID());
     $AC->addOrderV3("PostenID");
     $i = 0;
     $O = new Button("Positionen", "list", "iconic");
     while ($P = $AC->getNextEntry()) {
         $B = new Button("Position löschen", "trash_stroke", "iconic");
         $B->onclick("CustomerPage.rme('delPosten', {PostenID: '" . $P->getID() . "'}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
         $I = new HTMLInput("mwst", "text", Util::CLNumberParserZ($P->A("menge")));
         $I->style("text-align:right;width:80px;");
         $I->onEnter("\$j(this).trigger('blur');");
         $I->onblur("CustomerPage.rme('setMenge', {PostenID: '" . $P->getID() . "', menge: this.value}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
         $TPosten->addRow(array($i == 0 ? $O : "", $I, $P->A("name"), Util::CLNumberParserZ($P->A("preis")), Util::CLNumberParserZ($P->A("menge") * $P->A("preis")), Util::CLNumberParserZ($P->A("mwst")) . "%", $B));
         $i++;
     }
     if ($AC->numLoaded() == 0) {
         $TPosten->addRow(array($O, "Bitte fügen Sie einen Artikel hinzu."));
         $TPosten->addRowColspan(2, 6);
         $TPosten->setColWidth(2, "100%");
         $TPosten->setColStyle(2, "text-align:left;");
     }
     $TSumme = new HTMLTable(3);
     $TSumme->setTableStyle("width:100%;border-top:1px solid #AAA;margin-top:30px;");
     $TSumme->setColWidth(1, 26);
     $TSumme->addColStyle(3, "text-align:right;");
     $TSumme->addRow(array("", "Netto: <b>" . Util::CLFormatCurrency($Beleg->A("nettobetrag") * 1, true) . "</b>", "Brutto: <b>" . Util::CLFormatCurrency($Beleg->A("bruttobetrag") * 1, true) . "</b>"));
     $IZahlungsart = new HTMLInput("zahlungsart", "select", $Beleg->A("GRLBMpayedVia"), GRLBM::getPaymentVia(null, array("transfer", "debit")));
     $IZahlungsart->onchange("if(this.value == 'debit') \$('#rowZahlungsart').show(); else \$('#rowZahlungsart').hide(); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IBankleitzahl = new HTMLInput("bankleitzahl", "text", $Beleg->A("GRLBMBankleitzahl"));
     $IBankleitzahl->placeholder("Bankleitzahl");
     $IBankleitzahl->style("margin-top:10px;text-align:right;width:130px;");
     $IBankleitzahl->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     $IKontonummer = new HTMLInput("kontonummer", "text", $Beleg->A("GRLBMKontonummer"));
     $IKontonummer->placeholder("Kontonummer");
     $IKontonummer->style("margin-top:10px;text-align:right;margin-left:10px;width:130px;");
     $IKontonummer->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveKontodaten, 300);");
     #$IBIC = new HTMLInput("bic");
     #$IIBAN = new HTMLInput("iban");
     $BCheck = new Button("Prüfung", "question_mark", "iconic");
     $BCheck->id("ktoCheck");
     $BCheck->style("margin-left:8px;");
     $TZahlungsart = new HTMLTable(2, "Zahlungsart");
     $TZahlungsart->setTableStyle("width:100%;");
     $TZahlungsart->setColWidth(1, 26);
     $TZahlungsart->addRow(array(new Button("Zahlungsart", "pin", "iconic"), $IZahlungsart));
     $TZahlungsart->addRowColspan(2, 2);
     $TZahlungsart->addCellStyle(1, "vertical-align:top;");
     $TZahlungsart->addRow(array("", $IBankleitzahl . " " . $IKontonummer . "{$BCheck} <div id=\"bankMessage\" style=\"margin-top:6px;\">&nbsp;</div>"));
     $TZahlungsart->setRowID("rowZahlungsart");
     if ($Beleg->A("GRLBMpayedVia") != "debit") {
         $TZahlungsart->addRowStyle("display:none;");
     } else {
         echo OnEvent::script("CustomerPage.saveKontodaten();");
     }
     $IBemerkung = new HTMLInput("bemerkung", "textarea", $Beleg->A("textbausteinUnten"));
     $IBemerkung->style("width:100%;height:100px;margin-top:40px;");
     $IBemerkung->placeholder("Bemerkungen");
     #$IBemerkung->onblur("");
     $IBemerkung->onkeyup("if(CustomerPage.timeout != null) window.clearTimeout(CustomerPage.timeout); CustomerPage.timeout = window.setTimeout(CustomerPage.saveBemerkung, 300);");
     $TZahlungsart->addRow(array(new Button("Bemerkung", "document_alt_stroke", "iconic"), $IBemerkung));
     #$TSumme->addRowColspan(2, 2);
     $TZahlungsart->addCellStyle(1, "vertical-align:top;padding-top:40px;");
     $IOK = new Button("Abschließen");
     $IOK->className("submitFormButton");
     $IOK->onclick("\$(window).unbind('beforeunload'); document.location.href='?CC=Auftrag&page=1';");
     $IC = new Button("Abbrechen");
     $IC->className("submitFormButton");
     $IC->style("background-color:#DDD;color:grey;float:none;");
     $IC->onclick("\$(window).unbind('beforeunload'); CustomerPage.rme('cancelAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(){ document.location.href='?CC=Auftrag&page=2'; });");
     $TZahlungsart->addRow(array("", $IC . $IOK));
     $TZahlungsart->addCellStyle(2, "padding-top:50px;");
     #$TZahlungsart->addCellStyle(3, "padding-top:50px;");
     $html = "<h1>Auftrag</h1>\n\t\t\t\t{$TAdresse}\n\t\t\t\t{$TPosten}\n\t\t\t\t{$TSumme}\n\t\t\t\t{$TZahlungsart}";
     return $html . OnEvent::script("\n\t\t\tCustomerPage.timeout = null;\n\t\t\tCustomerPage.saveBemerkung  = function(){ CustomerPage.rme('setBemerkung', {GRLBMID: {$data['GRLBMID']}, bemerkung: \$('textarea[name=bemerkung]').val() }); };\n\t\t\tCustomerPage.saveKontodaten = function(){ CustomerPage.rme('setKontodaten', {\n\t\t\t\tGRLBMID: {$data['GRLBMID']},\n\t\t\t\tzahlungsart: \$('select[name=zahlungsart]').val(),\n\t\t\t\tkontonummer: \$('input[name=kontonummer]').val(),\n\t\t\t\tbankleitzahl: \$('input[name=bankleitzahl]').val()\n\t\t\t}, function(t){ \$('#bankMessage').html(t); }); };");
 }
コード例 #11
0
ファイル: WeckerGUI.class.php プロジェクト: nemiah/fheME
 public static function parserFallback($w, $l, $E)
 {
     T::D("Wecker");
     $I = new HTMLInput("WeckerFallback", "text", $w);
     $I->style("margin-top:10px;");
     $IF = new HTMLInput("WeckerFallbackUpload", "file");
     $IF->onchange(OnEvent::rme($E, "processUpload", array("fileName"), "\$j('[name=WeckerFallback]').val(fileName).trigger('change');"));
     return $IF . $I . "<br /><small style=\"color:grey;\">" . T::_("Diese Datei wird abgespielt, wenn nach 15 Sekunden kein Internetradio geladen werden konnte. Bitte beachten Sie, dass nicht alle Browser <a href=\"http://en.wikipedia.org/wiki/HTML5_Audio\" target=\"_blank\">alle Formate abspielen können</a>.") . "</small>";
 }
コード例 #12
0
ファイル: TodoGUI.class.php プロジェクト: nemiah/fheME
 public static function dayFromParser($w, $l, $E)
 {
     $I = new HTMLInput("TodoFromDay", "text", $w);
     $I->style("width:90px;text-align:right;");
     $I->id("TodoFromDay123");
     $I->onchange("\$('editTodoGUI').TodoTillDay.value = \$('editTodoGUI').TodoFromDay.value;");
     $T = self::timeTillParser($E->A("TodoFromTime"), "TodoFromTime", $E);
     return "<div style=\"display:inline-block;width:120px;\"><span style=\"color:grey;\">am</span> " . $I . "</div> " . $T . "<script type=\"text/javascript\">\$j('#TodoFromDay123').datepicker(); \$j('#TodoFromTimeDisplay').parent().mouseenter(function(){ \$j('#TodoFromTimeTable').show(); }).mouseleave(function(){ \$j('#TodoFromTimeTable').hide(); });</script>";
 }
コード例 #13
0
ファイル: mTodoGUI.class.php プロジェクト: nemiah/fheME
 public static function parserDayOfWeek($value)
 {
     $I = new HTMLInput("TodoRepeatDayOfWeek", "hidden", $value);
     $checked = array();
     if ($value != "") {
         $checked = explode(",", $value);
     }
     $Is = "";
     for ($i = 0; $i < 7; $i++) {
         $I2 = new HTMLInput("DOW{$i}", "checkbox", in_array($i, $checked) ? "1" : "0");
         $I2->style("float:left;margin:0px;margin-right:5px;");
         $I2->onchange("var selectedDOW = ''; \$j('.DOWSelector:checked').each(function(k, v){ selectedDOW += (selectedDOW == '' ? '' : ',')+\$j(v).prop('name').replace('DOW', '');}); \$j('[name=TodoRepeatDayOfWeek]').val(selectedDOW);");
         $I2->setClass("DOWSelector");
         $Is .= "<div style=\"margin-bottom:5px;\">" . $I2 . Util::CLWeekdayName($i) . "</div>";
     }
     return $Is . $I;
 }