Пример #1
0
 function getHTML($id)
 {
     $B = new Button("Element\nlöschen", "trash", "icon");
     $B->rmePCR("poolAnzeigeControl", $this->getID(), "deleteMe", "", OnEvent::closePopup("poolAnzeigeControl") . OnEvent::reload("Screen"));
     $B->style("margin:10px;");
     $gui = new HTMLGUIX($this);
     $gui->name("Element");
     $gui->displayMode("popupS");
     $gui->attributes(array("poolAnzeigeControlCaption", "poolAnzeigeControlLabel", "poolAnzeigeControlNewLine", "poolAnzeigeControlClass", "poolAnzeigeControlSrc", "poolAnzeigeControlServer", "poolAnzeigeControlMaster", "poolAnzeigeControlValue", "poolAnzeigeControlUpdate", "poolAnzeigeControlGroup", "poolAnzeigeControlGroupDelay", "poolAnzeigeControlGroupDelayIf"));
     $gui->label("poolAnzeigeControlNewLine", "Neue Zeile");
     $gui->label("poolAnzeigeControlCaption", "Überschrift");
     $gui->label("poolAnzeigeControlLabel", "Beschriftung");
     $gui->label("poolAnzeigeControlOrder", "Reihenfolge");
     $gui->label("poolAnzeigeControlClass", "Klasse");
     $gui->label("poolAnzeigeControlSrc", "Bild");
     $gui->label("poolAnzeigeControlServer", "Steuerung");
     $gui->label("poolAnzeigeControlGroupDelay", "Verzögerung in s");
     $gui->label("poolAnzeigeControlGroup", "Eigene Gruppe");
     $gui->label("poolAnzeigeControlUpdate", "Update Gruppe(n)");
     $gui->label("poolAnzeigeControlGroupDelayIf", "Wenn");
     $gui->type("poolAnzeigeControlNewLine", "checkbox");
     $gui->type("poolAnzeigeControlServer", "readonly");
     $gui->type("poolAnzeigeControlClass", "select", array("manual" => "Statisch", "load" => "Laden", "value" => "Wert"));
     $gui->type("poolAnzeigeControlGroupDelayIf", "select", array("" => "ohne", "on" => "Ein"));
     if ($this->A("poolAnzeigeControlMasterValues") != "") {
         $gui->type("poolAnzeigeControlMaster", "select", poolAnzeigeControl::values($this->A("poolAnzeigeControlMasterValues")));
     }
     $gui->descriptionField("poolAnzeigeControlUpdate", "Mehrere Gruppen durch Komma trennen");
     $gui->descriptionField("poolAnzeigeControlNewLine", "Fügt eine neue Zeile vor dem Element ein");
     $gui->space("poolAnzeigeControlClass");
     $gui->space("poolAnzeigeControlServer");
     $gui->space("poolAnzeigeControlUpdate");
     return $B . $gui->getEditHTML();
 }
Пример #2
0
 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;
 }
Пример #3
0
 public function check($touch = false)
 {
     $mbox = $this->connection();
     #echo "<h1>Nachrichten in INBOX</h1><div style=\"overflow:auto;max-height:400px;\"><pre>";
     $MC = imap_check($mbox);
     $T = new HTMLTable(1, $touch ? "Mails" : "");
     $T->setTableStyle("font-size:11px;");
     $T->useForSelection();
     $start = $MC->Nmsgs - 10;
     if ($start < 1) {
         $start = 1;
     }
     $result = imap_fetch_overview($mbox, "{$start}:{$MC->Nmsgs}", 0);
     $result = array_reverse($result);
     foreach ($result as $overview) {
         #print_r($overview);
         $T->addRow(array("\n\t\t\t\t<small style=\"color:grey;float:right;\">" . Util::CLDateParser($overview->udate) . "</small>\n\t\t\t\t" . str_replace("\"", "", $this->decodeBlubb($overview->from)) . "<br />\n\t\t\t\t<small style=\"color:grey;\">" . substr($this->decodeBlubb($overview->subject), 0, 50) . "</small>"));
         $T->addCellEvent(1, "click", "\$j('#MailFrame').attr('src', './interface/rme.php?class=MailCheck&constructor=" . $this->getID() . "&method=showMailBody&parameters=\\'{$overview->uid}\\'');");
     }
     imap_close($mbox);
     #echo "</pre></div>";
     $BC = "";
     if ($touch) {
         $BC = new Button("Fenster\nschließen", "stop");
         $BC->style("float:right;margin:10px;");
         $BC->onclick(OnEvent::closePopup("MailCheck"));
     }
     echo "<div style=\"float:right;width:300px;\">";
     echo $BC;
     echo "<p>{$MC->Nmsgs} Nachricht" . ($MC->Nmsgs == 1 ? "" : "en") . "</p><div style=\"clear:both;\"></div>";
     echo $T;
     echo "</div>";
     echo "\n\t\t\t<div style=\"border-right-style:solid;border-right-width:1px;width:699px;\" class=\"borderColor1\">\n\t\t\t\t<iframe id=\"MailFrame\" style=\"border:0px;width:699px;height:520px;\" src=\"./fheME/MailCheck/Home/index.html\"></iframe>\n\t\t\t</div>";
     echo "<div style=\"clear:both;\"></div>";
 }
