Example #1
0
 function add_radio($name, $id, $label = ' ', $checked = FALSE)
 {
     $s = new HTMLInput(RADIO, $name, $id, $label);
     $s->check($checked);
     $this->fields[][$name] = $s;
     return $s;
 }
Example #2
0
 private function row(poolAnzeige $A)
 {
     $html = "\n\t\t\t<div style=\"height:auto;padding-top:30px;padding-bottom:25px;border-bottom: 1px solid #ddd;\">";
     $I = new HTMLInput("poolAnzeigeName", "text", $A->A("poolAnzeigeName"));
     $I->activateMultiEdit("poolAnzeige", $A->getID());
     $I->style("text-align: right;width:90%;");
     $I->placeholder("Beschriftung");
     $B = new Button("Zeile löschen", "trash_stroke", "iconicL");
     $B->style("margin-top:10px;");
     $B->doBefore("if(confirm('Die Zeile löschen?')) %AFTER");
     $B->rmePCR("poolAnzeige", $A->getID(), "deleteMe", "", OnEvent::reload("Screen"));
     $html .= "\n\t\t\t\t<div style=\"text-align: right;color: #777;font-size: 1.5em;display: inline-block;width: 195px;height: auto;vertical-align: top;margin-top: 7px;margin-right: 21px;\">\n\t\t\t\t\t{$I}{$B}\n\t\t\t\t</div>";
     $close = 0;
     $AC = anyC::get("poolAnzeigeControl", "poolAnzeigeControlpoolAnzeigeID", $A->getID());
     $AC->addOrderV3("poolAnzeigeControlOrder");
     $AC->addOrderV3("poolAnzeigeControlID");
     while ($C = $AC->n()) {
         if ($C->A("poolAnzeigeControlNewLine")) {
             $html .= "<div style=\"margin-top:15px;\">\n\t\t\t\t\t<div style=\"display: inline-block;width: 195px;height: 120px;vertical-align: top;margin-top: 7px;margin-right: 21px;\"></div>";
             $close++;
         }
         $html .= $this->control($C);
     }
     $B = new Button("Element\nhinzufügen", "new");
     $B->style("margin:10px;display:inline-block;vertical-align:top;");
     $B->popup("", "Element hinzufügen", "mpoolAnzeige", "-1", "addElementPopup", array($A->getID()));
     $html .= $B;
     for ($i = 0; $i < $close; $i++) {
         $html .= "</div>";
     }
     $html .= "</div>";
     return $html;
 }
Example #3
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;
 }
Example #4
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);");
 }
Example #5
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());");
 }
 private function noBackupButton()
 {
     $GoAway = new HTMLInput("BackupGoAway", "checkbox");
     $GoAway->id("BackupGoAway");
     $GoAway->style("float:left;margin-right:5px;");
     $BSave = new Button("Einstellung\nspeichern", "save");
     $BSave->style("float:right;");
     $BSave->onclick("if(\$('BackupGoAway').checked) ");
     $BSave->rmePCR("BackupManager", "", "GoAway", "", "Popup.close('','BackupManagerGUI'); contentManager.reloadFrame('contentLeft');");
     return $BSave . $GoAway . " <label for=\"BackupGoAway\" style=\"float:none;text-align:left;width:auto;\">Diese Meldung nicht mehr anzeigen, ich erstelle meine Backups selbst.</label>";
 }
Example #7
0
 public static function parserMembers($w, $l, $E)
 {
     $Users = Users::getUsersArray();
     $r = "";
     foreach ($Users as $ID => $U) {
         $I = new HTMLInput("user_{$ID}", "checkbox", strpos($w, ";{$ID};") !== false ? "1" : "0");
         $I->onchange("if(this.checked) \$j('[name=phimGruppeMembers]').val(\$j('[name=phimGruppeMembers]').val()+';{$ID};'); else  \$j('[name=phimGruppeMembers]').val(\$j('[name=phimGruppeMembers]').val().replace(';{$ID};', ''));");
         $r .= $I . " " . $U . "<br>";
     }
     $I = new HTMLInput("phimGruppeMembers", "hidden", $w);
     return $r . $I;
 }
