Esempio n. 1
0
 public function getAngebote($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(2);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 130);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isA", "1");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     $AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("status", "=", "open");
     #$AC->addOrderV3("datum", "DESC");
     $AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $Adresse = new Adresse($B->A("AdresseID"));
         $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress()));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("cursor:pointer;border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $T->addRowEvent("click", "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');");
         $i++;
     }
     $html .= $T;
     return $html;
 }
Esempio n. 2
0
 function getHTML($id)
 {
     #$p = mUserdata::getPluginSpecificData("mStatistik");
     #if(!isset($p["pluginSpecificCanUseControlling"]))
     #	return;
     $html = "";
     #parent::getHTML($id);
     $tab = new HTMLTable(1);
     $tab->addRow("<div id=\"my_chartTodo\" style=\"height:200px;width:470px;\"></div>");
     $tab->addRowClass("backgroundColor0");
     $AC = $this->data();
     $U = Users::getUsersArray(null, true);
     $U[-1] = "Allgemein";
     $T = new HTMLTable(6);
     $T->addColStyle(2, "text-align:right;");
     $T->addColStyle(3, "text-align:right;");
     $T->addColStyle(4, "text-align:right;");
     $T->addColStyle(5, "text-align:right;");
     $T->addColStyle(6, "text-align:right;");
     $T->addHeaderRow(array("Benutzer", "Gesamt", "Abgesch.", "Kalt", "Erst", "Folge"));
     while ($A = $AC->n()) {
         $T->addRow(array(isset($U[$A->A("TodoUserID")]) ? $U[$A->A("TodoUserID")] : "Benutzer ID " . $A->A("TodoUserID"), $A->A("gesamt"), $A->A("gesamtDM") . " (" . Util::CLNumberParserZ($A->A("gesamt") != 0 ? round($A->A("gesamtDM") / $A->A("gesamt") * 100, 2) : 0) . "%)", $A->A("gesamtKalt"), $A->A("gesamtErst"), $A->A("gesamtFolge")));
         $T->addRowStyle("cursor:pointer;");
         $T->addRowEvent("click", OnEvent::rme($this, "details", array($A->A("TodoUserID")), "function(t){ \$j('#contentScreenLeft').html(t.responseText); }"));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Es liegen keine Daten vor"));
         $T->addRowColspan(1, 4);
     }
     return "<p class=\"prettySubtitle\">Termine</p>" . $tab . $html . $T . OnEvent::script("\n\t\t\tvar plot = \$j.plot(\$j('#my_chartTodo'), " . $this->chart() . ", {\n\t\t\tseries: {\n\t\t\t\tpie: { show: true, innerRadius: 0.4 }\n\t\t\t}\n\t\t\t});" . OnEvent::rme($this, "getHeaderCenter", "", "function(transport){ \$j('#contentScreenCenterHeader').html(transport.responseText); }"));
 }
