function getHTML($id)
 {
     #$p = mUserdata::getPluginSpecificData("mStatistik");
     #if(!isset($p["pluginSpecificCanUseControlling"]))
     #	return;
     $html = "";
     #parent::getHTML($id);
     $tab = new HTMLTable(1);
     $tab->addRow("<div id=\"my_chartTodo\" style=\"height:200px;width:470px;\"></div>");
     $tab->addRowClass("backgroundColor0");
     $AC = $this->data();
     $U = Users::getUsersArray(null, true);
     $U[-1] = "Allgemein";
     $T = new HTMLTable(6);
     $T->addColStyle(2, "text-align:right;");
     $T->addColStyle(3, "text-align:right;");
     $T->addColStyle(4, "text-align:right;");
     $T->addColStyle(5, "text-align:right;");
     $T->addColStyle(6, "text-align:right;");
     $T->addHeaderRow(array("Benutzer", "Gesamt", "Abgesch.", "Kalt", "Erst", "Folge"));
     while ($A = $AC->n()) {
         $T->addRow(array(isset($U[$A->A("TodoUserID")]) ? $U[$A->A("TodoUserID")] : "Benutzer ID " . $A->A("TodoUserID"), $A->A("gesamt"), $A->A("gesamtDM") . " (" . Util::CLNumberParserZ($A->A("gesamt") != 0 ? round($A->A("gesamtDM") / $A->A("gesamt") * 100, 2) : 0) . "%)", $A->A("gesamtKalt"), $A->A("gesamtErst"), $A->A("gesamtFolge")));
         $T->addRowStyle("cursor:pointer;");
         $T->addRowEvent("click", OnEvent::rme($this, "details", array($A->A("TodoUserID")), "function(t){ \$j('#contentScreenLeft').html(t.responseText); }"));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Es liegen keine Daten vor"));
         $T->addRowColspan(1, 4);
     }
     return "<p class=\"prettySubtitle\">Termine</p>" . $tab . $html . $T . OnEvent::script("\n\t\t\tvar plot = \$j.plot(\$j('#my_chartTodo'), " . $this->chart() . ", {\n\t\t\tseries: {\n\t\t\t\tpie: { show: true, innerRadius: 0.4 }\n\t\t\t}\n\t\t\t});" . OnEvent::rme($this, "getHeaderCenter", "", "function(transport){ \$j('#contentScreenCenterHeader').html(transport.responseText); }"));
 }
Exemple #2
0
 function message()
 {
     $BS = new Button("Nachricht", "comment_alt2_stroke", "iconicL");
     $BS->style("float:left;");
     $read = false;
     $message = $this->messageParser();
     #$this->A("NuntiusMessage");
     if ($this->A("NuntiusRead") > "0") {
         $read = true;
         $BS = new Button("Nachricht", "check", "iconicL");
         $BS->style("float:left;color:darkgreen;");
         $ex = explode("\n", $message);
         $message = "<span style=\"color:grey;\">" . $ex[0];
         if (isset($ex[1])) {
             $message .= " …";
         }
         $message .= "</span>";
     }
     $from = "";
     $ex = explode(":", $this->A("NuntiusSender"));
     if ($ex[0] == "Device") {
         $D = new Device($ex[1]);
         $from = $D->A("DeviceName");
     }
     if ($ex[0] == "FritzBox") {
         $from = $this->A("NuntiusSender");
     }
     if ($ex[0] == "Mobile") {
         $from = $this->A("NuntiusSender");
     }
     return "\n\t\t\t<div id=\"Nuntius" . $this->getID() . "\" style=\"cursor:pointer;" . ($read ? "" : "background-color:#efefef;") . "min-height:40px;margin-bottom:10px;margin-top:10px;\" onclick=\"" . OnEvent::rme($this, "read", "", "function(t){ \$j('#Nuntius" . $this->getID() . "').replaceWith(t.responseText); fheOverview.loadContent('mNuntiusGUI::getOverviewContent'); }") . "\">\n\t\t\t\t{$BS}\n\t\t\t\t<div style=\"margin-left:40px;\" class=\"\">\n\t\t\t\t\t<p><small style=\"float:right;color:grey;\">Von {$from}, " . Util::CLDateTimeParser($this->A("NuntiusTime")) . "</small>" . nl2br($message) . "</p>\n\t\t\t\t</div>\n\t\t\t</div>";
 }
 public function inPopup()
 {
     if ($_SESSION["S"]->isUserAdmin() == "0") {
         throw new AccessDeniedException();
     }
     $TB = new HTMLTable(3);
     $TB->addColStyle(2, "text-align:right;");
     $TB->setColWidth(2, "80px");
     $TB->setColWidth(3, "32px");
     $gesamt = 0;
     $list = $this->getBackupsList();
     foreach ($list as $name => $size) {
         $RB = new Button("Diese Sicherung wiederherstellen", "bestaetigung", "icon");
         $RB->onclick("if(confirm('Sind Sie sicher, dass dieses Backup wiederhergestellt werden soll? Es werden dabei alle Daten in der Datenbank überschrieben!')) ");
         $RB->rmePCR("BackupManager", "", "restoreBackup", $name, OnEvent::rme(new mInstallationGUI(), "getActions", "", "function(transport){ contentManager.contentBelow(transport.responseText); }") . OnEvent::closePopup("BackupManager") . " Popup.displayNamed('BackupManagerGUI','Backup-Manager', transport);");
         $RD = new Button("Backup anzeigen", "./images/i2/search.png", "icon");
         $RD->windowRme("BackupManager", "", "displayBackup", $name);
         $RD->style("float:left;margin-right:5px;");
         $TB->addRow(array($RD . $name, Util::formatByte($size, 2), $RB));
         $gesamt += $size;
     }
     #$ST = new HTMLSideTable("right");
     if (count($list) == 0) {
         return "<p>Es wurden noch keine Sicherungen angelegt.</p>";
     }
     echo $TB;
 }
Exemple #4
0
 public static function sortable($selector, $handle, $saveTo = null, $axis = "y", $connectWith = null, $placeholder = null, $onUpdateComplete = "", $additionalParameters = array())
 {
     if ($saveTo != null) {
         $ex = explode("::", $saveTo);
         $saveTo = OnEvent::rme($ex[0], $ex[1], array_merge(array("Sortable.serialize('{$selector}')"), $additionalParameters), $onUpdateComplete);
     }
     return "\n\t\t\$j('{$selector}').sortable({\n\t\t\t" . ($axis != "" ? "axis: '{$axis}', " : "") . "\n\t\t\tupdate: function(){" . ($saveTo == null ? "" : $saveTo) . "},\n\t\t\t" . ($connectWith != null ? "connectWith: \$j('{$connectWith}')," : "") . "\n\t\t\tdropOnEmpty: true,\n\t\t\t" . ($placeholder != null ? "placeholder: '{$placeholder}', " : "") . "\n\t\t\t" . ($handle != null ? "handle: \$j('{$handle}')" : "") . "\n\t\t});";
 }
 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);");
 }
 public function getContextMenuHTML($identifier)
 {
     $I = new HTMLInput("CalculatorRechner");
     $I->onEnter(OnEvent::rme($this, "calculate", array("\$j('input[name=CalculatorRechner]').val()"), "function(t){ if(t.responseText != '##') { \$j('{$identifier}').val(t.responseText); " . OnEvent::closeContext() . " } }"));
     $I->requestFocus(true);
     echo $I;
     echo "<div id=\"CalculatorErgebnisse\"></div>";
     echo "<p>Dieser Rechner unterstützt +, -, *, / sowie Klammern.</p>";
     echo OnEvent::script("\$j('input[name=CalculatorRechner]').val(\$j('{$identifier}').val());");
 }
Exemple #7
0
 public function addSettingPopup()
 {
     $T = new HTMLTable(2);
     $T->setColWidth(1, 20);
     $T->useForSelection(false);
     $S = new System(1);
     $B = new Button("Eintrag erstellen", "./images/i2/cart.png", "icon");
     foreach ($S->types as $k => $v) {
         $T->addRow(array($B, $v->name));
         $T->addRowEvent("click", OnEvent::rme($this, "addSettingNew", array("'{$k}'"), "function(t){ " . OnEvent::closePopup("mSystem") . OnEvent::reload("Right") . " contentManager.loadFrame('contentLeft', 'System', t.responseText); }"));
     }
     echo $T;
 }
 public static function tipJS($plugin)
 {
     $targetClass = $plugin;
     if (mUserdata::getUDValueS("hideTooltips", "0")) {
         return;
     }
     $hide = mUserdata::getUDValueS("hideTooltip{$targetClass}", "0");
     if ($hide) {
         return;
     }
     $xml = SpellbookGUI::getSpell($targetClass);
     $entries = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
     return OnEvent::script("\$j('#{$targetClass}MenuImage').qtip(\$j.extend({}, qTipSharedRed, {\n\t\tcontent: {\n\t\t\ttext: '" . $xml->plugin[0]->description . "<br /><div style=\"margin-top:10px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltip{$targetClass}'", "'1'", "''", "0", "1"))) . " return false;\">Diesen Tipp nicht mehr anzeigen</a></div><div style=\"clear:both;margin-top:5px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltips'", "'1'", "''", "0", "1"))) . " return false;\">Keine Tipps mehr anzeigen</a></div>', \n\t\t\ttitle: {\n\t\t\t\ttext: '" . array_search($targetClass, $entries) . "',\n\t\t\t\tbutton: true\n\t\t\t}\n\t\t}\n\t}));");
 }
Exemple #9
0
 public function getSortable($echo)
 {
     $entries = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
     #$appMenuHidden = MenuGUI::getAppMenuOrder("appMenuHidden");
     $appMenuDisplayed = MenuGUI::getAppMenuOrder("appMenuDisplayed");
     if ($appMenuDisplayed == "") {
         $appMenuDisplayed = implode(";", $_SESSION["CurrentAppPlugins"]->getMenuEntries());
     }
     $es = MenuGUI::sort($entries, $appMenuDisplayed);
     #, $appMenuHidden);
     $appMenuDisplayed = explode(";", $appMenuDisplayed);
     $L = new HTMLList();
     $L->addListStyle("list-style-type:none;margin-left:0px;margin-top:10px;");
     $es = array_reverse($es, true);
     foreach ($es as $key => $value) {
         if (!in_array($value, $appMenuDisplayed)) {
             continue;
         }
         $L->addItem($key);
         $L->addItemClass("containerSortTabsHandle");
         $L->addItemStyle("padding:5px;cursor:move;margin:0px;");
         $L->setItemID("appMenu_{$value}");
     }
     #$I = new HTMLInput("showAgain", "checkbox");
     #$I->style("float:left;margin-right:5px;");
     #$I->onclick(addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltipDashboard'", "'1'"))));
     $L .= OnEvent::script(OnEvent::sortable("#containerSortTabs ul", ".containerSortTabsHandle", "Spellbook::updateOrder", "y", null, null, "Menu.refresh();") . "\$j('#containerSortTabs ul li').hover(function() {\n      \$j(this).addClass('backgroundColor2');\n    }, function() {\n      \$j(this).removeClass('backgroundColor2');\n    });\n\t" . ((mUserdata::getUDValueS("hideTooltipDashboard", "0") == "0" and mUserdata::getUDValueS("hideTooltips", "0") == "0") ? "\n\t\$j('#SpellbookMenuEntry img').qtip(\$j.extend({}, qTipSharedRed, {\n\t\tcontent: {\n\t\t\ttext: 'Klicken Sie auf die Weltkugel, um die angezeigten Plugins und ihre Reihenfolge zu ändern.<br /><div style=\"margin-top:10px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltipDashboard'", "'1'", "''", "0", "1"))) . " return false;\">Diesen Tipp nicht mehr anzeigen</a></div><div style=\"clear:both;margin-top:5px;\"><a href=\"#\" style=\"color:grey;\" onclick=\"" . addslashes(OnEvent::rme(new mUserdata(-1), "setUserdata", array("'hideTooltips'", "'1'", "''", "0", "1"))) . " return false;\">Keine Tipps mehr anzeigen</a></div>', \n\t\t\ttitle: {\n\t\t\t\ttext: 'Dashboard',\n\t\t\t\tbutton: true\n\t\t\t}\n\t\t}\n\t}));" : ""));
     $L = "<h2 style=\"padding-left:0px;\">Reihenfolge</h2>{$L}";
     if ($echo) {
         echo $L;
     }
     return $L;
 }