Example #8
0
 public function getPosten(GRLBM $Beleg)
 {
     $T = new HTMLTable(1, "Arbeitsbeschreibung");
     $T->setTableStyle("width:100%;");
     $tinyMCEID = "tinyMCE" . rand(100, 90000000);
     $I = new HTMLInput("textbausteinUnten", "textarea", $Beleg->A("textbausteinUnten"));
     $I->style("width:100%;height:300px;margin-left:10px;");
     $I->id($tinyMCEID);
     $T->addRow(array($I));
     $buttons = "undo redo | pastetext | styleselect fontsizeselect fontselect | bold italic underline forecolor | hr";
     return $T . parent::getPosten($Beleg) . OnEvent::script("if(CCAuftrag.lastTextbausteinUnten != null) \$('[name=textbausteinUnten]').val(CCAuftrag.lastTextbausteinUnten); CCAuftrag.lastTextbausteinUnten = null;" . tinyMCEGUI::editorDokument($tinyMCEID, "function(content){}", $buttons, "../../styles/tinymce/email.css"));
 }
Example #9
0
 public function addInput($type, $name, $value = NULL, $label = NULL, $class = NULL, $language = NULL)
 {
     // Adds input to form
     $input = new HTMLInput($type, $name, $value, $language);
     if ($label) {
         $input->addLabel($label);
     }
     if ($class) {
         $input->addClass($class);
     }
     $this->inputs[] = $input;
     return $input;
 }
 function getField()
 {
     $value = (int) $this->getParam('value');
     switch ($this->params['mode']) {
         case 'list':
             $field = $value;
             break;
         case 'single':
             $field_obj = new HTMLInput();
             $field_obj->addParams($this->params);
             $field = $field_obj->getField();
             break;
     }
     return $field;
 }
Example #11
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 : "");
 }
Example #12
0
 public function __construct($name)
 {
     parent::__construct();
     $this->element->name = $name;
     $this->element->id = $name;
     $this->element->type = 'submit';
 }
Example #13
0
 /**
  * Cria um elemento HTMLInputRadio, passando para ele um nome, sendo que
  * diferente dos outros elementos HTML, o id é gerado concatenando o nome
  * mais uniqid(), para a utilização de label em grupos de radiobuttons
  * @param type $name 
  */
 public function __construct($name)
 {
     parent::__construct();
     $this->element->name = $name;
     $this->element->id = $name . uniqid();
     $this->element->type = 'radio';
 }
Example #14
0
 public function __construct($name)
 {
     parent::__construct();
     $this->element->type = "checkbox";
     $this->element->name = $name;
     $this->element->id = $name;
 }
Example #15
0
 public static function ActionParser($w, $l, $p)
 {
     $s = HTMLGUI::getArrayFromParametersString($p);
     if ($s[2] == "-1") {
         $I = new HTMLInput("FhemEventAction", "multiInput", $w, array("FhemEvent", $s[0], "FhemEventAction"));
         $I->style("width:95%;text-align:left;");
         return $I;
     }
     $Fhem = new Fhem($s[1]);
     $Fhem->loadMe();
     $op = $Fhem->getAvailableOptions();
     $o = "<option value=\"\">select...</option>";
     foreach ($op as $k => $v) {
         $o .= "<option " . ($w == $v ? "selected=\"selected\"" : "") . " value=\"{$v}\">{$k}</option>";
     }
     return "<select onchange=\"rme('FhemEvent', '{$s['0']}', 'saveMultiEditField', Array('FhemEventAction',this.value), 'checkResponse(transport);');\">{$o}</select>";
 }
Example #16
0
 /**
  * @param string $name
  */
 public function __construct($name)
 {
     parent::__construct("textarea");
     $this->element->name = $name;
     $this->element->id = $name;
     $this->element->type = 'text';
     $this->element->rows = "3";
     $this->element->cols = "30";
     $this->element->appendChild('');
 }