Пример #4
0
 public static function sendEmail($subject, $body, $recipient)
 {
     $S = new SupportGUI();
     $data = $S->getEMailData();
     $mailfrom = $data["fromAddress"];
     $mailto = $data["recipients"][$recipient][1];
     $mimeMail2 = new PHPMailer(false, substr($mailfrom, stripos($mailfrom, "@") + 1));
     $mimeMail2->CharSet = "UTF-8";
     $mimeMail2->Subject = $subject;
     $mimeMail2->From = $mailfrom;
     $mimeMail2->Sender = $mailfrom;
     $mimeMail2->FromName = $data["fromName"];
     $mimeMail2->Body = wordwrap($body, 80);
     $mimeMail2->AddAddress($mailto);
     $B = new Button("Danke!", "./images/big/thanks.png", "icon");
     $B->style("float:left;margin-right:10px;margin-bottom:20px;");
     $BOK = new Button("OK", "bestaetigung");
     $BOK->onclick(OnEvent::closePopup("Support"));
     $BOK->style("float:right;margin:10px;");
     if ($mimeMail2->Send()) {
         echo "<h1>{$B} Danke für Ihre Unterstützung!</h1><p>Sie erhalten in Kürze eine Antwort per E-Mail.</p>{$BOK}<div style=\"clear:both;\"></div>";
     } else {
         echo "<p style=\"padding:5px;color:red;\">Fehler beim Senden der E-Mail. Bitte überprüfen Sie Ihre Server-Einstellungen im Admin-Bereich.</p><p>Nachfolgend wird Ihre Nachricht angezeigt, falls Sie sie in die Zwischenablage kopieren (Strg + c) und manuell an <b>{$mailto}</b> möchten.</p><pre style=\"color:grey;max-height:300px;font-size:10px;padding:5px;width:590px;overflow:auto;\">" . wordwrap(stripslashes($body), 80) . "</pre>{$BOK}<div style=\"clear:both;\"></div>";
     }
 }
Пример #5
0
 function message()
 {
     $BS = new Button("Nachricht", "comment_alt2_stroke", "iconicL");
     $BS->style("float:left;");
     $read = false;
     $message = $this->messageParser();
     #$this->A("NuntiusMessage");
     if ($this->A("NuntiusRead") > "0") {
         $read = true;
         $BS = new Button("Nachricht", "check", "iconicL");
         $BS->style("float:left;color:darkgreen;");
         $ex = explode("\n", $message);
         $message = "<span style=\"color:grey;\">" . $ex[0];
         if (isset($ex[1])) {
             $message .= " …";
         }
         $message .= "</span>";
     }
     $from = "";
     $ex = explode(":", $this->A("NuntiusSender"));
     if ($ex[0] == "Device") {
         $D = new Device($ex[1]);
         $from = $D->A("DeviceName");
     }
     if ($ex[0] == "FritzBox") {
         $from = $this->A("NuntiusSender");
     }
     if ($ex[0] == "Mobile") {
         $from = $this->A("NuntiusSender");
     }
     return "\n\t\t\t<div id=\"Nuntius" . $this->getID() . "\" style=\"cursor:pointer;" . ($read ? "" : "background-color:#efefef;") . "min-height:40px;margin-bottom:10px;margin-top:10px;\" onclick=\"" . OnEvent::rme($this, "read", "", "function(t){ \$j('#Nuntius" . $this->getID() . "').replaceWith(t.responseText); fheOverview.loadContent('mNuntiusGUI::getOverviewContent'); }") . "\">\n\t\t\t\t{$BS}\n\t\t\t\t<div style=\"margin-left:40px;\" class=\"\">\n\t\t\t\t\t<p><small style=\"float:right;color:grey;\">Von {$from}, " . Util::CLDateTimeParser($this->A("NuntiusTime")) . "</small>" . nl2br($message) . "</p>\n\t\t\t\t</div>\n\t\t\t</div>";
 }
