public function getHTML($id) { #$_SESSION["BPS"]->unregisterClass(get_class($this)); $defaultAnsicht = "monat"; if (Applications::activeApplication() == "personalKartei") { $defaultAnsicht = "jahr"; } $ansicht = mUserdata::getUDValueS("KalenderAnsicht", $defaultAnsicht); #$ansicht = $ansicht->getUDValue("KalenderAnsicht"); #if($ansicht == null) $ansicht = "monat"; $display = mUserdata::getUDValueS("KalenderDisplay" . ucfirst($ansicht), "0"); $BThis = new Button("", "arrow_down", "iconicG"); $BThis->style("float:left;margin-top:-6px;margin-right:5px;"); $Calendars = ""; Registry::reset("Kalender"); while ($C = Registry::callNext("Kalender", "categories")) { if (!$C) { continue; } foreach ($C as $tab) { $Calendars .= "<div onclick=\"{$tab->onclick}\">" . ($tab->isCurrent ? $BThis : "") . " {$tab->label}</div>"; } } // <editor-fold defaultstate="collapsed" desc="styles"> $html = "\n\t\t\n\t\t<style type=\"text/css\">\n\t\t.Day {\n\t\t\t-moz-user-select:none;\n\t\t\tborder-left:1px solid #EEE;\n\t\t\tborder-bottom:1px solid #EEE;\n\t\t}\n\t\t\n\t\t/*.Day:hover {\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tpadding:2px;\n\t\t}*/\n\n\t\t.dayOptions {\n\t\t\tdisplay:none;\n\t\t}\n\n\t\t.Day:hover .dayOptions {\n\t\t\tdisplay:inline;\n\t\t}\n\n\t\t.Termin {\n\t\t\tposition:relative;\n\t\t\tleft:44px;\n\t\t\tcursor:pointer;\n\t\t\twidth:150px;\n\t\t\tfloat:left;\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tmargin-right:3px;\n\t\t}\n\t\t\n\t\t.KalenderButton {\n\t\t\topacity:0.5;\n\t\t}\n\t\t\n\t\t.KalenderButton:hover {\n\t\t\topacity:1;\n\t\t}\n\t\t\n\t\t.KalenderUser {\n\t\t\tmargin-left:10px;\n\t\t}\n\t\t\n\t\t.KalenderUser div {\n\t\t\tpadding:10px;\n\t\t\tpadding-top:10px;\n\t\t\tpadding-bottom:5px;\n\t\t\tdisplay:inline-block;\n\t\t\tmargin-right:20px;\n\t\t\tcursor:pointer;\n\t\t\tmin-width:150px;\n\t\t}\n\t\t\n\t\t.cellHeight {\n\t\t}\n\t\t\n\t\t.ui-datepicker {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t#contentScreen tr:hover {\n\t\t\tbackground-color:inherit;\n\t\t}\n\n\t\t#calendar1stMonth .ui-datepicker-prev, #calendar1stMonth .ui-datepicker-next/*,\n\t\t#calendar2ndMonth .ui-datepicker-prev, #calendar2ndMonth .ui-datepicker-next */{\n\t\t\tdisplay:none;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-widget-content,\n\t\t#calendar2ndMonth .ui-widget-content, \n\t\t#calendar2ndMonth .ui-widget-content .ui-state-default,\n\t\t#calendar1stMonth .ui-widget-content .ui-state-default {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-datepicker-header,\n\t\t#calendar2ndMonth .ui-datepicker-header {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t/*@media only screen and (max-height: 820px) {\n\t\t\t.cellHeight {\n\t\t\t\theight:55px;\n\t\t\t}\n\t\t}*/\n\t\t</style>"; // </editor-fold> $BLeft = new Button("Zurück", "back", "icon"); $BLeft->rmePCR("mKalender", "", "setDisplay", $display - 1, "contentManager.loadFrame('contentScreen','mKalender');"); $BLeft->style("margin-right:10px;"); $BRight = new Button("Weiter", "navigation", "icon"); $BRight->rmePCR("mKalender", "", "setDisplay", $display + 1, "contentManager.loadFrame('contentScreen','mKalender');"); $BRight->style("margin-right:10px;"); $BToday = new Button("Aktuelles Datum", "down", "icon"); $BToday->rmePCR("mKalender", "", "setToday", '', "contentManager.loadFrame('contentScreen','mKalender');"); $BToday->style("margin-right:10px;"); $BJahr = new Button("Jahr", "./ubiquitous/Kalender/month.png", "icon"); $BJahr->rmePCR("mKalender", "", "setView", "jahr", "contentManager.loadFrame('contentScreen','mKalender');"); $BJahr->style("margin-right:10px;" . ($ansicht != "jahr" ? "opacity:0.5;" : "")); $BJahr->id("jahrButton"); $BMonat = new Button("Monat", "./ubiquitous/Kalender/month.png", "icon"); $BMonat->rmePCR("mKalender", "", "setView", "monat", "contentManager.loadFrame('contentScreen','mKalender');"); $BMonat->style("margin-right:10px;" . ($ansicht != "monat" ? "opacity:0.5;" : "")); $BMonat->id("monatButton"); $BWoche = new Button("Woche", "./ubiquitous/Kalender/workweek.png", "icon"); $BWoche->rmePCR("mKalender", "", "setView", "woche", "contentManager.loadFrame('contentScreen','mKalender');"); $BWoche->style("margin-right:10px;" . ($ansicht != "woche" ? "opacity:0.5;" : "")); $BWoche->id("wocheButton"); $BTag = new Button("Tag", "./ubiquitous/Kalender/day.png", "icon"); $BTag->rmePCR("mKalender", "", "setView", "tag", "contentManager.loadFrame('contentScreen','mKalender');"); $BTag->style("margin-right:10px;" . ($ansicht != "tag" ? "opacity:0.5;" : "")); $BTag->id("tagButton"); if (Applications::activeApplication() == "personalKartei") { $BTag = ""; $BWoche = ""; $BMonat = ""; } if (Applications::activeApplication() != "personalKartei") { $BJahr = ""; } $ST = new HTMLTable(1); $ST->setColClass(1, ""); #$ST->setTableStyle("width:40px;margin:0px;margin-right:-215px;float:right;/*margin-right:-50px;margin-top:95px;*/"); $newWindow = new Button("Kalender in neuem Fenster öffnen", "new_window", "iconicL"); $newWindow->style("margin-right:10px;"); $newWindow->newSession("Mail", Applications::activeApplication(), "mKalender", "Kalender"); if (Session::physion()) { $newWindow = ""; } $reminder = ""; if (Session::isPluginLoaded("mReminder")) { $reminder = Reminder::getButton(); $reminder->style("margin-right:10px;"); } $ST->addRow("<div id=\"calendar1stMonth\"></div>"); $ST->addRow("<div id=\"calendar2ndMonth\"></div>"); $TC = "KalenderView" . ucfirst($ansicht); $TC = new $TC(); $TCalendars = "<div>"; if (trim($Calendars) != "") { $TCalendars .= "<div class=\"KalenderUser\">" . $Calendars . "</div>"; } $TCalendars .= "</div>"; $pCalButton = ""; if (Session::isPluginLoaded("mpCal")) { $pCalButton = pCal::getTBButton(); $pCalButton->type("icon"); $pCalButton->style("margin-right:10px;"); } $GoogleButton = ""; $GoogleDLButton = ""; if (Session::isPluginLoaded("mGoogle")) { $GoogleButton = LoginData::getButtonU("GoogleAccountUserPass", "Google-Daten bearbeiten", "./ubiquitous/Google/google.png"); $GoogleButton->type("icon"); $GoogleButton->style("margin-right:10px;"); $GoogleDLButton = new Button("Daten herunterladen", "./ubiquitous/Google/googleDL.png", "icon"); $GoogleDLButton->popup("", "Daten herunterladen", "Google", "-1", "syncByDateRange", array("'" . date("Y-m-d", $TC->getFirst()) . "'", "'" . date("Y-m-d", $TC->getLast()) . "'")); $GoogleDLButton->style("margin-right:10px;"); } $xCalButton = ""; if (Session::isPluginLoaded("mxCal")) { $xCalButton = xCal::getButton(); $xCalButton->style("margin-right:10px;"); } $BShare = new Button("Kalender teilen", "fork", "iconicL"); $BShare->popup("", "Kalender teilen", "mKalender", "-1", "share"); $BShare->style("margin-right:10px;"); #$AWVButton = new Button("Müllabfuhr-Daten herunterladen", "trash_stroke", "iconicL"); #$AWVButton->popup("", "Müllabfuhr-Daten", "mKalender", "-1", "downloadTrashData"); $AWVButton = ""; $ST->addRow($pCalButton . $GoogleButton . $GoogleDLButton); $html .= "\n\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"padding-top:30px;padding-bottom:15px;padding-left:0px;\">\n\t\t\t\t\t{$newWindow}{$BShare}{$AWVButton}{$xCalButton}{$reminder}\n\t\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<div style=\"margin-right:270px;\">\n\t\t<div id=\"KalenderTitle\" class=\"prettyTitle\">\n\t\t\t\n\t\t\t<span style=\"float:right;\">\n\t\t\t\t{$BLeft}{$BToday}{$BRight}\n\t\t\t</span>\n\t\t\t<div style=\"float:right;margin-right:100px;\">{$BTag}{$BWoche}{$BMonat}{$BJahr}</div>\n\t\t\t" . $TC->getTitle() . "\n\t\t</div>\n\t\t</div>\n\t\t<div id=\"KalenderAuswahl\">\n\t\t\t{$TCalendars}\n\t\t</div>\n\t\t" . $TC->getHeader() . "\n\t\t<div id=\"KalenderWrapper\" style=\"overflow:auto;\">\n\t\t\t" . ($ansicht != "jahr" ? "\n\t\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"height:23px;\"></div>{$ST}\n\t\t\t</div>" : "") . "\n\t\t\t<div style=\"" . ($ansicht != "jahr" ? "margin-right:270px;" : "") . "\">\n\n\t\t\t" . $TC->getTable($this) . "\n\t\t\t</div>\n\t\t</div>"; $nextMonths = new Datum(); $nextMonths->setToMonth1st(); $thisMonth = $nextMonths->time(); $nextMonths->addMonth(); $nextMonth = $nextMonths->time(); $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar1stMonth').datepicker({ minDate: '" . date("d.m.Y", $thisMonth) . "'" . ($TC->getCurrent()->time() < $nextMonth ? ",defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true, showOtherMonths: true, onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t\t\t\n\t\t\$j('.KalenderUser div[class!=backgroundColor1]').hover(function(){ \$j(this).addClass('backgroundColor2'); }, function(){ \$j(this).removeClass('backgroundColor2'); });\n\t\tfitKalender();\n\t\t\t\n\t\t\$j(window).resize(function() {\n\t\t\tfitKalender();\n\t\t});\n\t\t\n\t\t});\n\t\t\n\t\tfunction fitKalender(){\n\t\t\tif(!\$j('#KalenderTitle').length)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t//console.log(\$j('#KalenderTitle').outerHeight());\n\t\t\t//console.log(\$j('#KalenderAuswahl').outerHeight());\n\t\t\tvar height = (contentManager.maxHeight() - \$j('#KalenderAuswahl').outerHeight() - \$j('#KalenderTitle').outerHeight() - \$j('#KalenderHeader').outerHeight()) + 4;\n\t\t\tvar width = contentManager.maxWidth();\n\t\t\t\n\t\t\t\$j('#KalenderWrapper').css('height', height);\n\t\t\t\$j('#KalenderWrapper').css('width', width);\n\n\t\t\tvar cellHeight = (height - \$j('#KalenderTable tr:first th').parent().outerHeight()) / (\$j('#KalenderTable tr').length - " . (($ansicht == "monat" or $ansicht == "jahr") ? "1" : "0") . ") - 1;\n\t\t\t\$j('.cellHeight').css('height', cellHeight+'px');\n\t\t\t\$j('.innerCellHeight').css('height', (cellHeight - \$j('.innerCellTitle:visible').outerHeight())+'px');\n\t\t\t\n\t\t\tif(\$j('#KalenderHeader').length > 0){\n\t\t\t\t//console.log(\$j('#KalenderHeader tr:first th'));\n\t\t\t\t\$j('#KalenderTable tr:first td').each(function(k, v){\n\t\t\t\t\t\n\t\t\t\t\t\$j(\$j('#KalenderHeader tr:first th')[k]).css('width', \$j(v).width());\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tif(\$j('#tagDiv').length) {\n\t\t\t\t\$j('#tagDiv').css('width', \$j('#KalenderTable tr').width()+'px');\n\t\t\t\t\$j('#tagDiv').animate({scrollTop: 7*40}, 0);\n\t\t\t\tvar pos = \$j('#tagDiv').offset();\n\t\t\t\tpos.position = 'absolute';\n\n\t\t\t\t\$j('#tagDiv').css(pos)\n\t\t\t}\n\t\t}") . "\n\t\t<style type=\"text/css\">\n\t\t\t" . ($TC->getCurrent()->time() < $thisMonth ? "#calendar1stMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t" . ($TC->getCurrent()->time() < $nextMonth ? "#calendar2ndMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t.ui-datepicker-week-col { color:grey; text-align:left; }\n\t\t\ttr td.ui-datepicker-week-col {text-align:left;font-size:10px; }\n\t\t\t/*.ui-datepicker-week-end { background-color:#DDD; }*/\n\t\t</style>"; $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar2ndMonth').datepicker({ minDate: '" . date("d.m.Y", $nextMonth) . "'" . ($TC->getCurrent()->time() >= $nextMonth ? ", defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true, showOtherMonths: true, onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t});"); return $html; }
public function getAdresse($Beleg) { $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]});"); if (!$this->showButtonEditAddress) { $BUpdate = ""; } $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"); if (!$this->showButtonCheckWithGoogle) { $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;"); return $TAdresse; }
public function getActions() { $DBFilePath = Util::getRootPath() . "system/DBData/Installation.pfdb.php"; $File = new File($DBFilePath); $File->loadMe(); $ASetup = "contentManager.loadPlugin('contentRight', 'mInstallation');"; $B = new Button("Erneut prüfen", "./plugins/Installation/recheck.png", "icon"); $B->onclick($ASetup); $B->id("recheckButton"); $hasDBConnection = false; try { $Version = mUserdata::getGlobalSettingValue("DBVersion", false); $hasDBConnection = true; } catch (Exception $e) { } if (!$File->A("FileIsWritable") and !$hasDBConnection) { $message = "<p style=\"padding:20px;font-size:20px;color:#555;text-align:center;\">" . $_SESSION["applications"]->getActiveApplication() . " ist auf diesem Server noch nicht installiert.</p>"; $html = "<div style=\"width:600px;margin:auto;line-height:1.5;\">\n\t\t\t\t<p>\n\t\t\t\t<img src=\"./images/navi/restrictions.png\" style=\"float:left;margin-right:10px;\"/>\n\t\t\t\tDie Datei <code>/system/DBData/Installation.pfdb.php</code> ist <b>nicht beschreibbar</b>.</p>\n\t\t\t\t\n\t\t\t\t<p style=\"margin-top:20px;\">Machen Sie die Datei mit einem FTP-Programm beschreibbar.<br />\n\t\t\t\tKlicken Sie dazu mit der rechten Maustaste auf die Datei auf dem Server, wählen Sie <b>\"Eigenschaften\"</b>, und geben Sie den Modus <b>666</b> an, damit sie durch den Besitzer, die Gruppe und alle Anderen les- und beschreibbar ist.</p>\n\t\t\t\t<div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">\n\t\t\t\t" . $this->box($B, $ASetup, "Erneut<br />prüfen") . "\n\t\t\t\t</div>\n\t\t\t</div>"; die($message . $html); } $containers = 0; $message = ""; $html = ""; $hidden = "<a class=\"hiddenLink\" href=\"#\" onclick=\"" . OnEvent::popup("Fehlerausgabe", "mInstallation", "-1", "updateAllTables", array("'1'")) . "return false;\"> </a>"; try { $Version = mUserdata::getGlobalSettingValue("DBVersion", false); if ($Version !== false and $Version == Phynx::build()) { $message = "<p style=\"padding:20px;font-size:20px;color:#555;text-align:center;\">Ihre Datenbank ist auf dem aktuellen Stand.{$hidden}</p>"; } if ($Version === false or $Version != Phynx::build()) { $message = "<p style=\"padding:10px;font-size:20px;color:#555;margin-bottom:40px;text-align:center;\">Ihre Datenbank muss aktualisiert werden.</p>"; $ASetup = "\$j('#updateButton').attr('src', './plugins/Installation/bigLoader.png'); " . OnEvent::rme($this, "updateAllTables", "", "function(transport){ contentManager.contentBelow(transport.responseText); }"); $B = new Button("Datenbank aktualisieren", "./plugins/Installation/aktualisieren.png", "icon"); $B->onclick($ASetup); $B->id("updateButton"); $html = $this->box($B, $ASetup, "Die Datenbank<br />aktualisieren", "", $hidden); $html = "<div style=\"width:350px;margin:auto;padding-bottom:40px;\">" . $html . "</div>"; } } catch (NoDBUserDataException $e) { $message = "<p style=\"padding:10px;font-size:20px;color:#555;text-align:center;color:red;\">Mit den angegebenen Datenbank-Zugangsdaten kann keine Verbindung aufgebaut werden.</p>"; echo OnEvent::script("contentManager.loadFrame('contentLeft','Installation','1');"); if (PHYNX_MAIN_STORAGE == "MySQL") { try { $DB1 = new DBStorageU(); $BN = new Button("Hinweis", "notice", "icon"); $BN->style("float:left;margin-right:10px;"); $File = new File(Util::getRootPath() . "system/connect.php"); $B = new Button("Verbindungsart umstellen", "./plugins/Installation/changedb.png", "icon"); $B->onclick($A); $B->id("changedbButton"); $A = OnEvent::rme($this, "switchDBToMySQLo", "", "function(){ Installation.reloadApp(); }"); $BR = "<p style=\"margin-top:20px;\">Verwenden Sie den Knopf unten, um die Verbindungsart auf die ältere Version umzustellen.<br />\n\t\t\t\t\t\tSie müssen sich anschließend erneut anmelden.</p>\n\t\t\t\t\t\t<div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">" . $this->box($B, $A, "Verbindungsart<br />umstellen") . "</div>"; $A = "contentManager.loadPlugin('contentRight', 'mInstallation');"; $B = new Button("Erneut prüfen", "./plugins/Installation/recheck.png", "icon"); $B->onclick($A); $B->id("recheckButton"); if (!$File->A("FileIsWritable")) { $BR = "<p style=\"margin-top:20px;\">Bitte machen Sie die Datei /system/connect.php für den Webserver beschreibbar, damit phynx auf die ältere Verbindungsart umstellen kann.<br /><br />Verwenden Sie dazu Ihr FTP-Programm. Klicken Sie mit der rechten Maustaste auf die Datei auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 666 an, damit sie durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.\n\t\t\t\t\t\t\t</p><div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">" . $this->box($B, $A, "Erneut<br />prüfen") . "</div>"; } $html = "<p style=\"margin-top:30px;\">{$BN} Möglicherweise ist die MySQLi-Erweiterung auf Ihrem Server nicht korrekt konfiguriert.</p>{$BR}"; $html = "<div style=\"width:700px;margin:auto;padding-bottom:40px;\">" . $html . "</div>"; } catch (Exception $e) { #echo "MySQL geht auch nicht!"; } } } catch (DatabaseNotFoundException $e) { $message = "<p style=\"padding:10px;font-size:20px;color:#555;text-align:center;color:red;\">Die angegebene Datenbank konnte nicht gefunden werden.</p>"; echo OnEvent::script("contentManager.loadFrame('contentLeft','Installation','1');"); } catch (TableDoesNotExistException $e) { $message = "<p style=\"padding:10px;font-size:20px;color:#555;margin-bottom:40px;text-align:center;\">Ihre Datenbank hat derzeit noch keinen Inhalt.</p>"; $ASetup = "\$j('#setupButton').attr('src', './plugins/Installation/bigLoader.png'); " . OnEvent::rme($this, "setupAllTables", "", "function(transport){ contentManager.contentBelow(transport.responseText); }"); $BSetup = new Button("Datenbank einrichten", "./plugins/Installation/setup.png", "icon"); $BSetup->onclick($ASetup); $BSetup->id("setupButton"); $hidden = "<a class=\"hiddenLink\" href=\"#\" onclick=\"" . OnEvent::popup("Fehlerausgabe", "mInstallation", "-1", "setupAllTables", array("'1'")) . "return false;\"> </a>"; $html = $this->box($BSetup, $ASetup, "Die Datenbank<br />einrichten", "", $hidden); $containers = 1; $BM = new BackupManagerGUI(); $list = $BM->getBackupsList(); $ARestore = OnEvent::popup("Backup-Manager", "BackupManager", "-1", "inPopup"); $BRestore = new Button("Datenbank wiederherstellen", "./plugins/Installation/restore.png", "icon"); $BRestore->onclick($ARestore); $BRestore->id("setupButton"); $html .= $this->box($BRestore, $ARestore, "Eine Sicherung<br />wiederherstellen", count($list) == 0 ? "color:grey;" : ""); $containers++; $html = "<div style=\"width:" . $containers * 360 . "px;margin:auto;padding-bottom:40px;\">" . $html . "</div>"; } echo "{$message}{$html}"; }
function getBrowserHTML($lineWithId = -1) { $this->texts = $this->languageClass->getBrowserTexts(); $singularLanguageClass = $this->loadLanguageClass($this->singularClass); $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $this->singularClass); $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $this->singularClass); $userHiddenFields = mUserdata::getHides($this->singularClass); $defaultTarget = "contentRight"; if ($this->displaySide != "default") { $defaultTarget = "content" . ucfirst($this->displaySide); } if ($this->singularClass == "none") { echo "collectionOf is not set. See message log for further details."; throw new CollectionOfNotSetException(); } if ($this->name == "Noname") { $_SESSION["messages"]->addMessage("There is no name set. You might use setName of HTMLGUI to do that."); } /** * ERROR-TABLE */ $errorTab = new HTMLTable(1); if (isset($_SESSION["phynx_errors"]) and $lineWithId == -1 and ($_SERVER["HTTP_HOST"] == "dev.furtmeier.lan" or strpos(__FILE__, "nemiah") !== false)) { $errorTab->addRow("\n\t\t\t\t\t<img style=\"float:left;margin-right:10px;\" src=\"./images/navi/warning.png\" />\n\t\t\t\t\t<b>Es " . (count($_SESSION["phynx_errors"]) != 1 ? "liegen" : "liegt") . " " . count($_SESSION["phynx_errors"]) . " PHP-Fehler vor:</b><br />\n\t\t\t\t\t<a href=\"javascript:windowWithRme('Util','','showPHPErrors','');\">Fehler anzeigen</a>,<br />\n\t\t\t\t\t<a href=\"javascript:rme('Util','','deletePHPErrors','','contentManager.reloadFrameRight();');\">Fehler löschen</a>"); } /** * RETURN-BUTTON */ $returnTab = new HTMLTable(1); if ($this->isSelection) { $BReturn = new Button("Auswahl\nbeenden", "back"); $BReturn->onclick("contentManager.restoreFrame('content" . ucfirst($this->displaySide) . "','selectionOverlay');"); #return "<input type=\"button\" value=\"zurück zu\n".$p2[$s[0]]."\" style=\"background-image:url(./images/navi/back.png);\" class=\"bigButton backgroundColor3\" onclick=\"loadFrameV2('contentRight','$s[0]');\" />"; $returnTab->addRow($BReturn); } /** * DELETE-BUTTON */ if ((!$this->onlyDisplayMode or $this->deleteInDisplayMode) and $userCanDelete and !$this->isSelection and $this->showDeleteButton) { $this->newColsRight["delete"] = "\n\t\t\t<span class=\"iconic trash_stroke\" onclick=\"deleteClass('" . $this->singularClass . "','%%VALUE%%', " . ($this->JSOnDelete == null ? "function() { " . ($this->displaySide == "left" ? "contentManager.reloadFrameLeft();" : "contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '%%VALUE%%') \$('contentLeft').update('');") . " }" : $this->JSOnDelete) . ",'" . str_replace("%1", $this->singularName, $this->texts["%1 wirklich löschen?"]) . "');\"></span>"; } elseif (!$userCanDelete) { $this->newColsRight["delete"] = "<img src=\"./images/i2/empty.png\" />"; } /** * EDIT-BUTTON */ if (!isset($this->newColsLeft["select"]) and (!$this->onlyDisplayMode or $this->editInDisplayMode) and $this->showEditButton) { $EB = new Button("", "./images/i2/edit.png"); $EB->type("icon"); $EB->className("editButton"); if ($this->JSOnEdit == null) { $EB->onclick("contentManager.selectRow(this); contentManager.loadFrame('contentLeft','" . $this->singularClass . "','%%VALUE%%','0');"); } else { $EB->onclick($this->JSOnEdit); } $this->newColsLeft["select"] = $EB; } $cols = count($this->showAttributes) + count($this->newColsLeft) + count($this->newColsRight); $valuesTab = new HTMLTable($cols, $lineWithId == -1 ? $this->displaySide == "left" ? $this->name : "" : null); $valuesTab->addTableClass("contentBrowser"); /*if(isset($this->newColsRight["delete"]) AND ($this->displaySide == "default" OR $this->displaySide == "right")) $valuesTab->setColClass($cols, "backgroundColor0"); if(isset($this->newColsRight["delete"]) AND $this->displaySide == "left") $valuesTab->setColClass(1, "backgroundColor0");*/ /** * QUICKSEARCH */ #$quickSearchRow = ""; if ($this->quickSearchPlugin != "" and $lineWithId == -1) { list($quickSearchRow, $BSearchInfo) = $this->getQuicksearchField(); if ($this->displaySide == "left") { $insertRow = array($quickSearchRow); for ($i = 1; $i < $cols - 1; $i++) { $insertRow[] = ""; } $insertRow[] = $BSearchInfo; $valuesTab->addRow($insertRow); $valuesTab->addRowColspan(1, $cols - 1); } else { $valuesTab->addRow(array($BSearchInfo, $quickSearchRow)); $valuesTab->addRowColspan(2, $cols - 1); } $valuesTab->addRowClass("backgroundColorHeader"); } if ($this->headerRow != null) { $valuesTab->addHeaderRow($this->headerRow); } /** * PAGE-BROWSER */ #$multiPageRow = ""; $separator = ""; $userDefinedEntriesPerPage = false; $isMultiPageMode = false; if (count($this->multiPageMode) > 0) { $isMultiPageMode = true; $this->multiPageMode[3] = $defaultTarget; if ($this->multiPageMode[2] == 0) { $userDefinedEntriesPerPage = true; #$mU = new mUserdata(); #$this->multiPageMode[2] = $mU->getUDValue("entriesPerPage{$this->multiPageMode[4]}"); #if($this->multiPageMode[2] == null) $this->multiPageMode[2] = 20; } /* if($this->multiPageMode[1] == "undefined") $this->multiPageMode[1] = 0; $pages = ceil($this->multiPageMode[0] / $this->multiPageMode[2]); if($this->multiPageMode[1] != 0) $pageLinks = "<a href=\"javascript:contentManager.loadPage('$defaultTarget', '0');\"> << </a> "; else $pageLinks = " << "; if($this->multiPageMode[1] != 0) $pageLinks .= "<a href=\"javascript:contentManager.backwardOnePage('$defaultTarget');\"> < </a> "; else $pageLinks .= " < "; if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.forwardOnePage('$defaultTarget');\"> > </a> "; else $pageLinks .= " > "; if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget',".($pages-1).");\"> >> </a> | "; else $pageLinks .= " >> | "; $start = $this->multiPageMode[1] - 3; if($start < 0) $start = 0; $end = $this->multiPageMode[1] + 3; if($end > $pages - 1) $end = $pages - 1; for($i=$start; $i<=$end; $i++) if($this->multiPageMode[1] != "$i") $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget','".$i."');\">".($i+1)."</a> "; else $pageLinks .= ($i+1)." "; $pageLinks = "".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": ".$pageLinks; */ if ($this->displaySide == "left") { $pageLinks = "<span style=\"float:right;\">" . $this->getMultiPageButtons() . "</span>"; } else { $pageLinks = $this->getMultiPageButtons(); } /*if($lineWithId == -1) $multiPageRow = " <tr> ".($userDefinedEntriesPerPage ? "<td><img class=\"mouseoverFade\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','multiPageSettings:{$this->multiPageMode[4]}','".$this->texts["Einstellungen"].":');\" /></td>" : "")." <td colspan=\"".($colspan+1+($userDefinedEntriesPerPage ? 0 : 1))."\"><input type=\"text\"onkeydown=\"if(event.keyCode == 13) loadFrameV2('".$this->multiPageMode[3]."','".$this->multiPageMode[4]."','',this.value - 1);\" style=\"width:30px;float:right;text-align:right;\" value=\"".($this->multiPageMode[1]+1)."\" onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\" />".$this->multiPageMode[0]." ".($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"])."<!--, ".$pages." ".($pages != 1 ? $this->texts["Seiten"] : $this->texts["Seite"])."--></td> </tr> <tr> <td colspan=\"$determinedNumberofCols\">".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": $pageLinks</td> </tr>"; */ if ($lineWithId == -1) { $BSettings = $this->getPageOptionsButton(); #$IPage = $this->getPageSelectionField(); #$IPage->style("width:30px;float:right;text-align:right;"); $pageOptions = $this->multiPageMode[0] . " " . ($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"]) . ", {$pageLinks}"; if (!$userDefinedEntriesPerPage) { $valuesTab->addRow(array($pageOptions)); $valuesTab->addRowColspan(1, $cols); } else { if ($this->displaySide == "left") { $insertRow = array($pageOptions); for ($i = 1; $i < $cols - 1; $i++) { $insertRow[] = ""; } $insertRow[] = $BSettings; $valuesTab->addRow($insertRow); #$valuesTab->addRow(array($pageOptions,$BSettings)); $valuesTab->addRowColspan(1, $cols - 1); } else { /*$insertRow = array($BSettings); for($i=1; $i<$cols-1; $i++) $insertRow[] = ""; $insertRow[] = $pageOptions; $valuesTab->addRow($insertRow);*/ $valuesTab->addRow(array($BSettings, $pageOptions)); $valuesTab->addRowColspan(2, $cols - 1); } } $valuesTab->addRowClass("backgroundColorHeader"); #$valuesTab->addRow(array($pageLinks)); #$valuesTab->addRowColspan(1, $cols); #$valuesTab->addRowClass("backgroundColorHeader"); $valuesTab->addRow(""); $valuesTab->addRowColspan(1, $cols); $valuesTab->addRowClass("backgroundColor0 browserSeparatorTop"); } } $filteredCol = null; if ($lineWithId == -1 and $this->showFilteredCategoriesWarning != null and $this->showFilteredCategoriesWarning[0]) { $dB = new Button($this->texts["Filter löschen"], "./images/i2/delete.gif"); $dB->style("float:right;"); $dB->type("icon"); $dB->rme("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->showFilteredCategoriesWarning[1]}'"), "if(checkResponse(transport)) contentManager.reloadFrameRight();"); /*$separator = " <tr> <td class=\"backgroundColor0\"".((isset($this->showFilteredCategoriesWarning[0]) AND $this->showFilteredCategoriesWarning[0] == true) ? "<img src=\"./images/i2/note.png\" /></td><td class=\"backgroundColor0\" colspan=\"".($determinedNumberofCols - 2)."\" style=\"color:grey;\" >".$this->texts["Anzeige wurde gefiltert"]."</td><td class=\"backgroundColor0\">$dB</td>" : " >")."</td> </tr>";*/ $filteredCol = array("<img src=\"./images/i2/note.png\" />", $dB . $this->texts["Anzeige wurde gefiltert"]); $valuesTab->addRow($filteredCol); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowClass("backgroundColor0"); $valuesTab->addRowStyle("color:grey;"); } /** * NEW-BUTTON */ if (!$this->onlyDisplayMode and $userCanCreate and $this->showNewButton and $lineWithId == -1) { $BNew = new Button("", "./images/i2/new.gif"); $BNew->type("icon"); $BNew->id("buttonNewEntry{$this->singularClass}"); #$BNew->onclick($this->JSOnNew == null ? "contentManager.newClassButton('$this->singularClass','');" : $this->JSOnNew); if ($this->displaySide == "left") { #$valuesTab->addRow(array("<b>$this->singularName neu anlegen</b>",$BNew)); #$valuesTab->addRowColspan(1, $cols-1); } else { $valuesTab->addRow(array($BNew, "<b>{$this->singularName} neu anlegen</b>")); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowEvent("click", $this->JSOnNew == null ? "contentManager.newClassButton('{$this->singularClass}','');" : $this->JSOnNew); $valuesTab->addRowStyle("cursor:pointer;"); } #$valuesTab->addRowColspan(2, $cols-1); } /** * TABLE-CONTENT */ $displayGroup = null; for ($i = 0; $i < count($this->attributes); $i++) { $aid = $this->attributes[$i]->getID(); // get the id of an object separately $sc = $this->attributes[$i]->getA(); // get the attributes-object from the object if ($this->displayGroupBy != null) { $displayGroupField = $this->displayGroupBy; if ($sc->{$displayGroupField} != $displayGroup and $i > 0) { $valuesTab->addRow(""); $valuesTab->addRowClass("backgroundColor0"); } } $row = array(); $styles = array(); if ($this->displaySide == "left") { $colsLeft = $this->newColsRight; $colsRight = $this->newColsLeft; } else { $colsLeft = $this->newColsLeft; $colsRight = $this->newColsRight; } if (count($colsLeft) > 0) { foreach ($colsLeft as $key => $value) { $row[] = str_replace("%%VALUE%%", $aid, $value); $valuesTab->setColWidth(count($row), "20px"); } } foreach ($this->showAttributes as $key => $value) { if (isset($userHiddenFields[$value])) { continue; } if (isset($this->parsers[$value])) { $t = $this->invokeParser($this->parsers[$value], $sc->{$value}, $this->makeParameterStringFromArray($this->parserParameters[$value], $sc, $aid)); } else { $t = htmlspecialchars($sc->{$value}); } if ($this->multiEditMode != null and in_array($value, $this->multiEditMode)) { $posInArray = array_search($value, $this->multiEditMode); if ($this->multiEditModeInputs[$posInArray] == null) { $MI = new HTMLInput($value . "ID{$aid}", "multiInput", $sc->{$value}, array($this->singularClass, $aid, $value)); if ($this->multiEditModeStyle != null) { $MI->style($this->multiEditModeStyle[$posInArray]); } } else { $MI = clone $this->multiEditModeInputs[$posInArray]; $MI->setValue($sc->{$value}); $MI->activateMultiEdit($this->singularClass, $aid); } $t = $MI; } #<td id=\"Browser".$value."$aid\" ".(isset($this->colStyles[$value]) ? "style=\"".$this->colStyles[$value]."\"" : "").">".$t."</td>"; $row[] = $t; if (isset($this->colStyles[$value])) { $styles[count($row)] = $this->colStyles[$value]; } } if (count($colsRight) > 0) { foreach ($colsRight as $key => $value) { $row[] = str_replace("%%VALUE%%", $aid, $value); $valuesTab->setColWidth(count($row), "20px"); } } $valuesTab->addRow($row); if (count($styles) > 0) { foreach ($styles as $col => $s) { $valuesTab->addColStyle($col, $s); } } $valuesTab->setRowID("BrowserMain{$aid}"); #foreach($this->showAttributes as $key => $value) { # $valuesTab->addCellID($cellNo, "Browser".$value."$aid"); #} if ($this->displayGroupBy != null) { $displayGroup = $sc->{$displayGroupField}; } } if ($filteredCol !== null) { $valuesTab->addRow($filteredCol); $valuesTab->addRowColspan(2, $cols - 1); $valuesTab->addRowClass("backgroundColor0"); $valuesTab->addRowStyle("color:grey;"); } if ($lineWithId == -1 and $isMultiPageMode) { $valuesTab->addRow(""); $valuesTab->addRowColspan(1, $cols); $valuesTab->addRowClass("backgroundColor0 browserSeparatorBottom"); if (!$userDefinedEntriesPerPage) { $valuesTab->addRow(array($pageOptions)); $valuesTab->addRowColspan(1, $cols); } else { if ($this->displaySide == "left") { $valuesTab->addRow(array($pageOptions, $BSettings)); $valuesTab->addRowColspan(1, $cols - 1); } else { $valuesTab->addRow(array($BSettings, $pageOptions)); $valuesTab->addRowColspan(2, $cols - 1); } } $valuesTab->addRowClass("backgroundColorHeader"); #$valuesTab->addRow(array($pageLinks)); #$valuesTab->addRowColspan(1, $cols); #$valuesTab->addRowClass("backgroundColorHeader"); } if (count($this->attributes) == 0) { $valuesTab->addRow(array("keine Einträge")); $valuesTab->addRowColspan(1, $cols); } if ($lineWithId != -1) { $valuesTab = $valuesTab->getHTMLForUpdate(); } return $errorTab . $returnTab . $valuesTab . ($lineWithId == -1 ? $this->tip : ""); }
public function sendMessagePopup() { $AC = anyC::get("Device"); $AC->addOrderV3("DeviceName"); $B = new Button("Alle", "fullscreen", "touch"); $B->className("nuntiusMessageTo"); $B->id("nuntiusMessageTarget0"); $B->onclick("\$j('.nuntiusMessageTo:not(#nuntiusMessageTarget0)').slideToggle(); \$j('#nuntiusMessageContainer').slideToggle();"); $L = $B; while ($D = $AC->getNextEntry()) { $B = new Button($D->A("DeviceName"), "iphone", "touch"); $B->className("nuntiusMessageTo"); $B->id("nuntiusMessageTarget" . $D->getID()); $B->onclick("\$j('.nuntiusMessageTo:not(#nuntiusMessageTarget" . $D->getID() . ")').slideToggle(); \$j('#nuntiusMessageContainer').slideToggle();"); $L .= $B; } $BS = new Button("Senden", "arrow_right", "touch"); $BS->style("margin-top:0px;height:190px;margin-bottom:0px;"); $BS->rmePCR("mNuntius", "-1", "sendMessage", array("\$j('.nuntiusMessageTo:visible').attr('id').replace('nuntiusMessageTarget', '')", "\$j('[name=NuntiusMessage]').val()", "'Device:'+\$j.jStorage.get('phynxDeviceID', -1)"), "function(){ " . OnEvent::closePopup("mNuntius") . " }"); $I = new HTMLInput("NuntiusMessage", "textarea"); $I->style("width:100%;height:200px;max-width:400px;font-size:15px;"); $I->placeholder("Nachricht..."); echo "\n\t\t\t<div id=\"nuntiusTargets\" style=\"padding-top:15px;padding-bottom:1px;\">\n\t\t\t\t" . $L . "\n\t\t\t</div>\n\t\t\t<div style=\"display:none;padding-bottom:1px;\" id=\"nuntiusMessageContainer\">\n\t\t\t\t<div style=\"width:100px;float:right;\">{$BS}</div><div style=\"width:300px;\">{$I}</div>\n\t\t\t</div>"; }
public function getHTML($id) { if ($_SESSION["S"]->checkIfUserLoggedIn() == true) { return -1; } $es = $_SESSION["CurrentAppPlugins"]->getMenuEntries(); $ts = $_SESSION["CurrentAppPlugins"]->getMenuTargets(); $icons = $_SESSION["CurrentAppPlugins"]->getIcons(); $appIco = $_SESSION["applications"]->getApplicationIcon($_SESSION["applications"]->getActiveApplication()); if (isset($_COOKIE["phynx_color"]) and $_COOKIE["phynx_color"] != "standard") { $suffix = strrchr($appIco, "."); $newLogo = str_replace($suffix, ucfirst($_COOKIE["phynx_color"]) . $suffix, $appIco); if (file_exists("." . $newLogo)) { $appIco = $newLogo; } } // <editor-fold defaultstate="collapsed" desc="Aspect:jP"> $newAppIco = Aspect::joinPoint("appLogo", $this, __METHOD__); if ($newAppIco != null) { $appIco = $newAppIco; } // </editor-fold> $appMenuHidden = ""; $appMenuDisplayed = ""; $appMenuActive = (!$_SESSION["S"]->isUserAdmin() and (!isset($_COOKIE["phynx_layout"]) or $_COOKIE["phynx_layout"] == "fixed" or $_COOKIE["phynx_layout"] == "horizontal" or $_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical")); // <editor-fold defaultstate="collapsed" desc="Aspect:jP"> $aspectAppMenuActive = Aspect::joinPoint("appMenuActive", $this, __METHOD__); if ($aspectAppMenuActive !== null) { $appMenuActive = $aspectAppMenuActive; } // </editor-fold> $appIco = Environment::getS("ApplicationIcon:" . Applications::activeApplication(), $appIco); if ($appIco != "") { if (count($_SESSION["applications"]->getApplicationsList()) > 1 and !$_SESSION["S"]->isAltUser()) { echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden/Anwendung wechseln\" title=\"Abmelden/Anwendung wechseln\" onclick=\"" . Environment::getS("onLogout", "phynxContextMenu.start(this, 'Menu','1','Anwendung wechseln:','right');") . "\" />"; } else { echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden\" title=\"Abmelden\" onclick=\"" . Environment::getS("onLogout", "userControl.doLogout();") . "\" />"; } } $bigWorld = false; if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical")) { $bigWorld = true; } if (!$_SESSION["S"]->isUserAdmin()) { $userHiddenPlugins = mUserdata::getHiddenPlugins(); $U = new mUserdata(); $U->addAssocV3("typ", "=", "TTP"); $B = new Button(Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()), "application"); $B->type("icon"); $B->className($bigWorld ? "tabImg" : "smallTabImg"); #".(($t == null OR $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"")." $B->hasMouseOverEffect(false); $B->id("busyBox"); #$appMenuHidden = $this->getAppMenuOrder("appMenuHidden"); $appMenuDisplayed = $this->getAppMenuOrder("appMenuDisplayed"); #if($appMenuDisplayed != "" AND $appMenuHidden == "") # $appMenuHidden = implode(";", array_diff(array_values($es), explode(";", $appMenuDisplayed))); } $appMenuH = "\n\t\t\t<li id=\"appMenu_emptyList\" style=\"height:auto;" . ($appMenuHidden != "emptyList" ? "display:none;" : "") . "\">Ziehen Sie Einträge auf diese Seite, um sie aus dem Menü auszublenden und nur hier anzuzeigen.</li>"; $appMenuD = ""; if ($appMenuActive) { $es = self::sort($es, $appMenuDisplayed); } #, $appMenuHidden); echo "\n\t\t\t<div id=\"navTabsWrapper\">"; if ($appMenuActive) { echo "\n\t\t\t<div\n\t\t\t\tclass=\"navBackgroundColor navBorderColor " . ($bigWorld ? "" : " smallTab") . " navTab\"\n\t\t\t\tid=\"SpellbookMenuEntry\"\n\t\t\t>\n\t\t\t\t<div onclick=\"contentManager.loadPlugin('contentScreen', 'Spellbook', 'SpellbookGUI;-');\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\t\t\t\t{$B}" . ($bigWorld ? Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()) : "") . "\n\t\t\t\t</div>\n\t\t\t</div>"; } $collapsedTabs = Environment::getS("collapsedTabs", "0") == "1"; foreach ($es as $key => $value) { if (isset($userHiddenPlugins[$value])) { continue; } $single = $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($value); $anyC = new anyC(); $text = $anyC->loadLanguageClass($single); if ($text != null and $text->getMenuEntry() != "") { $key = $text->getMenuEntry(); } $t = !$_SESSION["S"]->isUserAdmin() ? $U->getUDValueCached("ToggleTab{$value}") : "big"; if ($t == null and $collapsedTabs) { $t = "small"; } $key = Aspect::joinPoint("renameTab", $this, __METHOD__, array($key), $key); if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "vertical" or $_COOKIE["phynx_layout"] == "desktop")) { $t = "big"; } #$emptyFrame = "contentLeft"; #if(isset($ts[$value]) AND $ts[$value] == "contentLeft") $emptyFrame = "contentRight"; #$onclick = "contentManager.emptyFrame('contentLeft'); contentManager.emptyFrame('contentRight'); contentManager.emptyFrame('contentScreen'); contentManager.loadFrame('".(isset($ts[$value]) ? $ts[$value] : "contentRight")."', '$value', -1, 0, '{$value}GUI;-');$('windows').update('');"; $onclick = "contentManager.loadPlugin('" . (isset($ts[$value]) ? $ts[$value] : "contentRight") . "', '{$value}', '{$value}GUI;-');"; $B = new Button($key, $icons[$value]); $B->type("icon"); $B->style("float:left;margin-right:10px;"); $BM = new Button("Reihenfolge ändern", "./images/i2/topdown.png"); $BM->type("icon"); $BM->style("float:right;margin-right:5px;"); $BM->className("appMenuHandle"); $appMenu = "\n\t\t\t<li\n\t\t\t\tid=\"appMenu_{$value}\"\n\t\t\t\tonmouseover = \"this.className = 'navBackgroundColor';\"\n\t\t\t\tonmouseout = \"this.className = '';\"\n\t\t\t>\n\t\t\t\t{$BM}\n\t\t\t\t<div\n\t\t\t\t\tonclick=\"appMenu.hide(); {$onclick}\"\n\t\t\t\t>\n\t\t\t\t{$B}<p>{$key}</p>\n\t\t\t\t</div>\n\t\t\t</li>"; if (strpos($appMenuHidden, $value) !== false) { $appMenuH .= $appMenu; } else { $appMenuD .= $appMenu; } $style = (strpos($appMenuHidden, $value) !== false and $appMenuActive) ? "style=\"display:none;\"" : ""; echo "\n\t\t\t\t\n\t\t\t\t<div\n\t\t\t\t\tid=\"" . $value . "MenuEntry\"\n\t\t\t\t\tclass=\"navBackgroundColor navBorderColor " . (($t == null or $t == "big") ? "" : " smallTab") . " navTab\"\n\t\t\t\t\t{$style}\n\t\t\t\t\t>\n\t\t\t\t\t<!--<img\n\t\t\t\t\t\tstyle=\"margin-top:-28px;float:left;\"\n\t\t\t\t\t\tid=\"" . $value . "TabMinimizer\"\n\t\t\t\t\t\tclass=\"navTabMinimizer\"\n\t\t\t\t\t\ttitle=\"Tab {$key} vergrößern/verkleinern\"\n\t\t\t\t\t\tonclick=\"toggleTab('{$value}');\"\n\t\t\t\t\t\tsrc=\"./images/i2/tabMinimize.png\" />-->\n\t\t\t\t\t\n\t\t\t\t\t<div onclick=\"{$onclick}\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tid=\"" . $value . "MenuImage\"\n\t\t\t\t\t\t\ttitle=\"{$key}\"\n\t\t\t\t\t\t\t" . (($t == null or $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"") . "\n\t\t\t\t\t\t\tsrc=\"{$icons[$value]}\" />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t" . (($t == null or $t == "big") ? $key : "") . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>"; } echo "\n\t\t\t\t<div style=\"float:none;clear:both;border:0px;height:0px;width:0px;margin:0px;padding:0px;\"></div>\n\t\t\t</div>"; /* <div id=\"appMenuContainer\" class=\"backgroundColor0 navBorderColor\" style=\"display:none;\"> <ul style=\"min-height:50px;\" id=\"appMenuHidden\">$appMenuH</ul> <p class=\"backgroundColor2\" style=\"cursor:pointer;background-image:url(./images/navi/down.png);background-repeat:no-repeat;background-position:95% 50%;\" onclick=\"if($('appMenuDisplayedContainer').style.display == 'none') new Effect.BlindDown('appMenuDisplayedContainer'); else new Effect.BlindUp('appMenuDisplayedContainer');\">Weitere Reiter</p> <div id=\"appMenuDisplayedContainer\" style=\"display:none;\"><ul style=\"min-height:50px;\" id=\"appMenuDisplayed\">$appMenuD</ul><p>Um die Sortierung der Einträge zu übernehmen, muss die Anwendung <a href=\"#\" onclick=\"Installation.reloadApp(); return false;\">neu geladen werden</a>.</p></div> </div>";*/ #echo OnEvent::script(""); if (!$_SESSION["S"]->isUserAdmin()) { $ud = new mUserdata(); $al = $ud->getUDValue("noAutoLogout", "false"); if ($al == "true") { echo "<script type=\"text/javascript\">contentManager.startAutoLogoutInhibitor();</script>"; } } echo OnEvent::script("contentManager.isAltUser = "******"true" : "false") . ";"); try { $c = get_class(Session::currentUser()); $U = new $c(Session::currentUser()->getID()); echo "<script type=\"text/javascript\">\$j.datepicker.setDefaults(\$j.datepicker.regional['" . $U->A("language") . "']); " . (Session::physion() ? "\$j('#navigation').hide();" : "") . "</script>"; } catch (Exception $e) { } }
function getCMSHTML() { registerClassPath("GSRaumgruppe", Util::getRootPath() . "FCalc/GSRaumgruppe/GSRaumgruppe.class.php"); registerClassPath("GSRaumgruppe", Util::getRootPath() . "FCalc/GSRaumgruppe/GSRaumgruppe.class.php"); registerClassPath("ObjektL", Util::getRootPath() . "personalKartei/ObjekteL/ObjektL.class.php"); registerClassPath("mGSTaetigkeitGUI", Util::getRootPath() . "FCalc/GSTaetigkeit/mGSTaetigkeitGUI.class.php"); registerClassPath("GSTaetigkeit", Util::getRootPath() . "FCalc/GSTaetigkeit/GSTaetigkeit.class.php"); registerClassPath("GSQMPruefer", Util::getRootPath() . "FCalc/GSQM/GSQMPruefer.class.php"); $html = "\n\t\t<script src=\"./lib/jquery.signaturepad.min.js\"></script>\n\t\t<style type=\"text/css\">\n\t\t\th3 {\n\t\t\t\tpadding:7px;\n\t\t\t\tmargin-top:30px;\n\t\t\t\tclear:both;\n\t\t\t\tborder-bottom:1px solid #97a652;\n\t\t\t\tmargin-left:-10px;\n\t\t\t\tmargin-right:-10px;\n\t\t\t\tbackground-color:rgb(" . mGSTaetigkeitGUI::$fillColor[0] . ", " . mGSTaetigkeitGUI::$fillColor[1] . ", " . mGSTaetigkeitGUI::$fillColor[2] . ");\n\t\t\t}\n\t\t\t\n\t\t\t.backgroundColor1 {\n\t\t\t\tbackground-color:rgb(" . mGSTaetigkeitGUI::$fillColor[0] . ", " . mGSTaetigkeitGUI::$fillColor[1] . ", " . mGSTaetigkeitGUI::$fillColor[2] . ");\n\t\t\t}\n\t\t\t\n\t\t\th4 {\n\t\t\t\tpadding-top:15px;\n\t\t\t\tpadding-bottom:15px;\n\t\t\t}\n\t\t\t\n\t\t\t.frameRight td {\n\t\t\t\tpadding-left:3px;\n\t\t\t\tpadding-top:3px;\n\t\t\t\tpadding-bottom:3px;\n\t\t\t\tcursor:pointer;\n\t\t\t}\n\t\t\t\n\t\t\t.frameRight tr:hover {\n\t\t\t\tbackground-color:rgb(" . mGSTaetigkeitGUI::$fillColor[0] . ", " . mGSTaetigkeitGUI::$fillColor[1] . ", " . mGSTaetigkeitGUI::$fillColor[2] . ");\n\t\t\t}\n\t\t\t\n\t\t\t.frameRight {\n\t\t\t\tborder-left:1px solid #97a652;\n\t\t\t\tpadding-left:10px;\n\t\t\t}\n\t\t\t\n\t\t\t.frameLeft td {\n\t\t\t\tpadding-top:3px;\n\t\t\t\tpadding-bottom:3px;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@media print { \n\t\t\t\t.frameRight {\n\t\t\t\t\tdisplay:none;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\th3 {\n\t\t\t\t\tpage-break-before:always;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\th2 + h3 {\n\t\t\t\t\t page-break-before:avoid;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t.buttonQuestion {\n\t\t\t\tfont-size:30px;\n\t\t\t\tpadding-top:40px;\n\t\t\t\tpadding-bottom:40px;\n\t\t\t\ttext-align:center;\n\t\t\t\twidth:120px;\n\t\t\t\tmargin-right:20px;\n\t\t\t}\n\t\t\t\n\t\t\t.box {\n\t\t\t\tmargin-top:20px;\n\t\t\t\twidth:420px;\n\t\t\t\tpadding:30px;\n\t\t\t\tborder-width:1px;\n\t\t\t\tborder-style:solid;\n\t\t\t\tborder-radius:5px;\n\t\t\t\tbox-shadow:2px 2px 2px #bbb;\n\t\t\t\tmargin-left:10px;\n\t\t\t\tmargin-bottom:20px;\n\t\t\t}\n\t\t\t\n\t\t\t#headerStep1 span, #headerStep2 span, #headerStep3 span, #headerStep4 span {\n\t\t\t\t/*-webkit-transform: translate(15px,200px) rotate(270deg);\n\t\t\t\t-moz-transform: translate(15px,200px) rotate(270deg);\n\t\t\t\t-o-transform: translate(15px,200px) rotate(270deg);\n\t\t\t\t-ms-transform: translate(15px,200px) rotate(270deg);\n\t\t\t\t-moz-transform-origin: top left;\n\t\t\t\t-webkit-transform-origin: top left;\n\t\t\t\t-o-transform-origin: top left;\n\t\t\t\t-ms-transform-origin: top left;*/\n\t\t\t}\n\t\t\t\n\t\t\t#headerStep1, #headerStep2, #headerStep3, #headerStep4 {\n\t\t\t\tborder-bottom-width:0px;\n\t\t\t\tborder-right-width:1px;\n\t\t\t\tborder-right-style:solid;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\twidth:30px;\n\t\t\t\theight:450px;\n\t\t\t\tmargin-right:20px;\n\t\t\t}\n\t\t\t\n\t\t\t#step1, #step2, #step3, #step4 {\n\t\t\t\twidth:600px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmargin-top:40px;\n\t\t\t\tvertical-align: top;\n\t\t\t}\n\t\t\t\n\t\t\t#selectPruefer {\n\t\t\t\tlist-style-type: none;\n\t\t\t}\n\n\t\t\t#selectPruefer li, #selectCategories li {\n\t\t\t\tfont-size:15px;\n\t\t\t\tpadding:10px;\n\t\t\t}\n\t\t</style>\n\t\t<script type=\"text/javascript\">\n\t\t\tvar CP_LV = {\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tvar CP_QM = {\n\t\t\t\tquestions: null,\n\t\t\t\tRaumGruppen: new Array(),\n\t\t\t\tqCounter: -1,\n\t\t\t\tcCounter: 0,\n\t\t\t\tcategories: null,\n\t\t\t\tanswers: {},\n\t\t\t\tauthor: null,\n\t\t\t\t\n\t\t\t\taddRaumGruppe: function(RaumGruppeID){\n\t\t\t\t\tif(\$.inArray(RaumGruppeID, CP_QM.RaumGruppen) >= 0){\n\t\t\t\t\t\tCP_QM.RaumGruppen.splice( \$.inArray(RaumGruppeID, CP_QM.RaumGruppen), 1 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tCP_QM.RaumGruppen.push(RaumGruppeID);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.updateOrderDisplay();\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tupdateOrderDisplay: function(){\n\t\t\t\t\t\$('.orderDisplay').html(' ');\n\t\t\t\t\t\n\t\t\t\t\tfor(var i = 0; i < CP_QM.RaumGruppen.length; i++){\n\t\t\t\t\t\t\$('#orderDisplay'+CP_QM.RaumGruppen[i]).html(i + 1);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tdoQuestionsAgain: function(){\n\t\t\t\t\t\$('#step3').show();\n\t\t\t\t\t\$('#step4').hide();\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.qCounter = 0;\n\t\t\t\t\tCP_QM.cCounter = 0;\n\t\t\t\t\tCP_QM.answers = {};\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.showQuestion();\n\t\t\t\t\t\n\t\t\t\t\t\$('#headerStep4').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep3').css('background-color', '');\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tsave: function(){\n\t\t\t\t\tvar value = \$.jStorage.get('QM');\n\t\t\t\t\tif(!value){\n\t\t\t\t\t\t\$.jStorage.set('QM', [{ 'answers': CP_QM.answers, 'signature' : \$('.sigPad input[name=output]').val(), 'author' : CP_QM.author, 'timestamp' : Math.round(+new Date()/1000) }])\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvalue.push({ 'answers': CP_QM.answers, 'signature' : \$('.sigPad input[name=output]').val(), 'author' : CP_QM.author, 'timestamp' : Math.round(+new Date()/1000) });\n\t\t\t\t\t\t\$.jStorage.set('QM', value)\n\t\t\t\t\t}\n\t\t\t\t\tCP_QM.view();\n\t\t\t\t\t//console.log(\$.jStorage.get('QM'));\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tupload: function(){\n\t\t\t\t\t\$.ajax({url: './index.php?CC=FCalc&M=checkConnection', success: function(transport){\n\t\t\t\t\t\tif(transport != '1')\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tCustomerPage.rme('saveData', 'data='+JSON.stringify(\$.jStorage.get('QM')), function(){ /*\$.jStorage.deleteKey('QM');*/ });\n\t\t\t\t\t\t\n\t\t\t\t\t},\n\t\t\t\t\t\n\t\t\t\t\terror: function(XMLHttpRequest, textStatus, errorThrown) {\n\t\t\t\t\t\tif(textStatus == 'timeout')\n\t\t\t\t\t\t\talert('Keine Verbindung zum Server!');\n\t\t\t\t\t\t\n\t\t\t\t\t},\n\t\t\t\t\t\n\t\t\t\t\ttype: 'GET'});\n\t\t\t\t\t\t\n/*\n\n\t\t\t\t\tvar value = \$.jStorage.get('QM');\n\t\t\t\t\tif(!value){\n\t\t\t\t\t\t\$('#view').html('Es wurden keine Prüfungen gespeichert');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor(var i = 0; i < value.length; i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}*/\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tview: function(){\n\t\t\t\t\tvar value = \$.jStorage.get('QM');\n\t\t\t\t\tif(!value){\n\t\t\t\t\t\t\$('#view').html('Es wurden keine Prüfungen gespeichert');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar s = '<ul>';\n\t\t\t\t\t\t\n\t\t\t\t\t\tconsole.log(value);\n\t\t\t\t\t\tfor(var i = 0; i < value.length; i++){\n\t\t\t\t\t\t\tvar date = new Date(value[i].timestamp*1000);\n\t\t\t\t\t\t\tvar hours = date.getHours();\n\t\t\t\t\t\t\tvar minutes = date.getMinutes();\n\t\t\t\t\t\t\t//var seconds = date.getSeconds();\n\t\t\t\t\t\t\tvar year = date.getFullYear();\n\t\t\t\t\t\t\tvar month = date.getMonth();\n\t\t\t\t\t\t\tvar day = date.getDate();\n\n\n\t\t\t\t\t\t\ts += '<li>Prüfung vom '+day+'.'+month+'.'+year+', '+hours+':'+minutes+' Uhr</li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ts += '</ul>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\$('#view').html(s);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\tnew: function(){\n\t\t\t\t\t\$('#step1').show();\n\t\t\t\t\t\$('#step4').hide();\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.qCounter = -1;\n\t\t\t\t\tCP_QM.cCounter = 0;\n\t\t\t\t\tCP_QM.answers = {};\n\t\t\t\t\t\n\t\t\t\t\t//CP_QM.showQuestion();\n\n\t\t\t\t\t\$('#headerStep4').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep1').css('background-color', '');\n\t\t\t\t},\n\n\t\t\t\tstep2: function(authorID){\n\t\t\t\t\t\$('#step1').hide();\n\t\t\t\t\t\$('#step2').show();\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.author = authorID;\n\t\t\t\t\t\n\t\t\t\t\t\$('#headerStep1').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep2').css('background-color', '');\n\t\t\t\t\t\n\t\t\t\t},\n\n\t\t\t\tstep3: function(){\n\t\t\t\t\t\$('#step1').hide();\n\t\t\t\t\t\$('#step2').hide();\n\t\t\t\t\t\$('#step3').show();\n\t\t\t\t\t\n\t\t\t\t\t\$('#headerStep2').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep3').css('background-color', '');\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.nextQuestion();\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tstep4: function(){\n\t\t\t\t\t\$('#step3').hide();\n\t\t\t\t\t\$('#step4').show();\n\t\t\t\t\t\n\t\t\t\t\t\$('#headerStep3').css('background-color', 'white');\n\t\t\t\t\t\$('#headerStep4').css('background-color', '');\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.view();\n\t\t\t\t\t\n\t\t\t\t\t//console.log(CP_QM.answers);\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tanswerQuestion: function(answer){\n\t\t\t\t\tif(typeof CP_QM.answers[CP_QM.cCounter] == 'undefined')\n\t\t\t\t\t\tCP_QM.answers[CP_QM.cCounter] = {};\n\t\t\t\t\t\t\n\t\t\t\t\tvar current = CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]][CP_QM.qCounter];\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.answers[CP_QM.cCounter][CP_QM.qCounter] = {'answer' : answer, 'object' : current };\n\t\t\t\t\t\n\t\t\t\t\t//console.log(CP_QM.answers);\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.nextQuestion();\n\t\t\t\t},\n\n\t\t\t\tnextQuestion: function(){\n\t\t\t\t\tCP_QM.qCounter++;\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.qCounter >= CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]].length) {\n\t\t\t\t\t\tCP_QM.qCounter = 0;\n\t\t\t\t\t\tCP_QM.cCounter++;\n\t\t\t\t\t\tCP_QM.showCategoryBox();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.cCounter >= CP_QM.RaumGruppen.length){\n\t\t\t\t\t\tCP_QM.step4();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.showQuestion();\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tpreviousQuestion: function(){\n\t\t\t\t\tCP_QM.qCounter--;\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.qCounter == -1) {\n\t\t\t\t\t\tCP_QM.cCounter--;\n\t\t\t\t\t\tCP_QM.qCounter = CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]].length - 1;\n\t\t\t\t\t\tCP_QM.showCategoryBox();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.cCounter == -1){\n\t\t\t\t\t\t//CP_QM.step4();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.showQuestion();\n\n\t\t\t\t\t\n\t\t\t\t},\n\n\t\t\t\tshowQuestion: function(){\n\t\t\t\t\t\$('#buttonPreviousQuestion').removeAttr('disabled');\n\t\t\t\t\t\$('.buttonQuestion').css('background-color', '');\n\t\t\t\t\t\n\t\t\t\t\tif(CP_QM.qCounter == 0 && CP_QM.cCounter == 0)\n\t\t\t\t\t\t\$('#buttonPreviousQuestion').attr('disabled', 'disabled');\n\n\t\t\t\t\tif(typeof CP_QM.answers[CP_QM.cCounter] != 'undefined' && CP_QM.answers[CP_QM.cCounter][CP_QM.qCounter] != undefined){\n\t\t\t\t\t\tvar B = 'Nein';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(CP_QM.answers[CP_QM.cCounter][CP_QM.qCounter] == 1)\n\t\t\t\t\t\t\tB = 'Teils';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(CP_QM.answers[CP_QM.cCounter][CP_QM.qCounter] == 2)\n\t\t\t\t\t\t\tB = 'Ja';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\$('#button'+B).css('background-color', '#F5FFC5');\n\t\t\t\t\t}\n\n\t\t\t\t\t\$('#category').html(CP_QM.categories[CP_QM.RaumGruppen[CP_QM.cCounter]]);\n\t\t\t\t\t\$('#categoryInfo').html(CP_QM.categories[CP_QM.RaumGruppen[CP_QM.cCounter]]);\n\t\t\t\t\t\n\t\t\t\t\tvar current = CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]][CP_QM.qCounter];\n\t\t\t\t\tvar q = current.label;\n\t\t\t\t\tif(current.turnusWoechentlich > 0)\n\t\t\t\t\t\tq += ' '+current.turnusWoechentlich+'xW';\n\t\t\t\t\t\t\n\t\t\t\t\tif(current.turnusMonatlich > 0)\n\t\t\t\t\t\tq += ' '+current.turnusMonatlich+'xM';\n\t\t\t\t\t\t\n\t\t\t\t\tif(current.turnusJaehrlich > 0)\n\t\t\t\t\t\tq += ' '+current.turnusJaehrlich+'xJ';\n\t\t\t\t\t\t\n\t\t\t\t\t\$('#question').html(q);\n\t\t\t\t\t\n\t\t\t\t\t\$('#qCounter').html((CP_QM.qCounter + 1)+'/'+CP_QM.questions[CP_QM.RaumGruppen[CP_QM.cCounter]].length);\n\t\t\t\t\t\$('#cCounter').html((CP_QM.cCounter + 1)+'/'+CP_QM.RaumGruppen.length);\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tcloseCategoryBox: function(){\n\t\t\t\t\t\$('#categoryBox').hide();\n\t\t\t\t\t\$('#questionBox').show();\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\tshowCategoryBox: function(){\n\t\t\t\t\t\$('#categoryBox').show();\n\t\t\t\t\t\$('#questionBox').hide();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\$(document).ready(function(){\n\t\t\t\t\$('#selectPruefer').attr('size', 10);\n\t\t\t});\n\t\t</script>"; $OID = $_GET["OBJ"] / GSRaumgruppe::$mult; $O = new ObjektL($OID); switch ($_GET["A"]) { case "LV": if (file_exists(Util::getRootPath() . "specifics/CPLogo.png")) { $html .= "<img src=\"../../specifics/CPLogo.png\" style=\"float:right;\" />"; } $html .= "<h1>Leistungsverzeichnis</h1>\n\t\t\t\t\t<h2>für " . $O->A("objektName") . "</h2>"; $GSR = anyC::get("GSRaumgruppe", "GSRaumgruppeObjektLID", $OID); $GSR->addOrderV3("GSRaumgruppeKuerzel"); while ($R = $GSR->getNextEntry()) { $html .= "<h3>" . $R->A("GSRaumgruppeKuerzel") . " (" . $R->A("GSRaumgruppeName") . ")</h3>\n\t\t\t\t\t\t<div style=\"max-width:1200px;\">"; $leftFrame = "<div style=\"width:490px;float:left;\" class=\"frameLeft\" id=\"frameLeft" . $R->getID() . "\">" . $this->leftFrame($R) . "</div>"; $rightFrame = "<div style=\"float:right;width:490px;margin-bottom:20px;\" class=\"frameRight\" id=\"frameRight" . $R->getID() . "\">" . $this->rightFrame($R) . "</div>"; $html .= "{$rightFrame}{$leftFrame}<div style=\"clear:both;\"></div></div>"; } break; case "QM": $html .= "<h1>Qualitätsmanagement</h1>\n\t\t\t\t\t<h2>für " . $O->A("objektName") . "</h2>"; $html .= "<h3 id=\"headerStep1\" class=\"borderColor1\"><span>" . $this->getStringImage("Prüfer") . "</span></h3><div id=\"step1\">\n\t\t\t\t\t<p>Bitte wählen Sie den Prüfer:</p>"; $L = new HTMLList(); $L->setListID("selectPruefer"); #$pruefer = array(0 => "bitte auswählen..."); #$Users = Users::getUsers(); $ACP = anyC::get("GSQMPruefer"); $ACP->addJoinV3("Personal", "GSQMPrueferPersonalID", "=", "PersonalID"); $ACP->addOrderV3("nachname"); $ACP->addOrderV3("vorname"); while ($U = $ACP->getNextEntry()) { $L->addItem("<a href=\"#\" onclick=\"CP_QM.step2(" . $U->getID() . "); return false;\">" . $U->A("nachname") . " " . $U->A("vorname") . "</a>"); } #$pruefer[$U->getID()] = $U->A("name"); #$IU = new HTMLInput("pruefer", "select", "0", $pruefer); #$IU->onchange("if(this.value > 0) CP_QM.step2();"); #$IU->id("selectPruefer"); #$IU->style("width:400px;"); $html .= $L; $html .= "</div>\n\t\t\t\t\t<h3 id=\"headerStep2\" style=\"background-color:white;\" class=\"borderColor1\"><span>" . $this->getStringImage("Kategorienauswahl") . "</span></h3>\n\t\t\t\t\t<div id=\"step2\" style=\"display:none;\">\n\t\t\t\t\t\n\t\t\t\t\t<p>Bitte wählen Sie die Kategorien in der Reihenfolge, in der Sie prüfen möchten:</p>\n\t\t\t\t\t<ul style=\"list-style-type:none;\" id=\"selectCategories\">"; $GSR = anyC::get("GSRaumgruppe", "GSRaumgruppeObjektLID", $OID); $GSR->addOrderV3("GSRaumgruppeKuerzel"); $data = array(); $categories = array(); while ($R = $GSR->getNextEntry()) { $html .= "\n\t\t\t\t\t\t<li style=\"margin-bottom:10px;\">\n\t\t\t\t\t\t\t<div style=\"width:30px;float:left;margin-right:10px;text-align:right;font-weight:bold;\" class=\"orderDisplay\" id=\"orderDisplay" . $R->getID() . "\"> </div>\n\t\t\t\t\t\t\t<div style=\"margin-left:40px;\"><a href=\"#\" onclick=\"CP_QM.addRaumGruppe(" . $R->getID() . "); return false;\">" . $R->A("GSRaumgruppeKuerzel") . "\n\t\t\t\t\t\t\t<span style=\"color:grey;\">(" . $R->A("GSRaumgruppeName") . ")</span></div></a>\n\t\t\t\t\t\t</li>"; $data[$R->getID()] = json_encode($R->getQuestions()); $categories[$R->getID()] = $R->A("GSRaumgruppeName"); } $GSR->resetPointer(); $BOK = new Button("Weiter", ""); $BOK->onclick("CP_QM.step3();"); $html .= "\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tCP_QM.questions = {"; foreach ($data as $RGID => $D) { $html .= "\n" . $RGID . ": {$D},"; } $html .= "\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCP_QM.categories = " . json_encode($categories) . ";\n\t\t\t\t</script>"; $html .= "</ul>\n\t\t\t\t\t{$BOK}\n\t\t\t\t\t</div>"; $BJa = new Button("Ja"); $BJa->onclick("CP_QM.answerQuestion(2);"); $BJa->id("buttonJa"); $BJa->className("buttonQuestion"); $BTeils = new Button("Teils"); $BTeils->onclick("CP_QM.answerQuestion(1);"); $BTeils->id("buttonTeils"); $BTeils->className("buttonQuestion"); $BNein = new Button("Nein"); $BNein->onclick("CP_QM.answerQuestion(0);"); $BNein->id("buttonNein"); $BNein->className("buttonQuestion"); $BP = new Button("vorherige Frage"); $BP->onclick("CP_QM.previousQuestion(0);"); $BP->id("buttonPreviousQuestion"); $BN = new Button("nächste Frage"); $BN->onclick("CP_QM.nextQuestion(0);"); $BN->id("buttonNextQuestion"); $BW = new Button("Weiter"); $BW->onclick("CP_QM.closeCategoryBox();"); $BW->style("float:right;"); $html .= "\n\t\t\t\t\t\t<h3 id=\"headerStep3\" class=\"borderColor1\" style=\"background-color:white;\"><span>" . $this->getStringImage("Prüfen") . "</span></h3>\n\t\t\t\t\t\t<div id=\"step3\" style=\"display:none;\">\n\t\t\t\t\t\t<div id=\"questionBox\" style=\"display:none;\">\n\t\t\t\t\t\t\t<p>{$BP} {$BN}</p>\n\t\t\t\t\t\t\t<div class=\"box borderColor1\">\n\t\t\t\t\t\t\t\t<p style=\"\">Kategorie: <span id=\"category\"></span></p>\n\t\t\t\t\t\t\t\t<p style=\"font-size:20px;font-weight:bold;\" id=\"question\"></p>\n\t\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td>{$BJa}</td>\n\t\t\t\t\t\t\t\t\t\t<td>{$BTeils}</td>\n\t\t\t\t\t\t\t\t\t\t<td>{$BNein}</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"borderColor1 box\" id=\"categoryBox\">\n\t\t\t\t\t\t\t<span style=\"font-size:30px;\">Kategorie:</span><br/><br/><span id=\"categoryInfo\" style=\"font-size:15px;\"></span><br /><br/>\n\t\t\t\t\t\t\t{$BW}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<p>Fragen in dieser Kategorie: <span id=\"qCounter\"></span></p>\n\t\t\t\t\t\t<p>Kategorien: <span id=\"cCounter\"></span></p>\n\t\t\t\t\t</div>"; $BNochmal = new Button("Fragen erneut\nausfüllen"); $BNochmal->onclick("CP_QM.doQuestionsAgain();"); $BSave = new Button("Prüfung\nspeichern"); $BSave->onclick("CP_QM.save();"); $BNew = new Button("Neue\nPrüfung"); $BNew->onclick("CP_QM.new();"); $BUpload = new Button("Daten\nhochladen"); $BUpload->onclick("CP_QM.upload();"); $html .= "\n\t\t\t\t\t<h3 id=\"headerStep4\" class=\"borderColor1\" style=\"background-color:white;\"><span>" . $this->getStringImage("Abschluss") . "</span></h3>\n\t\t\t\t\t<div id=\"step4\" style=\"display:none;\">\n\t\t\t\t\t\t<div class=\"backgroundColor1\" style=\"height:450px;width:290px;float:right;\">\n\t\t\t\t\t\t\t<div id=\"view\"></div>\n\t\t\t\t\t\t\t{$BUpload}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{$BNochmal}\n\t\t\t\t\n\t\t\t\t\t\t<div class=\"sigPad\" style=\"margin-top:20px;\">\n\t\t\t\t\t\t\t<p>Unterschrift des Kunden:</p>\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<canvas style=\"border-width:1px;border-style:solid;width:300px;height:150px;\" class=\"pad borderColor1\"></canvas>\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"output\" class=\"output\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{$BSave}\n\t\t\t\t\t\t\t<!--<a href=\"#clear\">Leeren</a>-->\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t{$BNew}\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t\t<script type=\"text/javascript\">\$(document).ready(function() { \$('.sigPad').signaturePad({drawOnly:true}); });</script>"; break; } return $html; }
public function __toString() { #$style = ""; if ($this->type == "date" and strpos($this->style, "width:") === false) { $this->style .= "width:87%;"; } #if($this->style != null) $style = " style=\"$this->style\""; switch ($this->type) { 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]}'"; } $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->popup("", "Editor", "Wysiwyg", "-1", "editInPopup", $BO, "", "Popup.presets.large"); $B->className("backgroundColor2"); $ITA = new HTMLInput($this->name, "textarea", $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->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: './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->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 "radio1": case "date": case "email": case "text": case "hidden": case "submit": case "number": case "button": case "password": case "checkbox": case "readonly": case "fileold": $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);"; } $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\"" : ""; } 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->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:87%"; } } 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); $JS .= $IN; $this->autocomplete[1] = "function(selection){ \$('{$this->id}').value = selection.value; \$('{$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->id .= "Display"; } $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", $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); " . ($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->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" . ($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": return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>"; 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; } else { $isThisIt = in_array($k, $values); } $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>"; } else { if ($this->value == $k or $v->getValue() == $this->value) { $v->isSelected(true); } $html .= $v; } } } $html .= "</select>"; return $html; break; } }
function getOperationsHTML($pluginName, $id = -1) { $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $pluginName); $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $pluginName); if ($this->texts == null) { $c = $this->loadLanguageClass("HTML"); $this->texts = $c->getEditTexts(); } $html = ""; if (PMReflector::implementsInterface($pluginName, "iNewWithValues") and $userCanCreate) { $os = "1"; } else { $os = "0"; } if (PMReflector::implementsInterface($pluginName, "iCloneable") and $userCanCreate) { $os .= "1"; } else { $os .= "0"; } if ((PMReflector::implementsInterface($pluginName, "iDeletable") or PMReflector::implementsInterface($pluginName, "iDeletable2")) and $userCanDelete) { $os .= "1"; } else { $os .= "0"; } if (PMReflector::implementsInterface($pluginName, "iRepeatable") and Session::isPluginLoaded("mRepeatable")) { $os .= "1"; } else { $os .= "0"; } if (PMReflector::implementsInterface($pluginName, "iXMLExport")) { $os .= "1"; } else { $os .= "0"; } if ($id != -1 and $os != "00000") { $B = new Button("Operationen", "wrench", "iconic"); $B->id($pluginName . "Operations"); $B->onclick("phynxContextMenu.start(this, 'HTML','operations:{$pluginName}:{$id}:{$os}','" . $this->texts["Operationen"] . ":');"); $B->style("float:right;margin-top:-3px;"); return $B; #"<span title=\"Operationen\" id=\"".$pluginName."Operations\" class=\"iconic wrench\" onclick=\"\" style=\"\" ></span>"; } return ""; }
public function controls() { echo "<p class=\"prettyTitle\">" . $this->A("UPnPName") . "</p>"; #$desiredCommands = array("Play", "Pause", "Stop", "Next", "Previous"); $icons = array("Play" => "play", "Pause" => "pause", "Stop" => "stop", "Next" => "arrow_right", "Previous" => "arrow_left", "Mute" => "volume_mute", "UnMute" => "volume", "Shutdown" => "download"); if (file_get_contents($this->A("UPnPLocation")) === false) { $B = new Button("Achtung", "notice", "icon"); $B->style("float:left;margin:10px;"); echo $B . "<p>Der Server ist nicht erreichbar!</p>"; } #$info = file_get_contents($url["scheme"]."://".$url["host"].":".$url["port"].$this->A("UPnPAVTransportSCPDURL")); #$xml = new SimpleXMLElement($info); #echo "<pre style=\"padding:5px;font-size:9px;overflow:auto;height:400px;\">"; /*foreach ($xml->actionList->action AS $action){ $name = $action->name[0].""; if(!in_array($name, $desiredCommands)) continue; $B = new Button($name, $icons[$name], "touch"); $B->rmePCR("UPnP", $this->getID(), $name, array("'0'")); echo $B; #echo "<p><a href=\"#\" onclick=\"".OnEvent::rme($this, $name, array("'0'"))." return false;\">".$name."</a></p>"; }*/ #$this->prettyfy($info); #echo "</pre>"; #print_r($info); echo "<div style=\"clear:both;height:10px;\"></div>"; $B = new Button("Play", $icons["Play"], "touch"); $B->rmePCR("UPnP", $this->getID(), "Play", array("'0'")); #$B->style("display:inline-block;width:30%;"); echo $B; $B = new Button("Pause", $icons["Pause"], "touch"); $B->rmePCR("UPnP", $this->getID(), "Pause", array("'0'")); #$B->style("display:inline-block;width:30%;"); echo $B; $B = new Button("Stop", $icons["Stop"], "touch"); $B->rmePCR("UPnP", $this->getID(), "Stop", array("'0'")); #$B->style("display:inline-block;width:30%;"); echo $B; echo "<br />"; echo "<br />"; $B = new Button("Previous", $icons["Previous"], "touch"); $B->rmePCR("UPnP", $this->getID(), "Previous", array("'0'")); $B->style("display:inline-block;width:47%;"); echo $B; $B = new Button("Next", $icons["Next"], "touch"); $B->rmePCR("UPnP", $this->getID(), "Next", array("'0'")); $B->style("display:inline-block;width:47%;"); echo $B; $B = new Button("Mute", $icons["Mute"], "touch"); $B->rmePCR("UPnP", $this->getID(), "SetMute", array("'0'", "'Master'", "'1'"), "function(){ \$j('#UPnPControlsMute').hide(); \$j('#UPnPControlsUnMute').show(); }"); $B->style("width:47%;" . ($this->GetMute(0, "Master") == "0" ? "" : "display:none;")); $B->id("UPnPControlsMute"); echo $B; $B = new Button("UnMute", $icons["UnMute"], "touch"); $B->rmePCR("UPnP", $this->getID(), "SetMute", array("'0'", "'Master'", "'0'"), "function(){ \$j('#UPnPControlsMute').show(); \$j('#UPnPControlsUnMute').hide(); }"); $B->style("width:47%;" . ($this->GetMute(0, "Master") == "1" ? "" : "display:none;")); $B->id("UPnPControlsUnMute"); echo $B; /*if(strpos($this->A("UPnPModelName"), "XBMC") !== false){ $B = new Button("Shutdown", $icons["Shutdown"], "touch"); $B->doBefore("if(confirm('Möchten Sie das Gerät herunterfahren?')) %AFTER"); $B->rmePCR("UPnP", $this->getID(), "VendorShutdown"); $B->style("display:inline-block;width:47%;"); echo $B; }*/ echo "<div style=\"height:1px;\"></div>"; }
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;\"> </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); }); };"); }
function getHTML($id) { $forReload = ""; $displayMode = null; $AuftragID = -1; $bps = $this->getMyBPSData(); if ($bps != -1 and isset($bps["AuftragID"])) { $AuftragID = $bps["AuftragID"]; } if ($bps != -1 and isset($bps["displayMode"])) { $displayMode = $bps["displayMode"]; } $_SESSION["BPS"]->unsetACProperty("AuftragID"); $_SESSION["BPS"]->unsetACProperty("displayMode"); #if($this->A == null AND $id != -1) $this->loadMe(); $this->loadMeOrEmpty(); if ($id * 1 == -1) { $this->A = $this->newAttributes(); $this->A->AuftragID = $AuftragID; if ($displayMode != null) { $this->A->type = $displayMode; } //Has to stay or lieferAdresse will also overwrite a normal Auftrags-Adresse if (Session::isPluginLoaded("mAdressBuch")) { $AB = BPS::getProperty("AdressenGUI", "AdressBuch", null); if ($AB) { $this->A->type = "AB{$AB}"; } } $id = $this->newMe(true, false); $this->forceReload(); try { $K = new Kunden(); if ($displayMode == null and $this->A("type") == "default") { //Or else a lieferAdresse will get a Kundennummer $K->createKundeToAdresse($id, false); } } catch (ClassNotFoundException $e) { } $forReload = "<script type=\"text/javascript\">lastLoadedLeft = {$id}; lastLoadedLeftPlugin = 'Adresse';</script>"; } $OptTab = new HTMLSideTable("right"); if (Session::isPluginLoaded("Kunden") and $this->A->AuftragID == -1) { $B = new Button("Kundendaten", "kunden"); $B->loadFrame("contentLeft", "Kunde", "-1", "0", "KundeGUI;AdresseID:{$this->getID()};action:Kappendix"); $OptTab->addRow($B); } if ($_SESSION["applications"]->getActiveApplication() == "open3A") { if ($displayMode != null) { $OptTab->setTableStyle("width:160px;margin:0px;margin-left:-170px;float:left;"); } if (($id == -1 or $forReload != "") and Session::isPluginLoaded("mImport")) { $OTBV = new Button("Schnell-\nImport", "import"); #$OTBV->rmePCR("importAdresse", "", "getFastImportWindow", "", "Popup.display('Adresse importieren:',transport);"); $OTBV->onclick("Import.openSchnellImportAdresse('Adresse importieren:');"); $OTBV->id("ButtonAdresseSchnellImport"); $OptTab->addRow($OTBV); } if ($id != -1 and Session::isPluginLoaded("Kundenpreise") and $this->A->AuftragID == -1 and $this->A->type == "default") { $ButtonKundenpreise = new Button("Kundenpreise", "package"); $ButtonKundenpreise->onclick("contentManager.loadFrame('contentLeft','Kunde', -1, 0, 'KundeGUI;AdresseID:{$this->ID};action:Kundenpreise');"); $OptTab->addRow($ButtonKundenpreise); } if ($this->A->AuftragID == -1 and (Session::isPluginLoaded("mAnsprechpartner") or Session::isPluginLoaded("mOSM"))) { $OptTab->addRow(""); $OptTab->addCellStyle(1, "height:30px;"); } if ($id != -1 and Session::isPluginLoaded("mAnsprechpartner") and $this->A->AuftragID == -1) { $OptTab->addRow(Ansprechpartner::getButton("Adresse", $this->getID())); } if ($id != -1 and Session::isPluginLoaded("mOSM") and $this->A("AuftragID") == -1) { $OptTab->addRow(OpenLayers::getButton("Adresse", $this->getID())); } } if (Session::isPluginLoaded("mklickTel") and $this->A->AuftragID == -1) { $OptTab->addRow(klickTel::getButton($this->getID())); } $this->loadMeOrEmpty(); $gui = $this->gui; $gui->insertSpaceAbove("tel", "Kontakt"); $gui->insertSpaceAbove("strasse", "Adresse"); $gui->insertSpaceAbove("homepage", "Sonstiges"); $gui->setFormID("AdresseForm"); $fields = array("firma", "position", "anrede", "vorname", "nachname", "AdresseSpracheID", "strasse", "bezirk", "zusatz1", "ort", "land", "tel", "fax", "mobil", "email", "homepage", "gebRem", "gebRemMail", "AuftragID", "KategorieID", "type", "geb", "bemerkung"); if (Session::isPluginLoaded("mLDAP")) { $fields[] = "exportToLDAP"; } $gui->setShowAttributes($fields); $gui->setLabel("bemerkung", "Notizen"); if (Session::isPluginLoaded("mSprache")) { $gui->setLabel("AdresseSpracheID", "Sprache"); $gui->setLabelDescription("AdresseSpracheID", "und Währung"); #$ACS = anyC::get("Sprache"); #$S = array(); #while($SLW = $ACS->getNextEntry()) # $S[$SLW->getID()] = $SLW->A("SpracheSprache")." "." ".$SLW->A("SpracheWaehrung"); $gui->selectWithCollection("AdresseSpracheID", new mSprache(), "SpracheName"); #$gui->setType("AdresseSpracheID", "select"); #$gui->setOptions("AdresseSpracheID", array_keys($S), array_values($S)); #$gui->insertSpaceAbove("firma"); } else { $gui->setType("AdresseSpracheID", "hidden"); } #$gui->setAttributes($this->A); $gui->setObject($this); $gui->setName("Adresse"); $gui->setOptions("anrede", array_keys(self::getAnreden()), array_values(self::getAnreden())); $gui->setType("anrede", "select"); $gui->setType("geb", "hidden"); $gui->setType("gebRemMail", "hidden"); $gui->setType("gebRem", "hidden"); $gui->setType("exportToLDAP", "checkbox"); $gui->insertSpaceAbove("exportToLDAP"); $gui->setFieldDescription("exportToLDAP", "Soll die Adresse auf einen LDAP-Server exportiert werden?"); $gui->setType("AuftragID", "hidden"); $gui->setType("type", "hidden"); #$gui->setLabel("geb","Jahrestag"); $gui->setLabel("ort", "PLZ/Ort"); $gui->setLabel("strasse", "Straße/Hausnr."); $gui->setLabel("tel", "Telefon"); $gui->setLabel("email", "E-Mail"); $gui->setLabel("exportToLDAP", "LDAP-Export?"); $gui->setParser("strasse", "AdresseGUI::parserStrasse", array($this->A("nr"))); $gui->setParser("ort", "AdresseGUI::parserOrt", array($this->A("plz"))); #$gui->useAutoCompletion("plz", (Session::isPluginLoaded("Postleitzahlen") ? "Postleitzahlen" : "Adressen")); if (Session::isPluginLoaded("mStammdaten") or Applications::activeApplication() == "MMDB") { /*if($this->A("land") == ""){ $S = Stammdaten::getActiveStammdaten(); if($S->A("land") == "D") $S->changeA("land","DE"); $this->changeA("land", ISO3166::getCountryToCode($S->A("land"))); }*/ $gui->setType("land", "select"); $countries = ISO3166::getCountries(); $labels = array_merge(array("" => "keine Angabe"), $countries); $values = array_merge(array("" => ""), $countries); $gui->setOptions("land", array_values($values), array_values($labels)); if ($this->A("land") != ISO3166::getCountryToCode("GB") and $this->A("land") != ISO3166::getCountryToCode("US") and $this->A("land") != ISO3166::getCountryToCode("CH")) { $gui->setLineStyle("zusatz1", "display:none;"); $gui->setLineStyle("position", "display:none;"); } if ($this->A("land") != ISO3166::getCountryToCode("DK") and $this->A("land") != ISO3166::getCountryToCode("ES")) { $gui->setLineStyle("bezirk", "display:none;"); } $gui->setLabel("zusatz1", "Zusatz 1"); $gui->setInputJSEvent("land", "onchange", "contentManager.toggleFormFields((this.value == '" . ISO3166::getCountryToCode("GB") . "' || this.value == '" . ISO3166::getCountryToCode("US") . "' || this.value == '" . ISO3166::getCountryToCode("CH") . "') ? 'show' : 'hide', ['zusatz1', 'position']); contentManager.toggleFormFields((this.value == '" . ISO3166::getCountryToCode("DK") . "' || this.value == '" . ISO3166::getCountryToCode("ES") . "') ? 'show' : 'hide', ['bezirk']);"); } if (Session::isPluginLoaded("mGemeinschaft")) { $gui->activateFeature("addCustomButton", $this, "tel", Gemeinschaft::getCallButton($this->A("tel"))); $gui->activateFeature("addCustomButton", $this, "mobil", Gemeinschaft::getCallButton($this->A("mobil"), "mobile")); } $kat = new Kategorien(); $kat->addAssocV3("type", "=", $displayMode != "" ? $displayMode : "1"); $keys = $kat->getArrayWithKeys(); $keys[] = "0"; $values = $kat->getArrayWithValues(); $values[] = "bitte auswählen"; $gui->setOptions("KategorieID", $keys, $values); $gui->setType("bemerkung", "textarea"); $gui->setLabel("KategorieID", "Kategorie"); if ($AuftragID == -1) { $gui->setType("KategorieID", "select"); } else { $gui->setType("KategorieID", "hidden"); $gui->setType("bemerkung", "hidden"); $gui->setType("tel", "hidden"); $gui->setType("fax", "hidden"); $gui->insertSpaceAbove("email"); $gui->setType("homepage", "hidden"); $gui->setType("exportToLDAP", "hidden"); $gui->setType("mobil", "hidden"); } switch ($displayMode) { case "auftragsAdresse": $gui->setJSEvent("onSave", "function() {\n\t\t\t\t\tcontentManager.loadFrame('contentLeft','Auftrag',{$this->A->AuftragID});\n\t\t\t\t\tcontentManager.loadFrame('contentRight','Auftraege');\n\t\t\t\t}"); break; case "lieferAdresse": $this->A->type = "lieferAdresse"; $gui->setJSEvent("onSave", "function() {\n\t\t\t\t\tcontentManager.loadFrame('contentRight','Auftraege');\n\t\t\t\t\tcontentManager.loadFrame('subframe','GRLBM',{$this->A->AuftragID});\n\t\t\t\t}"); break; } Aspect::joinPoint("buttons", $this, __METHOD__, $OptTab); $gui->setStandardSaveButton($this, "Adressen"); $gui->customize($this->customizer); return $forReload . $OptTab . $gui->getEditHTML(); }