Exemple #1
0
 public static function update()
 {
     $AC = anyC::get("RSSParser", "RSSParserUseCache", "1");
     while ($R = $AC->n()) {
         $R->download();
     }
 }
 function getCMSHTML()
 {
     $key = substr(Util::eK(), 0, 5);
     if (!isset($_GET["key"]) or $key != $_GET["key"]) {
         return "<span style=\"color:red;\">Bitte geben Sie den richtigen Schlüssel zum Aufrufen der Seite in der Adresszeile an.</span>";
     }
     registerClassPath("Einkaufszettel", Util::getRootPath() . "fheME/Einkaufszettel/Einkaufszettel.class.php");
     /*
     		registerClassPath("GSRaumgruppe", Util::getRootPath()."FCalc/GSRaumgruppe/GSRaumgruppe.class.php");
     		registerClassPath("ObjektL", Util::getRootPath()."personalKartei/ObjekteL/ObjektL.class.php");
     		registerClassPath("mGSTaetigkeitGUI", Util::getRootPath()."FCalc/GSTaetigkeit/mGSTaetigkeitGUI.class.php");
     		registerClassPath("GSTaetigkeit", Util::getRootPath()."FCalc/GSTaetigkeit/GSTaetigkeit.class.php");
     * 
     */
     $AC = anyC::get("Einkaufszettel");
     $AC->addAssocV3("EinkaufszettelBought", "=", "0");
     $AC->addOrderV3("EinkaufszettelName");
     $html = "<style type=\"text/css\">\n\t\t\t\tbody {\n\t\t\t\t\tmargin:0px;\n\t\t\t\t\tmargin-top:10px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entry {\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryTouch {\n\t\t\t\t\tbackground-color: #c5d674;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div id=\"einkaufsliste\">";
     while ($E = $AC->getNextEntry()) {
         $html .= "<div id=\"entry" . $E->getID() . "\" onclick=\"CustomerPage.rme('setBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').remove(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\" class=\"nonEmpty entry backgroundColor1 borderColor1\">" . ($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : "") . "</div>";
     }
     $html .= "<div style=\"" . ($AC->numLoaded() == 0 ? "" : "display:none;") . "\" class=\"entry backgroundColor1 borderColor1\" id=\"emptyEntry\">Die Einkaufsliste enthält keine Einträge.<br /><small style=\"color:grey;\">" . Util::CLDateParser(time()) . "</small></div>";
     $html .= "</div>";
     return $html . OnEvent::script("\$('.entry').hammer().on('touch', function(){ \$(this).addClass('entryTouch'); }); \$('.entry').hammer().on('release', function(){ \$(this).removeClass('entryTouch'); });");
 }
Exemple #3
0
 public function getAngebote($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(2);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 130);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isA", "1");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     $AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("status", "=", "open");
     #$AC->addOrderV3("datum", "DESC");
     $AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $Adresse = new Adresse($B->A("AdresseID"));
         $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress()));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("cursor:pointer;border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $T->addRowEvent("click", "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');");
         $i++;
     }
     $html .= $T;
     return $html;
 }