Пример #6
0
 private function getNav($parentID, $domain)
 {
     $mNav = new anyC();
     $mNav->setCollectionOf("Navigation");
     $mNav->addAssocV3("parentID", "=", $parentID);
     $mNav->addAssocV3("DomainID", "=", $domain);
     $mNav->addOrderV3("sort");
     $mNav->lCV3();
     if ($mNav->numLoaded() == 0) {
         return;
     }
     $html = "\n\t\t<ul style=\"list-style-image:none;list-style-type:none;\" id=\"sortable_{$parentID}\">";
     while ($n = $mNav->getNextEntry()) {
         $B = new Button("Element bearbeiten", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("contentManager.loadFrame('contentLeft','Navigation','" . $n->getID() . "');");
         $B->style("float:left;margin-right:10px;");
         $D = new Button("Element löschen", "./images/i2/delete.gif");
         $D->type("icon");
         $D->onclick("deleteClass('Navigation','" . $n->getID() . "', function() { contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' &amp;&amp; lastLoadedLeft == '1') \$('contentLeft').update(''); },'Element und alle Unterelemente wirklich löschen?');");
         $D->style("float:right;margin-right:10px;");
         $html .= "<li id=\"NavigationElementID_" . $n->getID() . "\" style=\"" . ($n->A("hidden") == "1" ? "text-decoration:line-through;" : "") . "\">{$D}<img src=\"./images/i2/topdown.png\" class=\"navigationHandler_sortable_{$parentID}\"\" style=\"cursor:pointer;float:right;margin-right:10px;\" />{$B}" . ($n->A("name") == "" ? "&lt;kein Name&gt;" : $n->A("name")) . $this->getNav($n->getID(), $domain) . "</li>";
     }
     #
     $html .= "\n\t\t</ul>\n\t\t<script type=\"text/javascript\">Website.add('sortable_{$parentID}');</script>";
     return $html;
 }
Пример #7
0
 public static function nameParser($w, $E)
 {
     $B = new Button("display episodes", "./images/i2/folder.png");
     $B->style("float:left;margin-right:5px;");
     $B->type("icon");
     $B->onclick("contentManager.loadFrame('contentLeft','mFolge',-1,0,'mFolgeGUI;SerieID:" . $E->getID() . "');");
     return $B . $w;
 }
Пример #8
0
 public static function textParser($w, $E)
 {
     $B = new Button("in HTML-Editor bearbeiten", "./multiCMS/Content/html.png");
     $B->type("icon");
     $B->style("float:left;margin-right:5px;");
     $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:Content;FieldClassID:" . $E->getID() . ";FieldName:text");
     return $B . substr(strip_tags($w, "<a><i><b><strong><img>"), 0, 150);
 }
 public function getIcon()
 {
     if ($this->ok) {
         return new Button("OK", "check", "iconicL");
     }
     $B = new Button("Warnung", "bolt", "iconicL");
     $B->style("color:rgb(220, 0, 0);");
     return $B;
 }
Пример #10
0
 public function getHTML($id, $page)
 {
     $B = new Button("AWV für\nExport", "./lightCRM/AWV/AWV.png");
     $B->style("float:right;margin-right:10px;");
     $B->windowRme("mAWV", "-1", "downloadTrashExport");
     echo $B;
     $B = new Button("AWV in\nKalender", "./lightCRM/AWV/AWV.png");
     $B->popup("", "Müllabfuhr-Daten", "mAWV", "-1", "downloadTrashData");
     echo $B;
 }
Пример #11
0
 public function getHTML($id)
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     #$this->addAssocV3("UserType", "=", "0");
     $this->addOrderV3("name");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $up = new anyC();
     $up->setCollectionOf("User");
     $up->addAssocV3("password", "!=", ";;;-1;;;");
     $up->lCV3();
     if ($up->numLoaded() > 0 and $id == -1) {
         return "\n\t\t<table>\n\t\t\t<colgroup>\n\t\t\t\t<col class=\"backgroundColor3\" />\n\t\t\t</colgroup>\n\t\t\t<tr>\n\t\t\t\t<td><input onclick=\"rme('Users','','convertPasswords','','contentManager.reloadFrameRight();');\" type=\"button\" style=\"float:right;background-image:url(./images/navi/keys.png);\" class=\"bigButton backgroundColor2\" value=\"Passwörter\nkonvertieren\" />In Ihrer Datenbank befinden sich noch unkonvertierte Passwörter.</td>\n\t\t\t</tr>\n\t\t</table>";
     }
     $gui = new HTMLGUIX($this);
     $gui->screenHeight();
     $gui->name("Benutzer");
     #$gui->setCollectionOf($this->collectionOf,"Benutzer");
     $gui->parser("isAdmin", "UsersGUI::isAdminParser");
     $gui->colWidth("isAdmin", "20px");
     $gui->attributes(array("name", "username", "isAdmin"));
     /*$g = "";
     		
     		if(strstr($_SERVER["SCRIPT_FILENAME"],"demo")) {
     			$UA = $_SESSION["S"]->getCurrentUser()->getA();
     			if($UA->name != "Installations-Benutzer"){
     				$g = "In der Demo können keine Benutzer geändert werden!";
     				$gui->setIsDisplayMode(true);
     			}
     		}*/
     $TR = new HTMLTable(1);
     if ($allowedUsers !== null and $id == -1) {
         $B = new Button("", "notice", "icon");
         $B->style("float:left;margin-right:10px;");
         $TR->addRow(array($B . "Bitte beachten Sie: Sie können insgesamt {$allowedUsers} Benutzer ohne Admin-Rechte anlegen."));
     }
     if ($allowedUsers === null) {
         $B = $gui->addSideButton("Externe\nAuthentifizierung", "./plugins/Users/auth.png");
         $B->popup("", "Externe Authentifizierung", "Users", "-1", "authenticationPopup");
     }
     $gui->prepend($TR);
     $gui->customize($this->customizer);
     try {
         $AD = new LoginAD();
         $AD->getUsers();
         if ($AD->n() !== null) {
             $B = $gui->addSideButton("ActiveDirectory-\nBenutzer", "users");
         }
         $B->popup("", "ActiveDirectory-Benutzer", "Users", "-1", "ldapUsersPopup");
     } catch (Exception $e) {
     }
     return $gui->getBrowserHTML($id);
 }
Пример #12
0
 function getHTML($id)
 {
     $BC = new Button("Abbrechen", "stop");
     $BC->style("margin:10px;float:right;");
     $BC->onclick("\$j('#listAP .lastSelected').removeClass('lastSelected'); \$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing'); });");
     $gui = new HTMLGUIX($this);
     $gui->name("Bricklet");
     $gui->type("TinkerforgeBrickletTinkerforgeID", "hidden");
     $gui->type("TinkerforgeBrickletType", "select", self::$types);
     $gui->addToEvent("onSave", "\$j('#listAP .lastSelected').removeClass('lastSelected'); \$j('#editAP').fadeOut(400, function(){ \$j('#editDetailsTinkerforge').animate({'width':'400px'}, 200, 'swing', function(){ " . OnEvent::reloadPopup("Tinkerforge") . " }); }); ");
     return $BC . "<div style=\"clear:both;\"></div>" . $gui->getEditHTML();
 }
Пример #13
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);
 }
Пример #14
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI2();
     $gui->setObject($this);
     $gui->setName("Serie");
     $gui->setShowAttributes(array("name", "sprache", "dir", "lastupdate", "genre", "description", "status", "quality", "RSSFilterID", "altFeedName1", "altFileName1"));
     #$gui->setType("adapter", "hidden");
     #$gui->setType("lastupdate", "readonly");
     #$gui->setType("siteID", "hidden");
     #$gui->setType("url", "hidden");
     $gui->setType("description", "textarea");
     $gui->setLabel("sprache", "Language");
     $gui->setLabel("lastupdate", "Last update");
     $gui->setLabel("RSSFilterID", "RSS feed");
     $gui->setLabel("altFileName1", "alt. file name");
     $gui->setLabel("altFeedName1", "alt. feed name");
     $gui->setFieldDescription("altFileName1", "This is useful if the filenames do not match the full series name. trinityDB will then look for both names on the harddrive. For example 'switch' instead of 'Switch Reloaded'.");
     $gui->setFieldDescription("altFeedName1", "This is useful if the feed names do not match the full series name. trinityDB will then look for both names in the feeds. For example 'Human.Target.2010' instead of 'Human Target (2010)'.");
     $gui->setParser("lastupdate", "SerieGUI::lastUpdateParser");
     $gui->setType("quality", "select");
     $gui->setOptions("quality", array_keys(self::getQualities()), array_values(self::getQualities()));
     $gui->setType("sprache", "select");
     $gui->setOptions("sprache", array("en", "de"), array("english", "deutsch"));
     $gui->setStandardSaveButton($this);
     $gui->insertSpaceAbove("RSSFilterID");
     $gui->selectWithCollection("RSSFilterID", new mRSSFilterGUI(), "RSSFilterName", "none");
     $tab = new HTMLSideTable("right");
     $B = new Button("Download\nepisodes", "./trinityDB/Serien/Updates.png");
     #$B->rmePCR("Serie", $this->ID, "downloadEpisodes", array("'1'"), "Popup.display('Download-Status', transport);");
     $B->popup("", "Download-Status", "Serie", $this->ID, "downloadEpisodes", array("'1'"));
     $S = new Button("Settings", "./images/i2/settings.png");
     $S->type("icon");
     $S->style("float:right;margin-right:-20px;");
     $S->contextMenu("Serie", "download", "Settings");
     $tab->addRow($S . $B);
     $B = new Button("Show\nepisodes", "./trinityDB/Serien/Folge.png");
     $B->onclick("contentManager.loadFrame('contentLeft','mFolge',-1,0,'mFolgeGUI;SerieID:" . $this->getID() . "');");
     $tab->addRow($B);
     #$B = new Button("Find new\nepisodes","./trinityDB/RSSFilter/RSSFilter.png");
     #$B->rmePCR("Serie", $this->ID, "checkRSS", "", "Popup.display('Episoden-Status', transport);");
     #$tab->addRow($B);
     $B = new Button("Check\nepisodes", "okCatch");
     $B->rmePCR("Serie", $this->ID, "checkAllEpisodes", "", "Popup.display('Episoden-Status', transport);");
     $tab->addRow($B);
     $Image = new Button("", DBImageGUI::imageLink("Serie", $this->getID(), "cover", false, true), "icon");
     $Image->style("width:150px;");
     $tab->addRow(array($Image));
     return $tab . $gui->getEditHTML();
 }
