function getCMSHTML()
 {
     $key = substr(Util::eK(), 0, 5);
     if (!isset($_GET["key"]) or $key != $_GET["key"]) {
         return "<span style=\"color:red;\">Bitte geben Sie den richtigen Schlüssel zum Aufrufen der Seite in der Adresszeile an.</span>";
     }
     registerClassPath("Einkaufszettel", Util::getRootPath() . "fheME/Einkaufszettel/Einkaufszettel.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");
     * 
     */
     $AC = anyC::get("Einkaufszettel");
     $AC->addAssocV3("EinkaufszettelBought", "=", "0");
     $AC->addOrderV3("EinkaufszettelName");
     $html = "<style type=\"text/css\">\n\t\t\t\tbody {\n\t\t\t\t\tmargin:0px;\n\t\t\t\t\tmargin-top:10px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entry {\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryTouch {\n\t\t\t\t\tbackground-color: #c5d674;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div id=\"einkaufsliste\">";
     while ($E = $AC->getNextEntry()) {
         $html .= "<div id=\"entry" . $E->getID() . "\" onclick=\"CustomerPage.rme('setBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').remove(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\" class=\"nonEmpty entry backgroundColor1 borderColor1\">" . ($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : "") . "</div>";
     }
     $html .= "<div style=\"" . ($AC->numLoaded() == 0 ? "" : "display:none;") . "\" class=\"entry backgroundColor1 borderColor1\" id=\"emptyEntry\">Die Einkaufsliste enthält keine Einträge.<br /><small style=\"color:grey;\">" . Util::CLDateParser(time()) . "</small></div>";
     $html .= "</div>";
     return $html . OnEvent::script("\$('.entry').hammer().on('touch', function(){ \$(this).addClass('entryTouch'); }); \$('.entry').hammer().on('release', function(){ \$(this).removeClass('entryTouch'); });");
 }
Exemple #2
0
 function showMessageTimeout($timeout)
 {
     echo $this->messageParser();
     if ($timeout > 0) {
         echo OnEvent::script("window.setTimeout(function(){" . OnEvent::closePopup("Nuntius") . "}, {$timeout} * 1000);");
     }
 }