Exemple #10
0
 function getSetTable($DeviceID, $values)
 {
     $controls = new HTMLTable(1);
     $controls->setTableStyle("width:100%;border:0px;");
     $i = 0;
     foreach ($values as $v => $l) {
         $controls->addRow(array($l));
         $controls->addRowClass("backgroundColor0");
         $controls->addCellStyle(1, "padding-top:10px;padding-bottom:10px;cursor:pointer;");
         if ($i != count($values) - 1) {
             $controls->addCellStyle(1, "border-bottom-style:solid;border-bottom-width:1px;");
             $controls->addCellClass(1, "borderColor1");
         }
         $controls->addCellEvent(1, "click", OnEvent::rme($this, "setDevice", array(str_replace(array("D", "H"), "", $DeviceID), "'{$v}'"), "function(){ \$j('#controls_{$DeviceID}').hide(); if(Fhem.doAutoUpdate) Fhem.requestUpdate(); }"));
         $i++;
     }
     $controls = "<div id=\"controls_{$DeviceID}\" style=\"display:none;width:50px;position:absolute;margin-left:150px;border-style:solid;border-width:1px;padding:3px;\" class=\"borderColor1 backgroundColor0 fhemeControl\">{$controls}</div>";
     return $controls;
 }
 public function popupSearchCity()
 {
     $I = new HTMLInput("city");
     $I->onEnter(OnEvent::rme($this, "searchCity", array("this.value"), "function(t){ \$j('#searchCityResults').html(t.responseText); }"));
     echo $I . "<div id=\"searchCityResults\"></div>";
 }
 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;
 }
Exemple #13
0
 public function getContextMenuHTML($identifier)
 {
     $deTexts = array();
     $deTexts["pluginSupport"] = "Bitte beachten Sie, dass ein Plugin diese Einstellungen unterstützen muss, selbst wenn es hier angezeigt wird!";
     $deTexts["selectPlugin"] = "Bitte Plugin wählen";
     $deTexts["add"] = "hinzufügen";
     $deTexts["selectPluginButton"] = "Plugin auswählen";
     $deTexts["save"] = "speichern";
     $deTexts["select"] = "auswählen";
     $deTexts["noPsOptions"] = "keine plugin-spezifischen Optionen vorhanden";
     $deTexts["newFieldName"] = "Neuer Feldname";
     $deTexts["maybeHidden"] = "Bitte beachten Sie, dass hier interne Namen angezeigt werden, die von der Feldbeschriftung abweichen können!<br />Manche internen Felder werden möglichweise gar nicht angezeigt.";
     $ac = new anyC();
     $singularLanguageClass = $ac->loadLanguageClass("Userdata");
     $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : $deTexts;
     $opts = "";
     $ps = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins());
     $ms = $_SESSION["CurrentAppPlugins"]->getAllMenuEntries();
     #print_r($ms);
     foreach ($ps as $key => $value) {
         if ($key == "mUserdata") {
             continue;
         }
         if ($identifier == "4" and !PMReflector::implementsInterface($key, "iPluginSpecificRestrictions")) {
             continue;
         }
         if ($identifier == "4") {
             $c = new $key();
             if (!$c->getPluginSpecificRestrictions()) {
                 continue;
             }
         }
         if ($identifier == "5" and !in_array($key, $ms)) {
             continue;
         }
         if ($value == "Kunde") {
             continue;
         }
         if (!$_SESSION["CurrentAppPlugins"]->getIsAdminOnly($key) and $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) != "") {
             $opts .= "<option value=\"{$key}:" . $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) . "\">{$value}</option>";
         }
     }
     $s = explode(":", $identifier);
     if (isset($s[1])) {
         $identifier = $s[0];
     }
     switch ($identifier) {
         case "1":
             $c = isset($text["kann nicht erstellen"]) ? $text["kann nicht erstellen"] : "kann nicht\nerstellen";
             $b = isset($text["kann nicht bearbeiten"]) ? $text["kann nicht bearbeiten"] : "kann nicht\nbearbeiten";
             $l = isset($text["kann nicht löschen"]) ? $text["kann nicht löschen"] : "kann nicht\nlöschen";
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $c . "\" style=\"background-image:url(./images/navi/new.png);\" onclick=\"phynxContextMenu.update('mUserdata','Create','" . str_replace(array("\n", "'"), array(" ", "\\'"), $c) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $b . "\" style=\"background-image:url(./images/navi/editb.png);\" onclick=\"phynxContextMenu.update('mUserdata','Edit','" . str_replace(array("\n", "'"), array(" ", "\\'"), $b) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $l . "\" style=\"background-image:url(./images/navi/trash.png);\" onclick=\"phynxContextMenu.update('mUserdata','Delete','" . str_replace(array("\n", "'"), array(" ", "\\'"), $l) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["pluginSupport"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "Edit":
         case "Delete":
         case "Create":
             echo "\n\t\t\t\t<input type=\"hidden\" id=\"uRestAction\" value=\"{$identifier}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"cant{$identifier}\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["add"] . "\" onclick=\"addUserRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "3":
         case "2":
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["select"] . "\" onclick=\"phynxContextMenu.update('mUserdata','" . ($identifier == "2" ? "relabel" : "hide") . ":'+\$('relabelPlugin').value.split(':')[1], \$('relabelPlugin').value.split(':')[1]);\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["maybeHidden"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "5":
         case "4":
             if ($opts == "") {
                 die("<p>" . $text["noPsOptions"] . "</p>");
             }
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == 4 ? "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"phynxContextMenu.update('mUserdata','pS:'+\$('relabelPlugin').value.split(':')[0], \$('relabelPlugin').value.split(':')[0]);\" /></td>\n\t\t\t\t\t</tr>" : "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"addHidePlugin();\" /></td>\n\t\t\t\t\t</tr>") . "\n\t\t\t\t</table>";
             break;
         case "pS":
             $c = new $s[1]();
             $pSs = $c->getPluginSpecificRestrictions();
             $pSopts = "";
             foreach ($pSs as $key => $value) {
                 $pSopts .= "<option value=\"{$key}:{$s['1']}\">{$value}</option>";
             }
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"pSSelect\">{$pSopts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"savePluginSpecificRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "hide":
         case "relabel":
             try {
                 $c = new $s[1](-1);
                 $c = $c->newAttributes();
                 echo "\n\t\t\t\t<input type=\"hidden\" id=\"" . $identifier . "Plugin\" value=\"{$s['1']}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"" . $identifier . "Field\"><option>" . implode("</option><option>", PMReflector::getAttributesArray($c)) . "</option></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == "relabel" ? "<tr>\n\t\t\t\t\t\t<td>" . $text["newFieldName"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input id=\"relabelTo\" type=\"text\" /></td>\n\t\t\t\t\t</tr>" : "") . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"" . ($identifier == "relabel" ? "saveFieldRelabeling();" : "saveFieldHiding();") . "\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             } catch (ClassNotFoundException $e) {
                 echo "<p>Diese Option steht bei diesem Plugin leider nicht zur Verfügung</p>";
             }
             break;
         case "copyFromUser":
             $T = new HTMLTable(2);
             $T->useForSelection();
             $T->setColWidth(1, 20);
             $T->maxHeight(200);
             $G = new Users();
             $G->addAssocV3("isAdmin", "=", "0");
             $G->setLimitV3("10");
             $G->lCV3();
             while ($t = $G->getNextEntry()) {
                 $T->addRow(array(new Button("", "./images/i2/copy.png", "icon"), $t->A("username")));
                 $T->addRowEvent("click", "copyFromOtherUser('" . $t->getID() . "');");
             }
             echo $T;
             break;
         case "login":
             $T = new HTMLTable(2);
             $T->useForSelection();
             $T->setColWidth(1, 20);
             $T->maxHeight(200);
             $apps = Applications::getList();
             foreach ($apps as $app) {
                 #rme("mUserdata","-1","setUserdata",new Array("hidePlugin"+$('relabelPlugin').value.split(":")[0],$('relabelPlugin').value.split(":")[0], "pHide", lastLoadedLeft),"contentManager.reloadFrameLeft()");
                 $T->addRow(array(new Button("", "./plugins/Userdata/login18.png", "icon"), "Kann sich nicht an '{$app}' anmelden"));
                 $T->addRowEvent("click", OnEvent::rme(new mUserdata(-1), "setUserdata", array("'loginTo{$app}'", "'0'", "'loginTo'", "lastLoadedLeft"), OnEvent::closeContext() . OnEvent::reload("Left")));
                 #$T->addRowEvent("click", "copyFromOtherUser('".$t->getID()."');");
             }
             echo $T;
             break;
     }
 }
Exemple #14
0
 public function sidePanelAttachments($filesDir)
 {
     $I = new HTMLInput("TBAttachments", "file");
     $I->onchange(OnEvent::rme($this, "processAttachmentUpload", array("'{$filesDir}'", "fileName"), " " . OnEvent::reloadSidePanel("tinyMCE")));
     echo "<div style=\"padding:5px;height:50px;\">" . $I . "</div></div>";
     if (!file_exists(FileStorage::getFilesDir() . "{$filesDir}")) {
         mkdir(FileStorage::getFilesDir() . "{$filesDir}");
     }
     $T = new HTMLTable(2, "Bilder");
     $dir = new DirectoryIterator(FileStorage::getFilesDir() . "{$filesDir}");
     foreach ($dir as $file) {
         if ($file->isDot()) {
             continue;
         }
         if ($file->isDir()) {
             continue;
         }
         $BI = new Button("Datei löschen", "./images/i2/insert.png", "icon");
         $BD = new Button("Datei löschen", "./images/i2/delete.gif", "icon");
         $BD->style("float:right;margin-left:5px;");
         $BD->rmePCR("tinyMCE", "", "deleteAttachment", array("'{$filesDir}'", "'" . $file->getFilename() . "'"), OnEvent::reloadSidePanel("tinyMCE"));
         $T->addRow(array($BI, "{$BD}<small style=\"color:grey;float:right;margin-top:4px;\">" . Util::formatByte($file->getSize()) . " </small>" . (strlen($file->getFilename()) > 15 ? substr($file->getFilename(), 0, 15) . "..." : $file->getFilename())));
         $T->addRowStyle("cursor:pointer;");
         $T->addRowEvent("click", "contentManager.tinyMCEAddImage('" . DBImageGUI::imageLink("tinyMCEGUI", $filesDir, $file->getFilename(), true) . "');");
     }
     echo $T;
 }
Exemple #15
0
 public function reminderContent()
 {
     $html = "\n\t\t\t<div style=\"padding:5px;background-color:white;\">\n\t\t\t\t<div style=\"width:15%;display:inline-block;font-weight:bold;\">\n\t\t\t\t\tQuelle\n\t\t\t\t</div><div style=\"width:45%;display:inline-block;font-weight:bold;\">\n\t\t\t\t\tName\n\t\t\t\t</div><div style=\"width:33%;display:inline-block;font-weight:bold;\">\n\t\t\t\t\tZeit\n\t\t\t\t</div><div style=\"width:7%;display:inline-block;font-weight:bold;\">\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"top\" style=\"height:124px;overflow:auto;\">\n\t\t\t\t\n\t\t\t</div>\n\t\t\t<div id=\"bottom\" style=\"padding:5px;height:150px;box-sizing:border-box;background-color:white;overflow:auto;\">\n\t\t\t\n\t\t\t</div>";
     echo self::getBasicHTML($html . OnEvent::script("function reloadList(){\n\t\t\t" . OnEvent::rme(new UtilGUI(), "reminderList", array(), "function(t){\n\t\t\t\tvar data = jQuery.parseJSON(t.responseText);\n\t\t\t\tfor(var i = 0; i < data.length; i++){\n\t\t\t\t\tif(\$j('#'+data[i][0]).length)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\$j('#top').append(data[i][1]);\n\t\t\t\t}\n\t\t\t\t//\$j('#top').html(t.responseText);\n\t\t\t}") . "\n\t\t};\n\t\tcontentManager.setRoot('../');\n\t\treloadList();"), "Erinnerungen");
 }