Пример #15
0
 public function getOverviewContent()
 {
     $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemGerichtGUI\"></span><p>MailCheck</p></div>\n\t\t\t<div style=\"padding:10px;overflow:auto;\">";
     $BU = new Button("", "./fheME/Gericht/update.png", "icon");
     $BU->style("float:right;");
     $BU->onclick("fheOverview.loadContent('mGerichtGUI::getOverviewContent');");
     $AC = anyC::get("MailCheck");
     while ($MC = $AC->getNextEntry()) {
         $B = new Button("Mails abholen", "mail", "iconicL");
         $html .= "\n\t\t\t<div class=\"touchButton\" onclick=\"Overlay.showDark();" . OnEvent::popup("Mails abholen", "MailCheck", $MC->getID(), "check", "1", "", "{width:1000, top:20, left:20, hPosition:'center'}") . "\">\n\t\t\t\t" . $B . "\n\t\t\t\t<div class=\"label\">" . $MC->A("MailCheckName") . "</div>\n\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</div>";
     }
     $html .= "</div>";
     echo $html;
 }
Пример #16
0
 public function getHTML($id)
 {
     $bps = $this->getMyBPSData();
     $t = new HTMLTable(1);
     $t->setTableStyle("width:160px;float:right;margin-right:10px;");
     if (!isset($bps["ID"])) {
         $F = new mFhemGUI();
         $F->addAssocV3("FhemType", "!=", "FHZ");
         while ($f = $F->getNextEntry()) {
             $B = new Button($f->getA()->FhemName, "./fheME/Fhem/fhem.png");
             $B->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;ID:" . $f->getID() . ";type:D;name:" . $f->getA()->FhemName . "');");
             $t->addRow($B);
             $t->addRowClass("backgroundColor0");
         }
         $t->addRow("");
         $t->addRowClass("backgroundColor1");
         $F = new anyC();
         $F->setCollectionOf("FhemPreset");
         $F->addAssocV3("FhemPresetHide", "=", "0");
         while ($f = $F->getNextEntry()) {
             $B = new Button($f->getA()->FhemPresetName, "./fheME/Fhem/events.png");
             $B->onclick("contentManager.loadFrame('contentRight','mFhemTimer',-1,0,'mFhemTimerGUI;ID:" . $f->getID() . ";type:P;name:" . $f->getA()->FhemPresetName . "');");
             $t->addRow($B);
             $t->addRowClass("backgroundColor0");
         }
         return $t;
     }
     if (isset($bps["ID"])) {
         if ($bps["type"] == "D") {
             $F = new Fhem($bps["ID"]);
             $F->loadMe();
             $FF = new Fhem("timer");
             $FF->setA($F->getA());
             $C = new FhemControlGUI();
             $control = $C->getControl($FF);
         } else {
             $control = "";
         }
         $rand = rand(10, 10000000);
         $B = new Button("set timer", "okCatch");
         $B->rme("FhemControl", '', 'setTimer', array($bps["ID"], "'setBPSValue'", "'{$bps['type']}'", "parent.clock4Timer{$rand}.stunden", "parent.clock4Timer{$rand}.minuten", "'{$bps['name']}'"), "contentManager.loadFrame(\\'contentRight\\',\\'mFhem\\',-1,0,\\'\\');");
         $B->style("float:right;");
         $t->addRow("<iframe name=\"clock4Timer{$rand}\" style=\"width:240px;height:330px;border:0px;\" src=\"./libraries/ClockGUI.class.php\"></iframe>");
         $t->addRowClass("backgroundColor0");
         $t->addRow($B);
         $t->addRowClass("backgroundColor0");
         return $control . $t;
     }
 }