Exemple #3
0
 function getCMSHTML()
 {
     $key = substr(Util::eK(), 0, 5);
     if (!isset($_GET["key"]) or $key != $_GET["key"]) {
         return "<span style=\"color:red;\">Bitte geben Sie den richtigen Schlüssel zum Aufrufen der Seite in der Adresszeile an.</span>";
     }
     registerClassPath("Einkaufszettel", Util::getRootPath() . "fheME/Einkaufszettel/Einkaufszettel.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");
     * 
     */
     $AC = anyC::get("Einkaufszettel");
     $AC->addAssocV3("EinkaufszettelBought", "=", "0");
     $AC->addJoinV3("EinkaufszettelKategorie", "EinkaufszettelEinkaufszettelKategorieID", "=", "EinkaufszettelKategorieID");
     $AC->addOrderV3("EinkaufszettelKategorieName");
     $AC->addOrderV3("EinkaufszettelName");
     $html = "<style type=\"text/css\">\n\t\t\t\tbody {\n\t\t\t\t\tmargin:0px;\n\t\t\t\t\tmargin-top:10px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@media only screen and (max-width: 360px) {\n\t\t\t\t\thtml {\n\t\t\t\t\t\tzoom: .8;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t  \n\t\t\t\t.entry {\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\t-webkit-tap-highlight-color:rgba(255,255,255,0);\n\t\t\t\t\twidth:100%;\n\t\t\t\t\tbox-sizing:border-box;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryRestore {\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\tcolor:#444;\n\t\t\t\t\t-webkit-tap-highlight-color:rgba(255,255,255,0);\n\t\t\t\t\twidth:100%;\n\t\t\t\t\tbox-sizing:border-box;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.backgroundColor4 {\n\t\t\t\t\tbackground-color: #eee;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryTouch {\n\t\t\t\t\tbackground-color: #c5d674;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.borderColor0 {\n\t\t\t\t\tborder-color:white;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div id=\"einkaufsliste\">";
     $B = new Button("Wiederherstellen", "undo", "iconicL");
     $last = null;
     while ($E = $AC->getNextEntry()) {
         if ($last != $E->A("EinkaufszettelKategorieName") and $last !== null) {
             $html .= "<h1 style=\"padding-left:10px;padding-top:15px;padding-bottom:7px;\">" . $E->A("EinkaufszettelKategorieName") . "</h1>";
         }
         $html .= "\n\t\t\t\t<div\n\t\t\t\t\tid=\"entry" . $E->getID() . "\"\n\t\t\t\t\tontouchend=\"if(Touch.cancelNext) return;  CustomerPage.rme('setBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').hide(); \$('#restoreEntry" . $E->getID() . "').show(); \$('#emptyEntry').hide(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\"\n\t\t\t\t\tclass=\"nonEmpty entry backgroundColor1 borderColor1\">\n\t\t\t\t\t\n\t\t\t\t\t" . ($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : "") . "\n\t\t\t\t</div>\n\t\t\t\t<div \n\t\t\t\t\tclass=\"nonEmpty entryRestore backgroundColor4 borderColor0\"\n\t\t\t\t\tontouchend=\"if(Touch.cancelNext) return; CustomerPage.rme('setUnBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').show(); \$('#restoreEntry" . $E->getID() . "').hide(); \$('#emptyEntry').hide(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\"\n\t\t\t\t\tid=\"restoreEntry" . $E->getID() . "\" style=\"display:none;\">" . $E->A("EinkaufszettelName") . " {$B}</div>";
         $last = $E->A("EinkaufszettelKategorieName");
     }
     $html .= "<div style=\"" . ($AC->numLoaded() == 0 ? "" : "display:none;") . "\" class=\"entry backgroundColor1 borderColor1\" id=\"emptyEntry\">Die Einkaufsliste enthält keine Einträge.<br /><small style=\"color:grey;\">" . Util::CLDateParser(time()) . "</small></div>";
     $html .= "</div>";
     return $html . OnEvent::script("\n\t\tvar Touch = {};\n\t\t\n\t\t\$(document).on('touchstart mousedown', '[ontouchend]', function(ev){\n\t\t\t\$(this).addClass('entryTouch'); \n\t\t\t\n\t\t\tTouch.startPos = [ev.clientX, ev.clientY];\n\t\t\tTouch.cancelNext = false;\n\t\t\tTouch.inAction = this;\n\t\t\n\t\t}); \n\t\t\n\t\t\$(document).on('touchend mouseup', '[ontouchend]', function(ev){\n\t\t\t\$(this).removeClass('entryTouch');\n\t\t\tTouch.inAction = false;\n\t\t});\n\t\t\t\n\t\t\$(document).on('touchmove mousemove', '[ontouchend]', function(ev){\n\t\t\tif(!Touch.inAction)\n\t\t\t\treturn;\n\n\t\t\tif(Math.abs(ev.clientX - Touch.startPos[0]) < 15 && Math.abs(ev.clientY - Touch.startPos[1]) < 15)\n\t\t\t\treturn;\n\n\t\t\tTouch.cancelNext = true;\n\t\t\t\$('.entryTouch').removeClass('entryTouch');\n\t\t\t\n\t\t\t//\$(ev.target).trigger('touchend');\n\t\t});\n\t");
 }
 public function getOffice3aRSS()
 {
     if (Environment::getS("blogShow", "1") == "0") {
         return "";
     }
     $data = file_get_contents(Environment::getS("blogRSSURL", "http://blog.office3a.eu/feed/"));
     if ($data === false) {
         return "";
     }
     $html = "\n\t\t\t<div style=\"border-bottom:1px solid #DDD;position:relative;\" class=\"desktopButton\" onclick=\"window.open('" . Environment::getS("blogURL", "http://blog.office3a.eu/") . "', '_blank');\">\n\t\t\t\t<h1 style=\"font-size:2.0em;color:#999999;position:absolute;bottom:5px;\">" . Environment::getS("blogName", "office<span style=\"color:#A0C100;\">3a</span> blog") . "</h1>\n\t\t\t</div>\n\t\t\t<div id=\"blogContainer\" style=\"padding-left:30px;padding-right:30px;overflow:auto;\">";
     try {
         $XML = new SimpleXMLElement($data);
         $i = 0;
         foreach ($XML->channel->item as $item) {
             $html .= "<h2 style=\"color:#999999;" . ($i > 0 ? "margin-top:30px;" : "") . "margin-bottom:0px;\">" . $item->title . "</h2>";
             $html .= "<p style=\"color:#999999;margin-top:10px;\">" . $item->description . "<br />\n\t\t\t\t\t<small style=\"color:#AAA;\">" . Util::CLFormatDate(strtotime($item->pubDate), true) . "</small> <a style=\"float:right;color:#444;\" href=\"{$item->link}\">mehr...</a></p>";
             #print_r($item);
             $i++;
             if ($i == 4) {
                 break;
             }
         }
         $html .= "</div>" . OnEvent::script("\$j('#blogContainer').css('height', contentManager.maxHeight() - \$j('.desktopButton').outerHeight() - 20)");
         return $html;
     } catch (Exception $e) {
         return "";
     }
 }
 public function getHTML($id, $page)
 {
     $html = "<div id=\"preview\" style=\"overflow:auto;background:linear-gradient(to right, #f1f1f1 0%,#f1f1f1 215px,#ffffff 215px,#ffffff 100%);\">";
     $html .= "<div style=\"display: inline-block;vertical-align: top;width: calc(100% - 200px);box-sizing: border-box;\">";
     $AC = anyC::get("poolAnzeige", "poolAnzeigeTyp", "row");
     $AC->addOrderV3("poolAnzeigeOrder");
     $AC->addOrderV3("poolAnzeigeID");
     while ($A = $AC->n()) {
         $html .= $this->row($A);
     }
     $B = new Button("Zeile\nhinzufügen", "new");
     $B->rmePCR("mpoolAnzeige", "-1", "addRow", "", OnEvent::reload("Screen"));
     $B->style("margin:10px;");
     $html .= $B;
     $html .= "</div><div style=\"display: inline-block;vertical-align: top;width: 190px;box-sizing: border-box;padding-left: 1em;border-left: 1px solid #ddd;\">";
     $AC = anyC::get("poolAnzeige", "poolAnzeigeTyp", "col");
     $AC->addOrderV3("poolAnzeigeOrder");
     $AC->addOrderV3("poolAnzeigeID");
     $A = $AC->n();
     if ($A != null) {
         $html .= $this->col($A);
     } else {
         $B = new Button("Spalte\nhinzufügen", "new");
         $B->rmePCR("mpoolAnzeige", "-1", "addCol", "", OnEvent::reload("Screen"));
         $B->style("margin:10px;float:right;");
         $html .= $B;
     }
     $html .= "</div></div>";
     $html .= OnEvent::script("\$j('#preview').css('height', contentManager.maxHeight());");
     return $html;
 }
 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); }"));
 }
 function getCMSHTML()
 {
     if (!isset($_GET["terminalID"])) {
         return "<p>Keine Terminal-ID per GET übergeben! (terminalID)</p>";
     }
     if (!isset($_GET["done"])) {
         return "<p style=\"font-size:30px;\">\r\n\t\t\t\tTerminal IP: " . $_SERVER['REMOTE_ADDR'] . "<br>\r\n\t\t\t\tServer IP: " . $_SERVER['SERVER_ADDR'] . "</p>\r\n\t\t\t\t<p>\r\n\t\t\t\t<a href=\"#\" onclick=\"\$.jStorage.set('pKTransferStack', []); \$.jStorage.set('pKTimeStack', []); return false;\">Datenspeicher löschen</a>\r\n\t\t\t\t</p>" . OnEvent::script("window.setTimeout(function(){ document.location.href=\"?" . $_SERVER['QUERY_STRING'] . "&done=true\"; }, 3000);");
     }
     self::loadClasses();
     $AC = self::getPersonal();
     $json = $AC->asJSON();
     $html = "\r\n\t\t<style type=\"text/css\">\r\n\t\t\thtml {\r\n\t\t\t\toverflow-y: hidden;\r\n\t\t\t}\r\n\t\t\tbody {\r\n\t\t\t\t/*background-image:url(./images/TimeTerminalBG.svg);\r\n\t\t\t\tbackground-size:100%;*/\r\n\t\t\t\tmargin:0px;\r\n\t\t\t}\r\n\t\t\t.message {\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.overlay {\r\n\t\t\t\tposition: fixed;\r\n\t\t\t\ttop: 0;\r\n\t\t\t\tleft: 0;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\theight: 100%;\r\n\t\t\t\tbackground-color: #72c100;\r\n\t\t\t\tz-index: 1100;\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.overlayCenter {\r\n\t\t\t\tposition: fixed;\r\n\t\t\t\ttop: 6%;\r\n\t\t\t\tleft: 3%;\r\n\t\t\t\twidth: 94%;\r\n\t\t\t\theight: 88%;\r\n\t\t\t\tbackground-color: white;\r\n\t\t\t\tz-index: 1101;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.green {\r\n\t\t\t\tbackground-color:#72c100;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.red {\r\n\t\t\t\tbackground-color:#c90021;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.orange {\r\n\t\t\t\tbackground-color:orange;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.touchField {\r\n\t\t\t\tbackground-color:#CCC;\r\n\t\t\t\tmargin-top:40px;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.currentAction {\r\n\t\t\t\tbackground-color:#c5ffab;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.overlay ul {\r\n\t\t\t\tlist-style-type:none;\r\n\t\t\t}\r\n\r\n\t\t\t.overlay li {\r\n\t\t\t\tfont-size:30px;\r\n\t\t\t\tfont-weight:normal;\r\n\t\t\t\tpadding-top:14px;\r\n\t\t\t\tpadding-bottom:14px;\r\n\t\t\t}\r\n\t\t</style>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tvar months = new Array('" . implode("', '", Datum::getGerMonthArray()) . "');\r\n\t\t\tvar days = new Array('" . implode("', '", Datum::getGerWeekArray()) . "');\r\n\t\t\tvar action = '" . ($this->switch ? "G" : "K") . "';\r\n\t\t\tvar inOverlay = false;\r\n\t\t\tvar inTransfer = false;\r\n\t\t\tvar Personal = {$json};\r\n\t\t\tvar PersonalLastUpdate = " . time() . ";\r\n\t\t\tvar timeoutTransfer = null;\r\n\t\t\t\r\n\t\t\t\$(function(){\r\n\t\t\t\twindow.setInterval(function(){\r\n\t\t\t\t\tclokk();\r\n\t\t\t\t}, 1000 * 30);\r\n\t\t\t\t\r\n\t\t\t\tclokk();\r\n\t\t\t\t\r\n\t\t\t\t\$('#chipCode').focus();\r\n\t\t\t\t\r\n\t\t\t\twindow.setInterval(function(){\r\n\t\t\t\t\tif(inOverlay || document.activeElement.id == 'chipCode')\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\$('#chipCode').focus();\r\n\t\t\t\t}, 1000);\r\n\t\t\t\t\r\n\t\t\t\twindow.setInterval(function(){\r\n\t\t\t\t\talive();\r\n\t\t\t\t}, 60000);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tfunction alive(){\r\n\t\t\t\tCustomerPage.rme('alive', [" . $_GET["terminalID"] . ", PersonalLastUpdate], function(t){\r\n\t\t\t\t\t\$('#aliveStatus').css('background-color', 'green');\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(t != ''){\r\n\t\t\t\t\t\tPersonal = JSON.parse(t);\r\n\t\t\t\t\t\tPersonalLastUpdate = Math.round(Date.now() / 1000);\r\n\t\t\t\t\t\t//console.log(Personal);\r\n\t\t\t\t\t}\r\n\t\t\t\t}, function(){\r\n\t\t\t\t\t\$('#aliveStatus').css('background-color', 'red');\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfunction clokk(){\r\n\t\t\t\tvar jetzt = new Date();\r\n\t\t\t\t\$('#clock').html(jetzt.getHours()+':'+(jetzt.getMinutes() < 10 ? '0' : '')+jetzt.getMinutes());\r\n\t\t\t\t\$('#day').html(days[jetzt.getDay()]+', '+jetzt.getDate()+'. '+months[jetzt.getMonth()]+' '+jetzt.getFullYear());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfunction heightContent(){\r\n\t\t\t\tvar max = \$j(window).height() / 100 * 88;\r\n\t\t\t\t\r\n\t\t\t\t\$j.each(\$j('.overlayContentSub'), function(k, v){\r\n\t\t\t\t\tmax -= \$j(v).outerHeight();\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn max;\r\n\t\t\t}\r\n\r\n\t\t\tfunction transfer(){\r\n\t\t\t\tif(inOverlay){\r\n\t\t\t\t\ttimeoutTransfer = window.setTimeout(function(){\r\n\t\t\t\t\t\ttransfer();\r\n\t\t\t\t\t}, 60000);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tinTransfer = true;\r\n\t\t\t\tvar timeStack = \$.jStorage.get('pKTimeStack', []);\r\n\t\t\t\t\$.jStorage.set('pKTimeStack', []);\r\n\t\t\t\tinTransfer = false;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tvar transferStack = \$.jStorage.get('pKTransferStack', []);\r\n\t\t\t\tvar newTransferStack = transferStack.concat(timeStack);\r\n\t\t\t\t\$.jStorage.set('pKTransferStack', newTransferStack);\r\n\t\t\t\t\r\n\t\t\t\tif(newTransferStack.length > 0)\r\n\t\t\t\t\tCustomerPage.rme('stampStack', [JSON.stringify(newTransferStack)/*, PersonalLastUpdate*/], function(t){\r\n\t\t\t\t\t\t\$.jStorage.set('pKTransferStack', []);\r\n\t\t\t\t\t\t//console.log('Transfer succeeded!');\r\n\t\t\t\t\t\tcounter();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/*if(t != ''){\r\n\t\t\t\t\t\t\tPersonal = JSON.parse(t);\r\n\t\t\t\t\t\t\tPersonalLastUpdate = Math.round(Date.now() / 1000);\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t}, function(){\r\n\t\t\t\t\t\t//console.log('Transfer failed!');\r\n\t\t\t\t\t\tcounter();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttimeoutTransfer = window.setTimeout(function(){\r\n\t\t\t\t\t\t\ttransfer();\r\n\t\t\t\t\t\t}, 60000);\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfunction counter(){\r\n\t\t\t\t\$('#transferCounter').html(\$.jStorage.get('pKTimeStack', []).length+'/'+\$.jStorage.get('pKTransferStack', []).length);\r\n\t\t\t}\r\n\r\n\t\t\tfunction stampp(){\r\n\t\t\t\tif(inTransfer){\r\n\t\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\t\tstampp();\r\n\t\t\t\t\t}, 20);\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\tinOverlay = true;\r\n\t\t\t\tvar stack = \$.jStorage.get('pKTimeStack', []);\r\n\t\t\t\tvar chip = \$('#chipCode').val();\r\n\t\t\t\t\r\n\t\t\t\tstack.push({'chip': chip, 'terminal': " . $_GET["terminalID"] . ", 'action': action, 'time': Math.round(Date.now() / 1000)});\r\n\t\t\t\t\$.jStorage.set('pKTimeStack', stack);\r\n\r\n\t\t\t\tvar usePersonal = null;\r\n\t\t\t\tfor (k in Personal) {\r\n\t\t\t\t//console.log(Personal[k].PersonalName+':'+Personal[k].PersonalChipNummer+';'+Personal[k].PersonalChipNummer2+';'+Personal[k].PersonalChipNummer3+';'+Personal[k].PersonalChipNummer4);\r\n\t\t\t\t\tif(chip == Personal[k].PersonalChipNummer){\r\n\t\t\t\t\t\tusePersonal = Personal[k];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(chip == Personal[k].PersonalChipNummer2){\r\n\t\t\t\t\t\tusePersonal = Personal[k];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(chip == Personal[k].PersonalChipNummer3){\r\n\t\t\t\t\t\tusePersonal = Personal[k];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(chip == Personal[k].PersonalChipNummer4){\r\n\t\t\t\t\t\tusePersonal = Personal[k];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\r\n\t\t\t\tvar color = 'green';\r\n\t\t\t\t\$('#chipCode').val('');\r\n\t\t\t\tif(usePersonal)\r\n\t\t\t\t\t\$j('.overlayText').html(usePersonal.PersonalName);\r\n\t\t\t\telse\r\n\t\t\t\t\t\$j('.overlayText').html('Zeit erfasst');\r\n\t\t\t\t\$j('.overlayDetails').html('');\r\n\r\n\t\t\t\t\$('.overlay').addClass(color).show();\r\n\r\n\t\t\t\tmoep();\r\n\r\n\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\t\$('.overlay').hide().removeClass(color);\r\n\t\t\t\t\tinOverlay = false;\r\n\t\t\t\t}, " . (isset($_GET["wait"]) ? $_GET["wait"] : "1500") . ");\r\n\t\t\t\t\r\n\r\n\t\t\t\tif(timeoutTransfer){\r\n\t\t\t\t\twindow.clearTimeout(timeoutTransfer);\r\n\t\t\t\t\ttimeoutTransfer = null;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\ttimeoutTransfer = window.setTimeout(function(){\r\n\t\t\t\t\ttransfer();\r\n\t\t\t\t}, 60000 * 2);\r\n\t\t\t\t\r\n\t\t\t\tcounter();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfunction moep(){\r\n\t\t\t\tif(typeof alex == 'undefined')\r\n\t\t\t\t\treturn;\r\n\t\t\t\tconsole.log(alex);\r\n\t\t\t\talex.beep();\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\$('html').focus(function() {\r\n\t\t\t\tif(inOverlay)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t\r\n\t\t\t\t\$('#chipCode').focus();\r\n\t\t\t}); \r\n\r\n\t\t\t\$(function(){\r\n\t\t\t\tmoep();\r\n\t\t\t\tcounter();\r\n\t\t\t\talive();\r\n\t\t\t\ttransfer();\r\n\t\t\t\t\r\n\t\t\t\t\$('.touchField').css('height', \$(window).height() - \$('#displayTime').outerHeight() - 60 - 130);\r\n\t\t\t\t\$('.touchField').hammer().on('touch release', function(ev){\r\n\t\t\t\t\tswitch(ev.type){\r\n\t\t\t\t\t\tcase 'touch':\r\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').css('background-color', 'rgba(255,204,0,0.3)');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'release':\r\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').css('background-color', '');\r\n\t\t\t\t\t\t\taction = \$(ev.target).closest('.touchField').data('action');\r\n\t\t\t\t\t\t\t\$('.currentAction').removeClass('currentAction');\r\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').addClass('currentAction');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t</script>";
     $I = new HTMLInput("chipCode");
     $I->id("chipCode");
     $I->onEnter("stampp();");
     $I->style("background-color:white;border:1px solid white;font-size:30px;width:96%;position:fixed;bottom:50px;");
     $BK = new Button("Kommen", "arrow_right", "iconic");
     $BK->style("font-size:200px;width:auto;");
     $BG = new Button("Gehen", "arrow_left", "iconic");
     $BG->style("font-size:200px;width:auto;");
     $actschion = "\r\n\t\t\t<div>\r\n\t\t\t\t<div data-action=\"G\" class=\"touchField\" style=\"width:48%;display:inline-block;margin-right:4%;vertical-align:top;\">\r\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;\">Gehen<br />{$BG}</p>\r\n\t\t\t\t</div><div data-action=\"K\" class=\"touchField currentAction\" style=\"width:48%;display:inline-block;vertical-align:top;\">\r\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;text-align:right;\">Kommen<br />{$BK}</p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>";
     if ($this->switch) {
         $actschion = "\r\n\t\t\t<div>\r\n\t\t\t\t<div data-action=\"K\" class=\"touchField\" style=\"width:48%;display:inline-block;margin-right:4%;vertical-align:top;\">\r\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;\">Kommen<br />{$BG}</p>\r\n\t\t\t\t</div><div data-action=\"G\" class=\"touchField currentAction\" style=\"width:48%;display:inline-block;vertical-align:top;\">\r\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;text-align:right;\">Gehen<br />{$BK}</p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>";
     }
     $html .= "\r\n\t\t\t<div id=\"transferCounter\" style=\"position:absolute;top:0px;left:0px;padding:3px;color:grey;\"></div>\r\n\t\t\t<div id=\"aliveStatus\" style=\"position:absolute;top:0px;right:0px;height:10px;width:10px;\"></div>\r\n\t\t\t\r\n\t\t\t<div id=\"displayTime\">\r\n\t\t\t\t<div id=\"clock\" style=\"font-size:190px;text-align:center;margin-top:40px;color:#333;\"></div>\r\n\t\t\t\t<div id=\"day\" style=\"font-size:35px;text-align:right;padding-right:45px;margin-top:0px;color:#CCC;\"></div>\r\n\t\t\t</div>\r\n\t\t\t{$actschion}\r\n\t\t\t{$I}\r\n\t\t\t<div class=\"overlay\">\r\n\t\t\t\t<div class=\"overlayCenter\">\r\n\t\t\t\t\t<div class=\"overlayList\"></div>\r\n\t\t\t\t\t<p style=\"font-size:70px;margin-top:60px;font-weight:bold;\" class=\"overlayText\"></p>\r\n\t\t\t\t\t<p style=\"font-size:50px;margin-top:60px;\" class=\"overlayDetails\"></p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>";
     return $html;
 }
 public static function parserDate($w, $l, $E)
 {
     $r = "";
     if ($E->A("JDownloadRenamed") == 0) {
         $r .= OnEvent::script("\$j('#BrowsermJDownload" . $E->getID() . "').css('background-color', 'rgba(235, 64, 0, 0.4)');");
     }
     return Util::CLDateTimeParser($w) . $r;
 }