Exemple #16
0
 private function printItem($item, $newName)
 {
     return "\n\t\t\t<div class=\"UPnPItem\" data-oid=\"" . $item->attributes()->id . "\" ontouchmove=\"\$j(this).removeClass('highlight'); UPnP.skipNext = true;\" onclick=\"if(UPnP.skipNext) { UPnP.skipNext = false; return; }  " . OnEvent::rme(new UPnP($this->getID()), "readSetStart", array("'" . $item->attributes()->id . "'", "UPnP.currentTargetID")) . " \$j(this).find('.iconic.check').css('display', 'inline'); \$j.jStorage.set('phynxUPnPPlayed" . $item->attributes()->id . "', true);\" style=\"cursor:pointer;width:33%;display:none;overflow:hidden;margin-bottom:30px;\">\n\t\t\t\t<div style=\"font-family:Roboto;font-size:17px;padding:10px;overflow:hidden;\">\n\t\t\t\t\t<span class=\"iconic iconicL check\" style=\"color:#bbb;margin-right:10px;float:right;color:#88cf00;display:none;\"></span>\n\t\t\t\t\t<span class=\"iconic iconicL document_alt_stroke\" style=\"color:#bbb;margin-right:10px;float:left;\"></span><div style=\"white-space: nowrap;margin-left:40px;display:block;overflow:hidden;\">" . $newName . "</div>\n\t\t\t\t\t<div style=\"font-size:12px;\">" . $item->children("http://www.pv.com/pvns/")->extension[0] . "" . "<!--<span style=\"float:right;\">" . Util::formatSeconds(Util::parseTime("de_DE", $item->res->attributes()->duration[0] . "")) . "</span>--></div>\n\t\t\t\t</div>\n\t\t\t</div>";
 }
Exemple #17
0
 public static function parserFallback($w, $l, $E)
 {
     T::D("Wecker");
     $I = new HTMLInput("WeckerFallback", "text", $w);
     $I->style("margin-top:10px;");
     $IF = new HTMLInput("WeckerFallbackUpload", "file");
     $IF->onchange(OnEvent::rme($E, "processUpload", array("fileName"), "\$j('[name=WeckerFallback]').val(fileName).trigger('change');"));
     return $IF . $I . "<br /><small style=\"color:grey;\">" . T::_("Diese Datei wird abgespielt, wenn nach 15 Sekunden kein Internetradio geladen werden konnte. Bitte beachten Sie, dass nicht alle Browser <a href=\"http://en.wikipedia.org/wiki/HTML5_Audio\" target=\"_blank\">alle Formate abspielen können</a>.") . "</small>";
 }
Exemple #18
0
 function editInPopup($id, $date = null, $targetClass = null, $targetClassID = null, $time = null, $description = null, $location = null)
 {
     if ($date != null) {
         BPS::setProperty("TodoGUI", "TodoTillDay", Util::CLDateParser($date));
     }
     if ($time != null) {
         BPS::setProperty("TodoGUI", "TodoFromTime", $time);
     }
     if ($description != null) {
         BPS::setProperty("TodoGUI", "TodoDescription", $description);
     }
     if ($location != null) {
         BPS::setProperty("TodoGUI", "TodoLocation", $location);
     }
     $T = new TodoGUI($id);
     $T->GUI = new HTMLGUIX($T);
     $T->GUI->displayMode("popupS");
     $T->GUI->requestFocus("TodoName");
     #if($id == -1)
     $T->GUI->addToEvent("onSave", OnEvent::popup("Event", "mKalender", "-1", "getInfo", array("'mTodoGUI'", "transport.responseText", "'{$date}'")));
     if ($targetClass != null) {
         BPS::setProperty("mTodoGUI", "ownerClass", $targetClass);
         BPS::setProperty("mTodoGUI", "ownerClassID", $targetClassID);
     }
     $T->getHTML($id);
     #if($T->A("TodoClass") == "Kalender" OR $T->A("TodoClass") == "DBMail")
     $T->GUI->insertAttribute("after", "TodoClassID", "TodoName");
     if (BPS::getProperty("TodoGUI", "overview")) {
         $T->GUI->addFieldEvent("TodoUserID", "onChange", OnEvent::rme($this, "getBusyList", array("this.value", "1"), "function(t){ \$j('#busyList').html(t.responseText); }"));
         $gui = $T->GUI->getEditHTML();
         $html = "<div id=\"busyList\" style=\"display:inline-block;width:400px;vertical-align:top;max-height:450px;overflow:auto;\">" . $this->getBusyList(Session::currentUser()->getID(), false) . "</div><div style=\"display:inline-block;width:400px;vertical-align:top;\">{$gui}</div>";
         BPS::unsetProperty("TodoGUI", "overview");
         die($html);
     }
     echo $T->GUI->getEditHTML();
     #.OnEvent::script("\$j('#editTodoGUI input[name=TodoName]').trigger('focus');");
 }