Esempio n. 3
0
 public function getHTML($id, $page)
 {
     $bps = $this->getMyBPSData();
     $LangTab = new HTMLTable(1, "Language selection:");
     $LangTab->addRow("German");
     $LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:de');");
     $LangTab->addRowStyle("cursor:pointer;");
     if ($bps != -1 and $bps["lang"] == "de") {
         $LangTab->addRowClass("backgroundColor1");
     }
     $LangTab->addRow("English");
     $LangTab->addRowEvent("click", "contentManager.loadFrame('contentRight', 'mNewSeries', -1, 0, 'mNewSeriesGUI;lang:en');");
     $LangTab->addRowStyle("cursor:pointer;");
     if ($bps != -1 and $bps["lang"] == "en") {
         $LangTab->addRowClass("backgroundColor1");
     }
     if ($bps == -1) {
         return $LangTab;
     }
     $T = new HTMLTable(1);
     $T->setTableStyle("width:370px;float:left;");
     $FeedSerien = array();
     $i = 0;
     $Series = array();
     $RSS = new mRSSFilterGUI();
     while ($R = $RSS->getNextEntry()) {
         $new = $R->filterNew();
         foreach ($new as $S => $v) {
             if ($v->language != $bps["lang"]) {
                 continue;
             }
             $Series[$v->name] = "rmeP('NewSeries', '-1', 'showInfo', ['{$v->name}', '{$v->language}'], 'if(checkResponse(transport)) { \$(\\'Row{$i}\\').className = \\'backgroundColor1\\'; \$(\\'contentLeft\\').update(transport.responseText); }');";
         }
     }
     asort($Series);
     foreach ($Series as $name => $action) {
         $T->addRow(array($name));
         $T->addRowStyle("cursor:pointer;");
         $T->addRowEvent("click", $action);
         $T->setRowID("Row{$i}");
         $i++;
     }
     return $LangTab . "<div style=\"margin-left:0px;height:500px;overflow:auto;\">" . $T . "</div>";
 }
 public function getHTML($id)
 {
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     try {
         $MArgs = func_get_args();
         return Aspect::joinPoint("around", $this, __METHOD__, $MArgs);
     } catch (AOPNoAdviceException $e) {
     }
     Aspect::joinPoint("before", $this, __METHOD__, $MArgs);
     // </editor-fold>
     if ($_SESSION["S"]->isUserAdmin()) {
         return parent::getHTML($id);
     }
     switch ($id) {
         case "1":
             $AC = anyC::get("JDownload");
             $AC->addOrderV3("JDownloadDate", "DESC");
             $AC->setLimitV3(19);
             $T = new HTMLTable(2);
             $T->weight("light");
             $T->addColStyle(1, "padding:5px;padding-left:10px;");
             $T->addColStyle(2, "color:grey;text-align:right;padding:5px;");
             while ($D = $AC->getNextEntry()) {
                 $T->addRow(array($D->A("JDownloadRenameto"), Util::formatByte($D->A("JDownloadFilesize"), 2)));
                 if ($D->A("JDownloadRenamed") == 0) {
                     $T->addRowClass("error");
                 }
                 #$r .= OnEvent::script ("\$j('#BrowsermJDownload".$E->getID()."').css('background-color', '');");
                 $T->addRowStyle("cursor:pointer;");
                 $T->addRowEvent("click", "contentManager.loadPlugin('contentRight', 'mJDownload', '', " . $D->getID() . ");");
             }
             return "<p class=\"prettyTitle\">Downloads</p>" . $T;
             break;
         case "2":
             break;
         case "3":
             return "";
             break;
     }
 }
 function getHTML($id)
 {
     #$showHelp = true;
     if ($this->collector == null) {
         $this->lCV3($id);
     }
     $singularLanguageClass = $this->loadLanguageClass("Installation");
     $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : "";
     if ($id == -1) {
         echo OnEvent::script(OnEvent::rme($this, "getActions", "", "function(transport){ contentManager.contentBelow(transport.responseText); }"));
     }
     $hasDBConnection = false;
     try {
         mUserdata::getGlobalSettingValue("DBVersion", false);
         $hasDBConnection = true;
     } catch (Exception $e) {
     }
     $g = "";
     $DBFilePath = Util::getRootPath() . "system/DBData/Installation.pfdb.php";
     $writable = new HTMLTable(1);
     $File = new File($DBFilePath);
     $File->loadMe();
     if (!$File->A("FileIsWritable") and !$hasDBConnection) {
         return;
     }
     if (!$File->A("FileIsWritable")) {
         $writable->addRow("<img src=\"./images/navi/restrictions.png\" style=\"float:left;margin-right:10px;\"/>Die Datei " . $DBFilePath . " ist nicht beschreibbar, Änderungen können nicht gespeichert werden.<br /><br />Machen Sie die Datei mit einem FTP-Programm beschreibbar. Klicken Sie dazu 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.");
         $g .= $writable->getHTML();
     }
     $gui = new HTMLGUI();
     $gui->setName("Datenbank-Zugangsdaten");
     if ($this->collector != null) {
         $gui->setAttributes($this->collector);
     }
     $gui->setCollectionOf($this->collectionOf, "Datenbank-Zugangsdaten");
     $gui->hideAttribute("password");
     $gui->hideAttribute("httpHost");
     $gui->hideAttribute("InstallationID");
     if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
         $UA = $_SESSION["S"]->getCurrentUser()->getA();
         if ($UA->name != "Installations-Benutzer") {
             $g = "In der Demo können keine Datenbank-Zugangsdaten geändert werden!";
             $gui->setIsDisplayMode(true);
         }
     }
     if (!Session::isPluginLoaded("multiInstall")) {
         $gui->setIsDisplayMode(true);
         $gui->setEditInDisplayMode(true, "contentLeft");
     }
     #try {
     $g .= $gui->getBrowserHTML($id);
     #} catch (Exception $e){
     #	$t->addRow(array("Etwas stimmt nicht, eine ".get_class($e)." wurde abgefangen!"));
     #	$t->addRow(array("<span style=\"font-size:8px;\">".nl2br(str_replace("#","\n#", $e->getTraceAsString()))."</span>"));
     #}
     /*	$help = "
     	<script type=\"text/javascript\">
     		contentManager.rmePCR('mInstallation','','getHelp','true','if(checkResponse(transport)) { Popup.create(\'123\', \'Installation\', \'Hilfe\'); Popup.update(transport, \'123\', \'Installation\'); }');
     	</script>";*/
     $ST = new HTMLSideTable("left");
     try {
         #$MailServer = LoginData::get("MailServerUserPass");
         #$MailServerID = $MailServer == null ? -1 : $MailServer->getID();
         $BMail = $ST->addButton("Mail-Server", "./plugins/Installation/serverMail.png");
         #$BMail->popup("edit", "Mail-Server", "LoginData", $MailServerID, "getPopup", "", "LoginDataGUI;preset:mailServer");
         $BMail->popup("edit", "Mail-Server", "mInstallation", -1, "manageMailservers");
         $BTestMail = $ST->addButton("Mailversand\ntesten", "mail");
         $BTestMail->popup("mailTest", "Mailversand testen", "mInstallation", "-1", "testMailGUI");
         if (Session::isPluginLoaded("mJabber")) {
             $JabberServer = LoginData::get("JabberServerUserPass");
             $JabberServerID = $JabberServer == null ? -1 : $JabberServer->getID();
             $BJabber = $ST->addButton("Jabber-Server", "./plugins/Installation/serverMail.png");
             $BJabber->popup("edit", "Jabber-Server", "LoginData", $JabberServerID, "getPopup", "", "LoginDataGUI;preset:jabberServer");
         }
         $BackupButton = $ST->addButton("Daten-\nsicherungen", "disk");
         $BackupButton->onclick("contentManager.loadFrame('contentLeft','BackupManager');");
     } catch (Exception $e) {
     }
     return $ST . $g;
     #.$t->getHTML();
     $t = new HTMLTable(1);
     try {
         $user = new User(1);
         $user->loadMe();
     } catch (DatabaseNotSelectedException $e) {
         if (BPS::getProperty("mInstallationGUI", "showErrorText", false)) {
             $t->addRow(isset($text["noDatabase"]) ? $text["noDatabase"] : "Es wurde kein korrekter Datenbankname angegeben.<br /><br />Bitte geben Sie eine existierende Datenbank an, sie wird nicht automatisch erzeugt.");
             $t->addRowClass("backgroundColor0");
             $t->addRowStyle("color:red;");
         }
         return $g . $t->getHTML();
         #.$help;
     } catch (NoDBUserDataException $e) {
         if (BPS::getProperty("mInstallationGUI", "showErrorText", false)) {
             $t->addRow(isset($text["wrongData"]) ? $text["wrongData"] : "Mit den angegebenen Datenbank-Zugangsdaten kann keine Verbindung aufgebaut werden.<br /><br />Wenn sie korrekt sind, werden hier weitere Möglichkeiten angezeigt angezeigt.");
             $t->addRowClass("backgroundColor0");
             $t->addRowStyle("color:red;");
         }
         if (PHYNX_MAIN_STORAGE == "MySQL") {
             try {
                 $DB1 = new DBStorageU();
                 $B = new Button("Hinweis", "notice", "icon");
                 $B->style("float:left;margin-right:10px;");
                 $File = new File(Util::getRootPath() . "system/connect.php");
                 $BR = new Button("DB-Verbindung\numstellen", "lieferschein");
                 $BR->style("float:right;margin-left:10px;");
                 $BR->rmePCR("mInstallation", "-1", "switchDBToMySQLo", "", "Installation.reloadApp();");
                 $BR = "Verwenden Sie den nebenstehenden Knopf, um die Verbindungsart auf die ältere Version umzustellen.<br />{$BR} Sie müssen sich anschließend erneut anmelden.";
                 $BReload = new Button("Ansicht\naktualisieren", "refresh");
                 $BReload->onclick("contentManager.emptyFrame('contentLeft'); contentManager.loadFrame('contentRight', 'mInstallation', -1, 0, 'mInstallationGUI;-');Popup.closeNonPersistent();");
                 $BReload->style("float:right;margin:10px;");
                 if (!$File->A("FileIsWritable")) {
                     $BR = "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.{$BReload}";
                 }
                 $t->addRow(array("{$B} <b>Möglicherweise ist die MySQLi-Erweiterung auf Ihrem Server nicht korrekt konfiguriert.</b><br /><br />{$BR}"));
                 $t->addRowClass("backgroundColor0");
             } catch (Exception $e) {
                 #echo "MySQL geht auch nicht!";
             }
         }
         return $g . $t->getHTML();
         #.$help;
     } catch (TableDoesNotExistException $e) {
     } catch (StorageException $e) {
     }
     /*$help = "
     	<script type=\"text/javascript\">
     		rme('mInstallation','','getHelp','false','if(checkResponse(transport)) { Popup.create(\'123\', \'Installation\', \'Hilfe\'); Popup.update(transport, \'123\', \'Installation\'); }');
     	</script>";*/
     /*if(false AND $id == -1) {
     			$BackupTab = new HTMLTable(1);
     
     			$BackupButton = new Button("Backup-\nManager","disk");
     			$BackupButton->style("float:right;");
     			$BackupButton->onclick("contentManager.loadFrame('contentLeft','BackupManager');");
     
     			$BackupTab->addRow($BackupButton);
     
     			$BUT = new Button((isset($text["alle Tabellen aktualisieren"]) ? $text["alle Tabellen aktualisieren"] : "alle Tabellen\naktualisieren"), "update");
     			$BUT->rmePCR("mInstallation", "", "updateAllTables", "", "$('contentLeft').update(transport.responseText);");
     
     			$g .= "
     	<div style=\"height:30px;\"></div>
     	$BackupTab
     	<div class=\"Tab backgroundColor1\"><p>Plugins</p></div>
     	<table>
     		<colgroup>
     			<col style=\"width:100px;\" class=\"backgroundColor2\" />
     			<col class=\"backgroundColor3\" />
     		</colgroup>
     		<tr>
     			<td colspan=\"3\">
     				<span style=\"float:right;\">".Installation::getReloadButton()."</span>
     				$BUT
     			</td>
     		</tr>
     		<tr>
     			<td style=\"background-color:white;\"></td>
     		</tr>";
     
     			$p = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins());
     			
     			
     			foreach($p as $key => $value){
     				try {
     					if(method_exists($_SESSION["CurrentAppPlugins"], "isPluginGeneric") AND $_SESSION["CurrentAppPlugins"]->isPluginGeneric($key)){
     						$c = new mGenericGUI('', $key);
     					} else {
     						$c = new $key();
     					}
     				} catch (ClassNotFoundException $e){
     					$key2 = $key."GUI";
     					
     					try {
     						$c = new $key2();
     					} catch (ClassNotFoundException $e2){
     						continue;
     					}
     				}
     				if($key == "CIs") continue;
     				
     
     				if($c->checkIfMyTableExists() AND $c->checkIfMyDBFileExists()) $showHelp = false;
     
     				if(!$c->checkIfMyDBFileExists())
     					continue;
     
     				$g .= "
     		<tr>
     			<td style=\"font-weight:bold;text-align:right;\">".($value != -1 ? $value : $key )."</td>
     			<td>".(!$c->checkIfMyTableExists() ? ($c->checkIfMyDBFileExists() ? "<input type=\"button\" value=\"".(isset($text["Tabelle anlegen"]) ? $text["Tabelle anlegen"] : "Tabelle anlegen")."\" onclick=\"installTable('$key');\" />" : "keine DB-Info-Datei" ) : ($c->checkIfMyDBFileExists() ? "<input type=\"button\" onclick=\"checkFields('$key');\" value=\"Tabellenupdate\" style=\"float:right;width:140px;\" />".(isset($text["Tabelle existiert"]) ? $text["Tabelle existiert"] : "Tabelle existiert") : (isset($text["keine DB-Info-Datei"]) ? $text["keine DB-Info-Datei"] : "keine DB-Info-Datei"))."")."</td>
     		</tr>";
     			}
     
     			$g .= "
     	</table>";
     		}*/
     #$showHelp = false;
     #if(!$showHelp)
     #	$help = OnEvent::script(OnEvent::closePopup("123", "Installation"));
     return $ST . $g;
     #.$help;
 }