Exemple #9
0
 public function getOverviewContent()
 {
     $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemWeckerGUI\"></span><p>Wecker</p></div>\n\t\t\t<div style=\"padding:10px;\">";
     $B = new Button("Wecker anzeigen", "moon_stroke", "iconicL");
     #Overlay.showDark();
     $html .= "\n\t\t\t<div class=\"touchButton\" onclick=\"Wecker.loadThemAll(function(){ Wecker.show(); });\">\n\t\t\t\t" . $B . "\n\t\t\t\t<div class=\"label\">Wecker anzeigen</div>\n\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</div>";
     $html .= "</div>" . OnEvent::script("if(\$j.jStorage.get('phynxWeckerActive', false) === true) Wecker.loadThemAll(function(){ Wecker.show(); });");
     echo $html;
 }
Exemple #10
0
 public function openInPopup($className, $classID, $fieldName)
 {
     $C = new $className($classID);
     $ITA = new HTMLInput("nicEditor", "textarea");
     $ITA->id("nicEditor");
     $ITA->style("width:998px;height:300px;");
     echo $ITA;
     echo OnEvent::script("\n\$j('#nicEditor').val('" . addslashes($C->A($fieldName)) . "'.makeHTML());\n\nsetTimeout(function(){\n\tnew nicEditor({\n\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\tbuttonList : ['save','bold','italic','underline','hr'],\n\t\tmaxHeight : 400,\n\n\t\tonSave : function(content, id, instance) {\n\t\t\tif(content.substr(0, 3) != '<p ' && content.substr(0, 3) != '<p>')\n\t\t\t\tcontent = '<p>'+content+'</p>';\n\t\t\t\n\t\t\t" . OnEvent::rme($C, "saveMultiEditField", array("'{$fieldName}'", "content.replace(/<br>/g, '<br />')")) . "\n\n\t\t\t" . OnEvent::closePopup("nicEdit") . "\n\t\t}\n\t}).panelInstance('nicEditor');}, 100);");
 }
Exemple #11
0
 public function getContextMenuHTML($identifier)
 {
     $I = new HTMLInput("CalculatorRechner");
     $I->onEnter(OnEvent::rme($this, "calculate", array("\$j('input[name=CalculatorRechner]').val()"), "function(t){ if(t.responseText != '##') { \$j('{$identifier}').val(t.responseText); " . OnEvent::closeContext() . " } }"));
     $I->requestFocus(true);
     echo $I;
     echo "<div id=\"CalculatorErgebnisse\"></div>";
     echo "<p>Dieser Rechner unterstützt +, -, *, / sowie Klammern.</p>";
     echo OnEvent::script("\$j('input[name=CalculatorRechner]').val(\$j('{$identifier}').val());");
 }
Exemple #12
0
 function formLogin()
 {
     $T = new HTMLForm("login", array("benutzer", "password", "action"), "Anmeldung");
     $T->setValue("action", "login");
     $T->setType("action", "hidden");
     $T->setType("password", "password");
     $T->setLabel("password", "Passwort");
     $T->setSaveCustomerPage("Anmelden", "", false, "function(){ document.location.reload(); }");
     return $T . OnEvent::script("\$j(function(){ \$j('[name=benutzer]').trigger('focus'); });");
 }
 protected function makeNewIfNew($promote = true)
 {
     if ($this->getID() != -1) {
         return $this->getID();
     }
     $this->loadMeOrEmpty();
     $id = $this->newMe();
     $this->forceReload();
     if ($promote) {
         echo OnEvent::script("contentManager.lastLoaded('left', " . $this->getID() . ");");
     }
     return $id;
 }
Exemple #14
0
 public function process(Fhem $F, $xml)
 {
     $state = $xml->attributes()->state;
     $stateText = "";
     $event = "\$j('#FhemControlID_" . $F->getID() . "').removeClass('highlight');";
     $FS = new Button("", "./images/i2/empty.png", "icon");
     $FS->style("float:left;margin-right:5px;width:32px;height:32px;");
     if ($state != "off" && $state != "aus") {
         $FS->image("./fheME/SieHabenPost/SieHabenPost.png");
         $stateText = "Sie haben Post!";
         $event = "\$j('#FhemControlID_" . $F->getID() . "').addClass('highlight');";
     }
     return "{$FS}<b>" . ($F->A("FhemAlias") == "" ? $F->A("FhemName") : $F->A("FhemAlias")) . "</b><br /><small style=\"color:grey;\">{$stateText}</small><div style=\"clear:both;\"></div>" . OnEvent::script($event);
 }
 public static function tipJS($plugin)
 {
     $targetClass = $plugin;
     if (mUserdata::getUDValueS("hideTooltips", "0")) {
         return;
     }
     $hide = mUserdata::getUDValueS("hideTooltip{$targetClass}", "0");
     if ($hide) {
         return;
     }
     $xml = SpellbookGUI::getSpell($targetClass);
     $entries = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
     return OnEvent::script("\$j('#{$targetClass}MenuImage').qtip(\$j.extend({}, qTipSharedRed, {\n\t\tcontent: {\n\t\t\ttext: '" . $xml->plugin[0]->description . "<br /><div style=\"margin-top:10px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltip{$targetClass}'", "'1'", "''", "0", "1"))) . " return false;\">Diesen Tipp nicht mehr anzeigen</a></div><div style=\"clear:both;margin-top:5px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltips'", "'1'", "''", "0", "1"))) . " return false;\">Keine Tipps mehr anzeigen</a></div>', \n\t\t\ttitle: {\n\t\t\t\ttext: '" . array_search($targetClass, $entries) . "',\n\t\t\t\tbutton: true\n\t\t\t}\n\t\t}\n\t}));");
 }