Exemple #4
0
 function getCMSHTML()
 {
     $key = substr(Util::eK(), 0, 5);
     if (!isset($_GET["key"]) or $key != $_GET["key"]) {
         return "<span style=\"color:red;\">Bitte geben Sie den richtigen Schlüssel zum Aufrufen der Seite in der Adresszeile an.</span>";
     }
     registerClassPath("Einkaufszettel", Util::getRootPath() . "fheME/Einkaufszettel/Einkaufszettel.class.php");
     /*
     		registerClassPath("GSRaumgruppe", Util::getRootPath()."FCalc/GSRaumgruppe/GSRaumgruppe.class.php");
     		registerClassPath("ObjektL", Util::getRootPath()."personalKartei/ObjekteL/ObjektL.class.php");
     		registerClassPath("mGSTaetigkeitGUI", Util::getRootPath()."FCalc/GSTaetigkeit/mGSTaetigkeitGUI.class.php");
     		registerClassPath("GSTaetigkeit", Util::getRootPath()."FCalc/GSTaetigkeit/GSTaetigkeit.class.php");
     * 
     */
     $AC = anyC::get("Einkaufszettel");
     $AC->addAssocV3("EinkaufszettelBought", "=", "0");
     $AC->addJoinV3("EinkaufszettelKategorie", "EinkaufszettelEinkaufszettelKategorieID", "=", "EinkaufszettelKategorieID");
     $AC->addOrderV3("EinkaufszettelKategorieName");
     $AC->addOrderV3("EinkaufszettelName");
     $html = "<style type=\"text/css\">\n\t\t\t\tbody {\n\t\t\t\t\tmargin:0px;\n\t\t\t\t\tmargin-top:10px;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@media only screen and (max-width: 360px) {\n\t\t\t\t\thtml {\n\t\t\t\t\t\tzoom: .8;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t  \n\t\t\t\t.entry {\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\t-webkit-tap-highlight-color:rgba(255,255,255,0);\n\t\t\t\t\twidth:100%;\n\t\t\t\t\tbox-sizing:border-box;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryRestore {\n\t\t\t\t\tborder-top-width:1px;\n\t\t\t\t\tborder-top-style:solid;\n\t\t\t\t\tborder-bottom-width:1px;\n\t\t\t\t\tborder-bottom-style:solid;\n\t\t\t\t\tpadding:10px;\n\t\t\t\t\tfont-size:2em;\n\t\t\t\t\tmargin-bottom:10px;\n\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t-webkit-touch-callout: none;\n\t\t\t\t\t-webkit-user-select: none;\n\t\t\t\t\t-khtml-user-select: none;\n\t\t\t\t\t-moz-user-select: none;\n\t\t\t\t\t-ms-user-select: none;\n\t\t\t\t\tuser-select: none;\n\t\t\t\t\tcolor:#444;\n\t\t\t\t\t-webkit-tap-highlight-color:rgba(255,255,255,0);\n\t\t\t\t\twidth:100%;\n\t\t\t\t\tbox-sizing:border-box;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.backgroundColor4 {\n\t\t\t\t\tbackground-color: #eee;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.entryTouch {\n\t\t\t\t\tbackground-color: #c5d674;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t.borderColor0 {\n\t\t\t\t\tborder-color:white;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div id=\"einkaufsliste\">";
     $B = new Button("Wiederherstellen", "undo", "iconicL");
     $last = null;
     while ($E = $AC->getNextEntry()) {
         if ($last != $E->A("EinkaufszettelKategorieName") and $last !== null) {
             $html .= "<h1 style=\"padding-left:10px;padding-top:15px;padding-bottom:7px;\">" . $E->A("EinkaufszettelKategorieName") . "</h1>";
         }
         $html .= "\n\t\t\t\t<div\n\t\t\t\t\tid=\"entry" . $E->getID() . "\"\n\t\t\t\t\tontouchend=\"if(Touch.cancelNext) return;  CustomerPage.rme('setBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').hide(); \$('#restoreEntry" . $E->getID() . "').show(); \$('#emptyEntry').hide(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\"\n\t\t\t\t\tclass=\"nonEmpty entry backgroundColor1 borderColor1\">\n\t\t\t\t\t\n\t\t\t\t\t" . ($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : "") . "\n\t\t\t\t</div>\n\t\t\t\t<div \n\t\t\t\t\tclass=\"nonEmpty entryRestore backgroundColor4 borderColor0\"\n\t\t\t\t\tontouchend=\"if(Touch.cancelNext) return; CustomerPage.rme('setUnBought', [" . $E->getID() . "], function(){ \$('#entry" . $E->getID() . "').show(); \$('#restoreEntry" . $E->getID() . "').hide(); \$('#emptyEntry').hide(); if(\$('#einkaufsliste .nonEmpty').length == 0) \$('#emptyEntry').show(); });\"\n\t\t\t\t\tid=\"restoreEntry" . $E->getID() . "\" style=\"display:none;\">" . $E->A("EinkaufszettelName") . " {$B}</div>";
         $last = $E->A("EinkaufszettelKategorieName");
     }
     $html .= "<div style=\"" . ($AC->numLoaded() == 0 ? "" : "display:none;") . "\" class=\"entry backgroundColor1 borderColor1\" id=\"emptyEntry\">Die Einkaufsliste enthält keine Einträge.<br /><small style=\"color:grey;\">" . Util::CLDateParser(time()) . "</small></div>";
     $html .= "</div>";
     return $html . OnEvent::script("\n\t\tvar Touch = {};\n\t\t\n\t\t\$(document).on('touchstart mousedown', '[ontouchend]', function(ev){\n\t\t\t\$(this).addClass('entryTouch'); \n\t\t\t\n\t\t\tTouch.startPos = [ev.clientX, ev.clientY];\n\t\t\tTouch.cancelNext = false;\n\t\t\tTouch.inAction = this;\n\t\t\n\t\t}); \n\t\t\n\t\t\$(document).on('touchend mouseup', '[ontouchend]', function(ev){\n\t\t\t\$(this).removeClass('entryTouch');\n\t\t\tTouch.inAction = false;\n\t\t});\n\t\t\t\n\t\t\$(document).on('touchmove mousemove', '[ontouchend]', function(ev){\n\t\t\tif(!Touch.inAction)\n\t\t\t\treturn;\n\n\t\t\tif(Math.abs(ev.clientX - Touch.startPos[0]) < 15 && Math.abs(ev.clientY - Touch.startPos[1]) < 15)\n\t\t\t\treturn;\n\n\t\t\tTouch.cancelNext = true;\n\t\t\t\$('.entryTouch').removeClass('entryTouch');\n\t\t\t\n\t\t\t//\$(ev.target).trigger('touchend');\n\t\t});\n\t");
 }
 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;
 }
 function deleteMe()
 {
     $AC = anyC::get("Navigation", "parentID", $this->getID());
     while ($N = $AC->getNextEntry()) {
         $N->deleteMe();
     }
     parent::deleteMe();
 }
 public static function update()
 {
     $AC = anyC::get("OpenWeatherMap");
     $AC->addAssocV3("OpenWeatherMapLastUpdate + (OpenWeatherMapUpdateInterval * 60)", "<=", time());
     while ($O = $AC->n()) {
         $O->download();
     }
 }