Esempio n. 6
0
 public function popupDesktop($DeviceID)
 {
     $O = anyC::getFirst("fheOverview", "fheOverviewDeviceID", $DeviceID);
     $d = json_decode($O->A("fheOverviewDesktop"));
     $BD = new Button("Fertig", "bestaetigung");
     $BD->onclick("fheOverview.draggableStop(); " . OnEvent::closePopup("mfheOverview"));
     $BD->style("float:right;margin:10px;");
     echo $BD . "<div style=\"clear:both;\"></div>";
     $T = new HTMLTable(2, "Plugins");
     $T->useForSelection();
     $T->weight("light");
     while ($callback = Registry::callNext("Overview")) {
         $c = $callback->className();
         $B = new Button("Plugin hinzufügen", "arrow_left", "iconic");
         $T->addRow(array($B, $callback->name()));
         $T->addRowEvent("click", OnEvent::rme("mfheOverview", "pluginLoad", array($DeviceID, "'" . $callback->className() . "'"), "function(t){  \$j('#addPlugin{$c}').hide(); \$j('#OverviewDesktop').append(t.responseText); }"));
         $T->setRowID("addPlugin{$c}");
         if (isset($d->{$c})) {
             $T->addRowStyle("display:none;");
         }
     }
     Registry::reset("Overview");
     echo $T;
     echo OnEvent::script("fheOverview.draggableStart({$DeviceID});");
     $T = new HTMLTable(1, "Hintergrundbild");
     $T->weight("light");
     $ID = new Button("Bild löschen", "trash_stroke", "iconicL");
     $ID->style("float:right;");
     $ID->rmePCR("mfheOverview", "-1", "backgroundDelete", $DeviceID, "function(t){\$j('#OverviewDesktop').append(t.responseText); }");
     $I = new HTMLInput("upload", "file", null, array("multiple" => false));
     $I->onchange(OnEvent::rme($this, "backgroudUpload", array($DeviceID, "fileName"), "function(t){\$j('#OverviewDesktop').append(t.responseText); }"));
     $T->addRow($ID . "<div style=\"margin-right:30px;\">" . $I . "</div>");
     echo $T;
 }