Exemple #16
0
 public function getHTML($id)
 {
     if ($_SESSION["S"]->isUserAdmin()) {
         $D = new ADesktopGUI();
         return $D->getHTML($id);
     }
     $c = Applications::activeApplication() . "DesktopGUI";
     try {
         $c = new $c();
         if ($id == "1") {
             return "\n\t\t\t\t\t<div style=\"float:right;width:33.3333%;\"><div id=\"desktopRight\" style=\"padding:10px;\">" . $c->getHTML($id) . "</div></div>\n\t\t\t\t\t<div style=\"float:right;width:33.3333%;\"><div id=\"desktopMiddle\" style=\"padding:10px;width:90%;margin:auto;\"></div></div>\n\t\t\t\t\t<div style=\"float:right;width:33.3333%;\"><div id=\"desktopLeft\" style=\"padding:10px;\"></div></div>\n\t\t\t\t\t" . OnEvent::script(OnEvent::frame("desktopLeft", "Desktop", "2") . OnEvent::frame("desktopMiddle", "Desktop", "3")) . "<div style=\"clear:both;\"></div>";
         }
         return $c->getHTML($id);
     } catch (ClassNotFoundException $e) {
     }
 }
 public function getControls()
 {
     switch ($this->A("TinkerforgeBrickletType")) {
         case "BrickletTemperatureIR":
             echo "<div id=\"brickletPlot" . $this->A("TinkerforgeBrickletUID") . "\" style=\"width:800px;height:300px;\"></div>" . OnEvent::script("\n\t\t\t\t\t\$j(function () {\n\t\t\t\t\t\tTinkerforge.plot.BID" . $this->A("TinkerforgeBrickletUID") . " = \$j.plot(\$j('#brickletPlot" . $this->A("TinkerforgeBrickletUID") . "'), [], {\n\t\t\t\t\t\t\txaxis: { \n\t\t\t\t\t\t\t\tmode: 'time',\n\t\t\t\t\t\t\t\ttimezone: 'browser',\n\t\t\t\t\t\t\t\ttimeformat: '%H:%M',\n\t\t\t\t\t\t\t\ttickLength: 0\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgrid: {\n\t\t\t\t\t\t\t\tborderWidth: 1,\n\t\t\t\t\t\t\t\tborderColor: '#AAAAAA'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t});");
             break;
         case "BrickletDualRelay":
             break;
     }
     /*
     		threshold: { 
     			below: 120,
     			color: 'rgb(200, 20, 30)'
     		}
     */
 }