Пример #17
0
 public function getPopup()
 {
     $bps = $this->getMyBPSData();
     $gui = $this->getGUI($this->getID());
     $gui->addToEvent("onSave", "Popup.close('LoginData', 'edit');");
     #$gui->setJSEvent("onSave", "function() { Popup.close('', 'mailServer'); contentManager.reloadFrame('contentRight'); }");
     #$gui->setStandardSaveButton($this,"mLoginData");
     $gui->displayMode("popup");
     $html = "";
     $html2 = "";
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "mailServer") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie diese Anwendung lokal auf einem Windows-Rechner betreiben oder direkt über einen SMTP-Server versenden möchten (z.B. Newsletter).</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "MailServerUserPass");
         $gui->type("optionen", "hidden");
     }
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "backupFTPServer") {
         $BAbort = new Button("Abbrechen", "stop");
         $BAbort->onclick("Popup.close('LoginData', 'edit');");
         $BAbort->style("float:right;");
         $html = "<p style=\"padding:5px;\">{$BAbort}<small>Sie müssen hier nur Einstellungen vornehmen, wenn Sie die Backups automatisch auf einen FTP-Server hochladen möchten.</small></p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", "-1");
         $gui->type("name", "hidden");
         $this->changeA("name", "BackupFTPServerUserPass");
         $gui->descriptionField("optionen", "Bitte geben Sie hier das Unterverzeichnis an, in das die Datei hochgeladen werden soll");
         $gui->label("optionen", "Verzeichnis");
         #$gui->type("optionen", "hidden");
     }
     #
     if ($bps != -1 and isset($bps["preset"]) and $bps["preset"] == "googleData") {
         $html = "<p>Bitte beachten Sie: Es werden nur Ihre eigenen Termine synchronisiert.</p>";
         $gui->type("UserID", "hidden");
         $this->changeA("UserID", Session::currentUser()->getID());
         $gui->type("name", "hidden");
         $this->changeA("name", "GoogleAccountUserPass");
         $gui->type("optionen", "hidden");
         $gui->type("server", "hidden");
     }
     $gui->label("benutzername", "Benutzername");
     $gui->label("passwort", "Passwort");
     $gui->label("server", "Server");
     echo $html . $gui->getEditHTML();
 }
Пример #18
0
 public function browser()
 {
     $BA = new Button("Eintrag\nhinzufügen", "new");
     $BA->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
     $BA->rmePCR($this->object->getClearClass(), "-1", "create", $this->parametersCreate, OnEvent::reloadPopup($this->object->getClearClass()));
     $BA->style("margin:10px;");
     $cols = 3 + count($this->colsLeft) + count($this->colsRight);
     $TE = new HTMLTable($cols, "Einträge");
     $TE->setColWidth(1, 20);
     $TE->setColWidth($cols, 20);
     $TE->useForSelection(false);
     $TE->maxHeight(400);
     $TE->weight("light");
     $BE = new Button("Eintrag bearbeiten", "arrow_right", "iconic");
     $autoLoad = false;
     while ($A = $this->object->getNextEntry()) {
         $BD = new Button("Eintrag löschen", "trash_stroke", "iconic");
         $BD->doBefore("\$j('#popupEditEntry').fadeOut(400, function(){ \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'400px'}, 200, 'swing', function(){ %AFTER }); });");
         $BD->onclick("deleteClass('" . get_class($A) . "','" . $A->getID() . "', function() { " . OnEvent::reloadPopup($this->object->getClearClass()) . " },'Eintrag wirklich löschen?');");
         $isEmpty = false;
         if ($this->emptyCheckField != null and $A->A($this->emptyCheckField) == "") {
             $autoLoad = $A->getID();
             $isEmpty = true;
         }
         if (!$isEmpty) {
             $div = Util::invokeStaticMethod(get_class($this->object), $this->parsers["main"], array($A));
         } else {
             $div = "Neuer Eintrag";
         }
         $row = array();
         $row[] = $BD;
         $row[] = $div;
         foreach ($this->colsRight as $col) {
             $c = Util::invokeStaticMethod(get_class($this->object), $col[0], array($A));
             $row[] = $c;
         }
         $row[] = $BE;
         $TE->addRow($row);
         $action = "contentManager.selectRow(this); \$j('#editDetails" . $this->object->getClearClass() . "').animate({'width':'800px'}, 200, 'swing', function(){ " . OnEvent::frame("popupEditEntry", get_class($A), $A->getID(), "0", "function(){ \$j('#popupEditEntry').fadeIn(); }") . " });";
         $TE->addCellEvent(2, "click", $action);
         $TE->addCellID(2, "popupEntryID" . $A->getID());
         $TE->addCellEvent(count($row), "click", $action);
     }
     if ($this->object->numLoaded() == 0) {
         $TE->addRow("Keine Einträge");
         $TE->addRowColspan(1, 3);
     }
     return "{$BA}\n\t\t\t<div style=\"float:right;width:400px;height:500px;display:none;\" id=\"popupEditEntry\"></div>\n\t\t\t<div id=\"popupListEntries\" 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('#popupEntryID" . $autoLoad . "').trigger(Touch.trigger);") : "");
 }
Пример #19
0
 public function getHTML($id)
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     $this->addOrderV3("name");
     if ($this->A == null) {
         $this->lCV3($id);
     }
     $up = new anyC();
     $up->setCollectionOf("User");
     $up->addAssocV3("password", "!=", ";;;-1;;;");
     $up->lCV3();
     if ($up->numLoaded() > 0 and $id == -1) {
         return "\n\t\t<table>\n\t\t\t<colgroup>\n\t\t\t\t<col class=\"backgroundColor3\" />\n\t\t\t</colgroup>\n\t\t\t<tr>\n\t\t\t\t<td><input onclick=\"rme('Users','','convertPasswords','','contentManager.reloadFrameRight();');\" type=\"button\" style=\"float:right;background-image:url(./images/navi/keys.png);\" class=\"bigButton backgroundColor2\" value=\"Passwörter\nkonvertieren\" />In Ihrer Datenbank befinden sich noch unkonvertierte Passwörter.</td>\n\t\t\t</tr>\n\t\t</table>";
     }
     $T = new HTMLTable(1, "Application Server");
     $I = new HTMLInput("AppServer", "text", mUserdata::getGlobalSettingValue("AppServer", ""));
     $I->onEnter("contentManager.rmePCR('Users', '-1', 'saveAppServer', [this.value], ' ');");
     if ($allowedUsers === null) {
         $T->addRow($I . "<br /><small>Wenn Sie einen Application Server bertreiben, tragen Sie hier bitte die URL ein, um die Benutzer mit diesem Server zu authorisieren.</small>");
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Benutzer");
     $gui->setCollectionOf($this->collectionOf, "Benutzer");
     #$gui->setObject($this);
     $gui->setParser("isAdmin", "UsersGUI::isAdminParser");
     $gui->setColWidth("isAdmin", "20px");
     #$gui->hideAttribute("password");
     #$gui->hideAttribute("SHApassword");
     #$gui->hideAttribute("language");
     $gui->setShowAttributes(array("name", "username", "isAdmin"));
     $g = "";
     if (strstr($_SERVER["SCRIPT_FILENAME"], "demo")) {
         $UA = $_SESSION["S"]->getCurrentUser()->getA();
         if ($UA->name != "Installations-Benutzer") {
             $g = "In der Demo können keine Benutzer geändert werden!";
             $gui->setIsDisplayMode(true);
         }
     }
     $TR = new HTMLTable(1);
     if ($allowedUsers !== null and $id == -1) {
         $B = new Button("", "notice", "icon");
         $B->style("float:left;margin-right:10px;");
         $TR->addRow(array($B . "Bitte beachten Sie: Sie können insgesamt {$allowedUsers} Benutzer ohne Admin-Rechte anlegen."));
     }
     $gui->customize($this->customizer);
     return $TR . $g . $gui->getBrowserHTML($id) . ($id == -1 ? $T : "");
 }