Exemple #8
0
 public function getService($data)
 {
     if (!$this->loggedIn) {
         return "TIMEOUT";
     }
     $html = "";
     $T = new HTMLTable(4);
     #, "Bitte wählen Sie einen Lieferschein");
     $T->setTableStyle("width:100%;margin-top:10px;");
     $T->setColWidth(1, 200);
     $T->setColWidth(4, 200);
     $T->useForSelection(false);
     $T->maxHeight(400);
     $AC = anyC::get("GRLBM", "isWhat", "S");
     $AC->addJoinV3("Auftrag", "AuftragID", "=", "AuftragID");
     #$AC->addAssocV3("UserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("isPrinted", "=", "0");
     $AC->addAssocV3("isEMailed", "=", "0");
     $AC->addAssocV3("isPixelLetteredTime", "=", "0");
     #$AC->addAssocV3("status", "=", "delivered");
     $AC->addAssocV3("GRLBMServiceMitarbeiter", "=", Session::currentUser()->getID(), "AND", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter2", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter3", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addAssocV3("GRLBMServiceMitarbeiter4", "=", Session::currentUser()->getID(), "OR", "2");
     $AC->addOrderV3("datum", "DESC");
     #$AC->addOrderV3("nummer", "DESC");
     #$AC->setLimitV3(100);
     #$AC->addJoinV3("Adresse", "t2.AdresseID", "=", "AdresseID");
     $i = 0;
     while ($B = $AC->n()) {
         $BPDF = new Button("PDF anzeigen");
         $BPDF->className("submitFormButton");
         $BPDF->style("background-color:#DDD;color:grey;float:right;");
         $BPDF->onclick("CustomerPage.popup('Service PDF', 'getPDFViewer', {GRLBMID: '" . $B->getID() . "'}, {width:'800px'});");
         $BOK = "";
         if ($B->A("GRLBMServiceSigAG") != "" and $B->A("GRLBMServiceSigAG") != "[]") {
             $BOK = new Button("Kunde hat unterschrieben", "check", "iconic");
             $BOK->style("font-size:55px;");
         }
         $Adresse = new Adresse($B->A("AdresseID"));
         $T->addRow(array("<span style=\"font-size:20px;font-weight:bold;\">" . $B->A("prefix") . $B->A("nummer") . "</span><br><span style=\"color:grey;\">" . Util::CLDateParser($B->A("datum")) . "</span>", $Adresse->getHTMLFormattedAddress(), $BOK, $BPDF));
         $T->addCellStyle(1, "vertical-align:top;");
         $T->addRowStyle("border-bottom:1px solid #ccc;");
         #if($i % 2 == 1)
         #	$T->addRowStyle ("background-color:#eee;");
         $event = "\n\t\t\t\t\$(this).addClass('selected');\n\t\t\t\tCCAuftrag.lastTextbausteinUnten = null;\n\t\t\t\t\n\t\t\t\tCustomerPage.rme('getAuftrag', {GRLBMID: " . $B->getID() . "}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentLeft').html(transport); \n\t\t\t\t\t\t\$('#frameSelect').hide(); \$('#frameEdit').show();\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');\n\t\t\t\t\t\n\t\t\t\tCustomerPage.rme('getArtikel', {GRLBMID: " . $B->getID() . ", query : '', KategorieID: ''}, function(transport){ \n\t\t\t\t\t\tif(transport == 'TIMEOUT') { document.location.reload(); return; } \n\t\t\t\t\t\t\$('#contentRight').html(transport); \n\t\t\t\t\t\t\$('.selected').removeClass('selected');\n\t\t\t\t\t}, \n\t\t\t\t\tfunction(){},\n\t\t\t\t\t'POST');";
         if ($B->A("GRLBMServiceSigAG") == "" or $B->A("GRLBMServiceSigAG") == "[]") {
             $T->addCellEvent(1, "click", $event);
             $T->addCellEvent(2, "click", $event);
             $T->addRowStyle("cursor:pointer;");
         } else {
             $T->addRowStyle("cursor:default;");
         }
         $i++;
     }
     $html .= $T;
     return $html;
 }
Exemple #9
0
 public static function updatePath($oldPath, $newPath)
 {
     $AC = anyC::get("Datei", "DateiPath", $oldPath);
     while ($D = $AC->getNextEntry()) {
         $D->changeA("DateiPath", $newPath);
         $D->changeA("DateiName", basename($newPath));
         $D->saveMe();
     }
 }
Exemple #10
0
 function saveMe($checkUserData = true, $output = false)
 {
     $AC = anyC::get("poolSteuerung", "poolSteuerungTyp", $this->A("poolSteuerungTyp"));
     $AC->addAssocV3("poolSteuerungID", "!=", $this->getID());
     $S = $AC->n();
     if ($S !== null) {
         Red::errorD("Jeder Steuerungstyp darf maximal einmal angelegt werden.");
     }
     return parent::saveMe($checkUserData, $output);
 }
Exemple #11
0
 public function renameDownloaded($output = false)
 {
     $AC = anyC::get("JDownload");
     $AC->addAssocV3("JDownloadRenameto", "!=", "");
     $AC->addAssocV3("JDownloadFilename", "!=", "");
     $AC->addAssocV3("JDownloadRenamed", "=", "0");
     $AC->addAssocV3("JDownloadDate", ">=", time() - 3600 * 24 * 2);
     $dirs = array();
     $ACI = anyC::get("Incoming", "IncomingUseForDownloads", "1");
     while ($I = $ACI->getNextEntry()) {
         $dirs[] = $I->A("IncomingDir");
     }
     while ($D = $AC->getNextEntry()) {
         $filename = preg_replace("/\\.htm\$/", "", basename($D->A("JDownloadFilename")));
         $ext = Util::ext($filename);
         $found = false;
         foreach ($dirs as $dir) {
             if (!file_exists($dir . "/{$filename}") and file_exists($dir . "/" . basename($D->A("JDownloadFilename")))) {
                 $filename = basename($D->A("JDownloadFilename"));
             }
             if (file_exists($dir . "/{$filename}")) {
                 $found = true;
                 $newName = Util::makeFilename(str_replace(" ", ".", $D->A("JDownloadRenameto")) . ($ext != "" ? ".{$ext}" : ""));
                 if (file_exists($dir . "/" . $newName)) {
                     if ($output) {
                         echo "<p>{$filename}: {$newName} ALREADY EXISTS!</p>";
                     }
                     $D->changeA("JDownloadRenamed", "-1");
                     $D->saveMe();
                     continue;
                 }
                 if (filesize($dir . "/{$filename}") != $D->A("JDownloadFilesize")) {
                     continue;
                 }
                 if (rename($dir . "/{$filename}", $dir . "/" . $newName)) {
                     if ($output) {
                         echo "<p>renamed {$dir}/{$filename} to " . $newName . "</p>";
                     }
                     $D->changeA("JDownloadRenamed", time());
                     $D->saveMe();
                 } else {
                     if ($output) {
                         echo "<p>{$filename}: ERROR RENAMING!</p>";
                     }
                 }
             }
             #	rename($filename, Util::makeFilename($D->A("JDownloadRenameto").".$ext"));
         }
         if (!$found and $output) {
             echo "<p>{$filename}: NOT FOUND!</p>";
         }
     }
 }
Exemple #12
0
 function getCMSHTML()
 {
     $html = "";
     $AC = anyC::get("Tinkerforge");
     while ($T = $AC->getNextEntry()) {
         $ACB = anyC::get("TinkerforgeBricklet", "TinkerforgeBrickletTinkerforgeID", $T->getID());
         while ($B = $ACB->getNextEntry()) {
             $html .= $this->getControl($B);
         }
     }
     return $html;
 }
Exemple #13
0
 public static function getHistorieData($ownerClass, $ownerClassID, HistorieTable $Tab)
 {
     $AC = anyC::get("Todo", "TodoClass", $ownerClass);
     $AC->addAssocV3("TodoClassID", "=", $ownerClassID);
     $AC->addOrderV3("TodoFromDay", "DESC");
     $AC->setLimitV3("10");
     while ($D = $AC->getNextEntry()) {
         $B = new Button("Aktivität anzeigen", "./ubiquitous/Todo/Todo.png", "icon");
         $B->popup("", "Event", "mKalender", "-1", "getInfo", array("'mTodoGUI'", $D->getID(), $D->A("TodoFromDay")));
         $Tab->addHistorie("Aktivität", "./ubiquitous/Todo/Todo.png", $D->A("TodoFromDay"), $D->getOwnerObject()->getCalendarTitle(), $B, $D->A("TodoDescription"), $D->A("TodoCreatorUserID"));
     }
     return true;
 }
 public function getOverviewContent()
 {
     $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemTinkerforgeGUI\"></span><p>Tinkerforge</p></div>\n\t\t\t<div style=\"padding:10px;\">";
     $AC = anyC::get("Tinkerforge");
     while ($T = $AC->getNextEntry()) {
         $ACB = anyC::get("TinkerforgeBricklet", "TinkerforgeBrickletTinkerforgeID", $T->getID());
         while ($B = $ACB->getNextEntry()) {
             $html .= $B->getControl();
         }
     }
     $html .= "</div>";
     echo $html;
 }
Exemple #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;
 }