Exemple #18
0
 function getCMSHTML()
 {
     if (!$this->loggedIn) {
         return $this->formLogin();
     }
     $BRL = new Button("Aktualisieren");
     $BRL->className("submitFormButton");
     $BRL->onclick("document.location.reload();");
     $BRL->style("float:right;margin-top:0px;");
     $BRA = new Button("Abmelden");
     $BRA->className("submitFormButton");
     $BRA->onclick("CustomerPage.rme('logout', {}, function(transport){ document.location.reload(); });");
     $BRA->style("background-color:#DDD;color:grey;margin-top:0px;float:right;margin-right:20px;");
     $IOK = new Button("Fertig");
     $IOK->className("submitFormButton");
     $IOK->onclick("\$('#frameSelect').show(); \$('#frameEdit').hide(); ");
     $IOK->style("margin-top:0px;float:right;margin-right:20px;");
     return "\n\t\t<div style=\"max-width:1200px;\">\n\t\t\t<div id=\"frameEdit\" style=\"display:none;\">\n\t\t\t\t<div style=\"display:inline-block;width:48%;vertical-align:top;margin-right:3%;\" id=\"contentLeft\">\n\t\t\t\t\t\t" . $this->getAuftrag(array("GRLBMID" => 0)) . "\n\t\t\t\t</div>\n\t\t\t\t<div style=\"display:inline-block;width:48%;vertical-align:top;\" id=\"contentRight\">\n\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"frameSelect\">\n\t\t\t\t<div style=\"display:inline-block;width:100%;vertical-align:top;\" id=\"contentScreen\">\n\t\t\t\t\t<h1>{$BRL}{$BRA}Angebote</h1>\n\t\t\t\t\t<div class=\"content\" style=\"overflow:auto;\">\n\t\t\t\t\t\t" . $this->getAngebote(array()) . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t\t" . OnEvent::script("\n\t\t\t\t/*\$('#contentRight .content .tableForSelection ').parent().css('max-height', \$(window).height() - \$('h1').outerHeight() - 40 - \$('#contentRight .Tab').outerHeight())\n\t\t\t\t\$('#contentLeft ').css('height', \$(window).height() - \$('h1').outerHeight() - 25)*/");
 }
 function getCMSHTML()
 {
     if (!isset($_GET["terminalID"])) {
         return "<p>Keine Terminal-ID per GET übergeben! (terminalID)</p>";
     }
     if (!isset($_GET["done"])) {
         return "<p style=\"font-size:30px;\">Terminal IP: " . $_SERVER['REMOTE_ADDR'] . "<br />Server IP: " . $_SERVER['SERVER_ADDR'] . "</p>" . OnEvent::script("window.setTimeout(function(){ document.location.href=\"?" . $_SERVER['QUERY_STRING'] . "&done=true\"; }, 3000);");
     }
     $html = "\n\t\t<style type=\"text/css\">\n\t\t\thtml {\n\t\t\t\toverflow-y: hidden;\n\t\t\t}\n\t\t\tbody {\n\t\t\t\t/*background-image:url(./images/TimeTerminalBG.svg);\n\t\t\t\tbackground-size:100%;*/\n\t\t\t\tmargin:0px;\n\t\t\t}\n\t\t\t.message {\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t.overlay {\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbackground-color: #72c100;\n\t\t\t\tz-index: 1100;\n\t\t\t\tdisplay:none;\n\t\t\t}\n\t\t\t\n\t\t\t.overlayCenter {\n\t\t\t\tposition: fixed;\n\t\t\t\ttop: 6%;\n\t\t\t\tleft: 3%;\n\t\t\t\twidth: 94%;\n\t\t\t\theight: 88%;\n\t\t\t\tbackground-color: white;\n\t\t\t\tz-index: 1101;\n\t\t\t}\n\t\t\t\n\t\t\t.green {\n\t\t\t\tbackground-color:#72c100;\n\t\t\t}\n\t\t\t\n\t\t\t.red {\n\t\t\t\tbackground-color:#c90021;\n\t\t\t}\n\t\t\t\n\t\t\t.touchField {\n\t\t\t\tbackground-color:#CCC;\n\t\t\t\tmargin-top:40px;\n\t\t\t}\n\t\t\t\n\t\t\t.currentAction {\n\t\t\t\tbackground-color:#c5ffab;\n\t\t\t}\n\t\t</style>\n\t\t<script type=\"text/javascript\">\n\t\t\tvar months = new Array('" . implode("', '", Datum::getGerMonthArray()) . "');\n\t\t\tvar days = new Array('" . implode("', '", Datum::getGerWeekArray()) . "');\n\t\t\tvar action = 'K';\n\n\t\t\t\$(function(){\n\t\t\t\twindow.setInterval(function(){\n\t\t\t\t\tclokk();\n\t\t\t\t}, 1000 * 30);\n\t\t\t\t\n\t\t\t\tclokk();\n\t\t\t\t\n\t\t\t\t\$('#chipCode').focus();\n\t\t\t});\n\t\t\t\n\t\t\tfunction clokk(){\n\t\t\t\tvar jetzt = new Date();\n\t\t\t\t\$('#clock').html(jetzt.getHours()+':'+(jetzt.getMinutes() < 10 ? '0' : '')+jetzt.getMinutes());\n\t\t\t\t\$('#day').html(days[jetzt.getDay()]+', '+jetzt.getDate()+'. '+months[jetzt.getMonth()]+' '+jetzt.getFullYear());\n\t\t\t}\n\t\t\t\n\t\t\tfunction stampp(){\n\t\t\t\tif(typeof alex != 'undefined')\n\t\t\t\t\talex.takePhoto();\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('stamp', [\$('#chipCode').val(), " . $_GET["terminalID"] . ", action], function(t){\n\t\t\t\t\tif(t == '')\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\n\t\t\t\t\tvar r = jQuery.parseJSON(t);\n\t\t\t\t\t\$('#chipCode').val('');\n\t\t\t\t\tif(r.status == 'command' && r.action =='reload'){\n\t\t\t\t\t\tdocument.location.reload();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar color = 'green';\n\t\t\t\t\tif(r.status == 'error')\n\t\t\t\t\t\tcolor = 'red';\n\n\t\t\t\t\t\$j('.overlayText').html(r.message);\n\t\t\t\t\t\$j('.overlayDetails').html('');\n\t\t\t\t\tif(r.details)\n\t\t\t\t\t\t\$j('.overlayDetails').html(r.details);\n\n\t\t\t\t\t\$('.overlay').addClass(color).show();\n\t\t\t\t\t\n\t\t\t\t\twindow.setTimeout(function(){\n\t\t\t\t\t\t\$('.overlay').hide().removeClass(color);\n\t\t\t\t\t}, 2000);\n\t\t\t\t\t\n\t\t\t\t\tif(r.status == 'OK')\n\t\t\t\t\t\tmoep();\n\n\t\t\t\t}, function(){\n\t\t\t\t\tvar color = 'red';\n\t\t\t\t\t\$('#chipCode').val('');\n\t\t\t\t\t\$j('.overlayText').html('Server nicht erreichbar!');\n\t\t\t\t\t\$j('.overlayDetails').html('');\n\n\t\t\t\t\t\$('.overlay').addClass(color).show();\n\t\t\t\t\t\n\t\t\t\t\twindow.setTimeout(function(){\n\t\t\t\t\t\t\$('.overlay').hide().removeClass(color);\n\t\t\t\t\t}, 1000);\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tfunction moep(){\n\t\t\t\tif(typeof alex == 'undefined')\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\talex.beep();\n\n\t\t\t}\n\n\t\t\t//if(typeof alex != 'undefined')\n\t\t\t//\talex.louder(100);\n\t\t\t\n\t\t\tmoep();\n\n\t\t\t\$('html').click(function() {\n\t\t\t\t\$('#chipCode').focus();\n\t\t\t}); \n\n\t\t\t\$(function(){\n\t\t\t\t\$('.touchField').css('height', \$(window).height() - \$('#displayTime').outerHeight() - 40 - 130);\n\t\t\t\t\$('.touchField').hammer().on('touch release', function(ev){\n\t\t\t\t\tswitch(ev.type){\n\t\t\t\t\t\tcase 'touch':\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').css('background-color', 'rgba(255,204,0,0.3)');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'release':\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').css('background-color', '');\n\t\t\t\t\t\t\taction = \$(ev.target).closest('.touchField').data('action');\n\t\t\t\t\t\t\t\$('.currentAction').removeClass('currentAction');\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').addClass('currentAction');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\n\t\t</script>";
     $I = new HTMLInput("chipCode");
     $I->id("chipCode");
     $I->onEnter("stampp();");
     $I->style("background-color:white;border:1px solid white;font-size:30px;width:96%;position:fixed;bottom:20px;");
     $BK = new Button("Kommen", "arrow_right", "iconic");
     $BK->style("font-size:200px;width:auto;");
     $BG = new Button("Gehen", "arrow_left", "iconic");
     $BG->style("font-size:200px;width:auto;");
     $actschion = "\n\t\t\t<div>\n\t\t\t\t<div data-action=\"G\" class=\"touchField\" style=\"width:48%;display:inline-block;margin-right:3.7%;vertical-align:top;\">\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;\">Gehen<br />{$BG}</p>\n\t\t\t\t</div>\n\t\t\t\t<div data-action=\"K\" class=\"touchField currentAction\" style=\"width:48%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;text-align:right;\">Kommen<br />{$BK}</p>\n\t\t\t\t</div>\n\t\t\t</div>";
     if ($this->switch) {
         $actschion = "\n\t\t\t<div>\n\t\t\t\t<div data-action=\"K\" class=\"touchField\" style=\"width:48%;display:inline-block;margin-right:3.7%;vertical-align:top;\">\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;\">Kommen<br />{$BG}</p>\n\t\t\t\t</div>\n\t\t\t\t<div data-action=\"G\" class=\"touchField currentAction\" style=\"width:48%;display:inline-block;vertical-align:top;\">\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;text-align:right;\">Gehen<br />{$BK}</p>\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     $html .= "\n\t\t\t<div id=\"displayTime\">\n\t\t\t\t<div id=\"clock\" style=\"font-size:190px;text-align:center;margin-top:40px;color:#333;\"></div>\n\t\t\t\t<div id=\"day\" style=\"font-size:35px;text-align:right;padding-right:45px;margin-top:0px;color:#CCC;\"></div>\n\t\t\t</div>\n\t\t\t{$actschion}\n\t\t\t{$I}\n\t\t\t<div class=\"overlay\">\n\t\t\t\t<div class=\"overlayCenter\">\n\t\t\t\t\t<p style=\"font-size:70px;margin-top:60px;font-weight:bold;\" class=\"overlayText\"></p>\n\t\t\t\t\t<p style=\"font-size:50px;margin-top:60px;\" class=\"overlayDetails\"></p>\n\t\t\t\t</div>\n\t\t\t</div>";
     return $html;
 }
 function getCMSHTML()
 {
     if (!isset($_GET["terminalID"])) {
         return "<p>Keine Terminal-ID per GET übergeben! (terminalID)</p>";
     }
     if (!isset($_GET["done"])) {
         return "<p style=\"font-size:30px;\">Terminal IP: " . $_SERVER['REMOTE_ADDR'] . "<br />Server IP: " . $_SERVER['SERVER_ADDR'] . "</p>" . OnEvent::script("window.setTimeout(function(){ document.location.href=\"?" . $_SERVER['QUERY_STRING'] . "&done=true\"; }, 3000);");
     }
     $html = "\r\n\t\t<style type=\"text/css\">\r\n\t\t\thtml {\r\n\t\t\t\toverflow-y: hidden;\r\n\t\t\t}\r\n\t\t\tbody {\r\n\t\t\t\t/*background-image:url(./images/TimeTerminalBG.svg);\r\n\t\t\t\tbackground-size:100%;*/\r\n\t\t\t\tmargin:0px;\r\n\t\t\t}\r\n\t\t\t.message {\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.overlay {\r\n\t\t\t\tposition: fixed;\r\n\t\t\t\ttop: 0;\r\n\t\t\t\tleft: 0;\r\n\t\t\t\twidth: 100%;\r\n\t\t\t\theight: 100%;\r\n\t\t\t\tbackground-color: #72c100;\r\n\t\t\t\tz-index: 1100;\r\n\t\t\t\tdisplay:none;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.overlayCenter {\r\n\t\t\t\tposition: fixed;\r\n\t\t\t\ttop: 6%;\r\n\t\t\t\tleft: 3%;\r\n\t\t\t\twidth: 94%;\r\n\t\t\t\theight: 88%;\r\n\t\t\t\tbackground-color: white;\r\n\t\t\t\tz-index: 1101;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.green {\r\n\t\t\t\tbackground-color:#72c100;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.red {\r\n\t\t\t\tbackground-color:#c90021;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.orange {\r\n\t\t\t\tbackground-color:orange;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.touchField {\r\n\t\t\t\tbackground-color:#CCC;\r\n\t\t\t\tmargin-top:40px;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.currentAction {\r\n\t\t\t\tbackground-color:#c5ffab;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.overlay ul {\r\n\t\t\t\tlist-style-type:none;\r\n\t\t\t}\r\n\r\n\t\t\t.overlay li {\r\n\t\t\t\tfont-size:30px;\r\n\t\t\t\tfont-weight:normal;\r\n\t\t\t\tpadding-top:14px;\r\n\t\t\t\tpadding-bottom:14px;\r\n\t\t\t}\r\n\t\t</style>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tvar months = new Array('" . implode("', '", Datum::getGerMonthArray()) . "');\r\n\t\t\tvar days = new Array('" . implode("', '", Datum::getGerWeekArray()) . "');\r\n\t\t\tvar action = '" . ($this->switch ? "G" : "K") . "';\r\n\t\t\tvar inOverlay = false;\r\n\t\t\tvar learnPersonalID = 0;\r\n\t\t\tvar learnChipID = 0;\r\n\t\t\t\r\n\t\t\t\$(function(){\r\n\t\t\t\twindow.setInterval(function(){\r\n\t\t\t\t\tclokk();\r\n\t\t\t\t}, 1000 * 30);\r\n\t\t\t\t\r\n\t\t\t\tclokk();\r\n\t\t\t\t\r\n\t\t\t\t\$('#chipCode').focus();\r\n\t\t\t\t\r\n\t\t\t\twindow.setInterval(function(){\r\n\t\t\t\t\tif(inOverlay || document.activeElement.id == 'chipCode')\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\$('#chipCode').focus();\r\n\t\t\t\t}, 1000);\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tfunction clokk(){\r\n\t\t\t\tvar jetzt = new Date();\r\n\t\t\t\t\$('#clock').html(jetzt.getHours()+':'+(jetzt.getMinutes() < 10 ? '0' : '')+jetzt.getMinutes());\r\n\t\t\t\t\$('#day').html(days[jetzt.getDay()]+', '+jetzt.getDate()+'. '+months[jetzt.getMonth()]+' '+jetzt.getFullYear());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfunction heightContent(){\r\n\t\t\t\tvar max = \$j(window).height() / 100 * 88;\r\n\t\t\t\t\r\n\t\t\t\t\$j.each(\$j('.overlayContentSub'), function(k, v){\r\n\t\t\t\t\tmax -= \$j(v).outerHeight();\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn max;\r\n\t\t\t}\r\n\r\n\t\t\tfunction stampp(){\r\n\t\t\t\tinOverlay = true;\r\n\t\t\t\tif(typeof alex != 'undefined' && typeof alex.takePhoto == 'function')\r\n\t\t\t\t\talex.takePhoto();\r\n\t\t\t\t\r\n\t\t\t\tlearnChipID = \$('#chipCode').val();\r\n\r\n\t\t\t\tCustomerPage.rme('stamp', [\$('#chipCode').val(), " . $_GET["terminalID"] . ", action, " . (isset($_GET["learn"]) ? "1" : "0") . ", learnPersonalID], function(t){\r\n\t\t\t\t\tif(t == '')\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tvar r = jQuery.parseJSON(t);\r\n\t\t\t\t\t\$('#chipCode').val('');\r\n\t\t\t\t\tlearnPersonalID = 0;\r\n\t\t\t\t\tif(r.status == 'command' && r.action =='reload'){\r\n\t\t\t\t\t\tdocument.location.reload();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tvar message = r.message;\r\n\t\t\t\t\tvar color = 'green';\r\n\t\t\t\t\tvar list = '';\r\n\t\t\t\t\tif(r.status == 'error')\r\n\t\t\t\t\t\tcolor = 'red';\r\n\t\t\t\t\tif(r.status == 'learn')\r\n\t\t\t\t\t\tcolor = 'orange';\r\n\r\n\t\t\t\t\tif(r.status == 'learn'){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlist = '<p class=\"overlayContentSub\" style=\"font-size:70px;font-weight:bold;background-color:white;margin-top:-20;\">Bitte wählen Sie:</p>';\r\n\t\t\t\t\t\tlist += '<ul class=\"overlayContentHeight\" style=\"padding-left:0px;padding-top:0px;padding-bottom:0px;margin-top:0;margin-bottom:0;overflow:auto;\">';\r\n\t\t\t\t\t\tfor(var i = 0;i < r.message.length; i++){\r\n\t\t\t\t\t\t\tlist += '<li data-personalid=\"'+r.message[i].PersonalID+'\" class=\"selectionName\" style=\"padding-left:40px;\">'+r.message[i].name+'</li>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlist += '</ul>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlist += '<div class=\"overlayContentSub\" id=\"buttonCancel\" style=\"background-color: rgb(204, 204, 204);padding-top:20px;padding-bottom:20px;font-size:30px;width:50%;display:inline-block;\"><div style=\"padding-left:10px;\"><span style=\"font-size:40px;margin-right:20px;\" class=\"iconic x\"></span> Abbrechen</div></div>';\r\n\t\t\t\t\t\tlist += '<div id=\"buttonSave\" style=\"background-color: rgb(204, 204, 204);padding-top:20px;padding-bottom:20px;width:50%;display:inline-block;font-size:30px;color:grey;\"><div style=\"padding-left:10px;\"><span style=\"font-size:40px;margin-right:20px;\" class=\"iconic check\"></span> Speichern</div></div>';\r\n\t\t\t\t\t\t//return;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\$j('.overlayText').html(message);\r\n\t\t\t\t\t\$j('.overlayDetails').html('');\r\n\t\t\t\t\t\$j('.overlayList').html(list);\r\n\t\t\t\t\t\$j('.overlayCenter').scrollTop(0);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(r.details)\r\n\t\t\t\t\t\t\$j('.overlayDetails').html(r.details);\r\n\r\n\t\t\t\t\t\$('.overlay').removeClass().addClass('overlay '+color).show();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(\$j('.overlayContentHeight').length)\r\n\t\t\t\t\t\t\$j('.overlayContentHeight').css('height', heightContent());\r\n\r\n\t\t\t\t\tif(r.status == 'learn'){\r\n\t\t\t\t\t\t\$('.selectionName').hammer().on('tap', function(ev){\r\n\t\t\t\t\t\t\t\$j('.selectionName').css('background-color', '');\r\n\t\t\t\t\t\t\t\$j(ev.target).css('background-color', 'rgba(255,204,0,0.3)');\r\n\t\t\t\t\t\t\t\$j('#buttonSave').css('background-color', '#c5ffab').css('color', '');\r\n\t\t\t\t\t\t\tlearnPersonalID = \$j(ev.target).data('personalid');\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\$('#buttonSave').hammer().on('touch release', function(ev){\r\n\t\t\t\t\t\t\tswitch(ev.type){\r\n\t\t\t\t\t\t\t\tcase 'touch':\r\n\t\t\t\t\t\t\t\t\t\$(ev.target).closest('#buttonSave').css('background-color', 'rgba(255,204,0,0.3)');\r\n\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'release':\r\n\t\t\t\t\t\t\t\t\t\$(ev.target).closest('#buttonSave').css('background-color', 'rgb(204, 204, 204)');\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(learnPersonalID == 0)\r\n\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\$('.overlay').hide();\r\n\t\t\t\t\t\t\t\t\tinOverlay = false;\r\n\t\t\t\t\t\t\t\t\t\$('#chipCode').val(learnChipID);\r\n\t\t\t\t\t\t\t\t\tstampp();\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\$('#buttonCancel').hammer().on('touch release', function(ev){\r\n\t\t\t\t\t\t\tswitch(ev.type){\r\n\t\t\t\t\t\t\t\tcase 'touch':\r\n\t\t\t\t\t\t\t\t\t\$(ev.target).closest('#buttonCancel').css('background-color', 'rgba(255,204,0,0.3)');\r\n\t\t\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t\t\t\tcase 'release':\r\n\t\t\t\t\t\t\t\t\t\$(ev.target).closest('#buttonCancel').css('background-color', 'rgb(204, 204, 204)');\r\n\t\t\t\t\t\t\t\t\t\$('.overlay').hide();\r\n\t\t\t\t\t\t\t\t\tinOverlay = false;\r\n\t\t\t\t\t\t\t\t\tlearnPersonalID = 0;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(r.status != 'learn')\r\n\t\t\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\t\t\t\$('.overlay').hide();\r\n\t\t\t\t\t\t\t\$('#chipCode').focus();\r\n\t\t\t\t\t\t\tinOverlay = false;\r\n\t\t\t\t\t\t}, 1500);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(r.status == 'OK')\r\n\t\t\t\t\t\tmoep();\r\n\r\n\r\n\t\t\t\t\tvar stack = \$.jStorage.get('pKTimeStack', [])\r\n\t\t\t\t\tif(stack.length > 0)\r\n\t\t\t\t\t\tCustomerPage.rme('stampStack', [JSON.stringify(stack)], function(t){\r\n\t\t\t\t\t\t\t\$.jStorage.set('pKTimeStack', []);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\r\n\t\t\t\t}, function(){\r\n\t\t\t\t\tvar stack = \$.jStorage.get('pKTimeStack', []);\r\n\t\t\t\t\t//console.log(stack);\r\n\t\t\t\t\tstack.push({'chip': \$('#chipCode').val(), 'terminal': " . $_GET["terminalID"] . ", 'action': action, 'time': Math.round(Date.now() / 1000)});\r\n\t\t\t\t\t\$.jStorage.set('pKTimeStack', stack);\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar color = 'orange';\r\n\t\t\t\t\t\$('#chipCode').val('');\r\n\t\t\t\t\t\$j('.overlayText').html('Zeit erfasst');\r\n\t\t\t\t\t\$j('.overlayDetails').html('Der Server ist nicht erreichbar.');\r\n\r\n\t\t\t\t\t\$('.overlay').addClass(color).show();\r\n\t\t\t\t\t\r\n\t\t\t\t\twindow.setTimeout(function(){\r\n\t\t\t\t\t\t\$('.overlay').hide().removeClass(color);\r\n\t\t\t\t\t}, 1000);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfunction moep(){\r\n\t\t\t\tif(typeof alex == 'undefined')\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\r\n\t\t\t\talex.beep();\r\n\r\n\t\t\t}\r\n\r\n\t\t\t//if(typeof alex != 'undefined')\r\n\t\t\t//\talex.louder(100);\r\n\t\t\t\r\n\t\t\tmoep();\r\n\r\n\t\t\t\$('html').focus(function() {\r\n\t\t\t\tif(inOverlay)\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\t\r\n\t\t\t\t\$('#chipCode').focus();\r\n\t\t\t}); \r\n\r\n\t\t\t\$(function(){\r\n\t\t\t\t\$('.touchField').css('height', \$(window).height() - \$('#displayTime').outerHeight() - 40 - 130);\r\n\t\t\t\t\$('.touchField').hammer().on('touch release', function(ev){\r\n\t\t\t\t\tswitch(ev.type){\r\n\t\t\t\t\t\tcase 'touch':\r\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').css('background-color', 'rgba(255,204,0,0.3)');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tcase 'release':\r\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').css('background-color', '');\r\n\t\t\t\t\t\t\taction = \$(ev.target).closest('.touchField').data('action');\r\n\t\t\t\t\t\t\t\$('.currentAction').removeClass('currentAction');\r\n\t\t\t\t\t\t\t\$(ev.target).closest('.touchField').addClass('currentAction');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\t\t</script>";
     $I = new HTMLInput("chipCode");
     $I->id("chipCode");
     $I->onEnter("stampp();");
     $I->style("background-color:white;border:1px solid white;font-size:30px;width:96%;position:fixed;bottom:20px;");
     $BK = new Button("Kommen", "arrow_right", "iconic");
     $BK->style("font-size:200px;width:auto;");
     $BG = new Button("Gehen", "arrow_left", "iconic");
     $BG->style("font-size:200px;width:auto;");
     $actschion = "\r\n\t\t\t<div>\r\n\t\t\t\t<div data-action=\"G\" class=\"touchField\" style=\"width:48%;display:inline-block;margin-right:3.7%;vertical-align:top;\">\r\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;\">Gehen<br />{$BG}</p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div data-action=\"K\" class=\"touchField currentAction\" style=\"width:48%;display:inline-block;vertical-align:top;\">\r\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;text-align:right;\">Kommen<br />{$BK}</p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>";
     if ($this->switch) {
         $actschion = "\r\n\t\t\t<div>\r\n\t\t\t\t<div data-action=\"K\" class=\"touchField\" style=\"width:48%;display:inline-block;margin-right:3.7%;vertical-align:top;\">\r\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;\">Kommen<br />{$BG}</p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div data-action=\"G\" class=\"touchField currentAction\" style=\"width:48%;display:inline-block;vertical-align:top;\">\r\n\t\t\t\t\t<p style=\"padding:30px;font-size:60px;text-align:right;\">Gehen<br />{$BK}</p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>";
     }
     $html .= "\r\n\t\t\t<div id=\"displayTime\">\r\n\t\t\t\t<div id=\"clock\" style=\"font-size:190px;text-align:center;margin-top:40px;color:#333;\"></div>\r\n\t\t\t\t<div id=\"day\" style=\"font-size:35px;text-align:right;padding-right:45px;margin-top:0px;color:#CCC;\"></div>\r\n\t\t\t</div>\r\n\t\t\t{$actschion}\r\n\t\t\t{$I}\r\n\t\t\t<div class=\"overlay\">\r\n\t\t\t\t<div class=\"overlayCenter\">\r\n\t\t\t\t\t<div class=\"overlayList\"></div>\r\n\t\t\t\t\t<p style=\"font-size:70px;margin-top:60px;font-weight:bold;\" class=\"overlayText\"></p>\r\n\t\t\t\t\t<p style=\"font-size:50px;margin-top:60px;\" class=\"overlayDetails\"></p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>";
     return $html;
 }
Exemple #21
0
 public function bricklets()
 {
     $BA = new Button("Bricklet\nhinzufügen", "new");
     $BA->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR("Tinkerforge", $this->getID(), "createNew", "", OnEvent::reloadPopup("Tinkerforge"));
     $BA->style("margin:10px;");
     $TE = new HTMLTable(4, "Bricklets");
     $TE->setColWidth(1, 20);
     $TE->setColWidth(2, 35);
     $TE->setColWidth(4, 20);
     $TE->useForSelection(false);
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     $AC = anyC::get("TinkerforgeBricklet", "TinkerforgeBrickletTinkerforgeID", $this->getID());
     while ($A = $AC->getNextEntry()) {
         $B = new Button("Master", "bars", "iconicL");
         $B->popup("", "Plot", "TinkerforgeBricklet", $A->getID(), "getControls", "", "", "{width:820}");
         $B->style("float:right;");
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('TinkerforgeBricklet','" . $A->getID() . "', function() { Popup.refresh('Tinkerforge'); },'Eintrag wirklich löschen?');");
         if ($A->A("TinkerforgeBrickletUID") == "") {
             $autoLoad = $A->getID();
         }
         $div = "<span id=\"TinkerforgeBrickletUID" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletUID") != "" ? $A->A("TinkerforgeBrickletUID") : "Neues Bricklet") . "</span>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"TinkerforgeBrickletType" . $A->getID() . "\">" . ($A->A("TinkerforgeBrickletType") != "" ? TinkerforgeBricklet::$types[$A->A("TinkerforgeBrickletType")] : "") . "</small>";
         $TE->addRow(array($BD, $B, $div, $BE));
         $TE->addCellEvent(3, "click", "contentManager.selectRow(this); \$j('#editDetailsTinkerforge').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("editAP", "TinkerforgeBricklet", $A->getID(), "0", "function(){ \$j('#editAP').fadeIn(); }") . " });");
     }
     if ($AC->numLoaded() == 0) {
         $TE->addRow("Keine Bricklets eingetragen");
         $TE->addRowColspan(1, 3);
     }
     echo "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"editAP\"></div>\n\t\t\t<div id=\"listAP\" style=\"width:400px;height:440px;overflow:auto;\">{$TE}</div>\n\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t" . ($autoLoad ? OnEvent::script("\$j('#TinkerforgeBrickletUID" . $autoLoad . "').parent().trigger(Touch.trigger);") : "");
 }
 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;
 }