Пример #20
0
 /**
  * Popup zur Konfiguration eines Servers.
  */
 public function getConfigPopup($echo = true)
 {
     // Button
     $BCreate = new Button("Server\nhinzufügen", "new");
     $BCreate->rmePCR("mxCal", "-1", "createNewServer", array(), OnEvent::reloadPopup("mxCal"));
     $htmlTableButton = new HTMLTable(1);
     $htmlTableButton->addRow($BCreate);
     // Liste der konfigurierten Server
     $userId = $_SESSION["S"]->getCurrentUser()->getID();
     $T = new HTMLTable(1, "xCal Server");
     $BDeleteRaw = new Button("Eintrag löschen", "./images/i2/delete.gif", "icon");
     $BDeleteRaw->style("float: right;");
     $serverList = anyC::get("xCal", "xCalUserID", $userId);
     $counter = 0;
     while ($S = $serverList->getNextEntry()) {
         $BDelete = clone $BDeleteRaw;
         $BDelete->onclick("deleteClass('xCal','" . $S->getID() . "', function() { Popup.refresh('mxCal'); }, 'Eintrag wirklich löschen?');");
         $F = new HTMLForm("xCal_" . $S->A("xCalID"), array("xCalName", "xCalUrl", "xCalServerActive"));
         $F->getTable()->setColWidth(1, 120);
         $F->setValues($S);
         $F->setLabel("xCalName", "Bezeichnung");
         $F->setLabel("xCalUrl", "URL");
         $F->setLabel("xCalServerActive", "Für den Import verwenden");
         $F->setType("xCalServerActive", "checkbox");
         $F->useRecentlyChanged();
         $F->setSaveClass("xCal", $S->getID(), "''");
         $display = "none";
         if ($S->A("xCalName") == "" && $S->A("xCalUrl") == "") {
             $display = "";
         }
         $div = "<div\n\t\t\t\t\tonmouseover=\"this.className = 'backgroundColor3';\" \n\t\t\t\t\tonmouseout=\"this.className = '';\" \n\t\t\t\t\tstyle=\"padding:3px;cursor:pointer;\" \n\t\t\t\t\tonclick=\"if(\$('APDetails" . $S->getID() . "').style.display == 'none') new Effect.BlindDown('APDetails" . $S->getID() . "'); else new Effect.BlindUp('APDetails" . $S->getID() . "');\">\n\t\t\t\t\t{$BDelete}<span id=\"APPosition" . $S->getID() . "\">" . ($S->A("xCalName") != "" ? $S->A("xCalName") : "Neuer Server") . "</span>&nbsp;<br />\n\t\t\t\t\t<small style=\"color:grey;\" id=\"APName" . $S->getID() . "\">" . ($S->A("xCalServerActive") == "1" ? "Import aktiviert" : "Import deaktiviert") . "&nbsp;</small>\n\t\t\t\t</div>";
         $T->addRow(array($div . "<div id=\"APDetails" . $S->getID() . "\" style=\"display:" . $display . ";\">" . $F . "</div>"));
         $T->addRowClass("backgroundColor0");
         $T->addCellClass(1, "borderColor1");
         $counter++;
     }
     if ($counter == 0) {
         $T->addRow("Keine Server eingetragen!");
     }
     if ($echo == "" || $echo === true) {
         echo $htmlTableButton . $T;
     } else {
         return $htmlTableButton . $T;
     }
 }
Пример #21
0
 public function buildTabBar()
 {
     $widths = Aspect::joinPoint("changeWidths", $this, __METHOD__);
     if ($widths == null and $this->size == "CRM") {
         $widths = array(700);
     }
     if ($this->size == "defaultLeft") {
         $widths = array(410);
     }
     $cTab = mUserdata::getUDValueS("TabBarLastTab{$this->className}", "none");
     $cTab = Aspect::joinPoint("lastTab", $this, __METHOD__, array($this->className, $cTab), $cTab);
     if (count($this->tabBar) == 0) {
         return "";
     }
     $bar = "";
     if (count($this->tabBar) > 0) {
         $bar = "\n\t\t\t<div style=\"width:{$widths['0']}px;margin-top:30px;padding-left:10px;padding-bottom:5px;\" class=\"backgroundColor4\">";
     }
     foreach ($this->tabBar as $value) {
         $B = new Button($value[1], $value[2]);
         $B->type("icon");
         $B->style("float:left;margin-right:5px;");
         if (!is_object($value[0])) {
             $id = "null";
             $onClick = $value[0];
         } else {
             $id = get_class($value[0]);
             $onClick = "Interface.TabBarActivate(this, '{$id}', '{$this->className}');";
         }
         $bar .= "\n\t\t\t\t<div\n\t\t\t\t\tid=\"tab_{$id}\"\n\t\t\t\t\tstyle=\"float:left;width:110px;padding:3px;cursor:pointer;-moz-user-select:none;margin-top:5px;overflow:hidden;white-space:nowrap;\"\n\t\t\t\t\tonmouseover=\"if(this.className != 'navBackgroundColor') this.className = 'backgroundColor2';\"\n\t\t\t\t\tonmouseout=\"if(this.className != 'navBackgroundColor') this.className = '';\"\n\t\t\t\t\tonclick=\"{$onClick}\">\n\t\t\t\t\t{$B}\n\t\t\t\t\t<p style=\"margin-top:3px;padding:0px;padding-top:5px;\">{$value['1']}</p>\n\t\t\t\t</div>";
         if ($id == $cTab) {
             $bar .= "<script type=\"text/javascript\">Interface.TabBarActivate(\$('tab_{$id}'), '{$id}');</script>";
         }
     }
     $bar .= "<div style=\"clear:both;\"></div>\n\t\t\t</div>\n\t\t\t<div style=\"clear:both;margin-bottom:-5px;\"></div>";
     foreach ($this->tabBar as $key => $value) {
         if (!is_object($value[0])) {
             continue;
         }
         $bar .= "<div id=\"" . get_class($value[0]) . "\" style=\"display:none;" . ($this->tabContainer[$key] === true ? "padding:10px;" : "") . "\"><p class=\"prettyTitle\">" . $this->tabBar[$key][1] . "</p>" . $value[0]->getHTML(-1, 0) . "</div>";
     }
     return $bar;
 }