Exemple #16
0
 public function getOverviewContent()
 {
     $html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemtrinityDBGUI\"></span><p>trinityDB</p></div>\n\t\t\t<div style=\"padding:10px;\">";
     $AC = anyC::get("trinityDB");
     while ($T = $AC->getNextEntry()) {
         $B = new Button("Neue Folgen", "star", "touch");
         $B->onclick("trinityDB.show(" . $T->getID() . ", 'newEpisodes');");
         $html .= "{$B}";
         $B = new Button("Serienbrowser", "aperture", "touch");
         $B->onclick("trinityDB.show(" . $T->getID() . ", 'browser');");
         $html .= "{$B}";
     }
     $html .= "</div>";
     echo $html;
 }
Exemple #17
0
 public function downloadPopup()
 {
     $J = array();
     $AC = anyC::get("JD");
     while ($D = $AC->getNextEntry()) {
         $J[$D->getID()] = $D->A("JDName");
     }
     $F = new HTMLForm("tdl", array("link", "JD"));
     $F->setType("link", "textarea");
     $F->setType("JD", "select", null, $J);
     $F->getTable()->setColWidth(1, 60);
     $F->setSaveRMEPCR("Download", "", "mJD", -1, "download", "function(t){ \$j('#downloadResult').html(t.responseText); }");
     $F->setInputStyle("link", "font-size:10px;height:200px;");
     echo $F . "<pre style=\"padding:5px;\" id=\"downloadResult\"></pre>";
 }