Exemple #23
0
 /**
  * Method to display an E-Mail popup for easy E-Mail sending
  * 
  * Requires a method named "getEMailData" in $dataClass which returns an array:
  * array(fromName, fromAddress, recipientName, recipientAddress, subject, body)
  * 
  * Will call $dataClass($dataClassID)::sendEmail afterwards
  * 
  * @param string $dataClass
  * @param string $dataClassID 
  */
 public static function EMailPopup($dataClass, $dataClassID, $callbackParameter = null, $onSuccessFunction = null, $onAbortFunction = null, $return = false)
 {
     $c = new $dataClass($dataClassID);
     $data = $c->getEMailData($callbackParameter);
     $html = "";
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     $tab->addLV("Absender:", "{$data['fromName']}<br /><small>&lt;{$data['fromAddress']}&gt;</small>");
     if (is_array($data["recipients"])) {
         if (count($data["recipients"]) == 1) {
             $tab->addLV("Empfänger:", $data["recipients"][0][0] . "<br /><small>&lt;" . $data["recipients"][0][1] . "&gt;</small>");
         } else {
             $recipients = array();
             foreach ($data["recipients"] as $ID => $Rec) {
                 $recipients[$ID] = new HTMLInput($Rec[0] . " &lt;" . $Rec[1] . "&gt;", "option", $ID);
             }
             $IS = new HTMLInput("EMailRecipient{$dataClassID}", "select", isset($data["default"]) ? $data["default"] : "0", $recipients);
             $IS->id("EMailRecipient{$dataClassID}");
             $tab->addLV("Empfänger:", $IS);
         }
     } else {
         $IS = new HTMLInput("EMailRecipient{$dataClassID}", "text", $data["recipients"]);
         $IS->id("EMailRecipient{$dataClassID}");
         $tab->addLV("Empfänger:", $IS);
     }
     $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
     $html .= $tab;
     $html .= "<div style=\"width:94%;margin:auto;\"><textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea></div>";
     #$tab->addRow(array(""));
     #$tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     if ($onSuccessFunction == null) {
         $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
     }
     $BAbort = new Button("Abbrechen", "stop");
     if ($onAbortFunction == null) {
         $BAbort->onclick("Popup.close('Util', 'edit');");
     } else {
         $BAbort->onclick($onAbortFunction);
     }
     $BAbort->style("margin-bottom:10px;margin-top:10px;");
     $BGo = new Button("E-Mail\nsenden", "okCatch");
     $BGo->style("float:right;margin-top:10px;");
     if (strpos($data["body"], "<p") !== false) {
         $BGo->doBefore("nicEditors.findEditor('EMailBody{$dataClassID}').saveContent(); %AFTER");
     }
     $BGo->rmePCR(str_replace("GUI", "", $dataClass), $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", (is_array($data["recipients"]) and count($data["recipients"]) == 1) ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
     #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
     $tab->addRow(array($BGo . $BAbort));
     $tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     $html .= $tab;
     if (strpos($data["body"], "<p") !== false) {
         echo OnEvent::script("\n\t\t\t\tsetTimeout(function(){\n\t\t\tnew nicEditor({\n\t\t\t\ticonsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',\n\t\t\t\tbuttonList : ['bold','italic','underline'],\n\t\t\t\tmaxHeight : 400\n\t\t\t}).panelInstance('EMailBody{$dataClassID}');}, 100);");
     }
     if ($return) {
         return $html;
     } else {
         echo $html;
     }
 }