Exemple #19
0
 public function __toString()
 {
     #$style = "";
     if ($this->type == "date" and strpos($this->style, "width:") === false) {
         $this->style .= "width:calc(100% - 28px)%;";
     }
     #if($this->style != null) $style = " style=\"$this->style\"";
     switch ($this->type) {
         /*case "JSONMultiText":
         			$data = json_decode($this->value);
         			
         			print_r($data);
         			
         			$L = new HTMLList();
         			$L->noDots();
         			$L->addListStyle("padding:0px;");
         			
         			foreach($data AS $k => $v){
         				$IL = new HTMLInput($this->name."_$k", "text", $v);
         				$BL = new Button("Element hinzufügen");
         				$L->addItem($IL);
         				$L->addItemStyle("margin-left:0px;");
         			}
         			
         			$I = new HTMLInput($this->name, "textarea", $this->value);
         			$I->id($this->name);
         			
         			return $L.$I;
         		break;*/
         case "audio":
             return "<audio controls preload=\"auto\" autobuffer style=\"{$this->style}\"><source src=\"{$this->value}\"></audio>";
             break;
         case "search":
             $currentId = $this->id != null ? $this->id : $this->name . rand(100, 100000000);
             $enter = "if(\$j('#{$currentId}').val() != ''){ \$j('#SB{$currentId}').fadeOut(200, function(){ \$j('#SA{$currentId}').fadeIn();}); } else { \$j('#SA{$currentId}').fadeOut(200, function(){ \$j('#SB{$currentId}').fadeIn(); }); }";
             $I = new HTMLInput($this->name, "text", $this->value, $this->options);
             $I->style($this->style);
             $I->placeholder($this->placeholder);
             $I->onEnter($this->onenter . $enter);
             #$I->onEnter(" ");
             $I->id($currentId);
             $BSearch = new Button("Suchen", "question_mark", "iconicG");
             $BSearch->style("margin-left:5px;");
             $BSearch->id("SB{$currentId}");
             $BSearch->onclick($this->onenter . $enter);
             #$BSearch->id("searchMailsInfo");
             $BSearchClear = new Button("Suche beenden", "x_alt", "iconicR");
             $BSearchClear->style("margin-left:5px;display:none;");
             $BSearchClear->id("SA{$currentId}");
             $BSearchClear->onclick("\$j('#{$currentId}').val('').trigger('blur'); {$this->onenter}{$enter}");
             #$BSearchClear->id("searchMailsClear");
             return $I . $BSearch . $BSearchClear . $this->requestFocus;
             break;
         case "HTMLEditor":
             $B = new Button("in HTML-Editor\nbearbeiten", "editor");
             $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->className("backgroundColor2");
             return $B->__toString();
             break;
         case "TextEditor":
             #return "<input ".(isset($this->events[$as]) ? $eve : "")." style=\"background-image:url(./images/navi/editor.png);".(isset($this->inputStyle[$as]) ? "".$this->inputStyle[$as]."" : "")."\" type=\"button\" class=\"bigButton backgroundColor2\" onclick=\"TextEditor.show('$as','$this->FormID');\" value=\"".$this->texts["in Editor bearbeiten"]."\" /><textarea style=\"display:none;\" name=\"".$as."\" id=\"".$as."\">".$this->attributes->$as."</textarea>";
             $B = new Button("in Editor\nbearbeiten", "editor");
             $B->className("backgroundColor2");
             $B->onclick("TextEditor.show('{$this->name}','{$this->options[0]}');");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             $ITA->id($this->name);
             $ITA->style("display:none;");
             return $B->__toString() . $ITA;
             break;
         case "nicEdit":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->doBefore("Overlay.showDark(); %AFTER");
             $B->popup("", "Editor", "nicEdit", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "hidden", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "tinyMCE":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             if (isset($this->options[3])) {
                 $BO[] = "'{$this->options[3]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->doBefore("Overlay.showDark(); %AFTER");
             $B->popup("", "Editor", "tinyMCE", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "hidden", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "multiInput":
             return "<input\n\t\t\t\t\tclass=\"multiEditInput2\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tvalue=\"" . htmlspecialchars($this->value) . "\"\n\t\t\t\t\tonfocus=\"oldValue = this.value;\"\n\t\t\t\t\tid=\"" . $this->options[2] . "ID" . $this->options[1] . "\"\n\t\t\t\t\tonblur=\"if(oldValue != this.value) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"\n\t\t\t\t\tonkeydown=\"if(event.keyCode == 13) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"/>";
             break;
             /*case "customSelection":
             				$B = new Button("Eintrag auswählen...", "gutschrift");
             				$B->type("LPBig");
             				$B->style("float:right;margin-left:10px;");
             				#				 "contentRight"		"callingPluginID"  "selectPlugin"
             				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
             
             				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
             			break;*/
         /*case "customSelection":
         				$B = new Button("Eintrag auswählen...", "gutschrift");
         				$B->type("LPBig");
         				$B->style("float:right;margin-left:10px;");
         				#				 "contentRight"		"callingPluginID"  "selectPlugin"
         				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
         
         				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
         			break;*/
         case "textarea":
             if ($this->isDisplayMode) {
                 return nl2br($this->value);
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 $this->onfocus .= " contentManager.oldValue = this.value;";
                 $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->onblur .= "if(contentManager.oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 if ($this->hasFocusEvent) {
                     $this->onfocus .= "focusMe(this);";
                     $this->onblur .= "blurMe(this);";
                 }
                 $this->hasFocusEvent = false;
             }
             return "<textarea\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . (!$this->autocorrect ? "autocorrect=\"off\"" : "") . "\n\t\t\t\t\t" . (!$this->spellcheck ? "spellcheck=\"false\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\t" . ($this->hasFocusEvent ? "onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">{$this->value}</textarea>";
             break;
         case "file":
             $physion = Session::physion();
             $currentId = ($this->id != null ? $this->id : $this->name) . rand(100, 100000000);
             if (isset($this->options["autoUpload"]) and !$this->options["autoUpload"]) {
                 $this->callback = "QQUploader{$currentId}.uploadStoredFiles();";
             }
             return "\n\t\t\t\t\t<div id=\"progress_{$currentId}\" style=\"height:10px;width:95%;display:none;\" class=\"\">\n\t\t\t\t\t\t<div id=\"progressBar_{$currentId}\" style=\"height:10px;width:0%;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"{$currentId}\" style=\"width:100%;{$this->style}\"></div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tQQUploader{$currentId} = new qq.FileUploader({\n\t\t\t\t\t\t\tmaxSizePossible: '" . ini_get("upload_max_filesize") . "B',\n\t\t\t\t\t\t\tsizeLimit: " . Util::toBytes(ini_get("upload_max_filesize")) . ",\n\t\t\t\t\t\t\telement: \$j('#{$currentId}')[0],\n\t\t\t\t\t\t\taction: '" . (($this->options != null and isset($this->options["action"])) ? $this->options["action"] : "./interface/set.php") . "',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\t'class': '" . (($this->options == null or !isset($this->options["class"])) ? "TempFile" : $this->options["class"]) . "'\n\t\t\t\t\t\t\t\t,'id':'-1'\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["path"])) ? ",'path':'" . $this->options["path"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["targetFilename"])) ? ",'targetFilename':'" . $this->options["targetFilename"] . "'" : "") . "\n\t\t\t\t\t\t\t\t" . ($physion ? ",'physion':'{$physion['0']}'" : "") . "\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t" . (isset($this->options["autoUpload"]) ? "autoUpload: " . ($this->options["autoUpload"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\t" . (isset($this->options["multiple"]) ? "multiple: " . ($this->options["multiple"] ? "true" : "false") . "," : "") . "\n\t\t\t\t\t\t\tonSubmit: function(id, fileName){ \$j('#progress_{$currentId}').css('display', 'block');},\n\t\t\t\t\t\t\tonComplete: function(id, fileName, transport){ \$j('progress_{$currentId}').css('display', 'none'); {$this->onchange} },\n\t\t\t\t\t\t\tonProgress: function(id, fileName, loaded, total){ \$j('#progressBar_{$currentId}').css('width', Math.ceil((loaded / total) * 100)+'%'); }});\n\t\t\t\t\t</script>";
             break;
         case "time":
             $this->type = "text";
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             if (!$this->id) {
                 $this->id = rand(100000, 9999999) . $this->name;
             }
             #$this->onkeyup .= "if(\$j(this).val().length == 2 && \$j(this).val().lastIndexOf(':') == -1) \$j(this).val(\$j(this).val()+':'); ";
             if ($this->connectTo) {
                 $this->onkeyup .= "contentManager.connectedTimeInput(event, '{$this->id}', '{$this->connectTo}'); ";
             } else {
                 $this->onkeyup .= "contentManager.timeInput(event, '{$this->id}'); ";
             }
         case "time2":
             if ($this->type == "time2") {
                 $this->type = "time";
             }
         case "radio1":
         case "date":
         case "email":
         case "text":
         case "hidden":
         case "submit":
         case "number":
         case "button":
         case "password":
         case "checkbox":
         case "readonly":
         case "fileold":
         case "color":
             $JS = "";
             if ($this->type == "radio1") {
                 $this->type = "radio";
             }
             if ($this->type == "fileold") {
                 $this->type = "file";
             }
             if ($this->isDisplayMode) {
                 if ($this->type == "checkbox") {
                     return Util::catchParser($this->value);
                 }
                 if ($this->type == "hidden") {
                     return "";
                 }
                 if ($this->type == "password") {
                     return str_repeat("*", mb_strlen($this->value));
                 }
                 return $this->value . "";
             }
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 if ($this->type == "checkbox") {
                     $this->onchange = "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 } else {
                     $this->onfocus .= " oldValue = this.value;";
                     $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                     $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
                 if ($this->type == "date") {
                     $this->onchange .= "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
             }
             $cal = "";
             $B2 = "";
             if ($this->type == "date") {
                 if ($this->id == null) {
                     $this->id = rand(10000, 90000);
                 }
                 $cal = new Button("Kalender anzeigen", "calendar", "iconic");
                 $cal->onclick("\$j('#{$this->id}').focus();");
                 $cal->style("float:right;");
                 $JS = "<script type=\"text/javascript\">\$j('#{$this->id}').datepicker();</script>";
                 $this->type = "text";
             }
             $value = "value=\"" . htmlspecialchars($this->value) . "\"";
             if ($this->type == "checkbox") {
                 $value = $this->value == "1" ? "checked=\"checked\"" : "";
             }
             $data = "";
             foreach ($this->data as $k => $v) {
                 $data .= " data-{$k}=\"{$v}\"";
             }
             if ($this->autocomplete != null) {
                 if ($this->id == null) {
                     $this->id = $this->name;
                 }
                 /*$this->onfocus .= " ACInputHasFocus=true; AC.start(this);";
                 		$this->onblur .= " ACInputHasFocus = false; AC.end(this);";
                 		$this->onkeyup .= " AC.update(event.keyCode, this, '".$this->autocomplete[0]."');";*/
                 $this->autocompleteBrowser = false;
                 $cal = $this->autocomplete[5];
                 #new Button("Suche", "./images/i2/details.png");
                 $cal->onclick("\$('{$this->id}').style.display = ''; \$('{$this->id}').value = ''; \$('{$this->id}').focus();");
                 if ($cal->getStyle() == "") {
                     $cal->style("float:right;");
                 }
                 if ($this->autocomplete[4] != null) {
                     $B2 = $this->autocomplete[4];
                     $B2->style("float:right;margin-left:5px;");
                     if (strpos($this->style, "width") === false) {
                         $this->style .= "width:80%";
                     }
                 } else {
                     if (strpos($this->style, "width") === false) {
                         $this->style .= "width:90%";
                     }
                 }
                 if ($this->autocomplete[1] == null) {
                     $cal->onclick("\$('{$this->id}Display').style.display = ''; \$('{$this->id}Display').value = ''; \$('{$this->id}').value = ''; \$('{$this->id}Display').focus();");
                     $IN = new HTMLInput($this->name, "hidden", htmlspecialchars($this->value));
                     $IN->id($this->name);
                     if ($this->onchange) {
                         $IN->onchange($this->onchange);
                         $this->onchange = "";
                     }
                     $JS .= $IN;
                     $this->autocomplete[1] = "function(selection){ if(!selection) return false; var oldVal = \$j('#{$this->id}').val(); \$j('#{$this->id}').val(selection.value); if(\$j('#{$this->id}').val() != oldVal) \$j('#{$this->id}').trigger('change'); \$('{$this->id}Display').value = selection.label; return false; }";
                     if ($this->value != "") {
                         $C = substr($this->autocomplete[0], 1) . "GUI";
                         $C = new $C($this->value);
                         $value = "value=\"" . htmlspecialchars($C->ACLabel($this->value, is_array($this->autocomplete[3]) ? $this->autocomplete[3] : array($this->autocomplete[3]))) . "\"";
                     }
                     $this->onkeyup .= "if(\$j('[name={$this->name}Display]').val() == '') {  \$j('[name={$this->name}]').val(''); } ";
                     $this->id .= "Display";
                     $this->name .= "Display";
                     $this->onkeyup .= "\$j('[name={$this->name}]').val(this.value);";
                 }
                 $JS .= OnEvent::script("var OnSelectCallback{$this->id} = " . $this->autocomplete[1] . "; \$j(\"input#{$this->id}\").autocomplete({\n\t\t\t\t\t\tsource: function(request, response){ \n\t\t\t\t\t\t\t " . OnEvent::rme($this->autocomplete[0], "getACData", array("'{$this->name}'", "request.term", is_array($this->autocomplete[3]) ? "'" . json_encode($this->autocomplete[3]) . "'" : $this->autocomplete[3]), "function(transport){ response(jQuery.parseJSON(transport.responseText)); }") . "\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item, event); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; },\n\t\t\t\t\t\tchange: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item, event); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; }\n\t\t\t\t\t}).data(\"ui-autocomplete\")._renderItem = function( ul, item ) {\n\t\t\t\t\t\treturn \$j( \"<li>\" )\n\t\t\t\t\t\t\t.data( \"item.ui-autocomplete\", item )\n\t\t\t\t\t\t\t.append( \"<a>\" + item.label + (item.description ? \"<br /><small>\"+item.description+\"</small>\" : \"\")+\"</a>\" )\n\t\t\t\t\t\t\t.appendTo( ul );\n\t\t\t\t\t};");
             }
             return "{$B2}{$cal}<input\n\t\t\t\t\t" . ($this->maxlength != null ? " maxlength=\"{$this->maxlength}\"" : "") . "\n\t\t\t\t\t" . ($this->placeholder != null ? " placeholder=\"{$this->placeholder}\"" : "") . "\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\t" . (!$this->autocompleteBrowser ? "autocomplete=\"off\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onclick != null ? "onclick=\"{$this->onclick}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeydown != null ? "onkeydown=\"{$this->onkeydown}\"" : "") . "\n\t\t\t\t\t" . ($this->tabindex != null ? "tabindex=\"{$this->tabindex}\"" : "") . "\n\t\t\t\t\t" . ($this->title != null ? "title=\"{$this->title}\"" : "") . "\n\t\t\t\t\t" . ($this->isSelected ? "checked=\"checked\"" : "") . "\n\t\t\t\t\t" . ($this->type == "file" ? "size=\"1\"" : "") . "\n\t\t\t\t\t" . ($this->type == "readonly" ? "readonly=\"readonly\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t{$data}\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\ttype=\"" . ($this->type != "readonly" ? $this->type : "text") . "\"\n\t\t\t\t\t" . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . "\n\t\t\t\t\t{$value} />{$this->requestFocus}{$JS}";
             break;
         case "option":
             $data = "";
             foreach ($this->data as $k => $v) {
                 $data .= " data-{$k}=\"{$v}\"";
             }
             return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " {$data} " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>";
             break;
         case "optgroup":
             $html = "<optgroup label=\"" . htmlentities($this->name) . "\">";
             foreach ($this->options as $k => $v) {
                 if (is_object($v)) {
                     $v->isSelected(false);
                     if ($this->parentValue == $k or $v->getValue() == $this->parentValue) {
                         $v->isSelected(true);
                     }
                 }
                 $html .= $v;
             }
             $html .= "</optgroup>";
             return $html;
             break;
         case "radio":
             $html = "";
             foreach ($this->options as $k => $v) {
                 $html .= "<div style=\"margin-bottom:5px;\"><input name=\"{$this->name}\" value=\"{$k}\" " . ($k == $this->value ? "checked=\"checked\"" : "") . " style=\"float:left;margin-right:5px;\" type=\"radio\">{$v}</div>";
             }
             return $html;
             break;
         case "select":
         case "select-multiple":
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             if ($this->type == "select-multiple") {
                 $values = trim($this->value) != "" ? explode(";:;", $this->value) : array();
             }
             if ($this->isDisplayMode) {
                 return is_object($this->options[$this->value]) ? $this->options[$this->value]->__toString() : $this->options[$this->value];
             }
             if ($this->multiEditOptions != null) {
                 $this->onchange .= "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             $html = "<select " . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . " " . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . " " . ($this->size ? "size=\"{$this->size}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->type == "select-multiple" ? " multiple=\"multiple\"" : "") . "" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . " name=\"{$this->name}\" " . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">";
             if ($this->options != null and is_array($this->options)) {
                 foreach ($this->options as $k => $v) {
                     if (!is_object($v)) {
                         if ($this->type == "select") {
                             $isThisIt = $this->value == $k;
                             if ($this->value . "" === "" and $k . "" === "0") {
                                 $isThisIt = false;
                             }
                         } else {
                             $isThisIt = in_array($k, $values);
                         }
                         $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>";
                     } else {
                         if ($v->getType() == "optgroup") {
                             $v->parentValue($this->value);
                         }
                         $v->isSelected(false);
                         if ($this->value == $k or $v->getValue() == $this->value) {
                             $v->isSelected(true);
                         }
                         $html .= $v;
                     }
                 }
             }
             $html .= "</select>";
             return $html;
             break;
     }
 }
Exemple #20
0
 public static function getOverviewPlugin()
 {
     $P = new overviewPlugin("mFhemGUI", "Fhem", 360);
     $P->updateInterval(120);
     $P->updateFunction("function(){ if(!Fhem.doAutoUpdate) return; " . OnEvent::rme(new FhemControlGUI(-1), "updateGUI", "", "function(transport){ fheOverview.updateTime('mFhemGUI'); Fhem.updateControls(transport); }") . "}");
     return $P;
 }
Exemple #21
0
 public function getQuickfilterInput()
 {
     $do = "if(checkResponse(transport)) contentManager.reloadFrameRight();";
     if ($this->tableMode == "popup") {
         $do = OnEvent::reloadPopup($this->collectionName);
     }
     $I = new HTMLInput("quickFilter", "text", mUserdata::getUDValueS("searchFilterInHTMLGUI" . $this->collectionName));
     #$I->hasFocusEvent(true);
     $I->id("quickFilter{$this->collectionName}");
     $I->onEnter(OnEvent::rme(new HTMLGUI(-1), "saveContextMenu", array("'searchFilter'", "'{$this->collectionName};:;'+\$('quickFilter{$this->collectionName}').value"), $do));
     #$I->onkeyup("AC.update(event.keyCode, this, '$this->collectionName','quickSearchLoadFrame');");
     $I->autocompleteBrowser(false);
     #$I->onfocus("focusMe(this); ACInputHasFocus=true; AC.start(this); if(this.value != '') AC.update('10', this, '$this->collectionName', 'quickSearchLoadFrame');");
     #$I->onblur("blurMe(this); ACInputHasFocus=false; AC.end(this);");
     $I->placeholder("Filtern");
     return $I;
 }
Exemple #22
0
    public function chatPopup($root = "")
    {
        $S = anyC::getFirst("Websocket", "WebsocketUseFor", "phim");
        $I = new HTMLInput("newMessage");
        $I->style("width:100%;background-color:white;");
        $I->onEnter("phimChat.send();");
        $IC = new HTMLInput("channel", "hidden", "0");
        $IC->id("channel");
        $B = new Button("Neue Nachricht", "star", "iconic");
        $B->style("color:orange;float:right;margin-top:-3px;");
        $B->className("newMessage");
        $BOn = new Button("Online", "{$root}../ubiquitous/phim/userOnline.png", "icon");
        $BOn->style("float:left;display:none;margin-right:3px;margin-top:-2px;");
        $BOn->className("online");
        $BOff = new Button("Offline", "{$root}../ubiquitous/phim/userOffline.png", "icon");
        $BOff->style("float:left;margin-right:3px;margin-top:-2px;");
        $BOff->className("offline");
        $AC = anyC::get("phimUserHidden");
        $hidden = array();
        while ($h = $AC->n()) {
            $hidden[$h->A("phimUserHiddenUserID")] = true;
        }
        $Users = Users::getUsersArray();
        $L = new HTMLList();
        $L->setListID("userList");
        $L->addListStyle("overflow:auto;box-sizing:border-box;");
        $L->noDots();
        $L->addItem($B . "Alle");
        $L->addItemEvent("onclick", "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatText0').show(); phimChat.scroll('chatText0'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0'); \$j('#channel').val('0');");
        $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
        $L->addItemClass("backgroundColor0");
        $L->setItemID("user0");
        $content = "";
        $AC = anyC::get("phim");
        $AC->addAssocV3("phimToUserID", "=", "0");
        $AC->addAssocV3("phimphimGruppeID", "=", "0");
        $AC->addOrderV3("phimID", "DESC");
        $AC->setLimitV3(50);
        while ($M = $AC->n()) {
            $content = "<div><span class=\"username\">" . (isset($Users[$M->A("phimFromUserID")]) ? $Users[$M->A("phimFromUserID")] : "Unbekannt") . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
        }
        $chatAll = "<div class=\"chatWindow\" id=\"chatText0\">{$content}</div>";
        $AC = anyC::get("phimGruppe");
        $AC->addAssocV3("INSTR(phimGruppeMembers, ';" . Session::currentUser()->getID() . ";')", ">", "0");
        $groups = array();
        $chatGroups = "";
        while ($G = $AC->n()) {
            $L->addItem($B . $G->A("phimGruppeName"));
            $L->addItemEvent("onclick", "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatTextg" . $G->getID() . "').show(); phimChat.scroll('chatTextg" . $G->getID() . "'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0'); \$j('#channel').val('g" . $G->getID() . "');");
            $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
            #$L->addItemClass("backgroundColor0");
            $L->setItemID("groupg" . $G->getID());
            $content = "";
            $ACS = anyC::get("phim");
            $ACS->addAssocV3("phimToUserID", "=", "0");
            $ACS->addAssocV3("phimphimGruppeID", "=", $G->getID());
            $ACS->addOrderV3("phimID", "DESC");
            $ACS->setLimitV3(50);
            while ($M = $ACS->n()) {
                $content = "<div><span class=\"username\">" . $Users[$M->A("phimFromUserID")] . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
            }
            $groups[] = $G->getID();
            $chatGroups .= "<div class=\"chatWindow\" style=\"display:none;\" id=\"chatTextg" . $G->getID() . "\">{$content}</div>";
        }
        asort($Users);
        $chatUsers = "";
        foreach ($Users as $ID => $U) {
            if ($ID == Session::currentUser()->getID()) {
                continue;
            }
            if (isset($hidden[$ID])) {
                continue;
            }
            $unread = false;
            $content = "";
            $AC = anyC::get("phim");
            $AC->addAssocV3("phimFromUserID", "=", Session::currentUser()->getID(), "AND", "1");
            $AC->addAssocV3("phimToUserID", "=", $ID, "AND", "1");
            $AC->addAssocV3("phimFromUserID", "=", $ID, "OR", "2");
            $AC->addAssocV3("phimToUserID", "=", Session::currentUser()->getID(), "AND", "2");
            $AC->addOrderV3("phimID", "DESC");
            $AC->setLimitV3(50);
            while ($M = $AC->n()) {
                $content = "<div><span class=\"username\">" . $Users[$M->A("phimFromUserID")] . ": </span>" . $M->A("phimMessage") . "</div>" . $content;
                if (!$M->A("phimRead") and $M->A("phimToUserID") == Session::currentUser()->getID()) {
                    $unread = true;
                }
            }
            $L->addItem($BOn . $BOff . $B . $U);
            $L->addItemEvent("onclick", OnEvent::rme("phim", "setRead", $ID) . "\$j(this).removeClass('highlight'); \$j('.chatWindow').hide(); \$j('#chatText{$ID}').show(); phimChat.scroll('chatText{$ID}'); \$j('#userList .backgroundColor0').removeClass('backgroundColor0'); \$j(this).addClass('backgroundColor0');\$j('#channel').val('{$ID}');");
            $L->addItemStyle("cursor:pointer;margin-left:0;padding:5px;");
            $L->setItemID("user{$ID}");
            if ($unread) {
                $L->addItemClass("highlight");
            }
            $chatUsers .= "<div style=\"display:none;\" class=\"chatWindow\" id=\"chatText{$ID}\">{$content}</div>";
        }
        $content = "<div style=\"width:68%;display:inline-block;vertical-align:top;\">\n\t\t\t\t{$chatAll}\n\t\t\t\t{$chatUsers}\n\t\t\t\t{$chatGroups}\n\t\t\t\t<div>{$I}</div>\n\t\t\t</div><div style=\"width:32%;display:inline-block;vertical-align:top;\">{$L}{$IC}</div>";
        $rp = str_replace("interface/rme.php", "", $_SERVER["SCRIPT_NAME"]);
        if (strpos($_SERVER["SCRIPT_NAME"], "phim.php") !== false) {
            $rp = "../../";
        }
        $physion = "default";
        if (isset($_GET["physion"])) {
            $physion = $_GET["physion"];
        }
        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>phim</title>
		<script type="text/javascript" src="' . $root . '../libraries/jquery/jquery-1.9.1.min.js"></script>
		<script type="text/javascript" src="' . $root . '../libraries/jquery/jquery-ui-1.10.1.custom.min.js"></script>
		<script type="text/javascript" src="' . $root . '../libraries/iconic/iconic.min.js"></script>
		<script type="text/javascript" src="' . $root . '../libraries/jquery/jquery.qtip.min.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/P2J.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/Aspect.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/handler.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/contentManager.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/Interface.js"></script>
		<script type="text/javascript" src="' . $root . '../javascript/Overlay.js"></script>
		<script type="text/javascript" src="' . $root . '../libraries/webtoolkit.base64.js"></script>
		
		<script type="text/javascript" src="' . $root . '../ubiquitous/phim/autobahn.min.js"></script>
		<script type="text/javascript" src="' . $root . '../ubiquitous/phim/phimChat.js"></script>
		<script type="text/javascript">
			contentManager.setRoot("' . $rp . '");
			$j(function(){
				Ajax.physion = "' . $physion . '";
					
				phimChat.init(
					"ws' . ($S->A("WebsocketSecure") ? "s" : "") . '://' . $S->A("WebsocketServer") . ":" . $S->A("WebsocketServerPort") . '/",
					"' . $S->A("WebsocketRealm") . '", 
					' . Session::currentUser()->getID() . ', 
					"' . Session::currentUser()->A("name") . '",
					"' . $S->A("WebsocketToken") . '",
					[' . implode(",", $groups) . '],
					"' . $root . '");
						
				phimChat.scroll("chatText0");
				$j("#userList").css("height", $j(window).height());
			});
		</script>
		<link rel="stylesheet" type="text/css" href="' . $root . '../libraries/jquery/jquery.qtip.min.css" />
		<link rel="stylesheet" type="text/css" href="' . $root . '../styles/' . (isset($_COOKIE["phynx_color"]) ? $_COOKIE["phynx_color"] : "standard") . '/colors.css"></link>
		<link rel="stylesheet" type="text/css" href="' . $root . '../styles/standard/general.css"></link>
		<style type="text/css">
			p {
				padding:5px;
			}
			
			body {
				background-color:#ddd;
			}
			
			html {
				overflow-y: auto;
			}

			.username {
				font-weight:bold;
			}
			
			.chatWindow {
				padding:5px;
				box-sizing:border-box;
				overflow-y: auto;
				height:270px;
				background-color:white;
				border-bottom:3px solid grey;
			}
			
			.newMessage {
				display:none;
			}
			
			.highlight .newMessage {
				display:block;
			}
			
			#darkOverlay {
				position:fixed;
				top:0;
				left:0;
			}
			
			#userList li {
				white-space: nowrap;
				overflow:hidden;
				margin-top:0;
			}
		</style>
	</head>
	<body>
		<div id="darkOverlay" style="background-color:rgba(0,0,0,.7);color:white;"></div>
		' . $content . '
	</body>
</html>';
    }
Exemple #23
0
 public function getListTable()
 {
     $T = new HTMLTable(2, "Gerichte");
     $T->maxHeight(480);
     $T->setColWidth(2, 30);
     $T->weight("light");
     $T->useForSelection(false);
     $AC = anyC::get("Gericht");
     $AC->addAssocV3("GerichtAdded", ">", "0");
     while ($E = $AC->getNextEntry()) {
         $BT = new Button("Löschen", "trash_stroke", "iconicL");
         $BT->onclick(OnEvent::rme($this, "reMoveItem", $E->getID(), OnEvent::reloadPopup("mGericht")));
         $T->addRow(array($E->A("GerichtName"), $BT));
         $T->addRowStyle("font-size:20px;");
         #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }"));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Die Liste enthält keine Einträge."));
         $T->addRowColspan(1, 2);
     }
     return $T;
 }
 public function __toString()
 {
     #$style = "";
     if ($this->type == "date" and strpos($this->style, "width:") === false) {
         $this->style .= "width:87%;";
     }
     #if($this->style != null) $style = " style=\"$this->style\"";
     switch ($this->type) {
         case "audio":
             return "<audio controls preload=\"auto\" autobuffer style=\"{$this->style}\"><source src=\"{$this->value}\"></audio>";
             break;
         case "HTMLEditor":
             $B = new Button("in HTML-Editor\nbearbeiten", "editor");
             $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->className("backgroundColor2");
             return $B->__toString();
             break;
         case "TextEditor":
             #return "<input ".(isset($this->events[$as]) ? $eve : "")." style=\"background-image:url(./images/navi/editor.png);".(isset($this->inputStyle[$as]) ? "".$this->inputStyle[$as]."" : "")."\" type=\"button\" class=\"bigButton backgroundColor2\" onclick=\"TextEditor.show('$as','$this->FormID');\" value=\"".$this->texts["in Editor bearbeiten"]."\" /><textarea style=\"display:none;\" name=\"".$as."\" id=\"".$as."\">".$this->attributes->$as."</textarea>";
             $B = new Button("in Editor\nbearbeiten", "editor");
             $B->className("backgroundColor2");
             $B->onclick("TextEditor.show('{$this->name}','{$this->options[0]}');");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             $ITA->id($this->name);
             $ITA->style("display:none;");
             return $B->__toString() . $ITA;
             break;
         case "tinyMCE":
             $BO = array("'{$this->options[0]}'", "'{$this->options[1]}'");
             if (isset($this->options[2])) {
                 $BO[] = "'{$this->options[2]}'";
             }
             $B = new Button("in Editor\nbearbeiten", "editor");
             #$B->windowRme("Wysiwyg","","getEditor","","WysiwygGUI;FieldClass:{$this->options[0]};FieldClassID:{$this->options[1]};FieldName:{$this->options[2]}");
             $B->popup("", "Editor", "Wysiwyg", "-1", "editInPopup", $BO, "", "Popup.presets.large");
             $B->className("backgroundColor2");
             $ITA = new HTMLInput($this->name, "textarea", $this->value);
             return $B->__toString() . $ITA;
             break;
         case "multiInput":
             return "<input\n\t\t\t\t\tclass=\"multiEditInput2\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tvalue=\"" . htmlspecialchars($this->value) . "\"\n\t\t\t\t\tonfocus=\"oldValue = this.value;\"\n\t\t\t\t\tid=\"" . $this->options[2] . "ID" . $this->options[1] . "\"\n\t\t\t\t\tonblur=\"if(oldValue != this.value) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"\n\t\t\t\t\tonkeydown=\"if(event.keyCode == 13) saveMultiEditInput('" . $this->options[0] . "','" . $this->options[1] . "','" . $this->options[2] . "');\"/>";
             break;
             /*case "customSelection":
             				$B = new Button("Eintrag auswählen...", "gutschrift");
             				$B->type("LPBig");
             				$B->style("float:right;margin-left:10px;");
             				#				 "contentRight"		"callingPluginID"  "selectPlugin"
             				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
             
             				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
             			break;*/
         /*case "customSelection":
         				$B = new Button("Eintrag auswählen...", "gutschrift");
         				$B->type("LPBig");
         				$B->style("float:right;margin-left:10px;");
         				#				 "contentRight"		"callingPluginID"  "selectPlugin"
         				$B->customSelect($this->options[0], $this->options[1], $this->options[2], $this->options[3]);
         
         				return $B."<input type=\"text\" name=\"$this->name\" value=\"$this->value\" />";
         			break;*/
         case "textarea":
             if ($this->isDisplayMode) {
                 return nl2br($this->value);
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 $this->onfocus .= " oldValue = this.value;";
                 $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 if ($this->hasFocusEvent) {
                     $this->onfocus .= "focusMe(this);";
                     $this->onblur .= "blurMe(this);";
                 }
                 $this->hasFocusEvent = false;
             }
             return "<textarea\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->hasFocusEvent ? "onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">{$this->value}</textarea>";
             break;
         case "file":
             $currentId = ($this->id != null ? $this->id : $this->name) . rand(100, 100000000);
             return "\n\t\t\t\t\t<div id=\"progress_{$currentId}\" style=\"height:10px;width:95%;display:none;\" class=\"\">\n\t\t\t\t\t\t<div id=\"progressBar_{$currentId}\" style=\"height:10px;width:0%;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"{$currentId}\" style=\"width:100%;\"></div>\n\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\tvar QQUploader = new qq.FileUploader({\n\t\t\t\t\t\t\tmaxSizePossible: '" . ini_get("upload_max_filesize") . "B',\n\t\t\t\t\t\t\telement: \$('{$currentId}'),\n\t\t\t\t\t\t\taction: './interface/set.php',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\t'class': '" . (($this->options == null or !isset($this->options["class"])) ? "TempFile" : $this->options["class"]) . "'\n\t\t\t\t\t\t\t\t,'id':'-1'\n\t\t\t\t\t\t\t\t" . (($this->options != null and isset($this->options["path"])) ? ",'path':'" . $this->options["path"] . "'" : "") . "\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tonSubmit: function(id, fileName){ \$('progress_{$currentId}').style.display = 'block';},\n\t\t\t\t\t\t\tonComplete: function(id, fileName, transport){ \$('progress_{$currentId}').style.display = 'none'; if(checkResponse(transport)) { {$this->onchange} } },\n\t\t\t\t\t\t\tonProgress: function(id, fileName, loaded, total){ \$('progressBar_{$currentId}').style.width = Math.ceil((loaded / total) * 100)+'%'; }});\n\t\t\t\t\t</script>";
             break;
         case "radio1":
         case "date":
         case "text":
         case "hidden":
         case "submit":
         case "button":
         case "password":
         case "checkbox":
         case "readonly":
             $JS = "";
             if ($this->type == "radio1") {
                 $this->type = "radio";
             }
             if ($this->isDisplayMode) {
                 if ($this->type == "checkbox") {
                     return Util::catchParser($this->value);
                 }
                 if ($this->type == "hidden") {
                     return "";
                 }
                 return $this->value . "";
             }
             if ($this->hasFocusEvent) {
                 $this->onfocus .= "focusMe(this);";
                 $this->onblur .= "blurMe(this);";
             }
             $cal = "";
             $B2 = "";
             if ($this->type == "date") {
                 if ($this->id == null) {
                     $this->id = rand(10000, 90000);
                 }
                 $cal = new Button("", "./images/i2/calendar.gif");
                 $cal->onclick("\$j('#{$this->id}').focus();");
                 $cal->type("icon");
                 $cal->className("calendarIcon");
                 $JS = "<script type=\"text/javascript\">\$j('#{$this->id}').datepicker();</script>";
                 $this->type = "text";
             }
             $value = "value=\"" . htmlspecialchars($this->value) . "\"";
             if ($this->type == "checkbox") {
                 $value = $this->value == "1" ? "checked=\"checked\"" : "";
             }
             if ($this->multiEditOptions != null) {
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
                 if ($this->type == "checkbox") {
                     $this->onchange = "saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 } else {
                     $this->onfocus .= " oldValue = this.value;";
                     $this->onkeyup .= "if(event.keyCode == 13) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                     $this->onblur .= "if(oldValue != this.value) saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");";
                 }
             }
             if ($this->autocomplete != null) {
                 if ($this->id == null) {
                     $this->id = $this->name;
                 }
                 /*$this->onfocus .= " ACInputHasFocus=true; AC.start(this);";
                 		$this->onblur .= " ACInputHasFocus = false; AC.end(this);";
                 		$this->onkeyup .= " AC.update(event.keyCode, this, '".$this->autocomplete[0]."');";*/
                 $this->autocompleteBrowser = false;
                 $cal = new Button("Suche", "./images/i2/details.png");
                 $cal->onclick("\$('{$this->id}').style.display = ''; \$('{$this->id}').value = ''; \$('{$this->id}').focus();");
                 $cal->type("icon");
                 $cal->className("calendarIcon");
                 if ($this->autocomplete[4] != null) {
                     $B2 = $this->autocomplete[4];
                     $B2->style("float:right;margin-left:5px;");
                     $this->style .= "width:80%";
                 } else {
                     $this->style .= "width:87%";
                 }
                 if ($this->autocomplete[1] == null) {
                     $cal->onclick("\$('{$this->id}Display').style.display = ''; \$('{$this->id}Display').value = ''; \$('{$this->id}Display').focus();");
                     $IN = new HTMLInput($this->name, "hidden", htmlspecialchars($this->value));
                     $IN->id($this->name);
                     $JS .= $IN;
                     $this->autocomplete[1] = "function(selection){ \$('{$this->id}').value = selection.value; \$('{$this->id}Display').value = selection.label; return false; }";
                     if ($this->value != "") {
                         $C = substr($this->autocomplete[0], 1) . "GUI";
                         $C = new $C($this->value);
                         $value = "value=\"" . htmlspecialchars($C->ACLabel()) . "\"";
                     }
                     $this->id .= "Display";
                 }
                 $JS .= OnEvent::script("var OnSelectCallback{$this->id} = " . $this->autocomplete[1] . "; \$j(\"input#{$this->id}\").autocomplete({\n\t\t\t\t\t\tsource: function(request, response){ \n\t\t\t\t\t\t\t " . OnEvent::rme($this->autocomplete[0], "getACData", array("'{$this->name}'", "request.term", $this->autocomplete[3]), "function(transport){ response(jQuery.parseJSON(transport.responseText)); }") . "\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t},\n\t\t\t\t\t\tselect: function(event, ui) { var r = OnSelectCallback{$this->id}(ui.item); " . ($this->autocomplete[2] ? "\$('{$this->id}').style.display = 'none';" : "") . " return r; }\n\t\t\t\t\t}).data(\"autocomplete\")._renderItem = function( ul, item ) {\n\t\t\t\t\t\treturn \$j( \"<li></li>\" )\n\t\t\t\t\t\t\t.data( \"item.autocomplete\", item )\n\t\t\t\t\t\t\t.append( \"<a>\" + item.label + (item.description ? \"<br /><small>\"+item.description+\"</small>\" : \"\")+\"</a>\" )\n\t\t\t\t\t\t\t.appendTo( ul );\n\t\t\t\t\t};");
             }
             return "{$B2}{$cal}<input\n\t\t\t\t\t" . ($this->style != null ? " style=\"{$this->style}\"" : "") . "\n\t\t\t\t\t" . (!$this->autocompleteBrowser ? "autocomplete=\"off\"" : "") . "\n\t\t\t\t\t" . ($this->className != null ? "class=\"{$this->className}\"" : "") . "\n\t\t\t\t\t" . ($this->onclick != null ? "onclick=\"{$this->onclick}\"" : "") . "\n\t\t\t\t\t" . ($this->onblur != null ? "onblur=\"{$this->onblur}\"" : "") . "\n\t\t\t\t\t" . ($this->onfocus != null ? "onfocus=\"{$this->onfocus}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeyup != null ? "onkeyup=\"{$this->onkeyup}\"" : "") . "\n\t\t\t\t\t" . ($this->onkeydown != null ? "onkeydown=\"{$this->onkeydown}\"" : "") . "\n\t\t\t\t\t" . ($this->tabindex != null ? "tabindex=\"{$this->tabindex}\"" : "") . "\n\t\t\t\t\t" . ($this->isSelected ? "checked=\"checked\"" : "") . "\n\t\t\t\t\t" . ($this->type == "file" ? "size=\"1\"" : "") . "\n\t\t\t\t\t" . ($this->type == "readonly" ? "readonly=\"readonly\"" : "") . "\n\t\t\t\t\tname=\"{$this->name}\"\n\t\t\t\t\t" . ($this->isDisabled ? "disabled=\"disabled\"" : "") . "\n\t\t\t\t\ttype=\"" . ($this->type != "readonly" ? $this->type : "text") . "\"\n\t\t\t\t\t" . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . "\n\t\t\t\t\t" . ($this->id != null ? "id=\"{$this->id}\"" : "") . "\n\t\t\t\t\t{$value} />{$this->requestFocus}{$JS}";
             break;
         case "option":
             return "<option" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->isSelected ? "selected=\"selected\"" : "") . " value=\"{$this->value}\">{$this->name}</option>";
             break;
         case "radio":
             $html = "";
             foreach ($this->options as $k => $v) {
                 $html .= "<div style=\"margin-bottom:5px;\"><input name=\"{$this->name}\" value=\"{$k}\" " . ($k == $this->value ? "checked=\"checked\"" : "") . " style=\"float:left;margin-right:5px;\" type=\"radio\">{$v}</div>";
             }
             return $html;
             break;
         case "select":
         case "select-multiple":
             if ($this->type == "select-multiple") {
                 $values = trim($this->value) != "" ? explode(";:;", $this->value) : array();
             }
             if ($this->isDisplayMode) {
                 return is_object($this->options[$this->value]) ? $this->options[$this->value]->__toString() : $this->options[$this->value];
             }
             if ($this->multiEditOptions != null) {
                 $this->onchange("saveMultiEditInput('" . $this->multiEditOptions[0] . "','" . $this->multiEditOptions[1] . "','" . $this->name . "'" . ($this->multiEditOptions[2] != null ? ", " . $this->multiEditOptions[2] : "") . ");");
                 $this->id($this->name . "ID" . $this->multiEditOptions[1]);
             }
             $html = "<select " . ($this->isDisabled ? "disabled=\"disabled\"" : "") . " " . ($this->type == "select-multiple" ? " multiple=\"multiple\"" : "") . "" . ($this->style != null ? " style=\"{$this->style}\"" : "") . " " . ($this->onchange != null ? "onchange=\"{$this->onchange}\"" : "") . " name=\"{$this->name}\" " . ($this->id != null ? "id=\"{$this->id}\"" : "") . ">";
             if ($this->options != null and is_array($this->options)) {
                 foreach ($this->options as $k => $v) {
                     if (!is_object($v)) {
                         if ($this->type == "select") {
                             $isThisIt = $this->value == $k;
                         } else {
                             $isThisIt = in_array($k, $values);
                         }
                         $html .= "<option " . ($isThisIt ? "selected=\"selected\"" : "") . " value=\"{$k}\">{$v}</option>";
                     } else {
                         if ($this->value == $k or $v->getValue() == $this->value) {
                             $v->isSelected(true);
                         }
                         $html .= $v;
                     }
                 }
             }
             $html .= "</select>";
             return $html;
             break;
     }
 }
 public function getActions()
 {
     $DBFilePath = Util::getRootPath() . "system/DBData/Installation.pfdb.php";
     $File = new File($DBFilePath);
     $File->loadMe();
     $ASetup = "contentManager.loadPlugin('contentRight', 'mInstallation');";
     $B = new Button("Erneut prüfen", "./plugins/Installation/recheck.png", "icon");
     $B->onclick($ASetup);
     $B->id("recheckButton");
     $hasDBConnection = false;
     try {
         $Version = mUserdata::getGlobalSettingValue("DBVersion", false);
         $hasDBConnection = true;
     } catch (Exception $e) {
     }
     if (!$File->A("FileIsWritable") and !$hasDBConnection) {
         $message = "<p style=\"padding:20px;font-size:20px;color:#555;text-align:center;\">" . $_SESSION["applications"]->getActiveApplication() . " ist auf diesem Server noch nicht installiert.</p>";
         $html = "<div style=\"width:600px;margin:auto;line-height:1.5;\">\n\t\t\t\t<p>\n\t\t\t\t<img src=\"./images/navi/restrictions.png\" style=\"float:left;margin-right:10px;\"/>\n\t\t\t\tDie Datei <code>/system/DBData/Installation.pfdb.php</code> ist <b>nicht beschreibbar</b>.</p>\n\t\t\t\t\n\t\t\t\t<p style=\"margin-top:20px;\">Machen Sie die Datei mit einem FTP-Programm beschreibbar.<br />\n\t\t\t\tKlicken Sie dazu mit der rechten Maustaste auf die Datei auf dem Server, wählen Sie <b>\"Eigenschaften\"</b>, und geben Sie den Modus <b>666</b> an, damit sie durch den Besitzer, die Gruppe und alle Anderen les- und beschreibbar ist.</p>\n\t\t\t\t<div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">\n\t\t\t\t" . $this->box($B, $ASetup, "Erneut<br />prüfen") . "\n\t\t\t\t</div>\n\t\t\t</div>";
         die($message . $html);
     }
     $containers = 0;
     $message = "";
     $html = "";
     $hidden = "<a class=\"hiddenLink\" href=\"#\" onclick=\"" . OnEvent::popup("Fehlerausgabe", "mInstallation", "-1", "updateAllTables", array("'1'")) . "return false;\">&nbsp;</a>";
     try {
         $Version = mUserdata::getGlobalSettingValue("DBVersion", false);
         if ($Version !== false and $Version == Phynx::build()) {
             $message = "<p style=\"padding:20px;font-size:20px;color:#555;text-align:center;\">Ihre Datenbank ist auf dem aktuellen Stand.{$hidden}</p>";
         }
         if ($Version === false or $Version != Phynx::build()) {
             $message = "<p style=\"padding:10px;font-size:20px;color:#555;margin-bottom:40px;text-align:center;\">Ihre Datenbank muss aktualisiert werden.</p>";
             $ASetup = "\$j('#updateButton').attr('src', './plugins/Installation/bigLoader.png'); " . OnEvent::rme($this, "updateAllTables", "", "function(transport){ contentManager.contentBelow(transport.responseText); }");
             $B = new Button("Datenbank aktualisieren", "./plugins/Installation/aktualisieren.png", "icon");
             $B->onclick($ASetup);
             $B->id("updateButton");
             $html = $this->box($B, $ASetup, "Die Datenbank<br />aktualisieren", "", $hidden);
             $html = "<div style=\"width:350px;margin:auto;padding-bottom:40px;\">" . $html . "</div>";
         }
     } catch (NoDBUserDataException $e) {
         $message = "<p style=\"padding:10px;font-size:20px;color:#555;text-align:center;color:red;\">Mit den angegebenen Datenbank-Zugangsdaten kann keine Verbindung aufgebaut werden.</p>";
         echo OnEvent::script("contentManager.loadFrame('contentLeft','Installation','1');");
         if (PHYNX_MAIN_STORAGE == "MySQL") {
             try {
                 $DB1 = new DBStorageU();
                 $BN = new Button("Hinweis", "notice", "icon");
                 $BN->style("float:left;margin-right:10px;");
                 $File = new File(Util::getRootPath() . "system/connect.php");
                 $B = new Button("Verbindungsart umstellen", "./plugins/Installation/changedb.png", "icon");
                 $B->onclick($A);
                 $B->id("changedbButton");
                 $A = OnEvent::rme($this, "switchDBToMySQLo", "", "function(){ Installation.reloadApp(); }");
                 $BR = "<p style=\"margin-top:20px;\">Verwenden Sie den Knopf unten, um die Verbindungsart auf die ältere Version umzustellen.<br />\n\t\t\t\t\t\tSie müssen sich anschließend erneut anmelden.</p>\n\t\t\t\t\t\t<div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">" . $this->box($B, $A, "Verbindungsart<br />umstellen") . "</div>";
                 $A = "contentManager.loadPlugin('contentRight', 'mInstallation');";
                 $B = new Button("Erneut prüfen", "./plugins/Installation/recheck.png", "icon");
                 $B->onclick($A);
                 $B->id("recheckButton");
                 if (!$File->A("FileIsWritable")) {
                     $BR = "<p style=\"margin-top:20px;\">Bitte machen Sie die Datei /system/connect.php für den Webserver beschreibbar, damit phynx auf die ältere Verbindungsart umstellen kann.<br /><br />Verwenden Sie dazu Ihr FTP-Programm. Klicken Sie mit der rechten Maustaste auf die Datei auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 666 an, damit sie durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.\n\t\t\t\t\t\t\t</p><div style=\"width:350px;margin:auto;padding-top:20px;padding-bottom:20px;\">" . $this->box($B, $A, "Erneut<br />prüfen") . "</div>";
                 }
                 $html = "<p style=\"margin-top:30px;\">{$BN} Möglicherweise ist die MySQLi-Erweiterung auf Ihrem Server nicht korrekt konfiguriert.</p>{$BR}";
                 $html = "<div style=\"width:700px;margin:auto;padding-bottom:40px;\">" . $html . "</div>";
             } catch (Exception $e) {
                 #echo "MySQL geht auch nicht!";
             }
         }
     } catch (DatabaseNotFoundException $e) {
         $message = "<p style=\"padding:10px;font-size:20px;color:#555;text-align:center;color:red;\">Die angegebene Datenbank konnte nicht gefunden werden.</p>";
         echo OnEvent::script("contentManager.loadFrame('contentLeft','Installation','1');");
     } catch (TableDoesNotExistException $e) {
         $message = "<p style=\"padding:10px;font-size:20px;color:#555;margin-bottom:40px;text-align:center;\">Ihre Datenbank hat derzeit noch keinen Inhalt.</p>";
         $ASetup = "\$j('#setupButton').attr('src', './plugins/Installation/bigLoader.png'); " . OnEvent::rme($this, "setupAllTables", "", "function(transport){ contentManager.contentBelow(transport.responseText); }");
         $BSetup = new Button("Datenbank einrichten", "./plugins/Installation/setup.png", "icon");
         $BSetup->onclick($ASetup);
         $BSetup->id("setupButton");
         $hidden = "<a class=\"hiddenLink\" href=\"#\" onclick=\"" . OnEvent::popup("Fehlerausgabe", "mInstallation", "-1", "setupAllTables", array("'1'")) . "return false;\">&nbsp;</a>";
         $html = $this->box($BSetup, $ASetup, "Die Datenbank<br />einrichten", "", $hidden);
         $containers = 1;
         $BM = new BackupManagerGUI();
         $list = $BM->getBackupsList();
         $ARestore = OnEvent::popup("Backup-Manager", "BackupManager", "-1", "inPopup");
         $BRestore = new Button("Datenbank wiederherstellen", "./plugins/Installation/restore.png", "icon");
         $BRestore->onclick($ARestore);
         $BRestore->id("setupButton");
         $html .= $this->box($BRestore, $ARestore, "Eine Sicherung<br />wiederherstellen", count($list) == 0 ? "color:grey;" : "");
         $containers++;
         $html = "<div style=\"width:" . $containers * 360 . "px;margin:auto;padding-bottom:40px;\">" . $html . "</div>";
     }
     echo "{$message}{$html}";
 }
Exemple #26
0
 public static function parserDefault($w, $E)
 {
     $I = new HTMLInput("isDefault", "checkbox", $E->getID() == self::$fieldDefaultFile[1] ? "1" : "0");
     $I->onchange(OnEvent::rme(self::$fieldDefaultFile[0], "saveMultiEditField", array("'" . self::$fieldDefaultFile[2] . "'", "this.checked ? '" . $E->getID() . "' : ''"), OnEvent::reloadPopup("mFile"), "", OnEvent::reloadPopup("mFile")));
     return $I;
 }
 public function getHTML($id)
 {
     #$_SESSION["BPS"]->unregisterClass(get_class($this));
     $defaultAnsicht = "monat";
     if (Applications::activeApplication() == "personalKartei") {
         $defaultAnsicht = "jahr";
     }
     $ansicht = mUserdata::getUDValueS("KalenderAnsicht", $defaultAnsicht);
     #$ansicht = $ansicht->getUDValue("KalenderAnsicht");
     #if($ansicht == null) $ansicht = "monat";
     $display = mUserdata::getUDValueS("KalenderDisplay" . ucfirst($ansicht), "0");
     $BThis = new Button("", "arrow_down", "iconicG");
     $BThis->style("float:left;margin-top:-6px;margin-right:5px;");
     $Calendars = "";
     Registry::reset("Kalender");
     while ($C = Registry::callNext("Kalender", "categories")) {
         if (!$C) {
             continue;
         }
         foreach ($C as $tab) {
             $Calendars .= "<div onclick=\"{$tab->onclick}\">" . ($tab->isCurrent ? $BThis : "") . " {$tab->label}</div>";
         }
     }
     // <editor-fold defaultstate="collapsed" desc="styles">
     $html = "\n\t\t\n\t\t<style type=\"text/css\">\n\t\t.Day {\n\t\t\t-moz-user-select:none;\n\t\t\tborder-left:1px solid #EEE;\n\t\t\tborder-bottom:1px solid #EEE;\n\t\t}\n\t\t\n\t\t/*.Day:hover {\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tpadding:2px;\n\t\t}*/\n\n\t\t.dayOptions {\n\t\t\tdisplay:none;\n\t\t}\n\n\t\t.Day:hover .dayOptions {\n\t\t\tdisplay:inline;\n\t\t}\n\n\t\t.Termin {\n\t\t\tposition:relative;\n\t\t\tleft:44px;\n\t\t\tcursor:pointer;\n\t\t\twidth:150px;\n\t\t\tfloat:left;\n\t\t\tborder-style:solid;\n\t\t\tborder-width:1px;\n\t\t\tmargin-right:3px;\n\t\t}\n\t\t\n\t\t.KalenderButton {\n\t\t\topacity:0.5;\n\t\t}\n\t\t\n\t\t.KalenderButton:hover {\n\t\t\topacity:1;\n\t\t}\n\t\t\n\t\t.KalenderUser {\n\t\t\tmargin-left:10px;\n\t\t}\n\t\t\n\t\t.KalenderUser div {\n\t\t\tpadding:10px;\n\t\t\tpadding-top:10px;\n\t\t\tpadding-bottom:5px;\n\t\t\tdisplay:inline-block;\n\t\t\tmargin-right:20px;\n\t\t\tcursor:pointer;\n\t\t\tmin-width:150px;\n\t\t}\n\t\t\n\t\t.cellHeight {\n\t\t}\n\t\t\n\t\t.ui-datepicker {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t#contentScreen tr:hover {\n\t\t\tbackground-color:inherit;\n\t\t}\n\n\t\t#calendar1stMonth .ui-datepicker-prev, #calendar1stMonth .ui-datepicker-next/*,\n\t\t#calendar2ndMonth .ui-datepicker-prev, #calendar2ndMonth .ui-datepicker-next */{\n\t\t\tdisplay:none;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-widget-content,\n\t\t#calendar2ndMonth .ui-widget-content, \n\t\t#calendar2ndMonth .ui-widget-content .ui-state-default,\n\t\t#calendar1stMonth .ui-widget-content .ui-state-default {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t#calendar1stMonth .ui-datepicker-header,\n\t\t#calendar2ndMonth .ui-datepicker-header {\n\t\t\tborder:0px;\n\t\t}\n\t\t\n\t\t/*@media only screen and (max-height: 820px) {\n\t\t\t.cellHeight {\n\t\t\t\theight:55px;\n\t\t\t}\n\t\t}*/\n\t\t</style>";
     // </editor-fold>
     $BLeft = new Button("Zurück", "back", "icon");
     $BLeft->rmePCR("mKalender", "", "setDisplay", $display - 1, "contentManager.loadFrame('contentScreen','mKalender');");
     $BLeft->style("margin-right:10px;");
     $BRight = new Button("Weiter", "navigation", "icon");
     $BRight->rmePCR("mKalender", "", "setDisplay", $display + 1, "contentManager.loadFrame('contentScreen','mKalender');");
     $BRight->style("margin-right:10px;");
     $BToday = new Button("Aktuelles Datum", "down", "icon");
     $BToday->rmePCR("mKalender", "", "setToday", '', "contentManager.loadFrame('contentScreen','mKalender');");
     $BToday->style("margin-right:10px;");
     $BJahr = new Button("Jahr", "./ubiquitous/Kalender/month.png", "icon");
     $BJahr->rmePCR("mKalender", "", "setView", "jahr", "contentManager.loadFrame('contentScreen','mKalender');");
     $BJahr->style("margin-right:10px;" . ($ansicht != "jahr" ? "opacity:0.5;" : ""));
     $BJahr->id("jahrButton");
     $BMonat = new Button("Monat", "./ubiquitous/Kalender/month.png", "icon");
     $BMonat->rmePCR("mKalender", "", "setView", "monat", "contentManager.loadFrame('contentScreen','mKalender');");
     $BMonat->style("margin-right:10px;" . ($ansicht != "monat" ? "opacity:0.5;" : ""));
     $BMonat->id("monatButton");
     $BWoche = new Button("Woche", "./ubiquitous/Kalender/workweek.png", "icon");
     $BWoche->rmePCR("mKalender", "", "setView", "woche", "contentManager.loadFrame('contentScreen','mKalender');");
     $BWoche->style("margin-right:10px;" . ($ansicht != "woche" ? "opacity:0.5;" : ""));
     $BWoche->id("wocheButton");
     $BTag = new Button("Tag", "./ubiquitous/Kalender/day.png", "icon");
     $BTag->rmePCR("mKalender", "", "setView", "tag", "contentManager.loadFrame('contentScreen','mKalender');");
     $BTag->style("margin-right:10px;" . ($ansicht != "tag" ? "opacity:0.5;" : ""));
     $BTag->id("tagButton");
     if (Applications::activeApplication() == "personalKartei") {
         $BTag = "";
         $BWoche = "";
         $BMonat = "";
     }
     if (Applications::activeApplication() != "personalKartei") {
         $BJahr = "";
     }
     $ST = new HTMLTable(1);
     $ST->setColClass(1, "");
     #$ST->setTableStyle("width:40px;margin:0px;margin-right:-215px;float:right;/*margin-right:-50px;margin-top:95px;*/");
     $newWindow = new Button("Kalender in neuem Fenster öffnen", "new_window", "iconicL");
     $newWindow->style("margin-right:10px;");
     $newWindow->newSession("Mail", Applications::activeApplication(), "mKalender", "Kalender");
     if (Session::physion()) {
         $newWindow = "";
     }
     $reminder = "";
     if (Session::isPluginLoaded("mReminder")) {
         $reminder = Reminder::getButton();
         $reminder->style("margin-right:10px;");
     }
     $ST->addRow("<div id=\"calendar1stMonth\"></div>");
     $ST->addRow("<div id=\"calendar2ndMonth\"></div>");
     $TC = "KalenderView" . ucfirst($ansicht);
     $TC = new $TC();
     $TCalendars = "<div>";
     if (trim($Calendars) != "") {
         $TCalendars .= "<div class=\"KalenderUser\">" . $Calendars . "</div>";
     }
     $TCalendars .= "</div>";
     $pCalButton = "";
     if (Session::isPluginLoaded("mpCal")) {
         $pCalButton = pCal::getTBButton();
         $pCalButton->type("icon");
         $pCalButton->style("margin-right:10px;");
     }
     $GoogleButton = "";
     $GoogleDLButton = "";
     if (Session::isPluginLoaded("mGoogle")) {
         $GoogleButton = LoginData::getButtonU("GoogleAccountUserPass", "Google-Daten bearbeiten", "./ubiquitous/Google/google.png");
         $GoogleButton->type("icon");
         $GoogleButton->style("margin-right:10px;");
         $GoogleDLButton = new Button("Daten herunterladen", "./ubiquitous/Google/googleDL.png", "icon");
         $GoogleDLButton->popup("", "Daten herunterladen", "Google", "-1", "syncByDateRange", array("'" . date("Y-m-d", $TC->getFirst()) . "'", "'" . date("Y-m-d", $TC->getLast()) . "'"));
         $GoogleDLButton->style("margin-right:10px;");
     }
     $xCalButton = "";
     if (Session::isPluginLoaded("mxCal")) {
         $xCalButton = xCal::getButton();
         $xCalButton->style("margin-right:10px;");
     }
     $BShare = new Button("Kalender teilen", "fork", "iconicL");
     $BShare->popup("", "Kalender teilen", "mKalender", "-1", "share");
     $BShare->style("margin-right:10px;");
     #$AWVButton = new Button("Müllabfuhr-Daten herunterladen", "trash_stroke", "iconicL");
     #$AWVButton->popup("", "Müllabfuhr-Daten", "mKalender", "-1", "downloadTrashData");
     $AWVButton = "";
     $ST->addRow($pCalButton . $GoogleButton . $GoogleDLButton);
     $html .= "\n\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"padding-top:30px;padding-bottom:15px;padding-left:0px;\">\n\t\t\t\t\t{$newWindow}{$BShare}{$AWVButton}{$xCalButton}{$reminder}\n\t\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<div style=\"margin-right:270px;\">\n\t\t<div id=\"KalenderTitle\" class=\"prettyTitle\">\n\t\t\t\n\t\t\t<span style=\"float:right;\">\n\t\t\t\t{$BLeft}{$BToday}{$BRight}\n\t\t\t</span>\n\t\t\t<div style=\"float:right;margin-right:100px;\">{$BTag}{$BWoche}{$BMonat}{$BJahr}</div>\n\t\t\t" . $TC->getTitle() . "\n\t\t</div>\n\t\t</div>\n\t\t<div id=\"KalenderAuswahl\">\n\t\t\t{$TCalendars}\n\t\t</div>\n\t\t" . $TC->getHeader() . "\n\t\t<div id=\"KalenderWrapper\" style=\"overflow:auto;\">\n\t\t\t" . ($ansicht != "jahr" ? "\n\t\t\t<div style=\"width:205px;float:right;margin-right:40px;\">\n\t\t\t\t<div style=\"height:23px;\"></div>{$ST}\n\t\t\t</div>" : "") . "\n\t\t\t<div style=\"" . ($ansicht != "jahr" ? "margin-right:270px;" : "") . "\">\n\n\t\t\t" . $TC->getTable($this) . "\n\t\t\t</div>\n\t\t</div>";
     $nextMonths = new Datum();
     $nextMonths->setToMonth1st();
     $thisMonth = $nextMonths->time();
     $nextMonths->addMonth();
     $nextMonth = $nextMonths->time();
     $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar1stMonth').datepicker({ minDate: '" . date("d.m.Y", $thisMonth) . "'" . ($TC->getCurrent()->time() < $nextMonth ? ",defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true,  showOtherMonths: true, onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t\t\t\n\t\t\$j('.KalenderUser div[class!=backgroundColor1]').hover(function(){ \$j(this).addClass('backgroundColor2'); }, function(){ \$j(this).removeClass('backgroundColor2'); });\n\t\tfitKalender();\n\t\t\t\n\t\t\$j(window).resize(function() {\n\t\t\tfitKalender();\n\t\t});\n\t\t\n\t\t});\n\t\t\n\t\tfunction fitKalender(){\n\t\t\tif(!\$j('#KalenderTitle').length)\n\t\t\t\treturn;\n\t\t\t\n\t\t\t//console.log(\$j('#KalenderTitle').outerHeight());\n\t\t\t//console.log(\$j('#KalenderAuswahl').outerHeight());\n\t\t\tvar height = (contentManager.maxHeight() - \$j('#KalenderAuswahl').outerHeight() - \$j('#KalenderTitle').outerHeight() - \$j('#KalenderHeader').outerHeight()) + 4;\n\t\t\tvar width = contentManager.maxWidth();\n\t\t\t\n\t\t\t\$j('#KalenderWrapper').css('height', height);\n\t\t\t\$j('#KalenderWrapper').css('width', width);\n\n\t\t\tvar cellHeight = (height - \$j('#KalenderTable tr:first th').parent().outerHeight()) / (\$j('#KalenderTable tr').length - " . (($ansicht == "monat" or $ansicht == "jahr") ? "1" : "0") . ") - 1;\n\t\t\t\$j('.cellHeight').css('height', cellHeight+'px');\n\t\t\t\$j('.innerCellHeight').css('height', (cellHeight - \$j('.innerCellTitle:visible').outerHeight())+'px');\n\t\t\t\n\t\t\tif(\$j('#KalenderHeader').length > 0){\n\t\t\t\t//console.log(\$j('#KalenderHeader tr:first th'));\n\t\t\t\t\$j('#KalenderTable tr:first td').each(function(k, v){\n\t\t\t\t\t\n\t\t\t\t\t\$j(\$j('#KalenderHeader tr:first th')[k]).css('width', \$j(v).width());\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\tif(\$j('#tagDiv').length) {\n\t\t\t\t\$j('#tagDiv').css('width', \$j('#KalenderTable tr').width()+'px');\n\t\t\t\t\$j('#tagDiv').animate({scrollTop: 7*40}, 0);\n\t\t\t\tvar pos = \$j('#tagDiv').offset();\n\t\t\t\tpos.position = 'absolute';\n\n\t\t\t\t\$j('#tagDiv').css(pos)\n\t\t\t}\n\t\t}") . "\n\t\t<style type=\"text/css\">\n\t\t\t" . ($TC->getCurrent()->time() < $thisMonth ? "#calendar1stMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t" . ($TC->getCurrent()->time() < $nextMonth ? "#calendar2ndMonth .ui-state-default { border: 1px solid #D3D3D3; background-color:transparent; }" : "") . "\n\t\t\t.ui-datepicker-week-col { color:grey; text-align:left; }\n\t\t\ttr td.ui-datepicker-week-col {text-align:left;font-size:10px; }\n\t\t\t/*.ui-datepicker-week-end { background-color:#DDD; }*/\n\t\t</style>";
     $html .= OnEvent::script("\$j(function() {\n\t\t\$j('#calendar2ndMonth').datepicker({ minDate: '" . date("d.m.Y", $nextMonth) . "'" . ($TC->getCurrent()->time() >= $nextMonth ? ", defaultDate: '" . date("d.m.Y", $TC->getCurrent()->time()) . "'" : "") . ", showWeek: true, showOtherMonths: true,  onSelect: function(dateText, inst) { var day = Math.round(+new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay, 0, 1, 0)/1000); " . OnEvent::rme($this, "setView", array("'tag'", "day"), "function(){ " . OnEvent::reload("Screen") . " }") . " } });\n\t});");
     return $html;
 }
 public function getListTable()
 {
     $T = new HTMLTable(2);
     $T->maxHeight(400);
     $T->setColWidth(2, 30);
     $T->weight("light");
     $T->useForSelection(false);
     $AC = anyC::get("Einkaufszettel", "EinkaufszettelBought", "0");
     $AC->addOrderV3("EinkaufszettelTime", "DESC");
     while ($E = $AC->getNextEntry()) {
         $BT = new Button("Löschen", "trash_stroke", "iconicL");
         #$BT->onclick();
         $T->addRow(array(($E->A("EinkaufszettelMenge") > 1 ? $E->A("EinkaufszettelMenge") . " x " : "") . $E->A("EinkaufszettelName") . ($E->A("EinkaufszettelNameDetails") != "" ? "<br /><small style=\"color:grey;\">" . $E->A("EinkaufszettelNameDetails") . "</small>" : ""), $BT));
         $T->addRowStyle("font-size:20px;");
         $T->addRowEvent("click", OnEvent::rme($E, "deleteMe", "", OnEvent::reloadPopup("mEinkaufszettel")));
         #$T->addCellEvent(1, "click", OnEvent::rme($this, "boughtItem", $E->getID(), "function(transport){ \$j('#currentList').html(transport.responseText); }"));
     }
     if ($AC->numLoaded() == 0) {
         $T->addRow(array("Die Einkaufsliste enthält keine Einträge."));
         $T->addRowColspan(1, 2);
     }
     return $T . OnEvent::script("\$j('#currentList div div').css('max-height', contentManager.maxHeight() - \$j('#headerList').outerHeight());");
 }