Exemple #18
0
 function newMe($checkUserData = true, $output = false)
 {
     $allowedUsers = Environment::getS("allowedUsers", null);
     if ($allowedUsers !== null and $this->A("isAdmin") == "0") {
         $AC = anyC::get("User", "isAdmin", "0");
         $AC->lCV3();
         if ($AC->numLoaded() >= $allowedUsers) {
             Red::errorD("Sie können keine weiteren Benutzer ohne Admin-Rechte anlegen. Bitte wenden Sie sich an den Support.");
         }
     }
     if (mUserdata::getGlobalSettingValue("encryptionKey") == null and Session::isUserAdminS()) {
         mUserdata::setUserdataS("encryptionKey", Util::getEncryptionKey(), "eK", -1);
     }
     $this->A->SHApassword = sha1($this->A->SHApassword);
     return parent::newMe($checkUserData, $output);
 }
 function getHTML($id)
 {
     if ($this->getID() == -1) {
         $this->loadMeOrEmpty();
         $this->changeA("EinkaufszettelBought", 1);
     }
     $gui = new HTMLGUIX($this);
     $gui->name("Einkaufszettel");
     $gui->attributes(array("EinkaufszettelName", "EinkaufszettelEinkaufszettelKategorieID", "EinkaufszettelImmer", "EinkaufszettelBought"));
     $gui->label("EinkaufszettelImmer", "Immer anzeigen?");
     $gui->label("EinkaufszettelEinkaufszettelKategorieID", "Kategorie");
     $gui->type("EinkaufszettelBought", "hidden");
     $gui->type("EinkaufszettelEinkaufszettelKategorieID", "select", anyC::get("EinkaufszettelKategorie"), "EinkaufszettelKategorieName", "Bitte auswählen...");
     $gui->type("EinkaufszettelImmer", "checkbox");
     return $gui->getEditHTML();
 }