Exemple #24
0
 public function getFrozenListTable()
 {
     $T = new HTMLTable(2);
     $T->maxHeight(400);
     $T->setColWidth(2, 30);
     $T->weight("light");
     $T->useForSelection(false);
     $AC = anyC::get("Gefrierschrank");
     $AC->addAssocV3("GefrierschrankAdded", ">", "0");
     while ($E = $AC->getNextEntry()) {
         $BT = new Button("Löschen", "trash_stroke", "iconicL");
         #$BT->onclick();
         $T->addRow(array($E->A("GefrierschrankName"), $BT));
         $T->addRowStyle("font-size:20px;");
         $T->addRowEvent("click", OnEvent::rme($this, "reMoveFrozenItem", $E->getID(), OnEvent::reloadPopup("mGericht")));
         #$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 . OnEvent::script("\$j('#currentList div div').css('max-height', contentManager.maxHeight() - \$j('#headerList').outerHeight());");
 }
 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;\">&nbsp;</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;\">&nbsp;</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}";
 }
Exemple #26
0
 public function __toString()
 {
     $hiddenFields = "";
     if ($this->cols == 2 or $this->cols == 1) {
         foreach ($this->fields as $k => $v) {
             if (isset($this->spaceLines[$v])) {
                 $this->table->addRow(array("<hr />"));
                 #$this->table->addRowStyle("font-weight:bold;");
                 #$this->table->addCellStyle(1, "padding-top:20px;");
                 $this->table->addRowColspan(1, 2);
                 $this->table->addRowClass("FormSeparatorWithoutLabel");
             }
             if (isset($this->spaces[$v]) and $this->spaces[$v] != "") {
                 $this->table->addRow(array($this->spaces[$v]));
                 #$this->table->addRowStyle("font-weight:bold;");
                 #$this->table->addCellStyle(1, "padding-top:20px;");
                 $this->table->addRowColspan(1, 2);
                 $this->table->addRowClass("FormSeparatorWithLabel");
             }
             if (isset($this->spaces[$v]) and $this->spaces[$v] == "") {
                 $this->table->addRow(array(""));
                 $this->table->addRowClass("backgroundColor0");
                 $this->table->addRowColspan(1, 2);
                 $this->table->addRowClass("FormSeparatorWithoutLabel");
             }
             $Input = $this->getInput($v);
             $B = $this->getCustomButton($v, $Input);
             if (is_object($Input) and $Input instanceof HTMLInput) {
                 $InputS = $Input->__toString();
                 $this->callbacks .= $Input->getCallback();
             } else {
                 $InputS = $Input;
             }
             if (!isset($this->types[$v]) or $this->types[$v] != "hidden") {
                 if ($this->cols == 2) {
                     $this->table->addLV((isset($this->labels[$v]) ? $this->labels[$v] : ucfirst($v)) . ($this->printColon ? ":" : ""), $B . $InputS . (isset($this->descriptionField[$v]) ? "<br /><small style=\"color:grey;\">" . $this->descriptionField[$v] . "</small>" : ""));
                 }
                 if ($this->cols == 1) {
                     $this->table->addRow("<label " . ($this->cols == 1 ? "style=\"width:100%;\"" : "") . ">" . (isset($this->labels[$v]) ? $this->labels[$v] : ucfirst($v)) . ":</label>");
                     $this->table->addRowClass("backgroundColor3");
                     $this->table->addRow($B . $InputS . (isset($this->descriptionField[$v]) ? "<br /><small style=\"color:grey;\">" . $this->descriptionField[$v] . "</small>" : ""));
                     $this->table->addRowClass("backgroundColor0");
                 }
                 if (isset($this->inputLineSyles[$v])) {
                     $this->table->addRowStyle($this->inputLineSyles[$v]);
                 }
             } else {
                 $hiddenFields .= $InputS;
             }
         }
     }
     if ($this->cols == 4) {
         $row = array();
         foreach ($this->fields as $k => $v) {
             $Input = $this->getInput($v);
             if (isset($this->types[$v]) and $this->types[$v] == "hidden") {
                 $hiddenFields .= $Input;
                 continue;
             }
             if (isset($this->spaces[$v])) {
                 if ($this->spaces[$v] == "") {
                     if (count($row) == 0) {
                         $this->table->addRow(array("", "", "", ""));
                         $this->table->addRowClass("backgroundColor0");
                     }
                     if (count($row) == 2) {
                         $row[] = "";
                         $row[] = "";
                         $this->table->addRow($row);
                         $row = array();
                         $this->table->addRow(array("", "", "", ""));
                         $this->table->addRowClass("backgroundColor0");
                     }
                 } else {
                     if (count($row) == 0) {
                         $this->table->addRow(array($this->spaces[$v], "", "", ""));
                         $this->table->addRowClass("backgroundColor0");
                     }
                     if (count($row) == 2) {
                         $row[] = "";
                         $row[] = "";
                         $this->table->addRow($row);
                         $row = array();
                         $this->table->addRow(array($this->spaces[$v], "", "", ""));
                         $this->table->addRowClass("backgroundColor0");
                     }
                 }
                 #$this->table->addRow($row);
                 #$row = array();
             }
             $B = $this->getCustomButton($v, $Input);
             $row[] = "<label>" . (isset($this->labels[$v]) ? $this->labels[$v] : ucfirst($v)) . ":</label>";
             $row[] = $B . $Input . (isset($this->descriptionField[$v]) ? "<br /><small style=\"color:grey;\">" . $this->descriptionField[$v] . "</small>" : "");
             /*if(!isset($this->types[$v]) OR $this->types[$v] != "hidden"){
             					$this->table->addLV(
             						(isset($this->labels[$v]) ? $this->labels[$v] : ucfirst($v)).":",
             						$B.$Input);
             
             					if(isset($this->inputLineSyles[$v]))
             						$this->table->addRowStyle($this->inputLineSyles[$v]);
             				}
             				else $hiddenFields .= $Input;*/
             if (count($row) == 4) {
                 $this->table->addRow($row);
                 $row = array();
             }
         }
         if (count($row) == 2) {
             $row[] = "";
             $row[] = "";
             $this->table->addRow($row);
         }
     }
     foreach ($this->endLV as $k => $v) {
         $this->table->addLV($v[0], $v[1]);
     }
     if ($this->saveMode != null) {
         switch ($this->saveMode) {
             case "custom":
                 $this->table->addRow(array($this->saveButtonCustom));
                 $this->table->addRowColspan(1, $this->cols);
                 break;
             case "class":
                 $S = $this->saveButton();
                 $this->table->addRow(array($S));
                 $this->table->addRowColspan(1, $this->cols);
                 break;
             case "multiCMS":
                 $S = new HTMLInput("submitForm", "submit", $this->saveButtonLabel);
                 if ($this->saveButtonBGIcon != "") {
                     $S->style("background-image:url({$this->saveButtonBGIcon});background-position:98% 50%;background-repeat:no-repeat;");
                 }
                 if ($this->saveButtonSubmit != null) {
                     $S->onclick(str_replace("/*CALLBACKS*/", $this->callbacks, $this->saveButtonSubmit));
                 }
                 $action = new HTMLInput("action", "hidden", $this->saveAction);
                 $handler = new HTMLInput("HandlerName", "hidden", $this->saveClass);
                 $return = new HTMLInput("returnP", "hidden", "/" . $_GET["permalink"]);
                 if ($this->cols > 1) {
                     $this->table->addRow(array("", $S . $action . $handler . $return));
                 } else {
                     $this->table->addRow(array($S . $action . $handler . $return));
                 }
                 break;
             case "rmeP":
                 $S = new HTMLInput("submitForm", "button", $this->saveButtonLabel);
                 if ($this->saveButtonBGIcon != "") {
                     $S->style("background-image:url({$this->saveButtonBGIcon});background-position:98% 50%;background-repeat:no-repeat;");
                 }
                 $S->onclick(($this->saveButtonConfirm != null ? "if(confirm('" . $this->saveButtonConfirm . "')) " : "") . $this->saveButtonSubmit);
                 $S->setClass("submitFormButton borderColor1");
                 $C = "";
                 if ($this->abortButton != null) {
                     $C = new HTMLInput("abortForm", "button", $this->abortButton[0]);
                     if ($this->abortButton[2] != null) {
                         $C->style("background-image:url({$this->abortButton[2]});background-position:98% 50%;background-repeat:no-repeat;");
                     }
                     $C->onclick($this->abortButton[1]);
                     $C->setClass("abortFormButton borderColor1");
                 }
                 $this->table->addRow(array($S . $C));
                 $this->table->addRowColspan(1, 2);
                 break;
             case "Bericht":
                 $S = new HTMLInput("submitForm", "button", $this->saveButtonLabel);
                 if ($this->saveButtonBGIcon != "") {
                     $S->style("background-image:url({$this->saveButtonBGIcon});background-position:98% 50%;background-repeat:no-repeat;");
                 }
                 $S->onclick($this->saveButtonOnclick);
                 $this->table->addRow(array($S));
                 $this->table->addRowColspan(1, 2);
                 break;
         }
     }
     $html = "";
     if ($this->formTag) {
         $html .= "\n\t<form\n\t\tid=\"{$this->id}\"\n\t\t" . ($this->action != null ? "action=\"{$this->action}\"" : "") . "\n\t\t" . ($this->method != null ? "method=\"{$this->method}\"" : "") . "\n\t\t" . ($this->enctype != null ? "enctype=\"{$this->enctype}\"" : "") . "\n\t\t" . ($this->onSubmit != null ? "onsubmit=\"{$this->onSubmit}\"" : "") . "\n\t\t" . ($this->style != null ? "style=\"{$this->style}\"" : "") . ">";
     }
     $html .= $this->table;
     $html .= $hiddenFields;
     if ($this->formTag) {
         $html .= "\n\t</form>";
     }
     return $html . ($this->appendJs != "" ? OnEvent::script($this->appendJs) : "") . ($this->useRecentlyChanged ? GUIFactory::editFormOnchangeTest($this->id) : "");
 }