Example #17
0
 function getCMSHTML()
 {
     if (!isset($_SERVER['PHP_AUTH_USER']) or $_SERVER['PHP_AUTH_USER'] == "") {
         header('WWW-Authenticate: Basic realm="Ticket POS"');
         header('HTTP/1.0 401 Unauthorized');
         die("Authentifikation fehlgeschlagen");
     }
     $EC = new ExtConn(Util::getRootPath());
     if (!$EC->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'])) {
         header('WWW-Authenticate: Basic realm="Ticket POS"');
         header('HTTP/1.0 401 Unauthorized');
         die("Authentifikation fehlgeschlagen");
     }
     $html = "<div style=\"width:200px;float:right;\">Angemeldet als<br /><b>" . Session::currentUser()->A("name") . "</b></div>";
     $html .= "<h1>Ticket POS</h1>";
     $AC = anyC::get("Seminar");
     $AC->addAssocV3("SeminarVon", ">=", time() - 3600 * 48);
     $Events = array();
     while ($S = $AC->getNextEntry()) {
         $Events[$S->getID()] = $S->A("SeminarName") . ", " . Util::CLFormatDate($S->A("SeminarVon"), true);
     }
     $I = new HTMLInput("currentEvent", "select", null, $Events);
     $I->style("font-size:20px;width:45%;");
     $html .= "<div style=\"margin-bottom:45px;\">{$I}</div>";
     $TS = new CCTicketShop();
     /*$count = array();
     		for($i = 0; $i < 21; $i++)
     			$count[$i] = $i;
     		
     		$I = new HTMLInput("ticketCount", "select", null, $count);
     		$I->style("width:100%;font-size:20px;");
     		
     		$IC = new Button("Weiter", "");
     		$IC->onclick("CustomerPage.rme('handleTicketSale', [$('select[name=currentEvent]').val(), $('select[name=ticketCount]').val()], function(){  })");
     		$IC->className("submitFormButton");*/
     $html .= "\n\t\t<div style=\"float:right;width:45%;\">\n\t\t\t<h2 style=\"margin-bottom:10px;\">Ticketverkauf</h2>\n\t\t\t" . $TS->getCMSHTML(false) . "\n\t\t\t<!--<div style=\"border:1px dashed grey;padding:10px;margin-top:10px;\">\n\t\t\t\tAnzahl der Tickets:\n\t\t\t\t{$I}{$IC}\n\t\t\t\t<div style=\"clear:both;\"></div>\n\t\t\t</div>-->\n\t\t</div>";
     $I = new HTMLInput("ticketCheck");
     $I->style("width:98%;font-size:20px;");
     $I->onEnter("CustomerPage.rme('handleTicketCheck', [\$('select[name=currentEvent]').val(), \$(this).val()], function(transport){ \$('#ticketValidInfo').html(transport); })");
     $html .= "\n\t\t<div style=\"width:45%;\">\n\t\t\t<h2 style=\"margin-bottom:10px;\">Einlass</h2>\n\t\t\t<div style=\"border:1px dashed #BBBBBB;padding:10px;\">\n\t\t\t\tTicket-Nummer:\n\t\t\t\t{$I}\n\t\t\t\t<div id=\"ticketValidInfo\" style=\"font-size:20px;margin-top:20px;\">\n\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>";
     return $html;
 }
    function getField()
    {
        $value = $this->getParam('value');
        $name = $this->getParam('name');
        if ($value == '0000-00-00') {
            $value = '';
            $this->setParam('value', '');
        }
        switch ($this->params['mode']) {
            case 'list':
                $is_link = $this->getParam('is_link');
                $link = $this->getParam('link');
                $key_field_value = $this->getParam('key_field_value');
                if ($is_link && $link && $key_field_value) {
                    $link = str_replace('*', $key_field_value, $link);
                    $link = $this->getURLString($link);
                    $field = '<a href="' . $link . '">' . $value . '</a>' . "\n";
                } else {
                    $field = (string) $value;
                }
                break;
            case 'single':
                $field = '
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
					<script type="text/javascript">
						$(document).ready(function(){
							$(".date_field_' . $name . '").datepicker();
						});
					</script>
				';
                $this->params['css_class'] = 'date_field_' . $name;
                $field_obj = new HTMLInput();
                $field_obj->addParams($this->params);
                $field .= $field_obj->getField();
                break;
        }
        return $field;
    }
Example #19
0
 /**
  * Cria um elemento HTML Button
  * @param string $name
  * @param bool $assync se TRUE o evento será executado de maneira assíncrona
  */
 public function __construct($name, $assync = FALSE)
 {
     parent::__construct();
     $this->element->type = "button";
     $this->element->name = $name;
     $this->element->id = $name;
     /**
      * Para que seja utilizável a chamada assíncrona do HTMLAnchor, é necessário
      * que esteja fixo no arquivos functions do Framework a referida função
      */
     if ($assync) {
         $this->element->setAttribute(IMouseEvent::CLICK, 'return $.callAssync(this);');
     }
 }
Example #20
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;
 }
 function getField()
 {
     $value = $this->getParam('value');
     //		var_dump($value); exit;
     switch ($this->params['mode']) {
         case 'list':
             $is_link = $this->getParam('is_link');
             $link = $this->getParam('link');
             $key_field = $this->getParam('key_field');
             if ($key_field) {
                 $row_data = $this->getParam('row_data');
                 if (isset($row_data[$key_field])) {
                     $key_field_value = $row_data[$key_field];
                 } else {
                     $key_field_value = $this->getParam('key_field_value');
                 }
             } else {
                 $key_field_value = $this->getParam('key_field_value');
             }
             //					var_dump($key_field_value); exit;
             if ($is_link && $link && $key_field_value) {
                 $link = str_replace('*', $key_field_value, $link);
                 $link = $this->getURLString($link);
                 $field = '<a href="' . $link . '">' . $value . '</a>' . "\n";
             } else {
                 $field = (string) $value;
             }
             break;
         case 'single':
             $field_obj = new HTMLInput();
             $field_obj->addParams($this->params);
             $field = $field_obj->getField();
             break;
     }
     return $field;
 }