Exemple #20
0
 public function getOverviewContent($echo = true)
 {
     $html = "";
     $i = 0;
     $header = false;
     $AC = anyC::get("RSSParser", "RSSParserOnCall", "1");
     while ($RSS = $AC->getNextEntry()) {
         if (!$header) {
             $html .= "<div class=\"touchHeader\"><p>RSS</p></div><div style=\"padding:10px;\">";
             $header = true;
         }
         $B = new Button($RSS->A("RSSParserName"), "rss", "touch");
         $B->popup("", $RSS->A("RSSParserName"), "RSSParser", $RSS->getID(), "showFeed");
         $html .= $B;
     }
     if ($header) {
         $html .= "</div>";
     }
     $this->addAssocV3("RSSParserOnCall", "=", "0");
     while ($RSS = $this->getNextEntry()) {
         $html .= "<div class=\"touchHeader\">\n\t\t\t\t<span class=\"lastUpdate\" id=\"lastUpdatemRSSParserGUI\"></span>\n\t\t\t\t<p>" . $RSS->A("RSSParserName") . "</p></div>\n\t\t\t\t\t<div id=\"RSSParserItemText\" class=\"backgroundColor4\" style=\"padding:10px;display:none;font-size:10px;\" onclick=\"\$j(this).hide(); \$j('#RSSParserItemList').show();\">asd</div>\n\t\t\t\t\t<div id=\"RSSParserItemList\" style=\"padding:10px;\">";
         $list = new HTMLList();
         $list->addListStyle("list-style-type:none;");
         $E = $RSS->parseFeed();
         foreach ($E as $item) {
             if ($RSS->A("RSSParserCount") > 0 and $RSS->A("RSSParserCount") <= $i) {
                 break;
             }
             #$B = new Button("", "empty", "icon");
             #
             $B = "";
             if ($item->icon != null) {
                 $B = $item->icon;
                 $B->style($B->getStyle() . "float:left;margin-right:10px;margin-top:-5px;margin-bottom:10px;");
             }
             $list->addItem($B . "<div id=\"RSSParserItem{$i}\" style=\"display:none;\">" . $item->description . "</div>" . ($item->description != "" ? "<a href=\"#\" onclick=\"\$j('#RSSParserItemList').hide(); \$j('#RSSParserItemText').html(\$j('#RSSParserItem{$i}').html()).show();\" >" : "") . $item->title . ($item->description != "" ? "</a>" : ""));
             $list->addItemStyle("clear:both;display:block;margin-left:0px;");
             $i++;
         }
         $html .= $list . "</div>";
     }
     if ($echo) {
         echo $html;
     }
     return $html;
 }
Exemple #21
0
 public function newAttributes()
 {
     $A = parent::newAttributes();
     $A->AuftragID = "-1";
     $A->KategorieID = "0";
     $A->type = "default";
     $mwst = 0;
     if (Session::isPluginLoaded("Kategorien")) {
         $AC = anyC::get("Kategorie", "type", "1");
         $AC->addAssocV3("isDefault", "=", "1");
         $M = $AC->getNextEntry();
         if ($M != null) {
             $A->KategorieID = $M->getID();
         }
     }
     if ($this->customizer != null) {
         $this->customizer->customizeNewAttributes($this->getClearClass(get_class($this)), $A);
     }
     return $A;
 }
Exemple #22
0
 function setRead($fromUserID)
 {
     $AC = anyC::get("phim");
     $AC->addAssocV3("phimFromUserID", "=", $fromUserID);
     $AC->addAssocV3("phimToUserID", "=", Session::currentUser()->getID());
     $AC->addAssocV3("phimRead", "=", "0");
     while ($P = $AC->n()) {
         echo $P->getID() . "\n";
         $P->changeA("phimRead", "1");
         $P->saveMe();
     }
     $message = new stdClass();
     $message->method = "read";
     #$message->content = $text;
     $message->from = $fromUserID;
     #$message->fromUser = Session::currentUser()->A("name");
     $message->to = Session::currentUser()->getID();
     $message->time = time();
     #$F->store();
     $this->go($message, Session::currentUser()->getID());
 }
Exemple #23
0
 public static function row(poolAnzeige $A)
 {
     $html = "\n\t\t\t\n\t\t\t<div class=\"container\">";
     $html .= "\n\t\t\t\t<div class=\"rowLabel\" style=\"height:120px;\">" . $A->A("poolAnzeigeName") . "</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:1em;\">\n\t\t\t\t\t<div class=\"rowLabel\">&nbsp;</div>";
             $close++;
         }
         $html .= self::control($C);
     }
     for ($i = 0; $i < $close; $i++) {
         $html .= "</div>";
     }
     $html .= "\n\t\t\t</div>";
     return $html;
 }
 public function getHTML($id)
 {
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     try {
         $MArgs = func_get_args();
         return Aspect::joinPoint("around", $this, __METHOD__, $MArgs);
     } catch (AOPNoAdviceException $e) {
     }
     Aspect::joinPoint("before", $this, __METHOD__, $MArgs);
     // </editor-fold>
     if ($_SESSION["S"]->isUserAdmin()) {
         return parent::getHTML($id);
     }
     switch ($id) {
         case "1":
             $AC = anyC::get("JDownload");
             $AC->addOrderV3("JDownloadDate", "DESC");
             $AC->setLimitV3(19);
             $T = new HTMLTable(2);
             $T->weight("light");
             $T->addColStyle(1, "padding:5px;padding-left:10px;");
             $T->addColStyle(2, "color:grey;text-align:right;padding:5px;");
             while ($D = $AC->getNextEntry()) {
                 $T->addRow(array($D->A("JDownloadRenameto"), Util::formatByte($D->A("JDownloadFilesize"), 2)));
                 if ($D->A("JDownloadRenamed") == 0) {
                     $T->addRowClass("error");
                 }
                 #$r .= OnEvent::script ("\$j('#BrowsermJDownload".$E->getID()."').css('background-color', '');");
                 $T->addRowStyle("cursor:pointer;");
                 $T->addRowEvent("click", "contentManager.loadPlugin('contentRight', 'mJDownload', '', " . $D->getID() . ");");
             }
             return "<p class=\"prettyTitle\">Downloads</p>" . $T;
             break;
         case "2":
             break;
         case "3":
             return "";
             break;
     }
 }