Exemple #27
0
 function getHTML()
 {
     if ($this->content == null) {
         return "";
     }
     $cols = "";
     $rows = "";
     for ($i = 0; $i < $this->numCols; $i++) {
         $cols .= "\n\t\t\t\t<col " . (isset($this->colWidth[$i + 1]) ? "style=\"width:" . $this->colWidth[$i + 1] . "\"" : "") . " class=\"" . (!isset($this->colClass[$i + 1]) ? "backgroundColor" . ($i % 2 + 2) . "" : $this->colClass[$i + 1]) . "\" />";
     }
     if (count($this->header) > 0) {
         $rows .= "\n\t\t\t<thead>\n\t\t\t<tr " . (isset($this->rowClasses[-1]) ? "class=\"" . $this->rowClasses[-1] . "\"" : "") . ">";
         foreach ($this->header as $K => $V) {
             if ($this->colOrder != null and isset($this->colOrder[$K])) {
                 $j = $this->colOrder[$K] - 1;
             } else {
                 $j = $K;
             }
             #$style = "";
             $style = isset($this->colStyles[$j + 1]) ? $this->colStyles[$j + 1] : "";
             #if(isset($this->cellStyles[$K][$j+1])) $style .= $this->cellStyles[$K][$j+1];
             if ($style != "") {
                 $style = "style=\"{$style}\"";
             }
             $rows .= "\n\t\t\t\t<th {$style}>" . (($this->colOrder != null and isset($this->colOrder[$K])) ? $this->header[$this->colOrder[$K] - 1] : $V) . "</th>";
         }
         $rows .= "\n\t\t\t</tr>\n\t\t\t</thead>";
     }
     $this->tab = 1;
     if (count($this->tablePart) > 0) {
         $headRows = $this->getHTMLForUpdate(true, "thead");
         if ($headRows != "") {
             $rows .= "\n\t\t\t\t<thead>\n\t\t\t\t\t{$headRows}\n\t\t\t\t</thead>";
         }
     }
     $rows .= "\n\t\t\t<tbody>\n\t\t\t\t" . $this->getHTMLForUpdate(true, "tbody") . "\n\t\t\t</tbody>";
     if (count($this->tablePart) > 0) {
         $footRows = $this->getHTMLForUpdate(true, "tfoot");
         if ($footRows != "") {
             $rows .= "\n\t\t\t\t<tfoot>\n\t\t\t\t\t{$footRows}\n\t\t\t\t</tfoot>";
         }
     }
     $divStyle = "";
     if (preg_match("/width:([0-9 ]*)px;/", $this->tableStyle, $regs)) {
         $divStyle = "style=\"" . $regs[0] . "\"";
     }
     $tabClass = "backgroundColor1 Tab";
     if ($this->weight == "light") {
         $tabClass = "lightTab borderColor1";
     }
     $R = "<div>\n\t\t" . ($this->caption != null ? "\n\t\t\t\n\t\t\t<div class=\"{$tabClass} browserContainerSubHeight\" {$divStyle}>\n\t\t\t\t<p>" . T::_($this->caption) . "</p>\n\t\t\t</div>" : "");
     if ($this->tab == 1) {
         $R .= "\n\t\t<div " . ($this->maxHeight != null ? "style=\"max-height:{$this->maxHeight}px;overflow:auto;\"" : "") . ">\n\t\t<table " . ($this->tableStyle != null ? "style=\"{$this->tableStyle}\"" : "") . " " . ($this->tableID != null ? "id=\"{$this->tableID}\"" : "") . " " . ($this->tableClass != "" ? "class=\"{$this->tableClass}\"" : "") . ">\n\t\t\t<colgroup>{$cols}\n\t\t\t</colgroup>";
     }
     $R .= "\n\t\t\t{$rows}\n\t\t</table>\n\t\t</div>";
     if ($this->tab > 1) {
         $R .= "\n\t\t</form>\n\t\t</div>\n\t\t";
     }
     $R .= "</div>";
     return $R . ($this->appendJS != "" ? OnEvent::script($this->appendJS) : "");
 }
 function backgroundDelete($DeviceID)
 {
     $O = anyC::getFirst("fheOverview", "fheOverviewDeviceID", $DeviceID);
     $d = json_decode($O->A("fheOverviewDesktop"));
     unset($d->background);
     $O->changeA("fheOverviewDesktop", json_encode($d));
     $O->saveMe();
     echo OnEvent::script("\$j('#wrapper').css('background-image', '');");
 }
Exemple #29
0
 public function remoteRadio()
 {
     $this->addAssocV3("UPnPAVTransport", "=", "1");
     $LR = new HTMLList();
     $LR->addListStyle("font-size:30px;font-family:Roboto;margin-left:10px;");
     $LR->noDots();
     while ($T = $this->getNextEntry()) {
         $LR->addItem("<span class=\"iconic iconicL x\" id=\"radioTarget" . $T->getID() . "\" style=\"color:#bbb;margin-right:10px;float:left;margin-top:5px;\"></span>" . $T->A("UPnPName"));
         $LR->addItemEvent("onclick", "UPnP.toggleRadioTarget('" . $T->getID() . "', '" . $T->A("UPnPName") . "');");
         $LR->addItemStyle("cursor:pointer;padding:10px;");
     }
     $AC = anyC::get("UPnPRadioStation");
     $AC->addOrderV3("UPnPRadioStationName");
     $LS = new HTMLList();
     $LS->addListStyle("font-size:30px;font-family:Roboto;margin-left:10px;");
     $LS->noDots();
     while ($T = $AC->getNextEntry()) {
         $LS->addItem("<span class=\"iconic iconicL arrow_right radioSource\" id=\"radioSource" . $T->getID() . "\" style=\"display:none;color:#bbb;margin-right:10px;float:left;margin-top:5px;\"></span>" . $T->A("UPnPRadioStationName"));
         $LS->addItemEvent("onclick", "UPnP.selectRadioSource('" . $T->getID() . "');");
         $LS->addItemStyle("cursor:pointer;padding:10px;");
     }
     $LA = new HTMLList();
     $LA->addListStyle("font-size:30px;font-family:Roboto;margin-left:10px;");
     $LA->noDots();
     $LA->addItem("<span class=\"iconic iconicL play\" style=\"color:#bbb;margin-right:10px;float:left;margin-top:5px;\"></span>Abspielen");
     $LA->addItemEvent("onclick", "UPnP.actionRadio('play');");
     $LA->addItemStyle("cursor:pointer;padding:10px;");
     $LA->addItem("<span class=\"iconic iconicL stop\" style=\"color:#bbb;margin-right:10px;float:left;margin-top:5px;\"></span>Stoppen");
     $LA->addItemEvent("onclick", "UPnP.actionRadio('stop');");
     $LA->addItemStyle("cursor:pointer;padding:10px;");
     #$L->addItem("Liste aktualisieren...");
     #$L->addItemEvent("onclick", OnEvent::popup("Abspielgeräte aktualisieren", "mUPnP", "-1", "discover", array("'targets'"), "", "{hPosition: 'center'}"));
     #$L->addItemStyle("cursor:pointer;padding:10px;");
     echo "\n\t\t<div style=\"width:100%;margin-bottom:20px;position:fixed;top:0;left:0;background-color:black;\" id=\"UPnPSelection\">\n\t\t\t<div style=\"float:right;margin-right:20px;\">\n\t\t\t\t<div onclick=\"UPnP.hide();\" style=\"cursor:pointer;float:left;font-family:Roboto;font-size:30px;padding:10px;\">\n\t\t\t\t\t<span style=\"margin-left:10px;float:right;margin-top:5px;color:#bbb;\" class=\"iconic iconicL x\"></span> <span>Schließen</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\n\t\t\t<div style=\"clear:both;height:15px;\">\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style=\"display:inline-block;width:33%;vertical-align:top;\">{$LR}</div>\n\t\t\t<div style=\"display:inline-block;width:33%;vertical-align:top;\">{$LS}</div>\n\t\t\t<div style=\"display:inline-block;width:33%;vertical-align:top;\">{$LA}</div>\n\t\t\t\n\t\t</div>" . OnEvent::script("UPnP.updateRadioTargets(); UPnP.updateRadioSource();");
 }
Exemple #30
0
 function getEditHTML()
 {
     $this->object->loadMeOrEmpty();
     if ($this->object->getID() == -1) {
         $this->addToEvent("onSave", "\$('contentLeft').update('');");
     }
     $F = $this->getForm();
     $requestFocus = "";
     if ($this->requestFocus) {
         $requestFocus = OnEvent::script("setTimeout(function(){ var target1 = \$j('input[name=" . $this->requestFocus[0] . "]:visible, textarea[name=" . $this->requestFocus[0] . "]:visible'); if(target1.length > 0) target1.focus(); " . ($this->requestFocus[1] != null ? "else \$j('input[name=" . $this->requestFocus[1] . "]:visible, textarea[name=" . $this->requestFocus[1] . "]:visible').focus();" : "") . "}, 100);");
     }
     $prepended = "";
     foreach ($this->prepended as $p) {
         $prepended .= $p;
     }
     return $prepended . $this->topButtons() . $this->sideButtons() . $F . $requestFocus . GUIFactory::editFormOnchangeTest($this->formID == null ? "edit" . get_class($this->object) : $this->formID) . ($this->hiddenJS != "" ? OnEvent::script($this->hiddenJS . " \$j('#{$this->formID} .recentlyChanged').removeClass('recentlyChanged');") : "");
 }