/** * Method to display an E-Mail popup for easy E-Mail sending * * Requires a method named "getEMailData" in $dataClass which returns an array: * array(fromName, fromAddress, recipientName, recipientAddress, subject, body) * * Will call $dataClass($dataClassID)::sendEmail afterwards * * @param string $dataClass * @param string $dataClassID */ public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null) { $c = new $dataClass($dataClassID); $data = $c->getEMailData($callbackParameter); $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); $tab->addLV("Absender:", "{$data['fromName']}<br /><small><{$data['fromAddress']}></small>"); if (count($data["recipients"]) == 1) { $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small><" . $data["recipients"][0][1] . "></small>"); } else { $recipients = array(); foreach ($data["recipients"] as $ID => $Rec) { $recipients[$ID] = new HTMLInput($Rec[0] . " <" . $Rec[1] . ">", "option", $ID); } $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", "0", $recipients); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />"); $tab->addRow(array("<textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea>")); $tab->addRowColspan(1, 2); $tab->addRowClass("backgroundColor0"); if ($onSuccessFunction == null) { $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');"; } $BAbort = new Button("Abbrechen", "stop"); $BAbort->onclick("Popup.close('Util', 'edit');"); $BAbort->style("margin-bottom:10px;margin-top:10px;"); $BGo = new Button("E-Mail\nsenden", "okCatch"); $BGo->style("float:right;margin-top:10px;"); $BGo->rmePCR($dataClass, $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", count($data["recipients"]) == 1 ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction); #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); "); $tab->addRow(array($BGo . $BAbort)); $tab->addRowColspan(1, 2); #$tab->addRowClass("backgroundColor0"); echo $tab; }
/** * Method to display an E-Mail popup for easy E-Mail sending * * Requires a method named "getEMailData" in $dataClass which returns an array: * array(fromName, fromAddress, recipientName, recipientAddress, subject, body) * * Will call $dataClass($dataClassID)::sendEmail afterwards * * @param string $dataClass * @param string $dataClassID */ public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null, $onAbortFunction = null, $return = false) { $c = new $dataClass($dataClassID); $data = $c->getEMailData($callbackParameter); $html = ""; $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); $tab->addLV("Absender:", "{$data['fromName']}<br /><small><{$data['fromAddress']}></small>"); if (is_array($data["recipients"])) { if (count($data["recipients"]) == 1) { $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small><" . $data["recipients"][0][1] . "></small>"); } else { $recipients = array(); foreach ($data["recipients"] as $ID => $Rec) { $recipients[$ID] = new HTMLInput($Rec[0] . " <" . $Rec[1] . ">", "option", $ID); } $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", isset($data["default"]) ? $data["default"] : "0", $recipients); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } } else { $IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />"); $html .= $tab; $html .= "<div style=\"width:94%;margin:auto;\"><textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>"; #$tab->addRow(array("")); #$tab->addRowColspan(1, 2); #$tab->addRowClass("backgroundColor0"); $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); if ($onSuccessFunction == null) { $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');"; } $BAbort = new Button("Abbrechen", "stop"); if ($onAbortFunction == null) { $BAbort->onclick("Popup.close('Util', 'edit');"); } else { $BAbort->onclick($onAbortFunction); } $BAbort->style("margin-bottom:10px;margin-top:10px;"); $BGo = new Button("E-Mail\nsenden", "okCatch"); $BGo->style("float:right;margin-top:10px;"); if (strpos($data["body"], "<p") !== false) { $BGo->doBefore("nicEditors.findEditor('EMailBody{$dataClassID}').saveContent(); %AFTER"); } $BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", (is_array($data["recipients"]) and count($data["recipients"]) == 1) ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction); #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); "); $tab->addRow(array($BGo . $BAbort)); $tab->addRowColspan(1, 2); #$tab->addRowClass("backgroundColor0"); $html .= $tab; if (strpos($data["body"], "<p") !== false) { echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\tnew nicEditor({\n\t\t\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\t\t\tbuttonList : ['bold','italic','underline'],\n\t\t\t\tmaxHeight : 400\n\t\t\t}).panelInstance('EMailBody{$dataClassID}');}, 100);"); } if ($return) { return $html; } else { echo $html; } }
function showPayPal() { $new = "<p><a href=\"#\" onclick=\"CustomerPage.rme('handleRestart', [], function(){ document.location.reload(); }); return false;\">Weitere Karten kaufen</a></p>"; switch ($_SESSION["ticketDataPayment"]["via"]) { #default: case "paypal": #www.paypal.com $paypalHTML = '<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="payPalForm"> <p>Vielen Dank für Ihren Einkauf!<br />Sie erhalten die Rechnung in Kürze per E-Mail.<br /><br /><b>Um die Zahlung abzuschließen, klicken Sie bitte auf nachfolgenden Knopf:</b></p> <input type="hidden" name="cmd" value="_cart" /> <input type="hidden" name="upload" value="1" /> <input type="hidden" name="currency_code" value="EUR" /> <input type="hidden" name="charset" value="utf-8" /> <input type="hidden" name="invoice" value="' . implode(";", $_SESSION["ticketDataOrderIDs"]) . '" /> <input type="hidden" name="business" value="*****@*****.**" />'; $i = 1; foreach ($_SESSION["ticketDataSelection"] as $SeminarID => $anzahl) { if ($anzahl == 0) { continue; } $S = new Seminar($SeminarID, false); $paypalHTML .= ' <input type="hidden" name="item_name_' . $i . '" value="' . $S->A("SeminarName") . ", " . $S->A("SeminarVon") . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr" . '" /> <input type="hidden" name="amount_' . $i . '" value="' . $anzahl * $S->A("SeminarPreisErwachsene") . '" />'; $i++; } $paypalHTML .= ' <p> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif" style="width:auto;border:0px;" name="submit" /> </p> ' . $new . ' </form> <script type="text/javascript"> $(document).ready(function() { $("#payPalForm").submit(function() { window.open("", "payPalpopup", "width=1000,height=600,resizeable,scrollbars"); this.target = "payPalpopup"; }); //$("#payPalForm").submit(); }); </script>'; $html .= $paypalHTML; break; case "debit": $html = "<form><p>Vielen Dank für Ihren Einkauf!<br />Sie erhalten die Rechnung in Kürze per E-Mail.<br /><br /><b>Der Rechnungsbetrag wird von uns von Ihrem Konto abgebucht.</b></p>{$new}</form>"; break; case "transfer": $S = mStammdaten::getActiveStammdaten(); $T = new HTMLTable(2); $T->addLV("Kontoinhaber:", $S->A("firmaLang")); $T->addLV("BLZ:", $S->A("blz")); $T->addLV("Konto:", $S->A("ktonr")); if ($S->A("IBAN") != "" and $S->A("SWIFTBIC") != "") { $T->addRow(array("", "")); $T->addLV("IBAN", $S->A("IBAN")); $T->addLV("BIC", $S->A("SWIFTBIC")); } $T->addRow(array("", "")); $T->addLV("Verw. zweck:", "Auftrag " . implode(", ", $_SESSION["ticketDataOrderIDs"])); $html = "<form><p>Vielen Dank für Ihren Einkauf!<br />Sie erhalten die Rechnung in Kürze per E-Mail.<br /><br /><b>Bitte überweisen Sie den Rechnungsgetrag auf folgendes Konto:</b></p>{$T}<p>Diese Daten finden Sie auch auf der Rechnung.</p>{$new}</form>"; break; default: $html = "<form><p>Vielen Dank für Ihren Einkauf!<br />Sie erhalten die Rechnung in Kürze per E-Mail.</p>{$new}</form>"; break; } return $html; }
function getInfo($time) { $BE = ""; $BD = ""; $BDS = ""; if ($this->editable != null) { if ($this->editable[0] != null) { $BE = new Button("Bearbeiten", "edit", "icon"); $BE->style("margin:10px;float:right;"); $BE->popup("", "Kalendereintrag bearbeiten", "mKalender", $this->classID, "editInPopup", array("'" . $this->className . "'", $this->classID, "'{$this->editable[0]}'")); } $BD = new Button("Dieses Event löschen", "trash", "icon"); $BD->style("float:right;margin:10px;"); $BD->doBefore("if(confirm('Löschen?')) %AFTER"); $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentScreen'); Popup.close('mKalender', 'edit');"); if ($this->repeat() !== false) { $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], array($this->classID, $time + Kalender::parseTime($this->time) - 60), "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');"); $BDS = new Button("Alle Events Löschen", "./ubiquitous/Kalender/deleteSeries.png", "icon"); $BDS->style("float:right;margin:10px;"); $BDS->doBefore("if(confirm('Löschen?')) %AFTER"); $BDS->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');"); } } $T = new HTMLTable(2, "Eventdetails"); $T->setColWidth(1, 120); $T->addColStyle(1, "vertical-align:top;"); $T->addLV("Betreff", $this->title); $T->addLV("Tag", Util::CLDateParser($time)); if (!$this->allDay) { $T->addLV("Uhrzeit", $this->formatTime($this->time)); } else { $T->addLV("Uhrzeit", "Ganzer Tag"); } $T->addLV("Details", "<div style=\"max-height:300px;overflow:auto;\">" . $this->summary . "</div>"); if ($this->organizer) { $T->addLV("Organisator", $this->organizer); } if (count($this->values) > 0) { $T->insertSpaceAbove(); } foreach ($this->values as $label => $value) { $T->addLV($label, $value); } $BN = ""; if ($this->canNotify) { // TODO: Entfernen sobald Einladungen funktionieren $BN = new Button("Terminbestätigung", "mail" . ($this->notified ? "ed" : ""), "icon"); $BN->style("margin-top:10px;margin-left:10px;"); $BN->popup("", "Terminbestätigung", "Util", "-1", "EMailPopup", array("'mKalender'", "-1", "'notification::{$this->className}::{$this->classID}::{$time}'", "'function(){ Kalender.refreshInfoPopup(); }'")); } $BR = ""; if ($this->isRepeatable and $this->getException() === false) { $BR = new Button("Wiederholungen", "refresh", "icon"); $BR->style("margin:10px;float:right;"); $BR->rmePCR("mKalender", "-1", "getRepeatable", array("'{$this->className}'", "'{$this->classID}'", "'{$this->isRepeatable}'"), "function(transport){ \$j('#eventSideContent').html(''); \$j('#editDetailsmKalender').animate({'width':'400px'}, 200, 'swing'); \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }"); } $BI = new Button("Teilnehmer", "./ubiquitous/Kalender/einladungen.png", "icon"); $BI->style("margin: 10px; float: right;"); $BI->rmePCR("mKalender", "-1", "getInvitees", array("'{$this->className}'", "'{$this->classID}'"), "function(t){ \$j('#eventAdditionalContent').html(''); \$j('#editDetailsmKalender').animate({'width':'800px'}, 200, 'swing', function(){ \$j('#eventSideContent').html(t.responseText).fadeIn(); }); }"); if (!$this->canInvite) { $BI = ""; } $closed = ""; if ($this->closeable) { $BC = new Button("Termin abschließen", "bestaetigung", "icon"); $BC->style("margin: 10px; float: right;"); $BC->rmePCR("mKalender", "-1", "getClose", array("'{$this->className}'", "'{$this->classID}'"), "function(t){ \$j('#editDetailsContentmKalender').html(t.responseText); }"); if ($this->closed[0]) { $BC = ""; $closed = "<p>Termin abgeschlossen am " . Util::CLDateParser($this->closed[0]) . ($this->closed[1] != "" ? ":<br>" . nl2br($this->closed[1]) : "") . "</p>"; } } $topButtons = ""; foreach ($this->topButtons as $B) { $B->type("icon"); $B->style("margin-top:10px;margin-left:10px;"); $topButtons .= $B; } return "<div style=\"width:400px;\">" . $BDS . $BD . $BE . $BN . $topButtons . $BR . $BI . $BC . $closed . "</div><div style=\"clear:both;\"></div><div style=\"display:none;\" id=\"eventAdditionalContent\"></div><div style=\"display:none;width:400px;float:right;\" id=\"eventSideContent\"></div><div style=\"width:400px;float:left;\" id=\"eventDefaultContent\"{$T}</div>"; }
function getInfo($time) { $BE = ""; $BD = ""; $BDS = ""; if ($this->editable != null) { if ($this->editable[0] != null) { $BE = new Button("Bearbeiten", "edit", "icon"); $BE->style("margin:10px;float:right;"); $BE->popup("", "Kalendereintrag bearbeiten", "mKalender", $this->classID, "editInPopup", array("'" . $this->className . "'", $this->classID, "'{$this->editable[0]}'")); } $BD = new Button("Dieses Event Löschen", "trash", "icon"); $BD->style("float:right;margin:10px;"); $BD->onclick("if(confirm('Löschen?')) "); $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');"); if ($this->repeat() !== false) { $BD->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], array($this->classID, $time + Kalender::parseTime($this->time) - 60), "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');"); $BDS = new Button("Alle Events Löschen", "./ubiquitous/Kalender/deleteSeries.png", "icon"); $BDS->style("float:right;margin:10px;"); $BDS->onclick("if(confirm('Löschen?')) "); $BDS->rmePCR(str_replace("GUI", "", $this->className), $this->classID, $this->editable[1], $this->classID, "contentManager.reloadFrame('contentLeft'); Popup.close('mKalender', 'edit');"); } } $T = new HTMLTable(2, "Eventdetails"); $T->setColWidth(1, 120); $T->addColStyle(1, "vertical-align:top;"); $T->addLV("Betreff", $this->title); $T->addLV("Tag", Util::CLDateParser($time)); if (!$this->allDay) { $T->addLV("Uhrzeit", $this->formatTime($this->time)); } else { $T->addLV("Uhrzeit", "Ganzer Tag"); } $T->addLV("Details", "<div style=\"max-height:300px;overflow:auto;\">" . $this->summary . "</div>"); if ($this->organizer) { $T->addLV("Organisator", $this->organizer); } if (count($this->values) > 0) { $T->insertSpaceAbove(); } foreach ($this->values as $label => $value) { $T->addLV($label, $value); } $BN = ""; if ($this->canNotify) { // TODO: Entfernen sobald Einladungen funktionieren $BN = new Button("Termin-\nbestätigung", "mail" . ($this->notified ? "ed" : ""), "icon"); $BN->style("margin-top:10px;margin-left:10px;"); $BN->popup("", "Terminbestätigung", "Util", "-1", "EMailPopup", array("'mKalender'", "-1", "'notification::{$this->className}::{$this->classID}::{$time}'", "'function(){ Kalender.refreshInfoPopup(); }'")); } $BR = ""; if ($this->isRepeatable and $this->getException() === false) { $BR = new Button("Wiederholungen", "refresh", "icon"); $BR->style("margin:10px;float:right;"); $BR->rmePCR("mKalender", "-1", "getRepeatable", array("'{$this->className}'", "'{$this->classID}'", "'{$this->isRepeatable}'"), "function(transport){ \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }"); } // TODO: Flag für Teilnehmer erstellen // nur anzeigen, wenn es sich um eine ToDo handelt // $buttonInvite = new Button("Teilnehmer einladen", "refresh", "icon"); // $buttonInvite->style("margin: 10px; float: right;"); // $buttonInvite->rmePCR("mKalender", "-1", "getInviteForm", array("'$this->className'", "'$this->classID'", "'getInviteForm'"), "function(transport){ \$j('#eventAdditionalContent').html(transport.responseText).slideDown(); }"); $topButtons = ""; foreach ($this->topButtons as $B) { $B->type("icon"); $B->style("margin-top:10px;margin-left:10px;"); $topButtons .= $B; } return $BDS . $BD . $BE . $BN . $topButtons . $BR . $buttonInvite . "<div style=\"clear:both;\"></div><div style=\"display:none;\" id=\"eventAdditionalContent\"></div>" . $T; }
/** * Method to display an E-Mail popup for easy E-Mail sending * * Requires a method named "getEMailData" in $dataClass which returns an array: * array(fromName, fromAddress, recipientName, recipientAddress, subject, body) * * Will call $dataClass($dataClassID)::sendEmail afterwards * * @param string $dataClass * @param string $dataClassID */ public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null, $onAbortFunction = null, $return = false) { $c = new $dataClass($dataClassID); $data = $c->getEMailData($callbackParameter); $html = ""; if (isset($data["attachmentsAlways"])) { /*$B = new Button("Anhänge", "export", "LPBig"); $B->style("margin:10px;float:right;"); $B->sidePanel("Util", "-1", "EMailPopupAttachmentsSP", array("'$dataClass'", "'$dataClassID'", "'$callbackParameter'")); $html .= $B;*/ $html .= OnEvent::script(OnEvent::popupSidePanel("Util", "-1", "EMailPopupAttachmentsSP", array("'{$dataClass}'", "'{$dataClassID}'", "'{$callbackParameter}'"))); } #$html .= "<p class=\"prettyTitle\">Neue E-Mail</p>"; #$html .= "<div style=\"clear:both;\"></div>"; $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); $tab->addLV("Absender:", "{$data['fromName']}<br /><small style=\"color:grey;\"><{$data['fromAddress']}></small>"); if (is_array($data["recipients"])) { if (count($data["recipients"]) == 1) { $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small style=\"color:grey;\"><" . $data["recipients"][0][1] . "></small>"); } else { $recipients = array(); foreach ($data["recipients"] as $ID => $Rec) { $recipients[$ID] = new HTMLInput($Rec[0] . " <" . $Rec[1] . ">", "option", $ID); } $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", isset($data["default"]) ? $data["default"] : "0", $recipients); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } } else { $IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]); $IS->id("EMailRecipient{$dataClassID}"); $tab->addLV("Empfänger:", $IS); } if (isset($data["bcc"]) and count($data["bcc"]) > 0) { foreach ($data["bcc"] as $bcc) { $tab->addLV("BCC:", $bcc); } } $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />"); $html .= $tab; $html .= "<div style=\"width:94%;margin:auto;\"><textarea class=\"tinyMCEEditor\" id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>"; #$tab->addRow(array("")); #$tab->addRowColspan(1, 2); #$tab->addRowClass("backgroundColor0"); $tab = new HTMLTable(2); $tab->setColWidth(1, "120px;"); if ($onSuccessFunction == null) { $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');"; } $BAbort = new Button("Abbrechen", "stop"); if ($onAbortFunction == null) { $BAbort->onclick("Popup.close('Util', 'edit');"); } else { $BAbort->onclick($onAbortFunction); } $BAbort->style("margin-bottom:10px;margin-top:10px;"); $optional = "var files = '';"; if (isset($data["attachmentsOptional"])) { $optional .= "\$j('#UtilEmailFormAttachments input[type=checkbox]:checked').each(function(k, v){ files += \$j(v).data('value')+'##'; });"; } $BGo = new Button("E-Mail\nsenden", "okCatch"); $BGo->style("float:right;margin-top:10px;"); $BGo->loading(); $BGo->doBefore("{$optional} %AFTER"); if (strpos($data["body"], "<p") !== false or trim($data["body"]) == "") { $BGo->doBefore("{$optional} \$j('#EMailBody{$dataClassID}').val(tinyMCE.get('EMailBody{$dataClassID}').getContent()); %AFTER"); } $BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$j('#EMailBody{$dataClassID}').val()", (is_array($data["recipients"]) and count($data["recipients"]) == 1) ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'", "files"), $onSuccessFunction); #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); "); $tab->addRow(array($BGo . $BAbort)); $tab->addRowColspan(1, 2); $tab->addRowClass("backgroundColor0"); $html .= $tab; if (strpos($data["body"], "<p") !== false or trim($data["body"]) == "") { echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t" . tinyMCEGUI::editorMail("EMailBody{$dataClassID}", null, "undo redo | pastetext | bold italic underline | fullscreen code") . "\n\t\t\t}, 100);"); } if ($return) { return $html; } else { echo $html; } }
function getInfo($time) { $T = new HTMLTable(2); $T->setColWidth(1, 120); $T->addLV("Name", $this->title); $T->addLV("Erster Tag", $this->formatDay($this->firstDay)); $T->addLV("Letzter Tag", $this->formatDay($this->lastDay)); $T->addLV("Beschreibung", $this->summary); if (count($this->values) > 0) { $T->insertSpaceAbove(); } foreach ($this->values as $label => $value) { $T->addLV($label, $value); } return $T; }
public function restoreBackup($name) { if ($_SESSION["S"]->isUserAdmin() == "0") { throw new AccessDeniedException(); } require Util::getRootPath() . "libraries/PMBP.inc.php"; $DB = new DBStorageU(); $con = $DB->getConnection(); $file = fopen(Util::getRootPath() . "system/Backup/{$name}", "r"); $return = PMBP_exec_sql($file, $con); $Tab = new HTMLTable(2); $Tab->setColWidth(1, "120px"); $Tab->addLV("Tabellen", $return["insertQueries"]); $Tab->addLV("Datensätze", $return["tableQueries"]); $Tab->addLV("Befehle gesamt", $return["totalqueries"]); $Tab->addLV("Zeilen", $return["linenumber"]); $Tab->addLV("Fehler", $return["error"]); echo $Tab; }
public function newInput($number) { $htmlTable = new HTMLTable(2); $input = new HTMLInput("adress_" . ++$number, "text"); $input->autocomplete("mTodo", "function(selection) { (typeof selection.email != 'undefined')? \$j('input[name=adress_" . $number . "]').val(selection.email) : \$j('input[name=adress_" . $number . "]').val(selection.value); return false; }"); $input->onfocus(OnEvent::rme($this, "newInput", $number, "function(transport) {\$j('input[name=adress_" . $number . "]').closest('tr').after(transport.responseText); \$j('input[name=adress_" . $number . "]').attr('onfocus', ''); }")); $htmlTable->addLV("Teilnehmer " . ($number + 1) . ":", $input); echo $htmlTable->getHTMLForUpdate(true); }
public function getContactPopup($kundennummer) { $A = new Adresse(Kappendix::getAdresseIDToKundennummer($kundennummer)); $T = new HTMLTable(2); $T->setColWidth(1, 120); $T->addRow(array($A->getHTMLFormattedAddress())); $T->addRowColspan(1, 2); if ($A->getA() == null) { die($T); } if ($A->A("tel") != "") { $T->addLV("Telefon:", $A->A("tel")); } if ($A->A("fax") != "") { $T->addLV("Fax:", $A->A("fax")); } if ($A->A("mobil") != "") { $T->addLV("Mobil:", $A->A("mobil")); } if ($A->A("email") != "") { $T->addLV("E-Mail:", $A->A("email")); } if (!Session::isPluginLoaded("mAnsprechpartner")) { die($T); } $AC = Ansprechpartner::getAnsprechpartner("Adresse", $kundennummer); $TAP = new HTMLTable(2); $TAP->setColWidth(1, 120); while ($AP = $AC->getNextEntry()) { if (trim($AP->A("AnsprechpartnerVorname") . " " . $AP->A("AnsprechpartnerNachname")) != "") { $TAP->insertSpaceAbove($AP->A("AnsprechpartnerPosition")); $TAP->addLV("Name:", $AP->A("AnsprechpartnerVorname") . " " . $AP->A("AnsprechpartnerNachname")); if ($AP->A("AnsprechpartnerTel") != "") { $TAP->addLV("Telefon:", $AP->A("AnsprechpartnerTel")); } if ($AP->A("AnsprechpartnerEmail") != "") { $TAP->addLV("E-Mail:", $AP->A("AnsprechpartnerEmail")); } } } echo $T . $TAP; }
public function getAdresse($Beleg) { $html = "<div style=\"width:50%;display:inline-block;vertical-align:top;\">" . parent::getAdresse($Beleg) . "</div>"; $T = new HTMLTable(3, "Details"); $I = new Button("Details", "info", "iconic"); if (Session::isPluginLoaded("mAdresseNiederlassung") and strpos($Beleg->A("GRLBMServiceArbeitsort"), "AdresseNiederlassungID:") === 0) { $N = new AdresseNiederlassung(str_replace("AdresseNiederlassungID:", "", $Beleg->A("GRLBMServiceArbeitsort"))); AdresseNiederlassung::fill($N); $new = $N->A("AdresseNiederlassungStrasse") . " " . $N->A("AdresseNiederlassungNr") . ", " . $N->A("AdresseNiederlassungPLZ") . " " . $N->A("AdresseNiederlassungOrt"); $Beleg->changeA("GRLBMServiceArbeitsort", $new); } $T->addRow(array($I, "<label>Auftraggeber:</label>", $Beleg->A("GRLBMServiceAuftraggeber"))); $T->addRow(array("", "<label>Ansprechpartner:</label>", $Beleg->A("GRLBMServiceAnsprechpartner"))); $T->addRow(array("", "<label>Arbeitsort:</label>", $Beleg->A("GRLBMServiceArbeitsort"))); if ($Beleg->A("GRLBMServiceTerminTag") > 0) { $T->addLV(array("", "<label>Termin:</label>", Util::CLDateParserE($Beleg->A("GRLBMServiceTerminTag")) . ($Beleg->A("GRLBMServiceTerminUhr") > 0 ? " um " . Util::CLTimeParser($Beleg->A("GRLBMServiceTerminUhr")) . " Uhr" : ""))); } $html .= "<div style=\"width:49%;margin-left:1%;display:inline-block;vertical-align:top;\">{$T}</div>"; return $html; }