Esempio n. 7
0
 function showOverview()
 {
     $html = "";
     $T = new HTMLTable(4, "Events");
     $T->setTableStyle("width:100%;");
     $T->addHeaderRow(array("Event", "Anzahl", "Preis", "Gesamt"));
     $gesamtpreis = 0;
     $mwst = 0;
     foreach ($_SESSION["ticketDataSelection"] as $SeminarID => $anzahl) {
         if ($anzahl == 0) {
             continue;
         }
         $S = new Seminar($SeminarID);
         $T->addRow(array("" . $S->A("SeminarName") . ", " . $S->A("SeminarVon") . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr", $anzahl, $S->A("SeminarPreisErwachsene"), Util::formatCurrency("de_DE", $anzahl * $S->A("SeminarPreisErwachsene"), true)));
         $T->addColStyle(1, "text-align:left;");
         $T->addColStyle(2, "text-align:right;");
         $T->addColStyle(3, "text-align:right;");
         $T->addColStyle(4, "text-align:right;");
         $gesamtpreis += $anzahl * $S->A("SeminarPreisErwachsene");
         $mwst = $S->A("SeminarMwSt");
         #$T->addCellID(4, "PreisGesamt".$S->getID());
     }
     $T->addRow(array("<label style=\"width:auto;\">Zu zahlender Betrag:</label>", "", "", "<b>" . Util::formatCurrency("de_DE", $gesamtpreis, true) . "</b>"));
     $T->addRowColspan(1, 3);
     $T->addRowStyle("border-top:1px solid black;");
     $calcMwst = Util::kRound($gesamtpreis / (100 + $mwst) * $mwst);
     $T->addRow(array("MwSt (" . Util::CLNumberParser($mwst) . "%):", "", "", Util::formatCurrency("de_DE", $calcMwst, true)));
     $T->addRowColspan(1, 3);
     $T->addCellStyle(1, "text-align:right;");
     $T->addRow(array("Netto-Betrag:", "", "", Util::formatCurrency("de_DE", $gesamtpreis - $calcMwst, true)));
     $T->addRowColspan(1, 3);
     $T->addCellStyle(1, "text-align:right;");
     $html .= $T;
     $T = new HTMLTable(2, "Rechnungsdaten");
     $T->setTableStyle("width:100%;");
     $T->addLV("Name:", $_SESSION["ticketDataAddress"]["vorname"] . " " . $_SESSION["ticketDataAddress"]["nachname"]);
     $T->addLV("Firma:", $_SESSION["ticketDataAddress"]["firma"]);
     $T->addRow(array("&nbsp;", ""));
     $T->addLV("E-Mail:", $_SESSION["ticketDataAddress"]["email"]);
     $T->addLV("Telefon:", $_SESSION["ticketDataAddress"]["tel"]);
     $T->addRow(array("&nbsp;", ""));
     $T->addLV("Straße:", $_SESSION["ticketDataAddress"]["strasse"] . " " . $_SESSION["ticketDataAddress"]["nr"]);
     $T->addLV("Ort:", $_SESSION["ticketDataAddress"]["plz"] . " " . $_SESSION["ticketDataAddress"]["ort"]);
     $T->addLV("Land:", ISO3166::getCountryToCode($_SESSION["ticketDataAddress"]["land"]));
     $html .= $T;
     $this->paymentMethods["cash"] = "Bar";
     $T = new HTMLTable(2, "Zahlung");
     $T->addLV("Zahlungsart:", $this->paymentMethods[$_SESSION["ticketDataPayment"]["via"]]);
     $T->setTableStyle("width:100%;");
     if ($_SESSION["ticketDataPayment"]["via"] == "debit") {
         $T->addRow(array("&nbsp;", ""));
         $T->addLV("Inhaber:", $_SESSION["ticketDataPayment"]["debitInhaber"]);
         $T->addLV("Kontonummer:", $_SESSION["ticketDataPayment"]["debitKontonummer"]);
         $T->addLV("BLZ:", $_SESSION["ticketDataPayment"]["debitBlz"]);
         #$T->addLV("Name der Bank:", $_SESSION["ticketDataPayment"]["debitBankName"]);
     }
     /*
     		$T->addRow(array("&nbsp;", ""));
     		
     		$T->addLV("E-Mail:", $_SESSION["ticketDataAddress"]["email"]);
     		$T->addLV("Telefon:", $_SESSION["ticketDataAddress"]["tel"]);
     		$T->addRow(array("&nbsp;", ""));
     		
     		$T->addLV("Straße:", $_SESSION["ticketDataAddress"]["strasse"]." ".$_SESSION["ticketDataAddress"]["nr"]);
     		$T->addLV("Ort:", $_SESSION["ticketDataAddress"]["plz"]." ".$_SESSION["ticketDataAddress"]["ort"]);
     		$T->addLV("Land:", ISO3166::getCountryToCode($_SESSION["ticketDataAddress"]["land"]));*/
     $I = new Button("Tickets kaufen", "");
     $I->onclick("CustomerPage.rme('handleOrder', [], function(){ document.location.reload(); })");
     $I->className("submitFormButton");
     $T->addRow($I);
     $T->addRowColspan(1, 2);
     $html .= $T;
     return "<form>" . $html . "</form>";
 }
Esempio n. 8
0
 public function getEditHTML()
 {
     if (BPS::getProperty($this->className . "GUI", "edit") == "ok") {
         return $this->getEditTableHTML();
     }
     ################################################################################
     if ($this->name == null) {
         $this->name = $this->className;
     }
     if ($this->attributes == null) {
         $this->attributes = PMReflector::getAttributesArrayAnyObject($this->object->getA());
     }
     $widths = Aspect::joinPoint("changeWidths", $this, __METHOD__);
     if ($widths == null) {
         $widths = array(700, 132, 218);
     }
     $tab = new HTMLTable(2);
     $tab->setTableStyle("width:{$widths['0']}px;margin-left:10px;");
     $tab->setColWidth(1, "50%");
     $tab->setColWidth(2, "50%");
     $A = $this->object->getA();
     $TSub = new HTMLTable(2);
     $TSub->setColWidth(1, 120);
     $TSub->setColClass(1, "");
     $TSub->setColClass(2, "");
     $TC = clone $TSub;
     $row = array();
     foreach ($this->attributes as $k => $v) {
         if (isset($this->types[$v]) and $this->types[$v] == "hidden") {
             continue;
         }
         if (isset($this->parsers[$v])) {
             $A->{$v} = $this->invokeParser($this->parsers[$v], $A->{$v}, $this->object);
         }
         if (isset($this->types[$v]) and $this->types[$v] == "select") {
             if (isset($this->options[$v]) and isset($this->options[$v][$A->{$v}])) {
                 $A->{$v} = $this->options[$v][$A->{$v}];
             }
         }
         if (isset($this->spaces[$v]) and $this->spaces[$v] != "") {
             if ($k > 0) {
                 $row[] = $TC;
             }
             if ($this->forceNewRow[$v]) {
                 $row[] = "";
                 $tab->addRow($row);
                 $tab->addRowClass("backgroundColor0");
                 $tab->addRowStyle("vertical-align:top;");
                 $row = array();
             }
             if (count($row) == 2) {
                 $tab->addRow($row);
                 $tab->addRowClass("backgroundColor0");
                 $tab->addRowStyle("vertical-align:top;");
                 $row = array();
             }
             $TC = clone $TSub;
             if (trim($this->spaces[$v]) != "") {
                 $TC->addRow(array($this->spaces[$v]));
                 $TC->addRowClass("backgroundColor2");
                 $TC->addRowColspan(1, 2);
             }
         }
         if ($A->{$v} != "") {
             $B = "";
             if (isset($this->fieldButtons[$v])) {
                 $B = $this->fieldButtons[$v];
                 $B->style("float:right;");
             }
             $TC->addLV($this->labels($v) . ":", $B . nl2br($A->{$v}));
             $TC->addRowStyle("vertical-align:top;");
         }
         /*
         			$label = isset($this->labels[$v]) ? $this->labels[$v] : $v;
         
         			$row[] = "<label>".($label != "" ? ucfirst($label).":" : "")."</label>";
         
         
         
         			$row[] = nl2br($A->$v);*/
         /*if(count($row) == 4){
         			$tab->addRow($row);
         			$row = array();
         		}*/
     }
     $row[] = $TC;
     if (count($row) == 1) {
         $row[] = "";
     }
     if (count($row) == 2) {
         $tab->addRow($row);
         $tab->addRowClass("backgroundColor0");
         $tab->addRowStyle("vertical-align:top;");
     }
     $BE = new Button("Eintrag\nbearbeiten", "edit");
     $BE->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionEdit));
     $BE->style("float:left;margin-left:10px;");
     $BD = new Button("Eintrag\nlöschen", "trash");
     $BD->onclick(str_replace(array("%CLASSNAME", "%CLASSID"), array($this->className, $this->object->getID()), $this->functionDelete));
     $BD->style("float:left;margin-left:10px;");
     $options = "<div style=\"width:{$widths['0']}px;\">" . $BE . $BD . implode("", $this->topButtons) . "</div><div style=\"clear:left;height:10px;width:{$widths['0']}px;\"></div>";
     $appended = "";
     if (count($this->appended) > 0) {
         foreach ($this->appended as $k => $v) {
             $appended .= $v->getHTML();
         }
     }
     $prepended = "";
     if (count($this->prepended) > 0) {
         foreach ($this->prepended as $k => $v) {
             $prepended .= $v->getHTML();
         }
     }
     /*
     		if(count($this->CRMGUIappendedElements) > 0)
     			foreach($this->CRMGUIappendedElements as $k => $v)
     				$appended .= $v->getHTML();*/
     return $options . $prepended . $tab . $appended;
 }