Example #22
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;
 }
Example #23
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;
 }
Example #24
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;
     }
 }
Example #25
0
 function getCartHTML($previewMode = false)
 {
     $payVia = "";
     if (count($this->payment) > 0) {
         $payVia = "&payVia='+CookieCart.getPayVia()+'";
     }
     #parameters: 'formID=nix&HandlerName=CookieCartHandler&artikelid='+id+'&action=delete&type='+type,
     if ($this->cookie != "") {
         $html = "\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t<!--\n\t\t\t\t\t\tvar CookieCart = {\n\t\t\t\t\t\t\tjoinFormFields: function(formID){\n\t\t\t\t\t\t\t\tsetString = '';\n\t\t\t\t\t\t\t\tfor(i = 0;i < \$(formID).elements.length;i++) {\n\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].type == 'button') continue;\n\n\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].type == 'radio'){\n\t\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].checked) setString += '&'+\$(formID).elements[i].name+'='+encodeURIComponent(\$(formID).elements[i].value);\n\t\t\t\t\t\t\t\t\t} else if(\$(formID).elements[i].type == 'checkbox'){\n\t\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].checked) setString += '&'+\$(formID).elements[i].name+'=1';\n\t\t\t\t\t\t\t\t\t\telse setString += '&'+\$(formID).elements[i].name+'=0';\n\t\t\t\t\t\t\t\t\t} else if(\$(formID).elements[i].type == 'select-multiple'){\n\t\t\t\t\t\t\t\t\t\tsetString += '&'+\$(formID).elements[i].name+'=';\n\t\t\t\t\t\t\t\t\t\tsubString = '';\n\t\t\t\t\t\t\t\t\t\tfor(j = 0; j < \$(formID).elements[i].length; j++)\n\t\t\t\t\t\t\t\t\t\t\tif(\$(formID).elements[i].options[j].selected) subString += (subString != '' ? ';:;' : '')+\$(formID).elements[i].options[j].value;\n\n\t\t\t\t\t\t\t\t\t\tsetString += subString;\n\n\t\t\t\t\t\t\t\t\t} else setString += '&'+\$(formID).elements[i].name+'='+encodeURIComponent(\$(formID).elements[i].value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn setString;\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tgetPayVia: function(){\n\t\t\t\t\t\t\t\tfor(i = 0;i < \$('cart').payVia.length; i++)\n\t\t\t\t\t\t\t\t\tif(\$('cart').payVia[i].checked) return \$('cart').payVia[i].value;\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tdeleteMe: function(id, type){\n\t\t\t\t\t\t\t\tnew Ajax.Request('/index.php', {\n\t\t\t\t\t\t\t\t\tmethod:'post',\n\t\t\t\t\t\t\t\t\tparameters:'r=" . mt_rand(0, 10000) . "&formID=nix&HandlerName=CookieCartHandler&artikelid='+id+'&action=delete&type='+type,\n\t\t\t\t\t\t\t\t\tonSuccess: function(transport){\n\t\t\t\t\t\t\t\t\t\tif(multiCMS.checkResponse(transport))\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.reload();\n\t\t\t\t\t\t\t\t}});\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\torderNow: function(){\n\t\t\t\t\t\t\t\t\$('cart').action.value = 'order';\n\n\t\t\t\t\t\t\t\t//if(confirm('Jetzt kaufen?'))\n\t\t\t\t\t\t\t\tnew Ajax.Request('/index.php', {\n\t\t\t\t\t\t\t\t\tmethod:'post',\n\t\t\t\t\t\t\t\t\tparameters: 'r=" . mt_rand(0, 10000) . "&formID=nix&HandlerName=CookieCartHandler{$payVia}'+CookieCart.joinFormFields('cart'),\n\t\t\t\t\t\t\t\t\tonSuccess: function(transport){\n\t\t\t\t\t\t\t\t\t\tif(multiCMS.checkResponse(transport))\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.reload();\n\t\t\t\t\t\t\t\t}});\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdateAmounts: function(){\n\t\t\t\t\t\t\t\tmultiCMS.formHandler('cart', function(transport){\n\t\t\t\t\t\t\t\t\tif(multiCMS.checkResponse(transport))\n\t\t\t\t\t\t\t\t\t\tdocument.location.reload();\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tinsertCoupon: function(){\n\t\t\t\t\t\t\t\tif(\$('CouponCode').value == '') {\n\t\t\t\t\t\t\t\t\talert('Bitte geben Sie einen Gutscheincode ein!');\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tnew Ajax.Request('/index.php', {\n\t\t\t\t\t\t\t\t\tmethod:'post',\n\t\t\t\t\t\t\t\t\tparameters: 'r=" . mt_rand(0, 10000) . "&formID=nix&HandlerName=CookieCartHandler&action=insertCoupon&couponCode='+encodeURIComponent(\$('CouponCode').value),\n\t\t\t\t\t\t\t\t\tonSuccess: function(transport){\n\t\t\t\t\t\t\t\t\t\tif(multiCMS.checkResponse(transport))\n\t\t\t\t\t\t\t\t\t\t\tdocument.location.reload();}});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t-->\n\t\t\t\t</script>\n\t\t\t\t\n\t\t\t\t<style type=\"text/css\">\n\t\t\t\t\t#CookieCart .CookieCartBorderColor td {\n\t\t\t\t\t\tborder-width:0px;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t#CookieCart table th {\n\t\t\t\t\t\ttext-align:left;\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t\t\n\t\t\t\t<form " . (!$previewMode ? "id=\"cart\"" : "") . " onsubmit=\"return false;\">";
     }
     $tab = $this->table;
     $tab->addHeaderRow(array("", "Menge", "Artikel", "Einzelpreis", "Gesamtpreis", ""));
     #$tab->addColStyle(2, "text-align:right;");
     $tab->addColStyle(4, "text-align:right;");
     $tab->addColStyle(5, "text-align:right;");
     $tab->addColStyle(6, "text-align:right;");
     $steuern = array();
     $gesamt = 0;
     $netto = 0;
     $i = 0;
     if ($this->cookie != "") {
         while ($t = $this->getNextElement()) {
             $num = array_search($t[2], $this->useClass);
             if ($t[2] != "CookieCart") {
                 $c = $this->useClass[$num];
                 $A = new $c($t[0], false);
                 $A->loadMe();
                 $mwst = $this->mwstField[$num];
                 $name = $this->nameField[$num];
                 $preis = $this->preisField[$num];
                 $artikelnummer = $this->artikelnummerField[$num];
             } else {
                 $A = $this;
                 $this->PostenID = $t[0];
                 $mwst = "mwst";
                 $name = "artikelname";
                 $preis = "preis";
                 $artikelnummer = "artikelnummer";
             }
             try {
                 new Staffelpreis(-1);
                 if (class_exists("Staffelpreis")) {
                     $ac = new anyC();
                     $ac->setCollectionOf("Staffelpreis");
                     $ac->addAssocV3("StaffelpreisClass", "=", $this->useClass);
                     $ac->addAssocV3("StaffelpreisClassID", "=", $t[0]);
                     $ac->addAssocV3("StaffelpreisAmount", "<=", $t[1]);
                     $ac->addOrderV3("StaffelpreisAmount", "DESC");
                     $ac->setLimitV3("1");
                     $ac2 = $ac->getNextEntry();
                     if ($ac2 != null) {
                         $A->changeA($preis, $ac2->A("StaffelpreisPrice"));
                     }
                 }
             } catch (Exception $e) {
             }
             if (!isset($steuern[$A->getA()->{$mwst}])) {
                 $steuern[$A->getA()->{$mwst}] = 0;
             }
             $steuern[$A->getA()->{$mwst}] += $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100) * $t[1];
             $gesamt += $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1) * $t[1];
             $netto += $A->getA()->{$preis} * 1 * $t[1];
             $image = $this->invokeParser($this->imagePathCallback[$num], $t[0], $A);
             if ($image != "") {
                 $parsedImage = "<img src=\"{$image}\" />";
             } else {
                 $parsedImage = "";
             }
             if ($this->imageParser != null) {
                 $parsedImage = $this->invokeParser($this->imageParser[$num], $t[0], $A);
             }
             #"<input type=\"input\" style=\"text-align:right;width:60px;\" name=\"amountOf_$t[0]_$t[2]\" value=\"$t[1]\" onkeydown=\"if(event.keyCode == 13) CookieCart.updateAmounts();\" />"
             $IMenge = new HTMLInput("amountOf_{$t['0']}_{$t['2']}", "text", $t[1]);
             $IMenge->style("text-align:right;width:60px;");
             $IMenge->onEnter("CookieCart.updateAmounts();");
             if ($t[2] == "CookieCart" and $t[0] == "1") {
                 $IMenge = $t[1];
             }
             $tab->addRow(array($parsedImage, !$previewMode ? $IMenge : "{$t['1']}", $A->getA()->{$name} . ((isset($A->getA()->{$artikelnummer}) and $A->getA()->{$artikelnummer} != "") ? "<br /><small>Art.Nr. " . $A->getA()->{$artikelnummer} . "</small>" : ""), Util::formatCurrency("de_DE", $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1), true) . "<br /><small>" . Util::formatNumber("de_DE", $A->getA()->{$mwst} * 1, 2, true, false) . "%</small>", Util::formatCurrency("de_DE", $A->getA()->{$preis} * 1 * ($A->getA()->{$mwst} / 100 + 1) * $t[1], true), !$previewMode ? "<img style=\"cursor:pointer;\" onclick=\"CookieCart.deleteMe('{$t[0]}','{$t['2']}');\" alt=\"Artikel aus Warenkorb löschen\" title=\"Artikel aus Warenkorb löschen\" src=\"{$this->trashImage}\" />" : ""));
             $tab->addCellStyle(1, "vertical-align:top;");
             $tab->addCellStyle(2, "vertical-align:middle;");
             $tab->addCellStyle(3, "vertical-align:middle;");
             $i++;
         }
         if ($this->versandkostenBrutto != null) {
             $tab->addRow(array("", "1", $this->versandkostenBrutto[0], Util::formatCurrency("de_DE", $this->versandkostenBrutto[1], true), Util::formatCurrency("de_DE", $this->versandkostenBrutto[1], true)));
             $gesamt += $this->versandkostenBrutto[1];
             $netto += Util::kRound($this->versandkostenBrutto[1] / ($this->versandkostenBrutto[2] + 100) * 100, 2);
             $steuern[number_format($this->versandkostenBrutto[2], 2)] += Util::kRound($this->versandkostenBrutto[1] / ($this->versandkostenBrutto[2] + 100) * $this->versandkostenBrutto[2], 2);
         }
         $s = "";
         foreach ($steuern as $key => $value) {
             $s .= ($s != "" ? "<br />" : "") . "" . Util::formatNumber("de_DE", $key * 1, 2, true, false) . "%: " . Util::formatCurrency("de_DE", $value, true);
         }
         $tab->addRow(array(!$previewMode ? "\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvalue=\"Mengen speichern\"\n\t\t\t\t\t\t\t\tonclick=\"CookieCart.updateAmounts();\"\n\t\t\t\t\t\t\t/>" : "", "", "", "Gesamt Netto", Util::formatCurrency("de_DE", $netto, true), ""));
         $tab->addCellStyle(1, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(2, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(3, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(4, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(5, "border-top-width:1px;border-top-style:solid;");
         $tab->addCellStyle(6, "border-top-width:1px;border-top-style:solid;");
         $tab->addRowClass("CookieCartBorderColor");
         $tab->addRowColspan(1, 3);
         $tab->addRow(array("", "", "", "Gesamt MwSt", $s, ""));
         $tab->addRow(array("", "", "", "Gesamt", Util::formatCurrency("de_DE", $gesamt, true), ""));
         $tab->addCellStyle(4, "font-weight:bold;border-top-style:solid;border-top-width:1px;");
         $tab->addCellStyle(5, "font-weight:bold;border-top-style:solid;border-top-width:1px;");
         $tab->addRowClass("CookieCartBorderColor");
         #$tab->addCellStyle(2, "text-align:right;");
         if (!$previewMode) {
             $coupon = "";
             if ($this->couponCallback !== null) {
                 $showCouponField = $this->invokeParser($this->couponCallback, "showCouponField", null);
                 if ($showCouponField === true) {
                     $CI = new HTMLInput("CouponCode");
                     $CI->id("CouponCode");
                     $CI->onEnter("CookieCart.insertCoupon();");
                     $CB = new HTMLInput("CouponInsert", "button", "Gutschein einlösen");
                     $CB->style("margin-top:5px;");
                     $CB->onclick("CookieCart.insertCoupon();");
                 } else {
                     $CI = "";
                     $CB = $showCouponField;
                 }
                 $coupon = "<div class=\"CookieCartCoupon\"><p><b>Gutschein-Code:</b><br />{$CI}<br>{$CB}</p></div>";
             }
             $tab->addRow(array($coupon, "", ""));
             $tab->addRowStyle("height:30px;");
             $tab->addRowColspan(1, 4);
         }
         if (count($this->payment) > 0 and !$previewMode and $this->payNowButton == null) {
             $pay = "";
             foreach ($this->payment as $k => $v) {
                 if ($pay != "") {
                     $pay .= "<br /><br />";
                 }
                 switch ($v) {
                     case "PayPal":
                         $pay .= "<input name=\"payVia\" value=\"{$v}\" type=\"radio\" " . ($pay == "" ? "checked=\"checked\"" : "") . " />\n\t\t\t\t\t\t\t<img src=\"https://www.paypal.com/de_DE/DE/i/logo/logo_80x35.gif\" alt=\"PayPal\">";
                         break;
                     case "Überweisung":
                         $pay .= "<input name=\"payVia\" value=\"{$v}\" type=\"radio\" " . ($pay == "" ? "checked=\"checked\"" : "") . " /> Überweisung";
                         break;
                     case "Kreditkarte":
                         $pay .= "<input name=\"payVia\" value=\"{$v}\" type=\"radio\" " . ($pay == "" ? "checked=\"checked\"" : "") . " /> Kreditkarte";
                         break;
                 }
             }
             $tab->addRow(array("", "", "", "Zahlung via", "{$pay}"));
             $tab->addCellStyle(4, "vertical-align:top;");
             $tab->addRow(array("", "", "", "", ""));
             $tab->addRowStyle("height:30px;");
         }
         if (!$previewMode and $this->payNowButton === null) {
             $tab->addRow(array("", "", "", "\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tvalue=\"Jetzt verbindlich bestellen\"\n\t\t\t\t\t\t\t\tstyle=\"border-color:green;width:220px;height:30px;color:green;\"\n\t\t\t\t\t\t\t\tonclick=\"CookieCart.orderNow();\"\n\t\t\t\t\t\t\t/>"));
             $tab->addRowColspan(4, 3);
         } elseif (!$previewMode and $this->payNowButton != null and $this->payNowButton != "") {
             $tab->addRow(array("<a href=\"{$this->payNowURL}\"><img alt=\"jetzt Bezahlen\" title=\"jetzt Bezahlen\" src=\"{$this->payNowButton}\" /></a>"));
             $tab->addRowColspan(1, 6);
             $tab->addCellStyle(1, "text-align:right;");
         }
         $html .= $tab->getHTML();
         $html .= "<input type=\"hidden\" name=\"returnP\" value=\"{$_GET['p']}\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"HandlerName\" value=\"CookieCartHandler\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"updateAll\" />\n\t\t\t\t</form>";
     } else {
         $html = "<p>Ihr Warenkorb enthält keine Artikel.</p>";
     }
     $_SESSION["CookieCart"] = $this;
     $this->elementPointer = 0;
     /*echo "<pre>";
     		echo $this->getCartText(false);
     		echo "</pre>";*/
     return "<div id=\"CookieCart\">" . $html . "</div>";
 }
Example #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) : "");
 }
Example #27
0
 /**
  * returns the text field to select a specific page
  *
  * @return HTMLInput
  */
 public function getPageSelectionField()
 {
     $IPage = new HTMLInput("page", "text", $this->multiPageMode[1] + 1);
     $IPage->onkeyup("if(event.keyCode == 13 && this.value > 0) contentManager.loadPage('{$this->multiPageMode[3]}',this.value - 1);");
     $IPage->hasFocusEvent(true);
     return $IPage;
 }
 public function buildFlipPageLine($where = "top")
 {
     if ($this->multiPageDetails["total"] == null) {
         return;
     }
     if (!$this->showFlipPage) {
         return;
     }
     $I = new HTMLInput("targetPage", "text", $this->multiPageDetails["page"] + 1);
     $I->onEnter("javascript:contentManager.loadPage('" . $this->multiPageDetails["target"] . "', this.value - 1);");
     $I->style("width: 30px; float: right; text-align: right;");
     $I->hasFocusEvent(true);
     $wholeLine2 = array($this->getPageBrowser());
     if ($where == "top" or $where == "bottom") {
         if ($this->tableMode == "BrowserRight") {
             $wholeLine1 = array($this->getSettingsButton(), $I . "<span style=\"float:left;\">" . $this->multiPageDetails["total"] . " " . ($this->multiPageDetails["total"] != 1 ? "Einträge" : "Eintrag") . "</span>");
             $this->table->addRow($wholeLine1);
             $this->table->addRowColspan(2, count($this->referenceLine) - 1);
         }
         if ($this->tableMode == "BrowserLeft") {
             $wholeLine1 = array($I . "<span style=\"float:left;\">" . $this->multiPageDetails["total"] . " " . ($this->multiPageDetails["total"] != 1 ? "Einträge" : "Eintrag") . "</span>");
             $wholeLine1 = array_pad($wholeLine1, count($this->referenceLine) - 1, "");
             $wholeLine1[] = $this->getSettingsButton();
             $this->table->addRow($wholeLine1);
             $this->table->addRowColspan(1, count($this->referenceLine) - 1);
             $this->setColStyle($this->referenceLine[count($this->referenceLine) - 1], "width:20px;");
         }
         $this->table->addRow($wholeLine2);
         $this->table->addRowColspan(1, count($this->referenceLine));
     }
 }
Example #29
0
 public function popupDesktop($DeviceID)
 {
     $O = anyC::getFirst("fheOverview", "fheOverviewDeviceID", $DeviceID);
     $d = json_decode($O->A("fheOverviewDesktop"));
     $BD = new Button("Fertig", "bestaetigung");
     $BD->onclick("fheOverview.draggableStop(); " . OnEvent::closePopup("mfheOverview"));
     $BD->style("float:right;margin:10px;");
     echo $BD . "<div style=\"clear:both;\"></div>";
     $T = new HTMLTable(2, "Plugins");
     $T->useForSelection();
     $T->weight("light");
     while ($callback = Registry::callNext("Overview")) {
         $c = $callback->className();
         $B = new Button("Plugin hinzufügen", "arrow_left", "iconic");
         $T->addRow(array($B, $callback->name()));
         $T->addRowEvent("click", OnEvent::rme("mfheOverview", "pluginLoad", array($DeviceID, "'" . $callback->className() . "'"), "function(t){  \$j('#addPlugin{$c}').hide(); \$j('#OverviewDesktop').append(t.responseText); }"));
         $T->setRowID("addPlugin{$c}");
         if (isset($d->{$c})) {
             $T->addRowStyle("display:none;");
         }
     }
     Registry::reset("Overview");
     echo $T;
     echo OnEvent::script("fheOverview.draggableStart({$DeviceID});");
     $T = new HTMLTable(1, "Hintergrundbild");
     $T->weight("light");
     $ID = new Button("Bild löschen", "trash_stroke", "iconicL");
     $ID->style("float:right;");
     $ID->rmePCR("mfheOverview", "-1", "backgroundDelete", $DeviceID, "function(t){\$j('#OverviewDesktop').append(t.responseText); }");
     $I = new HTMLInput("upload", "file", null, array("multiple" => false));
     $I->onchange(OnEvent::rme($this, "backgroudUpload", array($DeviceID, "fileName"), "function(t){\$j('#OverviewDesktop').append(t.responseText); }"));
     $T->addRow($ID . "<div style=\"margin-right:30px;\">" . $I . "</div>");
     echo $T;
 }
Example #30
0
 function showWarenkorb()
 {
     $AC = anyC::get("Seminar");
     $AC->addAssocV3("SeminarVon", ">=", Util::parseDate("de_DE", Util::formatDate("de_DE", time())));
     $count = array();
     for ($i = 0; $i < 21; $i++) {
         $count[$i] = $i;
     }
     $T = new HTMLTable(3, "Events");
     $T->setTableStyle("width:100%;");
     while ($S = $AC->getNextEntry()) {
         $I = new HTMLInput("AnzahlKarten" . $S->getID(), "select", "0", $count);
         $I->style("width:80px;text-align:right;");
         $I->onchange("CustomerPage.rme('recalc', ['" . $S->getID() . "', this.value], function(response){ \$('#PreisGesamt" . $S->getID() . "').html(response) });");
         if (isset($_SESSION["ticketDataSelection"])) {
             $I->setValue($_SESSION["ticketDataSelection"][$S->getID()]);
         }
         $Adresse = new Adresse($S->A("SeminarAdresseID"));
         $T->addRow(array("<b>" . $S->A("SeminarName") . "</b>, " . Util::CLDateParser($S->A("SeminarVon")) . " ab " . Util::CLTimeParser($S->A("SeminarStart")) . " Uhr, " . $Adresse->A("ort")));
         $T->addRowColspan(1, 3);
         $T->addRow(array($I, Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * 1, true), Util::formatCurrency("de_DE", $S->A("SeminarPreisErwachsene") * $I->getValue(), true)));
         $T->addCellStyle(1, "text-align:right;");
         $T->addCellStyle(2, "text-align:right;");
         $T->addCellStyle(3, "text-align:right;");
         $T->addCellID(3, "PreisGesamt" . $S->getID());
         $T->addRow(array("&nbsp;"));
         $T->addRowColspan(1, 3);
     }
     $I = new Button("Weiter", "");
     $I->onclick("CustomerPage.rme('handleForm', \$('#ticketShop').serialize(), function(){ document.location.reload(); })");
     $I->className("submitFormButton");
     $T->addRow($I);
     $T->addRowColspan(1, 3);
     $IA = new HTMLInput("action", "hidden", "handleSelection");
     return "<form id=\"ticketShop\">" . $T . $IA . "</form>";
 }