Пример #22
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Preset");
     $gui->selectWithCollection("FhemPresetServerID", new mFhemServerGUI(), "FhemServerName");
     $gui->setLabel("FhemPresetServerID", "Server");
     $gui->setLabel("FhemPresetName", "Name");
     $gui->setType("FhemPresetHide", "checkbox");
     $gui->setLabel("FhemPresetHide", "Hide?");
     $gui->setType("FhemPresetNightOnly", "checkbox");
     $gui->setLabel("FhemPresetNightOnly", "Night only?");
     $gui->setLabel("FhemPresetLocationID", "Location");
     $gui->setLabel("FhemPresetRunOn", "run on");
     $gui->settype("FhemPresetLocationID", "select");
     $gui->selectWithCollection("FhemPresetLocationID", new mFhemLocationGUI(), "FhemLocationName");
     $gui->setFieldDescription("FhemPresetRunOn", "The event that triggers this Preset. For example HomeStatus:here will trigger this Preset when the dummy 'HomeStatus' is set to 'here'. The Preset will create its own dummy if this field is empty.");
     $gui->setStandardSaveButton($this, "mFhemPreset");
     #$gui->setIsDisplayMode(true);
     #$gui->setShowAttributes(array("name"));
     $gui->setShowAttributes(array("FhemPresetServerID", "FhemPresetLocationID", "FhemPresetName", "FhemPresetRunOn", "FhemPresetHide", "FhemPresetNightOnly"));
     $desc = new HTMLTable(1);
     $desc->addRow("For the \"Night only\"-option to work correctly you might want to set <code>{sunrise_coord(\"10.873799\",\"48.699495\",\"Europe/Berlin\")}</code> in the <code>fhem.cfg</code>-file. With your own coordinates/timezone of course.");
     if ($id == -1) {
         return $gui->getEditHTML() . $desc;
     }
     $_SESSION["BPS"]->registerClass("mFhemSelection");
     $_SESSION["BPS"]->setACProperty("selectionServerID", $this->A->FhemPresetServerID);
     $B = new Button("add Device", "./fheME/Fhem/fhem.png");
     $B->select("false", "mFhem", "FhemPreset", $this->ID, "addDevice");
     $BW = new Button("add custom", "backup");
     $BW->rmePCR("FhemPreset", $this->ID, "addWait", "", "contentManager.reloadFrame('contentLeft');");
     $BW->style("float:right;");
     $t = new HTMLTable(1);
     $t->addRow($BW . $B);
     $_SESSION["CurrentAppPlugins"]->addClass("Presets", "mFhemPreset");
     $mFE = new mFhemEventGUI();
     $mFE->addJoinV3("Fhem", "FhemEventFhemID", "=", "FhemID");
     $mFE->addAssocV3("FhemEventPresetID", "=", $this->ID);
     return $gui->getEditHTML() . $desc . "<div style=\"height:30px;\"></div>" . $t . $mFE->getHTML(-1) . "<div style=\"height:30px;\"></div>";
 }
Пример #23
0
 public function setPath()
 {
     $bps = $this->getMyBPSData();
     #Aspect::registerOnetimePointCut("aboveList", "GUIFactory::getContainer", "FileManagerGUI::adviceAboveList");
     $rootDir = null;
     if ($bps != -1 and isset($bps["root"])) {
         $rootDir = preg_replace("/^([A-Z])%/", "\\1:", $bps["root"]);
     }
     #echo $rootDir;
     if ($rootDir != null) {
         $T = new HTMLTable(1);
         #$rel = "specifics/$rootDir";
         #$root = Util::getRootPath().$rel;
         $root = FileStorage::getFilesDir() . $rootDir;
         $_SESSION["BPS"]->setProperty("FileManagerGUI", "path", preg_replace("/^([A-Z]):/", "\\1%", $root));
         $_SESSION["BPS"]->setProperty("FileManagerGUI", "root", preg_replace("/^([A-Z]):/", "\\1%", $root));
         $F = new File($root);
         $F->loadMe();
         if ($F->getA() == null) {
             if (is_writable(FileStorage::getFilesDir())) {
                 mkdir($root);
             } else {
                 $B = new Button("", "stop");
                 $B->type("icon");
                 $B->style("float:left;margin-right:10px;");
                 $T->addRow($B . "Das Verzeichnis <code>{$rel}</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt.");
                 return $T;
             }
         }
     }
     $bps = $this->getMyBPSData();
     //go again
     #print_r($bps);
     if (isset($bps["path"]) and strpos($bps["path"], $bps["root"]) === false) {
         $bps["path"] = preg_replace("/^([A-Z])%/", "\\1:", $bps["root"]);
     }
     #$bps["root"];
     if ($bps != -1 and isset($bps["path"])) {
         $this->setDir(preg_replace("/^([A-Z])%/", "\\1:", $bps["path"]));
     }
     return true;
 }