Exemple #25
0
 function getHTML($id)
 {
     T::load(dirname(__FILE__), "Wecker");
     $gui = new HTMLGUIX($this);
     $gui->name("Wecker");
     $gui->attributes(array("WeckerDeviceID", "WeckerIsActive", "WeckerTime", "WeckerMo", "WeckerRepeat", "WeckerSource", "WeckerFallback", "WeckerVolume", "WeckerRepeatAfter", "WeckerRuntime"));
     $gui->type("WeckerDeviceID", "select", anyC::get("Device"), "DeviceName");
     $gui->type("WeckerIsActive", "checkbox");
     $gui->type("WeckerRepeat", "checkbox");
     #$gui->type("WeckerFallback", "file");
     $gui->type("WeckerRuntime", "select", array(10 => "10 " . T::_("Minuten"), 20 => "20 " . T::_("Minuten"), 30 => "30 " . T::_("Minuten"), 40 => "40 " . T::_("Minuten"), 50 => "50 " . T::_("Minuten"), 60 => "1 " . T::_("Stunde")));
     #$gui->type("WeckerMo", "checkbox");
     #$gui->type("WeckerDi", "checkbox");
     #$gui->type("WeckerMi", "checkbox");
     #$gui->type("WeckerDo", "checkbox");
     #$gui->type("WeckerFr", "checkbox");
     #$gui->type("WeckerSa", "checkbox");
     #$gui->type("WeckerSo", "checkbox");
     $gui->type("WeckerRepeat", "hidden");
     $gui->type("WeckerRepeatAfter", "select", array(60 => "1 " . T::_("Minute"), 5 * 60 => "5 " . T::_("Minuten"), 10 * 60 => "10 " . T::_("Minuten"), 15 * 60 => "15 " . T::_("Minuten"), 20 * 60 => "20 " . T::_("Minuten")));
     $gui->type("WeckerVolume", "select", array(10 => "10%", 20 => "20%", 30 => "30%", 40 => "40%", 50 => "50%", 60 => "60%", 70 => "70%", 80 => "80%", 90 => "90%", 100 => "100%"));
     $gui->space("WeckerTime");
     $gui->space("WeckerRepeat");
     $gui->label("WeckerMo", "Tage");
     $gui->label("WeckerDeviceID", "Gerät");
     $gui->label("WeckerIsActive", "Aktiv?");
     $gui->label("WeckerTime", "Zeit");
     $gui->label("WeckerSource", "URL");
     $gui->label("WeckerFallback", "Datei");
     $gui->label("WeckerVolume", "Lautstärke");
     $gui->label("WeckerRepeatAfter", "Wiederholen nach");
     $gui->label("WeckerRuntime", "Laufzeit");
     $gui->parser("WeckerFallback", "WeckerGUI::parserFallback");
     $gui->parser("WeckerMo", "WeckerGUI::parserDays");
     $gui->descriptionField("WeckerSource", "Die Adresse zu einem Internetradio-Stream");
     #$gui->parser("WeckerMo", "WeckerGUI::parserTage");
     return $gui->getEditHTML();
 }