Esempio n. 9
0
 public function getListTable()
 {
     $T = new HTMLTable(2, "Gerichte");
     $T->maxHeight(480);
     $T->setColWidth(2, 30);
     $T->weight("light");
     $T->useForSelection(false);
     $AC = anyC::get("Gericht");
     $AC->addAssocV3("GerichtAdded", ">", "0");
     while ($E = $AC->getNextEntry()) {
         $BT = new Button("Löschen", "trash_stroke", "iconicL");
         $BT->onclick(OnEvent::rme($this, "reMoveItem", $E->getID(), OnEvent::reloadPopup("mGericht")));
         $T->addRow(array($E->A("GerichtName"), $BT));
         $T->addRowStyle("font-size:20px;");
         #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }"));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Die Liste enthält keine Einträge."));
         $T->addRowColspan(1, 2);
     }
     return $T;
 }
Esempio n. 10
0
 public function getArtikel($data)
 {
     $TKategorien = new HTMLTable(2, "Kategorien");
     $TKategorien->setTableStyle("width:100%;");
     $TKategorien->setTableID("tableKategorien");
     $TKategorien->setColWidth(1, 20);
     $B = new Button("Nach Kategorie filtern", "arrow_down", "iconic");
     $B->className("reverse");
     $AC = anyC::get("Kategorie", "type", "2");
     $AC->addOrderV3("name");
     $TKategorien->addRow(array($B, "Alle Kategorien"));
     $TKategorien->addRowClass("selectable");
     $TKategorien->addRowEvent("click", "CustomerPage.rme('getArtikel', {KategorieID: '', query : '{$data['query']}', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     if ($data["KategorieID"] == "") {
         $TKategorien->addRowStyle("text-decoration:underline;");
     }
     while ($K = $AC->getNextEntry()) {
         $B = new Button("Nach Kategorie filtern", "arrow_down", "iconic");
         if ($data["KategorieID"] != $K->getID()) {
             $B->className("reverse");
         }
         $TKategorien->addRow(array($B, $K->A("name")));
         $TKategorien->addRowClass("selectable");
         $TKategorien->addRowEvent("click", "CustomerPage.rme('getArtikel', {KategorieID: '" . $K->getID() . "', query : '{$data['query']}', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
         #if($data["KategorieID"] == $K->getID())
         #	$TKategorien->addRowStyle ("text-decoration:underline;");
     }
     $TArtikel = new HTMLTable(4, "Artikel");
     $TArtikel->setTableStyle("width:100%;");
     $TArtikel->setColWidth(1, 26);
     $TArtikel->setColWidth(2, 100);
     $TArtikel->setColStyle(4, "text-align:right;");
     $BQ = "";
     if ($data["query"] != "") {
         $BQ = new Button("Suche löschen", "x_alt", "iconic");
         $BQ->onclick("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : '', GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
         $BQ->style("color:darkred;float:left;");
     } else {
         $BQ = new Button("Suche", "question_mark", "iconic");
     }
     $I = new HTMLInput("query", "text", $data["query"]);
     $I->placeholder("Suche nach Name, Nummer oder Beschreibung");
     $I->style("width:90%;");
     $I->onEnter("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : this.value, GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     $BS = new Button("Los", "arrow_right", "iconic");
     $BS->onclick("CustomerPage.rme('getArtikel', {KategorieID: '{$data['KategorieID']}', query : \$j('[name=query]').val(), GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentRight').html(transport); });");
     $TArtikel->addRow(array($BQ, $I . " " . $BS));
     $TArtikel->addRowColspan(2, 3);
     $AC = anyC::get("Artikel");
     if ($data["KategorieID"] != "") {
         $AC->addAssocV3("KategorieID", "=", $data["KategorieID"], "AND", "1");
     }
     if ($data["query"] != "") {
         $AC->addAssocV3("artikelnummer", "LIKE", "%{$data['query']}%", "AND", "2");
         $AC->addAssocV3("name", "LIKE", "%{$data['query']}%", "OR", "2");
         $AC->addAssocV3("beschreibung", "LIKE", "%{$data['query']}%", "OR", "2");
     }
     $AC->addOrderV3("artikelnummer");
     $AC->addOrderV3("name");
     $AC->setLimitV3(100);
     while ($A = $AC->getNextEntry()) {
         $B = new Button("Artikel hinzufügen", "arrow_left", "iconic");
         $B->className("reverse");
         #$B->onclick("CustomerPage.rme('delPosten', {PostenID: '".$P->getID()."'}, function(){ CustomerPage.rme('getAuftrag', {GRLBMID: $data[GRLBMID]}, function(transport){ $('#contentLeft').html(transport); }); });");
         $A->resetParsers();
         $TArtikel->addRow(array($B, $A->A("artikelnummer"), $A->A("name") . ($A->A("bemerkung") != "" ? "<br /><small style=\"color:grey;\">" . $A->A("bemerkung") . "</small>" : ""), $this->showPrices ? Util::CLFormatCurrency($A->getGesamtBruttoVK() * 1, true) . "<br /><small style=\"color:grey;\">" . Util::CLFormatCurrency($A->getGesamtNettoVK() * 1, true) . "</small>" : ""));
         $TArtikel->addRowClass("selectable");
         $TArtikel->addRowEvent("click", "CCAuftrag.lastTextbausteinUnten = \$('[name=textbausteinUnten]').val(); CustomerPage.rme('addArtikel', {ArtikelID: '" . $A->getID() . "', GRLBMID: {$data['GRLBMID']}}, function(transport){ CustomerPage.rme('getAuftrag', {GRLBMID: {$data['GRLBMID']}}, function(transport){ \$('#contentLeft').html(transport); }); });");
     }
     if ($AC->numLoaded() == 0) {
         $TArtikel->addRow(array("", "Keine Artikel gefunden"));
         $TArtikel->setColWidth(2, 200);
     }
     $html = "<h1>Artikel</h1>\n\t\t\t\t{$TKategorien}\n\t\t\t\t{$TArtikel}";
     return $html;
 }
Esempio n. 11
0
 public function sidePanelAttachments($filesDir)
 {
     $I = new HTMLInput("TBAttachments", "file");
     $I->onchange(OnEvent::rme($this, "processAttachmentUpload", array("'{$filesDir}'", "fileName"), " " . OnEvent::reloadSidePanel("tinyMCE")));
     echo "<div style=\"padding:5px;height:50px;\">" . $I . "</div></div>";
     if (!file_exists(FileStorage::getFilesDir() . "{$filesDir}")) {
         mkdir(FileStorage::getFilesDir() . "{$filesDir}");
     }
     $T = new HTMLTable(2, "Bilder");
     $dir = new DirectoryIterator(FileStorage::getFilesDir() . "{$filesDir}");
     foreach ($dir as $file) {
         if ($file->isDot()) {
             continue;
         }
         if ($file->isDir()) {
             continue;
         }
         $BI = new Button("Datei löschen", "./images/i2/insert.png", "icon");
         $BD = new Button("Datei löschen", "./images/i2/delete.gif", "icon");
         $BD->style("float:right;margin-left:5px;");
         $BD->rmePCR("tinyMCE", "", "deleteAttachment", array("'{$filesDir}'", "'" . $file->getFilename() . "'"), OnEvent::reloadSidePanel("tinyMCE"));
         $T->addRow(array($BI, "{$BD}<small style=\"color:grey;float:right;margin-top:4px;\">" . Util::formatByte($file->getSize()) . " </small>" . (strlen($file->getFilename()) > 15 ? substr($file->getFilename(), 0, 15) . "..." : $file->getFilename())));
         $T->addRowStyle("cursor:pointer;");
         $T->addRowEvent("click", "contentManager.tinyMCEAddImage('" . DBImageGUI::imageLink("tinyMCEGUI", $filesDir, $file->getFilename(), true) . "');");
     }
     echo $T;
 }
Esempio n. 12
0
 function getBrowserHTML($lineWithId = -1)
 {
     $this->texts = $this->languageClass->getBrowserTexts();
     $singularLanguageClass = $this->loadLanguageClass($this->singularClass);
     $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $this->singularClass);
     $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $this->singularClass);
     $userHiddenFields = mUserdata::getHides($this->singularClass);
     $defaultTarget = "contentRight";
     if ($this->displaySide != "default") {
         $defaultTarget = "content" . ucfirst($this->displaySide);
     }
     if ($this->singularClass == "none") {
         echo "collectionOf is not set. See message log for further details.";
         throw new CollectionOfNotSetException();
     }
     if ($this->name == "Noname") {
         $_SESSION["messages"]->addMessage("There is no name set. You might use setName of HTMLGUI to do that.");
     }
     /**
      * ERROR-TABLE
      */
     $errorTab = new HTMLTable(1);
     if (isset($_SESSION["phynx_errors"]) and $lineWithId == -1 and ($_SERVER["HTTP_HOST"] == "dev.furtmeier.lan" or strpos(__FILE__, "nemiah") !== false)) {
         $errorTab->addRow("\n\t\t\t\t\t<img style=\"float:left;margin-right:10px;\" src=\"./images/navi/warning.png\" />\n\t\t\t\t\t<b>Es " . (count($_SESSION["phynx_errors"]) != 1 ? "liegen" : "liegt") . " " . count($_SESSION["phynx_errors"]) . " PHP-Fehler vor:</b><br />\n\t\t\t\t\t<a href=\"javascript:windowWithRme('Util','','showPHPErrors','');\">Fehler anzeigen</a>,<br />\n\t\t\t\t\t<a href=\"javascript:rme('Util','','deletePHPErrors','','contentManager.reloadFrameRight();');\">Fehler löschen</a>");
     }
     /**
      * RETURN-BUTTON
      */
     $returnTab = new HTMLTable(1);
     if ($this->isSelection) {
         $BReturn = new Button("Auswahl\nbeenden", "back");
         $BReturn->onclick("contentManager.restoreFrame('content" . ucfirst($this->displaySide) . "','selectionOverlay');");
         #return "<input type=\"button\" value=\"zurück zu\n".$p2[$s[0]]."\" style=\"background-image:url(./images/navi/back.png);\" class=\"bigButton backgroundColor3\" onclick=\"loadFrameV2('contentRight','$s[0]');\" />";
         $returnTab->addRow($BReturn);
     }
     /**
      * DELETE-BUTTON
      */
     if ((!$this->onlyDisplayMode or $this->deleteInDisplayMode) and $userCanDelete and !$this->isSelection and $this->showDeleteButton) {
         $this->newColsRight["delete"] = "\n\t\t\t<span class=\"iconic trash_stroke\" onclick=\"deleteClass('" . $this->singularClass . "','%%VALUE%%', " . ($this->JSOnDelete == null ? "function() { " . ($this->displaySide == "left" ? "contentManager.reloadFrameLeft();" : "contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '%%VALUE%%') \$('contentLeft').update('');") . " }" : $this->JSOnDelete) . ",'" . str_replace("%1", $this->singularName, $this->texts["%1 wirklich löschen?"]) . "');\"></span>";
     } elseif (!$userCanDelete) {
         $this->newColsRight["delete"] = "<img src=\"./images/i2/empty.png\" />";
     }
     /**
      * EDIT-BUTTON
      */
     if (!isset($this->newColsLeft["select"]) and (!$this->onlyDisplayMode or $this->editInDisplayMode) and $this->showEditButton) {
         $EB = new Button("", "./images/i2/edit.png");
         $EB->type("icon");
         $EB->className("editButton");
         if ($this->JSOnEdit == null) {
             $EB->onclick("contentManager.selectRow(this); contentManager.loadFrame('contentLeft','" . $this->singularClass . "','%%VALUE%%','0');");
         } else {
             $EB->onclick($this->JSOnEdit);
         }
         $this->newColsLeft["select"] = $EB;
     }
     $cols = count($this->showAttributes) + count($this->newColsLeft) + count($this->newColsRight);
     $valuesTab = new HTMLTable($cols, $lineWithId == -1 ? $this->displaySide == "left" ? $this->name : "" : null);
     $valuesTab->addTableClass("contentBrowser");
     /*if(isset($this->newColsRight["delete"]) AND ($this->displaySide == "default" OR $this->displaySide == "right"))
     			$valuesTab->setColClass($cols, "backgroundColor0");
     		if(isset($this->newColsRight["delete"]) AND $this->displaySide == "left")
     			$valuesTab->setColClass(1, "backgroundColor0");*/
     /**
      * QUICKSEARCH
      */
     #$quickSearchRow = "";
     if ($this->quickSearchPlugin != "" and $lineWithId == -1) {
         list($quickSearchRow, $BSearchInfo) = $this->getQuicksearchField();
         if ($this->displaySide == "left") {
             $insertRow = array($quickSearchRow);
             for ($i = 1; $i < $cols - 1; $i++) {
                 $insertRow[] = "";
             }
             $insertRow[] = $BSearchInfo;
             $valuesTab->addRow($insertRow);
             $valuesTab->addRowColspan(1, $cols - 1);
         } else {
             $valuesTab->addRow(array($BSearchInfo, $quickSearchRow));
             $valuesTab->addRowColspan(2, $cols - 1);
         }
         $valuesTab->addRowClass("backgroundColorHeader");
     }
     if ($this->headerRow != null) {
         $valuesTab->addHeaderRow($this->headerRow);
     }
     /**
      * PAGE-BROWSER
      */
     #$multiPageRow = "";
     $separator = "";
     $userDefinedEntriesPerPage = false;
     $isMultiPageMode = false;
     if (count($this->multiPageMode) > 0) {
         $isMultiPageMode = true;
         $this->multiPageMode[3] = $defaultTarget;
         if ($this->multiPageMode[2] == 0) {
             $userDefinedEntriesPerPage = true;
             #$mU = new mUserdata();
             #$this->multiPageMode[2] = $mU->getUDValue("entriesPerPage{$this->multiPageMode[4]}");
             #if($this->multiPageMode[2] == null) $this->multiPageMode[2] = 20;
         }
         /*
         
         if($this->multiPageMode[1] == "undefined") $this->multiPageMode[1] = 0;
         
         $pages = ceil($this->multiPageMode[0] / $this->multiPageMode[2]);
         
         if($this->multiPageMode[1] != 0) $pageLinks = "<a href=\"javascript:contentManager.loadPage('$defaultTarget', '0');\">&nbsp;&lt;&lt;&nbsp;</a> ";
         else $pageLinks = "&nbsp;&lt;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != 0) $pageLinks .= "<a href=\"javascript:contentManager.backwardOnePage('$defaultTarget');\">&nbsp;&lt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.forwardOnePage('$defaultTarget');\">&nbsp;&gt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&gt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget',".($pages-1).");\">&nbsp;&gt;&gt;&nbsp;</a> | ";
         else $pageLinks .= "&nbsp;&gt;&gt;&nbsp; | ";
         
         $start = $this->multiPageMode[1] - 3;
         if($start < 0) $start = 0;
         
         $end = $this->multiPageMode[1] + 3;
         if($end > $pages - 1) $end = $pages - 1;
         
         for($i=$start; $i<=$end; $i++)
         	if($this->multiPageMode[1] != "$i") $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget','".$i."');\">".($i+1)."</a> ";
         	else $pageLinks .= ($i+1)." ";
         
         	$pageLinks = "".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": ".$pageLinks;
         */
         if ($this->displaySide == "left") {
             $pageLinks = "<span style=\"float:right;\">" . $this->getMultiPageButtons() . "</span>";
         } else {
             $pageLinks = $this->getMultiPageButtons();
         }
         /*if($lineWithId == -1) $multiPageRow = "
         					<tr>
         						".($userDefinedEntriesPerPage ? "<td><img class=\"mouseoverFade\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','multiPageSettings:{$this->multiPageMode[4]}','".$this->texts["Einstellungen"].":');\" /></td>" : "")."
         						<td colspan=\"".($colspan+1+($userDefinedEntriesPerPage ? 0 : 1))."\"><input type=\"text\"onkeydown=\"if(event.keyCode == 13) loadFrameV2('".$this->multiPageMode[3]."','".$this->multiPageMode[4]."','',this.value - 1);\" style=\"width:30px;float:right;text-align:right;\" value=\"".($this->multiPageMode[1]+1)."\" onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\" />".$this->multiPageMode[0]." ".($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"])."<!--, ".$pages." ".($pages != 1 ? $this->texts["Seiten"] : $this->texts["Seite"])."--></td>
         					</tr>
         					<tr>
         						<td colspan=\"$determinedNumberofCols\">".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": $pageLinks</td>
         					</tr>";
         
         
         */
         if ($lineWithId == -1) {
             $BSettings = $this->getPageOptionsButton();
             #$IPage = $this->getPageSelectionField();
             #$IPage->style("width:30px;float:right;text-align:right;");
             $pageOptions = $this->multiPageMode[0] . " " . ($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"]) . ", {$pageLinks}";
             if (!$userDefinedEntriesPerPage) {
                 $valuesTab->addRow(array($pageOptions));
                 $valuesTab->addRowColspan(1, $cols);
             } else {
                 if ($this->displaySide == "left") {
                     $insertRow = array($pageOptions);
                     for ($i = 1; $i < $cols - 1; $i++) {
                         $insertRow[] = "";
                     }
                     $insertRow[] = $BSettings;
                     $valuesTab->addRow($insertRow);
                     #$valuesTab->addRow(array($pageOptions,$BSettings));
                     $valuesTab->addRowColspan(1, $cols - 1);
                 } else {
                     /*$insertRow = array($BSettings);
                     		for($i=1; $i<$cols-1; $i++)
                     			$insertRow[] = "";
                     		$insertRow[] = $pageOptions;
                     		$valuesTab->addRow($insertRow);*/
                     $valuesTab->addRow(array($BSettings, $pageOptions));
                     $valuesTab->addRowColspan(2, $cols - 1);
                 }
             }
             $valuesTab->addRowClass("backgroundColorHeader");
             #$valuesTab->addRow(array($pageLinks));
             #$valuesTab->addRowColspan(1, $cols);
             #$valuesTab->addRowClass("backgroundColorHeader");
             $valuesTab->addRow("");
             $valuesTab->addRowColspan(1, $cols);
             $valuesTab->addRowClass("backgroundColor0 browserSeparatorTop");
         }
     }
     $filteredCol = null;
     if ($lineWithId == -1 and $this->showFilteredCategoriesWarning != null and $this->showFilteredCategoriesWarning[0]) {
         $dB = new Button($this->texts["Filter löschen"], "./images/i2/delete.gif");
         $dB->style("float:right;");
         $dB->type("icon");
         $dB->rme("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->showFilteredCategoriesWarning[1]}'"), "if(checkResponse(transport)) contentManager.reloadFrameRight();");
         /*$separator = "
         		<tr>
         			<td class=\"backgroundColor0\"".((isset($this->showFilteredCategoriesWarning[0]) AND $this->showFilteredCategoriesWarning[0] == true) ? "<img src=\"./images/i2/note.png\" /></td><td class=\"backgroundColor0\" colspan=\"".($determinedNumberofCols - 2)."\" style=\"color:grey;\" >".$this->texts["Anzeige wurde gefiltert"]."</td><td class=\"backgroundColor0\">$dB</td>" : " >")."</td>
         		</tr>";*/
         $filteredCol = array("<img src=\"./images/i2/note.png\" />", $dB . $this->texts["Anzeige wurde gefiltert"]);
         $valuesTab->addRow($filteredCol);
         $valuesTab->addRowColspan(2, $cols - 1);
         $valuesTab->addRowClass("backgroundColor0");
         $valuesTab->addRowStyle("color:grey;");
     }
     /**
      * NEW-BUTTON
      */
     if (!$this->onlyDisplayMode and $userCanCreate and $this->showNewButton and $lineWithId == -1) {
         $BNew = new Button("", "./images/i2/new.gif");
         $BNew->type("icon");
         $BNew->id("buttonNewEntry{$this->singularClass}");
         #$BNew->onclick($this->JSOnNew == null ? "contentManager.newClassButton('$this->singularClass','');" : $this->JSOnNew);
         if ($this->displaySide == "left") {
             #$valuesTab->addRow(array("<b>$this->singularName neu anlegen</b>",$BNew));
             #$valuesTab->addRowColspan(1, $cols-1);
         } else {
             $valuesTab->addRow(array($BNew, "<b>{$this->singularName} neu anlegen</b>"));
             $valuesTab->addRowColspan(2, $cols - 1);
             $valuesTab->addRowEvent("click", $this->JSOnNew == null ? "contentManager.newClassButton('{$this->singularClass}','');" : $this->JSOnNew);
             $valuesTab->addRowStyle("cursor:pointer;");
         }
         #$valuesTab->addRowColspan(2, $cols-1);
     }
     /**
      * TABLE-CONTENT
      */
     $displayGroup = null;
     for ($i = 0; $i < count($this->attributes); $i++) {
         $aid = $this->attributes[$i]->getID();
         // get the id of an object separately
         $sc = $this->attributes[$i]->getA();
         // get the attributes-object from the object
         if ($this->displayGroupBy != null) {
             $displayGroupField = $this->displayGroupBy;
             if ($sc->{$displayGroupField} != $displayGroup and $i > 0) {
                 $valuesTab->addRow("");
                 $valuesTab->addRowClass("backgroundColor0");
             }
         }
         $row = array();
         $styles = array();
         if ($this->displaySide == "left") {
             $colsLeft = $this->newColsRight;
             $colsRight = $this->newColsLeft;
         } else {
             $colsLeft = $this->newColsLeft;
             $colsRight = $this->newColsRight;
         }
         if (count($colsLeft) > 0) {
             foreach ($colsLeft as $key => $value) {
                 $row[] = str_replace("%%VALUE%%", $aid, $value);
                 $valuesTab->setColWidth(count($row), "20px");
             }
         }
         foreach ($this->showAttributes as $key => $value) {
             if (isset($userHiddenFields[$value])) {
                 continue;
             }
             if (isset($this->parsers[$value])) {
                 $t = $this->invokeParser($this->parsers[$value], $sc->{$value}, $this->makeParameterStringFromArray($this->parserParameters[$value], $sc, $aid));
             } else {
                 $t = htmlspecialchars($sc->{$value});
             }
             if ($this->multiEditMode != null and in_array($value, $this->multiEditMode)) {
                 $posInArray = array_search($value, $this->multiEditMode);
                 if ($this->multiEditModeInputs[$posInArray] == null) {
                     $MI = new HTMLInput($value . "ID{$aid}", "multiInput", $sc->{$value}, array($this->singularClass, $aid, $value));
                     if ($this->multiEditModeStyle != null) {
                         $MI->style($this->multiEditModeStyle[$posInArray]);
                     }
                 } else {
                     $MI = clone $this->multiEditModeInputs[$posInArray];
                     $MI->setValue($sc->{$value});
                     $MI->activateMultiEdit($this->singularClass, $aid);
                 }
                 $t = $MI;
             }
             #<td id=\"Browser".$value."$aid\" ".(isset($this->colStyles[$value]) ? "style=\"".$this->colStyles[$value]."\"" : "").">".$t."</td>";
             $row[] = $t;
             if (isset($this->colStyles[$value])) {
                 $styles[count($row)] = $this->colStyles[$value];
             }
         }
         if (count($colsRight) > 0) {
             foreach ($colsRight as $key => $value) {
                 $row[] = str_replace("%%VALUE%%", $aid, $value);
                 $valuesTab->setColWidth(count($row), "20px");
             }
         }
         $valuesTab->addRow($row);
         if (count($styles) > 0) {
             foreach ($styles as $col => $s) {
                 $valuesTab->addColStyle($col, $s);
             }
         }
         $valuesTab->setRowID("BrowserMain{$aid}");
         #foreach($this->showAttributes as $key => $value) {
         #	$valuesTab->addCellID($cellNo, "Browser".$value."$aid");
         #}
         if ($this->displayGroupBy != null) {
             $displayGroup = $sc->{$displayGroupField};
         }
     }
     if ($filteredCol !== null) {
         $valuesTab->addRow($filteredCol);
         $valuesTab->addRowColspan(2, $cols - 1);
         $valuesTab->addRowClass("backgroundColor0");
         $valuesTab->addRowStyle("color:grey;");
     }
     if ($lineWithId == -1 and $isMultiPageMode) {
         $valuesTab->addRow("");
         $valuesTab->addRowColspan(1, $cols);
         $valuesTab->addRowClass("backgroundColor0 browserSeparatorBottom");
         if (!$userDefinedEntriesPerPage) {
             $valuesTab->addRow(array($pageOptions));
             $valuesTab->addRowColspan(1, $cols);
         } else {
             if ($this->displaySide == "left") {
                 $valuesTab->addRow(array($pageOptions, $BSettings));
                 $valuesTab->addRowColspan(1, $cols - 1);
             } else {
                 $valuesTab->addRow(array($BSettings, $pageOptions));
                 $valuesTab->addRowColspan(2, $cols - 1);
             }
         }
         $valuesTab->addRowClass("backgroundColorHeader");
         #$valuesTab->addRow(array($pageLinks));
         #$valuesTab->addRowColspan(1, $cols);
         #$valuesTab->addRowClass("backgroundColorHeader");
     }
     if (count($this->attributes) == 0) {
         $valuesTab->addRow(array("keine Einträge"));
         $valuesTab->addRowColspan(1, $cols);
     }
     if ($lineWithId != -1) {
         $valuesTab = $valuesTab->getHTMLForUpdate();
     }
     return $errorTab . $returnTab . $valuesTab . ($lineWithId == -1 ? $this->tip : "");
 }
Esempio n. 13
0
 public function getListTable()
 {
     $T = new HTMLTable(2);
     $T->maxHeight(400);
     $T->setColWidth(2, 30);
     $T->weight("light");
     $T->useForSelection(false);
     $AC = anyC::get("Einkaufszettel", "EinkaufszettelBought", "0");
     $AC->addOrderV3("EinkaufszettelTime", "DESC");
     while ($E = $AC->getNextEntry()) {
         $BT = new Button("Löschen", "trash_stroke", "iconicL");
         #$BT->onclick();
         $T->addRow(array(($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : ""), $BT));
         $T->addRowStyle("font-size:20px;");
         $T->addRowEvent("click", OnEvent::rme($E, "deleteMe", "", OnEvent::reloadPopup("mEinkaufszettel")));
         #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }"));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Die Einkaufsliste enthält keine Einträge."));
         $T->addRowColspan(1, 2);
     }
     return $T . OnEvent::script("\$j('#currentList div div').css('max-height', contentManager.maxHeight() - \$j('#headerList').outerHeight());");
 }
Esempio n. 14
0
 public function getService($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(4);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 200);
     $T->setColWidth(4, 200);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isWhat", "S");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     #$AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("isPrinted", "=", "0");
     $AC->addAssocV3("isEMailed", "=", "0");
     $AC->addAssocV3("isPixelLetteredTime", "=", "0");
     #$AC->addAssocV3("status", "=", "delivered");
     $AC->addAssocV3("GRLBMServiceMitarbeiter", "=", Session::currentUser()->getID(), "AND", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter2", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter3", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter4", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addOrderV3("datum", "DESC");
     #$AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $BPDF = new Button("PDF anzeigen");
         $BPDF->className("submitFormButton");
         $BPDF->style("background-color:#DDD;color:grey;float:right;");
         $BPDF->onclick("CustomerPage.popup('Service PDF', 'getPDFViewer', {GRLBMID: '" . $B->getID() . "'}, {width:'800px'});");
         $BOK = "";
         if ($B->A("GRLBMServiceSigAG") != "" and $B->A("GRLBMServiceSigAG") != "[]") {
             $BOK = new Button("Kunde hat unterschrieben", "check", "iconic");
             $BOK->style("font-size:55px;");
         }
         $Adresse = new Adresse($B->A("AdresseID"));
         $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress(), $BOK, $BPDF));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $event = "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\tCCAuftrag.lastTextbausteinUnten = null;\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');";
         if ($B->A("GRLBMServiceSigAG") == "" or $B->A("GRLBMServiceSigAG") == "[]") {
             $T->addCellEvent(1, "click", $event);
             $T->addCellEvent(2, "click", $event);
             $T->addRowStyle("cursor:pointer;");
         } else {
             $T->addRowStyle("cursor:default;");
         }
         $i++;
     }
     $html .= $T;
     return $html;
 }