Пример #24
0
 public function showDetailsPopup()
 {
     $BD = new Button("Gericht löschen", "trash", "icon");
     $BD->style("float:right;margin-right:10px;");
     $BD->onclick("deleteClass('Gericht','" . $this->getID() . "', function() { " . OnEvent::closePopup("Gericht") . " fheOverview.loadContent('mGerichtGUI::getOverviewContent'); },'Eintrag wirklich löschen?');");
     $BC = new Button("Popup schließen", "stop", "icon");
     $BC->style("float:right;margin-right:10px;");
     $BC->onclick(OnEvent::closePopup("Gericht"));
     $BE = new Button("Gericht bearbeiten", "edit", "icon");
     $BE->style("float:right;margin-right:10px;");
     $BE->editInPopup("Gericht", $this->getID(), "Gericht bearbeiten", "GerichtGUI;mode:popup");
     $html = "<h1>{$BC}{$BD}{$BE}" . $this->A("GerichtName") . "</h1><p>";
     if ($this->A("GerichtRezeptBuch") != "") {
         $html .= "Buch: " . $this->A("GerichtRezeptBuch") . "<br />";
         $html .= "Seite: " . $this->A("GerichtRezeptBuchSeite") . "<br />";
     }
     $html .= nl2br($this->A("GerichtRezept"));
     $html .= "</p>";
     echo $html;
 }
Пример #25
0
 public function editInWindow($UDID)
 {
     $T = new HTMLTable(1);
     $B = new Button("Desktop-Link\nlöschen", "trash");
     $B->onclick("");
     $B->style("float:right;");
     $B->rmePCR("DesktopLink", "", "delete", $UDID, "if(checkResponse(transport)){ Popup.close('', 'DesktopLinkPopup'); DesktopLink.loadContent(true); }");
     $T->addRow($B);
     $T->addRowClass("backgroundColor0");
     $UD = new Userdata($UDID);
     $F = new HTMLForm("DesktopLinkEdit", array("order", "symbol", "name", "UDID"), "Bearbeiten:");
     $F->setSaveRMEP("Desktop-Link speichern", "./images/i2/save.gif", "DesktopLink", "{$UDID}", "save", "if(checkResponse(transport)){ Popup.close(\\'\\', \\'DesktopLinkPopup\\'); DesktopLink.loadContent(true); }");
     $v = explode(";", $UD->A("wert"));
     $F->setValue("order", $v[0]);
     $F->setValue("symbol", $v[1]);
     $F->setValue("name", $v[2]);
     $F->setValue("UDID", $UDID);
     $F->setType("UDID", "hidden");
     $F->setType("order", "hidden");
     $F->setType("symbol", "hidden");
     echo $T . $F;
 }
Пример #26
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)
 {
     $c = new $dataClass($dataClassID);
     $data = $c->getEMailData($callbackParameter);
     $tab = new HTMLTable(2);
     $tab->setColWidth(1, "120px;");
     $tab->addLV("Absender:", "{$data['fromName']}<br /><small>&lt;{$data['fromAddress']}&gt;</small>");
     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", "0", $recipients);
         $IS->id("EMailRecipient{$dataClassID}");
         $tab->addLV("Empfänger:", $IS);
     }
     $tab->addLV("Betreff:", "<input type=\"text\" id=\"EMailSubject{$dataClassID}\" value=\"{$data['subject']}\" />");
     $tab->addRow(array("<textarea id=\"EMailBody{$dataClassID}\" style=\"width:100%;height:300px;font-size:10px;\">{$data['body']}</textarea>"));
     $tab->addRowColspan(1, 2);
     $tab->addRowClass("backgroundColor0");
     if ($onSuccessFunction == null) {
         $onSuccessFunction = "" . OnEvent::reload("Left") . " Popup.close('Util', 'edit');";
     }
     $BAbort = new Button("Abbrechen", "stop");
     $BAbort->onclick("Popup.close('Util', 'edit');");
     $BAbort->style("margin-bottom:10px;margin-top:10px;");
     $BGo = new Button("E-Mail\nsenden", "okCatch");
     $BGo->style("float:right;margin-top:10px;");
     $BGo->rmePCR($dataClass, $dataClassID, "sendEmail", array("\$('EMailSubject{$dataClassID}').value", "\$('EMailBody{$dataClassID}').value", count($data["recipients"]) == 1 ? "0" : "\$('EMailRecipient{$dataClassID}').value", "'" . $callbackParameter . "'"), $onSuccessFunction);
     #$BGo->onclick("CloudKunde.directMail('$this->ID', '$data[recipientAddress]', $('EMailSubject$this->ID').value, $('EMailBody$this->ID').value); ");
     $tab->addRow(array($BGo . $BAbort));
     $tab->addRowColspan(1, 2);
     #$tab->addRowClass("backgroundColor0");
     echo $tab;
 }
Пример #27
0
 public function setSaveCheckListUD($targetClass, $identifier = "", $checkedByDefault = true, $onSuccessFunction = null)
 {
     $this->saveMode = "custom";
     if ($onSuccessFunction != null and strpos($onSuccessFunction, "function(") !== 0) {
         $onSuccessFunction = "function(transport){ {$onSuccessFunction} }";
     }
     $value = mUserdata::getUDValueS("{$identifier}{$targetClass}", "");
     if ($checkedByDefault and !$value) {
         foreach ($this->fields as $field) {
             $this->setValue($field, "1");
         }
     }
     if ($value != "") {
         $value = explode(",", $value);
         foreach ($value as $field) {
             $this->setValue($field, "1");
         }
     }
     $B = new Button("Speichern", "./images/i2/save.gif", "icon");
     $B->onclick("var submitValues = ''; \$j.each(\$j('#{$this->id}').serializeArray(), function(k, v) { submitValues += (submitValues != '' ? ',' : '')+v.name; }); contentManager.rmePCR('mUserdata', '-1', 'setUserdata', ['{$identifier}{$targetClass}', submitValues]" . ($onSuccessFunction != null ? ", {$onSuccessFunction}" : "") . ");");
     $B->style("float:right;margin-top:-25px;margin-right:3px;");
     $this->saveButtonCustom = $B;
     $this->onSubmit = "return false;";
 }
Пример #28
0
 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;
 }
Пример #29
0
 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;
 }
Пример #30
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);") : "");
 }