Exemple #26
0
 public static function getCalendarData($firstDay, $lastDay, $UserID = null)
 {
     $calendar = new Kalender();
     $AC = anyC::get("xCal", "xCalUserID", $UserID);
     $AC->addAssocV3("xCalServerActive", "=", "1");
     while ($server = $AC->getNextEntry()) {
         // XML
         $xmlBuffer = xCalUtil::getSimpleXmlByXCal($server->A("xCalCache"));
         // Events
         foreach ($xmlBuffer->vcalendar->vevent as $event) {
             // Überprüfung, ob es sich um DATE-TIME Einträge handelt
             $dateTimeFlag = false;
             foreach ($event->dtstart->attributes() as $dtStartAttributeKey => $dtStartAttributeValue) {
                 if ($dtStartAttributeKey == "value" && (string) $dtStartAttributeValue === "DATE-TIME") {
                     $dateTimeFlag = true;
                 }
             }
             if (!$dateTimeFlag) {
                 continue;
             }
             // Konvertierung der Zeitstempel
             $match = array();
             preg_match("/^(\\d{4})(\\d{2})(\\d{2})T(\\d{2})(\\d{2})(\\d{2})Z\$/", (string) $event->dtstart, $match);
             $startTimestamp = gmmktime($match[4], $match[5], $match[6], $match[2], $match[3], $match[1]);
             $match = array();
             preg_match("/^(\\d{4})(\\d{2})(\\d{2})T(\\d{2})(\\d{2})(\\d{2})Z\$/", (string) $event->dtend, $match);
             $endTimestamp = gmmktime($match[4], $match[5], $match[6], $match[2], $match[3], $match[1]);
             #echo date("d.m.Y H:i", $startTimestamp)." $event->dtstart $event->summary<br />";
             // Weiter wenn Terminende zu weit zurück liegt oder Anfangszeit zu weit in der Zukunft
             if ($endTimestamp < $firstDay or $startTimestamp > $lastDay) {
                 continue;
             }
             $calendarEvent = new KalenderEvent("mxCalGUI", $server->A("xCalID") . ":" . (string) $event->uid, $calendar->formatDay($startTimestamp), $calendar->formatTime($startTimestamp), (string) $event->summary);
             $calendar->addEvent($calendarEvent);
         }
     }
     return $calendar;
 }
Exemple #27
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);") : "");
 }
Exemple #28
0
 public function sendMessagePopup()
 {
     $AC = anyC::get("Device");
     $AC->addOrderV3("DeviceName");
     $B = new Button("Alle", "fullscreen", "touch");
     $B->className("nuntiusMessageTo");
     $B->id("nuntiusMessageTarget0");
     $B->onclick("\$j('.nuntiusMessageTo:not(#nuntiusMessageTarget0)').slideToggle(); \$j('#nuntiusMessageContainer').slideToggle();");
     $L = $B;
     while ($D = $AC->getNextEntry()) {
         $B = new Button($D->A("DeviceName"), "iphone", "touch");
         $B->className("nuntiusMessageTo");
         $B->id("nuntiusMessageTarget" . $D->getID());
         $B->onclick("\$j('.nuntiusMessageTo:not(#nuntiusMessageTarget" . $D->getID() . ")').slideToggle(); \$j('#nuntiusMessageContainer').slideToggle();");
         $L .= $B;
     }
     $BS = new Button("Senden", "arrow_right", "touch");
     $BS->style("margin-top:0px;height:190px;margin-bottom:0px;");
     $BS->rmePCR("mNuntius", "-1", "sendMessage", array("\$j('.nuntiusMessageTo:visible').attr('id').replace('nuntiusMessageTarget', '')", "\$j('[name=NuntiusMessage]').val()", "'Device:'+\$j.jStorage.get('phynxDeviceID', -1)"), "function(){ " . OnEvent::closePopup("mNuntius") . " }");
     $I = new HTMLInput("NuntiusMessage", "textarea");
     $I->style("width:100%;height:200px;max-width:400px;font-size:15px;");
     $I->placeholder("Nachricht...");
     echo "\n\t\t\t<div id=\"nuntiusTargets\" style=\"padding-top:15px;padding-bottom:1px;\">\n\t\t\t\t" . $L . "\n\t\t\t</div>\n\t\t\t<div style=\"display:none;padding-bottom:1px;\" id=\"nuntiusMessageContainer\">\n\t\t\t\t<div style=\"width:100px;float:right;\">{$BS}</div><div style=\"width:300px;\">{$I}</div>\n\t\t\t</div>";
 }
 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>";
 }
Exemple #30
0
 public function popupRadio()
 {
     $AC = anyC::get("UPnP");
     $AC->addAssocV3("UPnPAVTransport", "=", "1");
     $I = new HTMLInput("radioSelection", "select", BPS::getProperty("mUPnPGUI", "lastStation", "0"));
     $I->setOptions($AC, "UPnPName", "Abspielgerät auswählen");
     echo $I;
     $AC = anyC::get("UPnPRadioStation");
     $I = new HTMLInput("radioStation", "select", BPS::getProperty("mUPnPGUI", "lastStation", "0"));
     $I->setOptions($AC, "UPnPRadioStationName", "Sender auswählen");
     echo $I;
     $B = new Button("Play", "play", "touch");
     $B->rmePCR("mUPnP", "-1", "playRadio", array("\$j('select[name=radioSelection]').val()", "\$j('select[name=radioStation]').val()"));
     $B->style("display:inline-block;width:30%;");
     echo $B;
     $B = new Button("Stop", "stop", "touch");
     $B->rmePCR("mUPnP", "-1", "stopRadio", array("\$j('select[name=radioSelection]').val()", "\$j('select[name=radioStation]').val()"));
     $B->style("display:inline-block;width:30%;");
     echo $B;
 }