Exemplo n.º 1
0
 private function getNav($parentID, $domain)
 {
     $mNav = new anyC();
     $mNav->setCollectionOf("Navigation");
     $mNav->addAssocV3("parentID", "=", $parentID);
     $mNav->addAssocV3("DomainID", "=", $domain);
     $mNav->addOrderV3("sort");
     $mNav->lCV3();
     if ($mNav->numLoaded() == 0) {
         return;
     }
     $html = "\n\t\t<ul style=\"list-style-image:none;list-style-type:none;\" id=\"sortable_{$parentID}\">";
     while ($n = $mNav->getNextEntry()) {
         $B = new Button("Element bearbeiten", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("contentManager.loadFrame('contentLeft','Navigation','" . $n->getID() . "');");
         $B->style("float:left;margin-right:10px;");
         $D = new Button("Element löschen", "./images/i2/delete.gif");
         $D->type("icon");
         $D->onclick("deleteClass('Navigation','" . $n->getID() . "', function() { contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' &amp;&amp; lastLoadedLeft == '1') \$('contentLeft').update(''); },'Element und alle Unterelemente wirklich löschen?');");
         $D->style("float:right;margin-right:10px;");
         $html .= "<li id=\"NavigationElementID_" . $n->getID() . "\" style=\"" . ($n->A("hidden") == "1" ? "text-decoration:line-through;" : "") . "\">{$D}<img src=\"./images/i2/topdown.png\" class=\"navigationHandler_sortable_{$parentID}\"\" style=\"cursor:pointer;float:right;margin-right:10px;\" />{$B}" . ($n->A("name") == "" ? "&lt;kein Name&gt;" : $n->A("name")) . $this->getNav($n->getID(), $domain) . "</li>";
     }
     #
     $html .= "\n\t\t</ul>\n\t\t<script type=\"text/javascript\">Website.add('sortable_{$parentID}');</script>";
     return $html;
 }
 public function getHTML($id)
 {
     try {
         $U = new mUserdata();
         $U->addAssocV3("typ", "=", $_SESSION["applications"]->getActiveApplication() . "DesktopLink");
         $U->addAssocV3("UserID", "=", $_SESSION["S"]->getCurrentUser()->getID());
         $U->addOrderV3("wert");
         $U->addOrderV3("UserdataID");
         $U->lCV3();
     } catch (Exception $e) {
         return "";
     }
     $html = "";
     while ($t = $U->getNextEntry()) {
         $e = explode(";", $t->A("name"));
         $v = explode(";", $t->A("wert"));
         $B = new Button($v[2], $v[1]);
         $B->type("icon");
         $B->onclick("DesktopLink.hide(); contentManager.loadFrame('{$e['2']}', '{$e['0']}', '{$e['1']}')");
         $BS = new Button("Einstellungen", "./images/i2/settings.png");
         $BS->type("icon");
         $BS->className("DesktopLinkSettings");
         $BS->rmePCR("DesktopLink", "", "editInWindow", $t->getID(), "Popup.displayNamed('DesktopLinkPopup','Desktop-Link bearbeiten', transport);");
         $BM = new Button("Verschieben", "./images/i2/moveLeftRight.png");
         $BM->type("icon");
         $BM->className("DesktopLinkHandler");
         $html .= "<li id=\"DesktopLink_" . $t->getID() . "\" class=\"DesktopLinkIcon\">{$BS}{$BM}{$B}" . "<p>" . $v[2] . "</p></li>";
     }
     if ($html != "") {
         echo "<ul id=\"DesktopLinkElements\">{$html}</ul><div style=\"clear:both;\"></div>";
     }
 }
Exemplo n.º 3
0
 public static function textParser($w, $E)
 {
     $B = new Button("in HTML-Editor bearbeiten", "./multiCMS/Content/html.png");
     $B->type("icon");
     $B->style("float:left;margin-right:5px;");
     $B->windowRme("Wysiwyg", "", "getEditor", "", "WysiwygGUI;FieldClass:Content;FieldClassID:" . $E->getID() . ";FieldName:text");
     return $B . substr(strip_tags($w, "<a><i><b><strong><img>"), 0, 150);
 }
Exemplo n.º 4
0
 public static function nameParser($w, $E)
 {
     $B = new Button("display episodes", "./images/i2/folder.png");
     $B->style("float:left;margin-right:5px;");
     $B->type("icon");
     $B->onclick("contentManager.loadFrame('contentLeft','mFolge',-1,0,'mFolgeGUI;SerieID:" . $E->getID() . "');");
     return $B . $w;
 }
Exemplo n.º 5
0
 function getHTML($id)
 {
     $this->loadMeOrEmpty();
     $gui = new HTMLGUI2();
     $gui->setObject($this);
     $gui->setName("Serie");
     $gui->setShowAttributes(array("name", "sprache", "dir", "lastupdate", "genre", "description", "status", "quality", "RSSFilterID", "altFeedName1", "altFileName1"));
     #$gui->setType("adapter", "hidden");
     #$gui->setType("lastupdate", "readonly");
     #$gui->setType("siteID", "hidden");
     #$gui->setType("url", "hidden");
     $gui->setType("description", "textarea");
     $gui->setLabel("sprache", "Language");
     $gui->setLabel("lastupdate", "Last update");
     $gui->setLabel("RSSFilterID", "RSS feed");
     $gui->setLabel("altFileName1", "alt. file name");
     $gui->setLabel("altFeedName1", "alt. feed name");
     $gui->setFieldDescription("altFileName1", "This is useful if the filenames do not match the full series name. trinityDB will then look for both names on the harddrive. For example 'switch' instead of 'Switch Reloaded'.");
     $gui->setFieldDescription("altFeedName1", "This is useful if the feed names do not match the full series name. trinityDB will then look for both names in the feeds. For example 'Human.Target.2010' instead of 'Human Target (2010)'.");
     $gui->setParser("lastupdate", "SerieGUI::lastUpdateParser");
     $gui->setType("quality", "select");
     $gui->setOptions("quality", array_keys(self::getQualities()), array_values(self::getQualities()));
     $gui->setType("sprache", "select");
     $gui->setOptions("sprache", array("en", "de"), array("english", "deutsch"));
     $gui->setStandardSaveButton($this);
     $gui->insertSpaceAbove("RSSFilterID");
     $gui->selectWithCollection("RSSFilterID", new mRSSFilterGUI(), "RSSFilterName", "none");
     $tab = new HTMLSideTable("right");
     $B = new Button("Download\nepisodes", "./trinityDB/Serien/Updates.png");
     #$B->rmePCR("Serie", $this->ID, "downloadEpisodes", array("'1'"), "Popup.display('Download-Status', transport);");
     $B->popup("", "Download-Status", "Serie", $this->ID, "downloadEpisodes", array("'1'"));
     $S = new Button("Settings", "./images/i2/settings.png");
     $S->type("icon");
     $S->style("float:right;margin-right:-20px;");
     $S->contextMenu("Serie", "download", "Settings");
     $tab->addRow($S . $B);
     $B = new Button("Show\nepisodes", "./trinityDB/Serien/Folge.png");
     $B->onclick("contentManager.loadFrame('contentLeft','mFolge',-1,0,'mFolgeGUI;SerieID:" . $this->getID() . "');");
     $tab->addRow($B);
     #$B = new Button("Find new\nepisodes","./trinityDB/RSSFilter/RSSFilter.png");
     #$B->rmePCR("Serie", $this->ID, "checkRSS", "", "Popup.display('Episoden-Status', transport);");
     #$tab->addRow($B);
     $B = new Button("Check\nepisodes", "okCatch");
     $B->rmePCR("Serie", $this->ID, "checkAllEpisodes", "", "Popup.display('Episoden-Status', transport);");
     $tab->addRow($B);
     $Image = new Button("", DBImageGUI::imageLink("Serie", $this->getID(), "cover", false, true), "icon");
     $Image->style("width:150px;");
     $tab->addRow(array($Image));
     return $tab . $gui->getEditHTML();
 }
Exemplo n.º 6
0
 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck($this->getClearClass());
     $t = new HTMLTable(2, $this->tableLabel);
     $t->addColStyle(1, "width:20px;");
     $FB = new FileBrowser();
     $FB->addDir($this->directory);
     $w = $FB->getAsLabeledArray("iFileBrowser", ".class.php");
     foreach ($w as $k => $v) {
         $B = new Button("", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("contentManager.loadFrame('contentLeft','{$v}');");
         $t->addRow(array($B, "{$k}"));
     }
     return $t->getHTML();
 }
Exemplo n.º 7
0
 public function getHTML($id)
 {
     $gui = new HTMLGUI();
     $gui->VersionCheck("mTool");
     $FB = new FileBrowser();
     $FB->addDir("../PM/GoD");
     $files = $FB->getAsLabeledArray("iPMTool", ".class.php", true);
     $tab = new HTMLTable(2, "Tools");
     $tab->setColWidth(1, "20px");
     foreach ($files as $key => $value) {
         $B = new Button("", "./images/i2/edit.png");
         $B->type("icon");
         $B->onclick("loadFrameV2('contentLeft','{$value}');");
         $tab->addRow(array($B, $key));
     }
     return $tab;
 }
Exemplo n.º 8
0
 public function buildTabBar()
 {
     $widths = Aspect::joinPoint("changeWidths", $this, __METHOD__);
     if ($widths == null and $this->size == "CRM") {
         $widths = array(700);
     }
     if ($this->size == "defaultLeft") {
         $widths = array(410);
     }
     $cTab = mUserdata::getUDValueS("TabBarLastTab{$this->className}", "none");
     $cTab = Aspect::joinPoint("lastTab", $this, __METHOD__, array($this->className, $cTab), $cTab);
     if (count($this->tabBar) == 0) {
         return "";
     }
     $bar = "";
     if (count($this->tabBar) > 0) {
         $bar = "\n\t\t\t<div style=\"width:{$widths['0']}px;margin-top:30px;padding-left:10px;padding-bottom:5px;\" class=\"backgroundColor4\">";
     }
     foreach ($this->tabBar as $value) {
         $B = new Button($value[1], $value[2]);
         $B->type("icon");
         $B->style("float:left;margin-right:5px;");
         if (!is_object($value[0])) {
             $id = "null";
             $onClick = $value[0];
         } else {
             $id = get_class($value[0]);
             $onClick = "Interface.TabBarActivate(this, '{$id}', '{$this->className}');";
         }
         $bar .= "\n\t\t\t\t<div\n\t\t\t\t\tid=\"tab_{$id}\"\n\t\t\t\t\tstyle=\"float:left;width:110px;padding:3px;cursor:pointer;-moz-user-select:none;margin-top:5px;overflow:hidden;white-space:nowrap;\"\n\t\t\t\t\tonmouseover=\"if(this.className != 'navBackgroundColor') this.className = 'backgroundColor2';\"\n\t\t\t\t\tonmouseout=\"if(this.className != 'navBackgroundColor') this.className = '';\"\n\t\t\t\t\tonclick=\"{$onClick}\">\n\t\t\t\t\t{$B}\n\t\t\t\t\t<p style=\"margin-top:3px;padding:0px;padding-top:5px;\">{$value['1']}</p>\n\t\t\t\t</div>";
         if ($id == $cTab) {
             $bar .= "<script type=\"text/javascript\">Interface.TabBarActivate(\$('tab_{$id}'), '{$id}');</script>";
         }
     }
     $bar .= "<div style=\"clear:both;\"></div>\n\t\t\t</div>\n\t\t\t<div style=\"clear:both;margin-bottom:-5px;\"></div>";
     foreach ($this->tabBar as $key => $value) {
         if (!is_object($value[0])) {
             continue;
         }
         $bar .= "<div id=\"" . get_class($value[0]) . "\" style=\"display:none;" . ($this->tabContainer[$key] === true ? "padding:10px;" : "") . "\"><p class=\"prettyTitle\">" . $this->tabBar[$key][1] . "</p>" . $value[0]->getHTML(-1, 0) . "</div>";
     }
     return $bar;
 }
Exemplo n.º 9
0
 public function setPath()
 {
     $bps = $this->getMyBPSData();
     #Aspect::registerOnetimePointCut("aboveList", "GUIFactory::getContainer", "FileManagerGUI::adviceAboveList");
     $rootDir = null;
     if ($bps != -1 and isset($bps["root"])) {
         $rootDir = preg_replace("/^([A-Z])%/", "\\1:", $bps["root"]);
     }
     #echo $rootDir;
     if ($rootDir != null) {
         $T = new HTMLTable(1);
         #$rel = "specifics/$rootDir";
         #$root = Util::getRootPath().$rel;
         $root = FileStorage::getFilesDir() . $rootDir;
         $_SESSION["BPS"]->setProperty("FileManagerGUI", "path", preg_replace("/^([A-Z]):/", "\\1%", $root));
         $_SESSION["BPS"]->setProperty("FileManagerGUI", "root", preg_replace("/^([A-Z]):/", "\\1%", $root));
         $F = new File($root);
         $F->loadMe();
         if ($F->getA() == null) {
             if (is_writable(FileStorage::getFilesDir())) {
                 mkdir($root);
             } else {
                 $B = new Button("", "stop");
                 $B->type("icon");
                 $B->style("float:left;margin-right:10px;");
                 $T->addRow($B . "Das Verzeichnis <code>{$rel}</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt.");
                 return $T;
             }
         }
     }
     $bps = $this->getMyBPSData();
     //go again
     #print_r($bps);
     if (isset($bps["path"]) and strpos($bps["path"], $bps["root"]) === false) {
         $bps["path"] = preg_replace("/^([A-Z])%/", "\\1:", $bps["root"]);
     }
     #$bps["root"];
     if ($bps != -1 and isset($bps["path"])) {
         $this->setDir(preg_replace("/^([A-Z])%/", "\\1:", $bps["path"]));
     }
     return true;
 }
Exemplo n.º 10
0
 function getBrowserHTML($lineWithId = -1)
 {
     $this->texts = $this->languageClass->getBrowserTexts();
     $singularLanguageClass = $this->loadLanguageClass($this->singularClass);
     $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $this->singularClass);
     $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $this->singularClass);
     $userHiddenFields = mUserdata::getHides($this->singularClass);
     $defaultTarget = "contentRight";
     if ($this->displaySide != "default") {
         $defaultTarget = "content" . ucfirst($this->displaySide);
     }
     if ($this->singularClass == "none") {
         echo "collectionOf is not set. See message log for further details.";
         throw new CollectionOfNotSetException();
     }
     if ($this->name == "Noname") {
         $_SESSION["messages"]->addMessage("There is no name set. You might use setName of HTMLGUI to do that.");
     }
     /**
      * ERROR-TABLE
      */
     $errorTab = new HTMLTable(1);
     if (isset($_SESSION["phynx_errors"]) and $lineWithId == -1 and ($_SERVER["HTTP_HOST"] == "dev.furtmeier.lan" or strpos(__FILE__, "nemiah") !== false)) {
         $errorTab->addRow("\n\t\t\t\t\t<img style=\"float:left;margin-right:10px;\" src=\"./images/navi/warning.png\" />\n\t\t\t\t\t<b>Es " . (count($_SESSION["phynx_errors"]) != 1 ? "liegen" : "liegt") . " " . count($_SESSION["phynx_errors"]) . " PHP-Fehler vor:</b><br />\n\t\t\t\t\t<a href=\"javascript:windowWithRme('Util','','showPHPErrors','');\">Fehler anzeigen</a>,<br />\n\t\t\t\t\t<a href=\"javascript:rme('Util','','deletePHPErrors','','contentManager.reloadFrameRight();');\">Fehler löschen</a>");
     }
     /**
      * RETURN-BUTTON
      */
     $returnTab = new HTMLTable(1);
     if ($this->isSelection) {
         $BReturn = new Button("Auswahl\nbeenden", "back");
         $BReturn->onclick("contentManager.restoreFrame('content" . ucfirst($this->displaySide) . "','selectionOverlay');");
         #return "<input type=\"button\" value=\"zurück zu\n".$p2[$s[0]]."\" style=\"background-image:url(./images/navi/back.png);\" class=\"bigButton backgroundColor3\" onclick=\"loadFrameV2('contentRight','$s[0]');\" />";
         $returnTab->addRow($BReturn);
     }
     /**
      * DELETE-BUTTON
      */
     if ((!$this->onlyDisplayMode or $this->deleteInDisplayMode) and $userCanDelete and !$this->isSelection and $this->showDeleteButton) {
         $this->newColsRight["delete"] = "\n\t\t\t<span class=\"iconic trash_stroke\" onclick=\"deleteClass('" . $this->singularClass . "','%%VALUE%%', " . ($this->JSOnDelete == null ? "function() { " . ($this->displaySide == "left" ? "contentManager.reloadFrameLeft();" : "contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '%%VALUE%%') \$('contentLeft').update('');") . " }" : $this->JSOnDelete) . ",'" . str_replace("%1", $this->singularName, $this->texts["%1 wirklich löschen?"]) . "');\"></span>";
     } elseif (!$userCanDelete) {
         $this->newColsRight["delete"] = "<img src=\"./images/i2/empty.png\" />";
     }
     /**
      * EDIT-BUTTON
      */
     if (!isset($this->newColsLeft["select"]) and (!$this->onlyDisplayMode or $this->editInDisplayMode) and $this->showEditButton) {
         $EB = new Button("", "./images/i2/edit.png");
         $EB->type("icon");
         $EB->className("editButton");
         if ($this->JSOnEdit == null) {
             $EB->onclick("contentManager.selectRow(this); contentManager.loadFrame('contentLeft','" . $this->singularClass . "','%%VALUE%%','0');");
         } else {
             $EB->onclick($this->JSOnEdit);
         }
         $this->newColsLeft["select"] = $EB;
     }
     $cols = count($this->showAttributes) + count($this->newColsLeft) + count($this->newColsRight);
     $valuesTab = new HTMLTable($cols, $lineWithId == -1 ? $this->displaySide == "left" ? $this->name : "" : null);
     $valuesTab->addTableClass("contentBrowser");
     /*if(isset($this->newColsRight["delete"]) AND ($this->displaySide == "default" OR $this->displaySide == "right"))
     			$valuesTab->setColClass($cols, "backgroundColor0");
     		if(isset($this->newColsRight["delete"]) AND $this->displaySide == "left")
     			$valuesTab->setColClass(1, "backgroundColor0");*/
     /**
      * QUICKSEARCH
      */
     #$quickSearchRow = "";
     if ($this->quickSearchPlugin != "" and $lineWithId == -1) {
         list($quickSearchRow, $BSearchInfo) = $this->getQuicksearchField();
         if ($this->displaySide == "left") {
             $insertRow = array($quickSearchRow);
             for ($i = 1; $i < $cols - 1; $i++) {
                 $insertRow[] = "";
             }
             $insertRow[] = $BSearchInfo;
             $valuesTab->addRow($insertRow);
             $valuesTab->addRowColspan(1, $cols - 1);
         } else {
             $valuesTab->addRow(array($BSearchInfo, $quickSearchRow));
             $valuesTab->addRowColspan(2, $cols - 1);
         }
         $valuesTab->addRowClass("backgroundColorHeader");
     }
     if ($this->headerRow != null) {
         $valuesTab->addHeaderRow($this->headerRow);
     }
     /**
      * PAGE-BROWSER
      */
     #$multiPageRow = "";
     $separator = "";
     $userDefinedEntriesPerPage = false;
     $isMultiPageMode = false;
     if (count($this->multiPageMode) > 0) {
         $isMultiPageMode = true;
         $this->multiPageMode[3] = $defaultTarget;
         if ($this->multiPageMode[2] == 0) {
             $userDefinedEntriesPerPage = true;
             #$mU = new mUserdata();
             #$this->multiPageMode[2] = $mU->getUDValue("entriesPerPage{$this->multiPageMode[4]}");
             #if($this->multiPageMode[2] == null) $this->multiPageMode[2] = 20;
         }
         /*
         
         if($this->multiPageMode[1] == "undefined") $this->multiPageMode[1] = 0;
         
         $pages = ceil($this->multiPageMode[0] / $this->multiPageMode[2]);
         
         if($this->multiPageMode[1] != 0) $pageLinks = "<a href=\"javascript:contentManager.loadPage('$defaultTarget', '0');\">&nbsp;&lt;&lt;&nbsp;</a> ";
         else $pageLinks = "&nbsp;&lt;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != 0) $pageLinks .= "<a href=\"javascript:contentManager.backwardOnePage('$defaultTarget');\">&nbsp;&lt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&lt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.forwardOnePage('$defaultTarget');\">&nbsp;&gt;&nbsp;</a> ";
         else $pageLinks .= "&nbsp;&gt;&nbsp; ";
         
         if($this->multiPageMode[1] != $pages - 1) $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget',".($pages-1).");\">&nbsp;&gt;&gt;&nbsp;</a> | ";
         else $pageLinks .= "&nbsp;&gt;&gt;&nbsp; | ";
         
         $start = $this->multiPageMode[1] - 3;
         if($start < 0) $start = 0;
         
         $end = $this->multiPageMode[1] + 3;
         if($end > $pages - 1) $end = $pages - 1;
         
         for($i=$start; $i<=$end; $i++)
         	if($this->multiPageMode[1] != "$i") $pageLinks .= "<a href=\"javascript:contentManager.loadPage('$defaultTarget','".$i."');\">".($i+1)."</a> ";
         	else $pageLinks .= ($i+1)." ";
         
         	$pageLinks = "".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": ".$pageLinks;
         */
         if ($this->displaySide == "left") {
             $pageLinks = "<span style=\"float:right;\">" . $this->getMultiPageButtons() . "</span>";
         } else {
             $pageLinks = $this->getMultiPageButtons();
         }
         /*if($lineWithId == -1) $multiPageRow = "
         					<tr>
         						".($userDefinedEntriesPerPage ? "<td><img class=\"mouseoverFade\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','multiPageSettings:{$this->multiPageMode[4]}','".$this->texts["Einstellungen"].":');\" /></td>" : "")."
         						<td colspan=\"".($colspan+1+($userDefinedEntriesPerPage ? 0 : 1))."\"><input type=\"text\"onkeydown=\"if(event.keyCode == 13) loadFrameV2('".$this->multiPageMode[3]."','".$this->multiPageMode[4]."','',this.value - 1);\" style=\"width:30px;float:right;text-align:right;\" value=\"".($this->multiPageMode[1]+1)."\" onfocus=\"focusMe(this);\" onblur=\"blurMe(this);\" />".$this->multiPageMode[0]." ".($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"])."<!--, ".$pages." ".($pages != 1 ? $this->texts["Seiten"] : $this->texts["Seite"])."--></td>
         					</tr>
         					<tr>
         						<td colspan=\"$determinedNumberofCols\">".($pages == 0 ? 1 : $pages)." ".(($pages == 0 ? 1 : $pages) != 1 ? $this->texts["Seiten"] : $this->texts["Seite"]).": $pageLinks</td>
         					</tr>";
         
         
         */
         if ($lineWithId == -1) {
             $BSettings = $this->getPageOptionsButton();
             #$IPage = $this->getPageSelectionField();
             #$IPage->style("width:30px;float:right;text-align:right;");
             $pageOptions = $this->multiPageMode[0] . " " . ($this->multiPageMode[0] == 1 ? $this->texts["Eintrag"] : $this->texts["Einträge"]) . ", {$pageLinks}";
             if (!$userDefinedEntriesPerPage) {
                 $valuesTab->addRow(array($pageOptions));
                 $valuesTab->addRowColspan(1, $cols);
             } else {
                 if ($this->displaySide == "left") {
                     $insertRow = array($pageOptions);
                     for ($i = 1; $i < $cols - 1; $i++) {
                         $insertRow[] = "";
                     }
                     $insertRow[] = $BSettings;
                     $valuesTab->addRow($insertRow);
                     #$valuesTab->addRow(array($pageOptions,$BSettings));
                     $valuesTab->addRowColspan(1, $cols - 1);
                 } else {
                     /*$insertRow = array($BSettings);
                     		for($i=1; $i<$cols-1; $i++)
                     			$insertRow[] = "";
                     		$insertRow[] = $pageOptions;
                     		$valuesTab->addRow($insertRow);*/
                     $valuesTab->addRow(array($BSettings, $pageOptions));
                     $valuesTab->addRowColspan(2, $cols - 1);
                 }
             }
             $valuesTab->addRowClass("backgroundColorHeader");
             #$valuesTab->addRow(array($pageLinks));
             #$valuesTab->addRowColspan(1, $cols);
             #$valuesTab->addRowClass("backgroundColorHeader");
             $valuesTab->addRow("");
             $valuesTab->addRowColspan(1, $cols);
             $valuesTab->addRowClass("backgroundColor0 browserSeparatorTop");
         }
     }
     $filteredCol = null;
     if ($lineWithId == -1 and $this->showFilteredCategoriesWarning != null and $this->showFilteredCategoriesWarning[0]) {
         $dB = new Button($this->texts["Filter löschen"], "./images/i2/delete.gif");
         $dB->style("float:right;");
         $dB->type("icon");
         $dB->rme("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->showFilteredCategoriesWarning[1]}'"), "if(checkResponse(transport)) contentManager.reloadFrameRight();");
         /*$separator = "
         		<tr>
         			<td class=\"backgroundColor0\"".((isset($this->showFilteredCategoriesWarning[0]) AND $this->showFilteredCategoriesWarning[0] == true) ? "<img src=\"./images/i2/note.png\" /></td><td class=\"backgroundColor0\" colspan=\"".($determinedNumberofCols - 2)."\" style=\"color:grey;\" >".$this->texts["Anzeige wurde gefiltert"]."</td><td class=\"backgroundColor0\">$dB</td>" : " >")."</td>
         		</tr>";*/
         $filteredCol = array("<img src=\"./images/i2/note.png\" />", $dB . $this->texts["Anzeige wurde gefiltert"]);
         $valuesTab->addRow($filteredCol);
         $valuesTab->addRowColspan(2, $cols - 1);
         $valuesTab->addRowClass("backgroundColor0");
         $valuesTab->addRowStyle("color:grey;");
     }
     /**
      * NEW-BUTTON
      */
     if (!$this->onlyDisplayMode and $userCanCreate and $this->showNewButton and $lineWithId == -1) {
         $BNew = new Button("", "./images/i2/new.gif");
         $BNew->type("icon");
         $BNew->id("buttonNewEntry{$this->singularClass}");
         #$BNew->onclick($this->JSOnNew == null ? "contentManager.newClassButton('$this->singularClass','');" : $this->JSOnNew);
         if ($this->displaySide == "left") {
             #$valuesTab->addRow(array("<b>$this->singularName neu anlegen</b>",$BNew));
             #$valuesTab->addRowColspan(1, $cols-1);
         } else {
             $valuesTab->addRow(array($BNew, "<b>{$this->singularName} neu anlegen</b>"));
             $valuesTab->addRowColspan(2, $cols - 1);
             $valuesTab->addRowEvent("click", $this->JSOnNew == null ? "contentManager.newClassButton('{$this->singularClass}','');" : $this->JSOnNew);
             $valuesTab->addRowStyle("cursor:pointer;");
         }
         #$valuesTab->addRowColspan(2, $cols-1);
     }
     /**
      * TABLE-CONTENT
      */
     $displayGroup = null;
     for ($i = 0; $i < count($this->attributes); $i++) {
         $aid = $this->attributes[$i]->getID();
         // get the id of an object separately
         $sc = $this->attributes[$i]->getA();
         // get the attributes-object from the object
         if ($this->displayGroupBy != null) {
             $displayGroupField = $this->displayGroupBy;
             if ($sc->{$displayGroupField} != $displayGroup and $i > 0) {
                 $valuesTab->addRow("");
                 $valuesTab->addRowClass("backgroundColor0");
             }
         }
         $row = array();
         $styles = array();
         if ($this->displaySide == "left") {
             $colsLeft = $this->newColsRight;
             $colsRight = $this->newColsLeft;
         } else {
             $colsLeft = $this->newColsLeft;
             $colsRight = $this->newColsRight;
         }
         if (count($colsLeft) > 0) {
             foreach ($colsLeft as $key => $value) {
                 $row[] = str_replace("%%VALUE%%", $aid, $value);
                 $valuesTab->setColWidth(count($row), "20px");
             }
         }
         foreach ($this->showAttributes as $key => $value) {
             if (isset($userHiddenFields[$value])) {
                 continue;
             }
             if (isset($this->parsers[$value])) {
                 $t = $this->invokeParser($this->parsers[$value], $sc->{$value}, $this->makeParameterStringFromArray($this->parserParameters[$value], $sc, $aid));
             } else {
                 $t = htmlspecialchars($sc->{$value});
             }
             if ($this->multiEditMode != null and in_array($value, $this->multiEditMode)) {
                 $posInArray = array_search($value, $this->multiEditMode);
                 if ($this->multiEditModeInputs[$posInArray] == null) {
                     $MI = new HTMLInput($value . "ID{$aid}", "multiInput", $sc->{$value}, array($this->singularClass, $aid, $value));
                     if ($this->multiEditModeStyle != null) {
                         $MI->style($this->multiEditModeStyle[$posInArray]);
                     }
                 } else {
                     $MI = clone $this->multiEditModeInputs[$posInArray];
                     $MI->setValue($sc->{$value});
                     $MI->activateMultiEdit($this->singularClass, $aid);
                 }
                 $t = $MI;
             }
             #<td id=\"Browser".$value."$aid\" ".(isset($this->colStyles[$value]) ? "style=\"".$this->colStyles[$value]."\"" : "").">".$t."</td>";
             $row[] = $t;
             if (isset($this->colStyles[$value])) {
                 $styles[count($row)] = $this->colStyles[$value];
             }
         }
         if (count($colsRight) > 0) {
             foreach ($colsRight as $key => $value) {
                 $row[] = str_replace("%%VALUE%%", $aid, $value);
                 $valuesTab->setColWidth(count($row), "20px");
             }
         }
         $valuesTab->addRow($row);
         if (count($styles) > 0) {
             foreach ($styles as $col => $s) {
                 $valuesTab->addColStyle($col, $s);
             }
         }
         $valuesTab->setRowID("BrowserMain{$aid}");
         #foreach($this->showAttributes as $key => $value) {
         #	$valuesTab->addCellID($cellNo, "Browser".$value."$aid");
         #}
         if ($this->displayGroupBy != null) {
             $displayGroup = $sc->{$displayGroupField};
         }
     }
     if ($filteredCol !== null) {
         $valuesTab->addRow($filteredCol);
         $valuesTab->addRowColspan(2, $cols - 1);
         $valuesTab->addRowClass("backgroundColor0");
         $valuesTab->addRowStyle("color:grey;");
     }
     if ($lineWithId == -1 and $isMultiPageMode) {
         $valuesTab->addRow("");
         $valuesTab->addRowColspan(1, $cols);
         $valuesTab->addRowClass("backgroundColor0 browserSeparatorBottom");
         if (!$userDefinedEntriesPerPage) {
             $valuesTab->addRow(array($pageOptions));
             $valuesTab->addRowColspan(1, $cols);
         } else {
             if ($this->displaySide == "left") {
                 $valuesTab->addRow(array($pageOptions, $BSettings));
                 $valuesTab->addRowColspan(1, $cols - 1);
             } else {
                 $valuesTab->addRow(array($BSettings, $pageOptions));
                 $valuesTab->addRowColspan(2, $cols - 1);
             }
         }
         $valuesTab->addRowClass("backgroundColorHeader");
         #$valuesTab->addRow(array($pageLinks));
         #$valuesTab->addRowColspan(1, $cols);
         #$valuesTab->addRowClass("backgroundColorHeader");
     }
     if (count($this->attributes) == 0) {
         $valuesTab->addRow(array("keine Einträge"));
         $valuesTab->addRowColspan(1, $cols);
     }
     if ($lineWithId != -1) {
         $valuesTab = $valuesTab->getHTMLForUpdate();
     }
     return $errorTab . $returnTab . $valuesTab . ($lineWithId == -1 ? $this->tip : "");
 }
Exemplo n.º 11
0
 public function getPopupManager($rootDir = null, $class = null, $classID = null, $usePool = false, $fieldDefaultFile = "", $uploadTargetFilename = null)
 {
     if ($rootDir != null) {
         $T = new HTMLTable(1);
         #$rel = "$rootDir";
         $root = FileStorage::getFilesDir() . $rootDir;
         $_SESSION["BPS"]->setProperty("mFileGUI", "path", $root);
         $_SESSION["BPS"]->setProperty("mFileGUI", "root", $root);
         $F = new File($root);
         $F->loadMe();
         if ($F->getA() == null) {
             if (is_writable(FileStorage::getFilesDir())) {
                 mkdir($root, 0777, true);
             } else {
                 $B = new Button("", "stop");
                 $B->type("icon");
                 $B->style("float:left;margin-right:10px;");
                 $T->addRow($B . "Das Verzeichnis <code>{$rootDir}</code> existiert nicht und kann nicht automatisch angelegt werden, da keine Schreibberechtigung für <code>specifics</code> vorliegt.");
                 die($T);
             }
         }
     }
     $bps = $this->getMyBPSData();
     if (strpos($bps["path"], $bps["root"]) === false) {
         $bps["path"] = $bps["root"];
     }
     if ($bps != -1 and isset($bps["path"])) {
         $this->setDir($bps["path"]);
     }
     $this->hideDirs(true);
     $gui = new HTMLGUIX();
     $gui->object($this);
     $cols = array();
     if ($fieldDefaultFile != "") {
         $C = new $class($classID);
         self::$fieldDefaultFile = array($C, $C->A($fieldDefaultFile), $fieldDefaultFile);
         $cols[] = "isDefault";
         $gui->colWidth("isDefault", 20);
         $gui->parser("isDefault", "mFileGUI::parserDefault");
     }
     $cols[] = "FileName";
     $gui->attributes($cols);
     $gui->parser("FileName", "mFileGUI::nameParser2");
     $gui->options(true, false, false);
     $gui->name("Datei");
     $gui->addToEvent("onDelete", OnEvent::reloadPopup("mFile"));
     $oldFiles = "";
     if ($class != null and $classID != null) {
         $AC = anyC::get("Datei", "DateiClassID", $classID);
         $AC->addAssocV3("DateiClass", "=", $class);
         $oldFiles = new HTMLTable(2, "Verknüpfte Dateien");
         while ($F = $AC->getNextEntry()) {
             $BDL = new Button("Datei herunterladen", "./plugins/Files/download.png", "icon");
             $BDL->onclick("windowWithRme('File','" . $F->A("DateiPath") . "','download','');");
             $BDL->style("float:right;");
             $oldFiles->addRow(array($BDL . $F->A("DateiName")));
         }
     }
     $BPool = new Button("Pool\nanzeigen", "./lightCRM/Mail/images/attach.png");
     $BPool->style("float:right;margin:10px;");
     $BPool->onclick(OnEvent::popupSidePanel("mFile", -1, "sidePanelPool", array("'{$class}Pool'", "'{$rootDir}'")));
     if ($usePool and $rootDir) {
         echo $BPool . "<div style=\"clear:both;\"></div>";
         if (file_exists(FileStorage::getFilesDir() . "{$class}Pool")) {
             echo OnEvent::script("window.setTimeout(function(){ if(\$j('#editDetailsmFileSidePanel').length > 0) return; " . OnEvent::popupSidePanel("mFile", -1, "sidePanelPool", array("'{$class}Pool'", "'{$rootDir}'")) . "}, 100);");
         }
     }
     $F = new HTMLForm("fileUpload", array("datei"));
     $s = array("path" => $bps["path"], "class" => "File");
     if ($uploadTargetFilename != null) {
         $s["targetFilename"] = $uploadTargetFilename;
     }
     $F->setType("datei", "file", null, $s);
     $F->addJSEvent("datei", "onChange", OnEvent::reloadPopup("mFile"));
     $F->getTable()->setColWidth(1, 120);
     echo "<p class=\"prettyTitle\">/" . basename($bps["path"]) . "</p><p style=\"color:grey;margin-top:-15px;margin-bottom:10px;\"><small>" . dirname(realpath($bps["path"])) . "</small></p>" . $F . $gui->getBrowserHTML(-1) . $oldFiles;
 }
Exemplo n.º 12
0
 public static function folgeParser($w, $E)
 {
     #$p = HTMLGUI::getArrayFromParametersString($p);
     $icon = "stop";
     if (isset(mFolgeGUI::$found[$E->getID()])) {
         $icon = "note";
     }
     $F = new Folge($w);
     #return $F->getNewFileName(mFolgeGUI::$Serie, "avi");
     if ($F->fileExists(mFolgeGUI::$Serie)) {
         $icon = "okCatch";
     }
     $B = new Button("", "./images/i2/{$icon}.png");
     $B->type("icon");
     if ($icon == "note") {
         $B->rmePCR("Folge", $E->getID(), "renameFile", addslashes(mFolgeGUI::$found[$E->getID()]), "contentManager.reloadFrame('contentLeft');");
     }
     return $B;
 }
Exemplo n.º 13
0
 public function getHTML($id)
 {
     if ($_SESSION["S"]->checkIfUserLoggedIn() == true) {
         return -1;
     }
     $es = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
     $ts = $_SESSION["CurrentAppPlugins"]->getMenuTargets();
     $icons = $_SESSION["CurrentAppPlugins"]->getIcons();
     $appIco = $_SESSION["applications"]->getApplicationIcon($_SESSION["applications"]->getActiveApplication());
     if (isset($_COOKIE["phynx_color"]) and $_COOKIE["phynx_color"] != "standard") {
         $suffix = strrchr($appIco, ".");
         $newLogo = str_replace($suffix, ucfirst($_COOKIE["phynx_color"]) . $suffix, $appIco);
         if (file_exists("." . $newLogo)) {
             $appIco = $newLogo;
         }
     }
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     $newAppIco = Aspect::joinPoint("appLogo", $this, __METHOD__);
     if ($newAppIco != null) {
         $appIco = $newAppIco;
     }
     // </editor-fold>
     $appMenuHidden = "";
     $appMenuDisplayed = "";
     $appMenuActive = (!$_SESSION["S"]->isUserAdmin() and (!isset($_COOKIE["phynx_layout"]) or $_COOKIE["phynx_layout"] == "fixed" or $_COOKIE["phynx_layout"] == "horizontal" or $_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical"));
     // <editor-fold defaultstate="collapsed" desc="Aspect:jP">
     $aspectAppMenuActive = Aspect::joinPoint("appMenuActive", $this, __METHOD__);
     if ($aspectAppMenuActive !== null) {
         $appMenuActive = $aspectAppMenuActive;
     }
     // </editor-fold>
     $appIco = Environment::getS("ApplicationIcon:" . Applications::activeApplication(), $appIco);
     if ($appIco != "") {
         if (count($_SESSION["applications"]->getApplicationsList()) > 1 and !$_SESSION["S"]->isAltUser()) {
             echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden/Anwendung wechseln\" title=\"Abmelden/Anwendung wechseln\" onclick=\"" . Environment::getS("onLogout", "phynxContextMenu.start(this, 'Menu','1','Anwendung wechseln:','right');") . "\" />";
         } else {
             echo "<img src=\"{$appIco}\" style=\"margin-left:10px;float:left;\" alt=\"Abmelden\" title=\"Abmelden\" onclick=\"" . Environment::getS("onLogout", "userControl.doLogout();") . "\" />";
         }
     }
     $bigWorld = false;
     if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "desktop" or $_COOKIE["phynx_layout"] == "vertical")) {
         $bigWorld = true;
     }
     if (!$_SESSION["S"]->isUserAdmin()) {
         $userHiddenPlugins = mUserdata::getHiddenPlugins();
         $U = new mUserdata();
         $U->addAssocV3("typ", "=", "TTP");
         $B = new Button(Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()), "application");
         $B->type("icon");
         $B->className($bigWorld ? "tabImg" : "smallTabImg");
         #".(($t == null OR $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"")."
         $B->hasMouseOverEffect(false);
         $B->id("busyBox");
         #$appMenuHidden = $this->getAppMenuOrder("appMenuHidden");
         $appMenuDisplayed = $this->getAppMenuOrder("appMenuDisplayed");
         #if($appMenuDisplayed != "" AND $appMenuHidden == "")
         #	$appMenuHidden = implode(";", array_diff(array_values($es), explode(";", $appMenuDisplayed)));
     }
     $appMenuH = "\n\t\t\t<li id=\"appMenu_emptyList\" style=\"height:auto;" . ($appMenuHidden != "emptyList" ? "display:none;" : "") . "\">Ziehen Sie Einträge auf diese Seite, um sie aus dem Menü auszublenden und nur hier anzuzeigen.</li>";
     $appMenuD = "";
     if ($appMenuActive) {
         $es = self::sort($es, $appMenuDisplayed);
     }
     #, $appMenuHidden);
     echo "\n\t\t\t<div id=\"navTabsWrapper\">";
     if ($appMenuActive) {
         echo "\n\t\t\t<div\n\t\t\t\tclass=\"navBackgroundColor navBorderColor " . ($bigWorld ? "" : " smallTab") . " navTab\"\n\t\t\t\tid=\"SpellbookMenuEntry\"\n\t\t\t>\n\t\t\t\t<div onclick=\"contentManager.loadPlugin('contentScreen', 'Spellbook', 'SpellbookGUI;-');\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\t\t\t\t{$B}" . ($bigWorld ? Environment::getS("renameApplication:" . $_SESSION["applications"]->getActiveApplication(), $_SESSION["applications"]->getActiveApplication()) : "") . "\n\t\t\t\t</div>\n\t\t\t</div>";
     }
     $collapsedTabs = Environment::getS("collapsedTabs", "0") == "1";
     foreach ($es as $key => $value) {
         if (isset($userHiddenPlugins[$value])) {
             continue;
         }
         $single = $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($value);
         $anyC = new anyC();
         $text = $anyC->loadLanguageClass($single);
         if ($text != null and $text->getMenuEntry() != "") {
             $key = $text->getMenuEntry();
         }
         $t = !$_SESSION["S"]->isUserAdmin() ? $U->getUDValueCached("ToggleTab{$value}") : "big";
         if ($t == null and $collapsedTabs) {
             $t = "small";
         }
         $key = Aspect::joinPoint("renameTab", $this, __METHOD__, array($key), $key);
         if (isset($_COOKIE["phynx_layout"]) and ($_COOKIE["phynx_layout"] == "vertical" or $_COOKIE["phynx_layout"] == "desktop")) {
             $t = "big";
         }
         #$emptyFrame = "contentLeft";
         #if(isset($ts[$value]) AND $ts[$value] == "contentLeft") $emptyFrame = "contentRight";
         #$onclick = "contentManager.emptyFrame('contentLeft'); contentManager.emptyFrame('contentRight'); contentManager.emptyFrame('contentScreen'); contentManager.loadFrame('".(isset($ts[$value]) ? $ts[$value] : "contentRight")."', '$value', -1, 0, '{$value}GUI;-');$('windows').update('');";
         $onclick = "contentManager.loadPlugin('" . (isset($ts[$value]) ? $ts[$value] : "contentRight") . "', '{$value}', '{$value}GUI;-');";
         $B = new Button($key, $icons[$value]);
         $B->type("icon");
         $B->style("float:left;margin-right:10px;");
         $BM = new Button("Reihenfolge ändern", "./images/i2/topdown.png");
         $BM->type("icon");
         $BM->style("float:right;margin-right:5px;");
         $BM->className("appMenuHandle");
         $appMenu = "\n\t\t\t<li\n\t\t\t\tid=\"appMenu_{$value}\"\n\t\t\t\tonmouseover = \"this.className = 'navBackgroundColor';\"\n\t\t\t\tonmouseout = \"this.className = '';\"\n\t\t\t>\n\t\t\t\t{$BM}\n\t\t\t\t<div\n\t\t\t\t\tonclick=\"appMenu.hide(); {$onclick}\"\n\t\t\t\t>\n\t\t\t\t{$B}<p>{$key}</p>\n\t\t\t\t</div>\n\t\t\t</li>";
         if (strpos($appMenuHidden, $value) !== false) {
             $appMenuH .= $appMenu;
         } else {
             $appMenuD .= $appMenu;
         }
         $style = (strpos($appMenuHidden, $value) !== false and $appMenuActive) ? "style=\"display:none;\"" : "";
         echo "\n\t\t\t\t\n\t\t\t\t<div\n\t\t\t\t\tid=\"" . $value . "MenuEntry\"\n\t\t\t\t\tclass=\"navBackgroundColor navBorderColor " . (($t == null or $t == "big") ? "" : " smallTab") . " navTab\"\n\t\t\t\t\t{$style}\n\t\t\t\t\t>\n\t\t\t\t\t<!--<img\n\t\t\t\t\t\tstyle=\"margin-top:-28px;float:left;\"\n\t\t\t\t\t\tid=\"" . $value . "TabMinimizer\"\n\t\t\t\t\t\tclass=\"navTabMinimizer\"\n\t\t\t\t\t\ttitle=\"Tab {$key} vergrößern/verkleinern\"\n\t\t\t\t\t\tonclick=\"toggleTab('{$value}');\"\n\t\t\t\t\t\tsrc=\"./images/i2/tabMinimize.png\" />-->\n\t\t\t\t\t\n\t\t\t\t\t<div onclick=\"{$onclick}\" style=\"padding:3px;padding-right:7px;padding-top:7px;height:18px;\">\n\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tid=\"" . $value . "MenuImage\"\n\t\t\t\t\t\t\ttitle=\"{$key}\"\n\t\t\t\t\t\t\t" . (($t == null or $t == "big") ? "class=\"tabImg\"" : "class=\"smallTabImg\"") . "\n\t\t\t\t\t\t\tsrc=\"{$icons[$value]}\" />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t" . (($t == null or $t == "big") ? $key : "") . "\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
     }
     echo "\n\t\t\t\t<div style=\"float:none;clear:both;border:0px;height:0px;width:0px;margin:0px;padding:0px;\"></div>\n\t\t\t</div>";
     /*
     			<div id=\"appMenuContainer\" class=\"backgroundColor0 navBorderColor\" style=\"display:none;\">
     				<ul style=\"min-height:50px;\" id=\"appMenuHidden\">$appMenuH</ul>
     				<p class=\"backgroundColor2\" style=\"cursor:pointer;background-image:url(./images/navi/down.png);background-repeat:no-repeat;background-position:95% 50%;\" onclick=\"if($('appMenuDisplayedContainer').style.display == 'none') new Effect.BlindDown('appMenuDisplayedContainer'); else new Effect.BlindUp('appMenuDisplayedContainer');\">Weitere Reiter</p>
     				<div id=\"appMenuDisplayedContainer\" style=\"display:none;\"><ul style=\"min-height:50px;\" id=\"appMenuDisplayed\">$appMenuD</ul><p>Um die Sortierung der Einträge zu übernehmen, muss die Anwendung <a href=\"#\" onclick=\"Installation.reloadApp(); return false;\">neu geladen werden</a>.</p></div>
     			</div>";*/
     #echo OnEvent::script("");
     if (!$_SESSION["S"]->isUserAdmin()) {
         $ud = new mUserdata();
         $al = $ud->getUDValue("noAutoLogout", "false");
         if ($al == "true") {
             echo "<script type=\"text/javascript\">contentManager.startAutoLogoutInhibitor();</script>";
         }
     }
     echo OnEvent::script("contentManager.isAltUser = "******"true" : "false") . ";");
     try {
         $c = get_class(Session::currentUser());
         $U = new $c(Session::currentUser()->getID());
         echo "<script type=\"text/javascript\">\$j.datepicker.setDefaults(\$j.datepicker.regional['" . $U->A("language") . "']); " . (Session::physion() ? "\$j('#navigation').hide();" : "") . "</script>";
     } catch (Exception $e) {
     }
 }
Exemplo n.º 14
0
 public function getTable($GUI)
 {
     $bps = BPS::getAllProperties("mKalenderGUI");
     $K = $GUI->getData($this->first, $this->last, isset($bps["KID"]) ? $bps["KID"] : Session::currentUser()->getID());
     $ansicht = $this->ansicht;
     $cols = $this->cols;
     $rows = $this->rows;
     $html = "<table style=\"margin-left:10px;border-spacing: 0px;\" id=\"KalenderTable\">\n\t\t\t<colgroup>";
     for ($j = 0; $j < $cols - 2; $j++) {
         #
         $html .= "\n\t\t\t\t<col " . ($ansicht == "woche" ? "class=\"backgroundColor" . ($j % 2 + 2) . "\" " : "") . " style=\"width:" . 100 / $cols . "%;\" />";
     }
     $html .= "\n\t\t\t\t<col style=\"background-color:{$this->colorBgSaturday};width:" . 100 / $cols . "%;\" />\n\t\t\t\t<col style=\"background-color:{$this->colorBgSunday};width:" . 100 / $cols . "%;\" />\n\t\t\t</colgroup>";
     if ($ansicht != "tag") {
         $html .= "\n\t\t\t\t<tr>";
         $D2 = clone $this->date;
         for ($j = 0; $j < $cols; $j++) {
             $html .= "\n\t\t\t\t\t\t<th style=\"border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#EEE;padding-top:10px;\" class=\"backgroundColor0\">" . Util::CLWeekdayName(date("w", $D2->time())) . "</th>";
             $D2->addDay();
         }
         unset($D2);
         $html .= "\n\t\t\t</tr>";
     }
     $D = clone $this->date;
     for ($i = 0; $i < $rows; $i++) {
         $html .= "\n\t\t\t<tr class=\"cellHeight noHover\">";
         for ($j = 0; $j < $cols; $j++) {
             $entry = "";
             $events = $K->getEventsOnDay(date("dmY", $D->time()));
             $holidays = $K->getHolidaysOnDay(date("dmY", $D->time()));
             $hasMultiDay = $K->hasMultiDayEvents($this->first, $this->last);
             if ($ansicht == "tag") {
                 #$dayContent = "";
                 $dayDivs = "";
                 for ($i = 0; $i < 24; $i++) {
                     $dayDivs .= "\n\t\t\t\t\t\t<div style=\"height:40px;z-index:10;\" class=\"backgroundColor" . ($i % 2 == 0 ? "3" : "2") . "\">\n\t\t\t\t\t\t\t";
                     $BN = "";
                     if (Session::isPluginLoaded("mTodo")) {
                         $BN = new Button("Neuer Termin", "./ubiquitous/Kalender/addToDo.png", "icon");
                         $BN->className("KalenderButton");
                         $BN->popup("", "Neuer Termin", "mKalender", "-1", "newTodo", array("-1", $D->time(), "'Kalender'", "-1", $i), "", "Kalender.popupOptions");
                         $BN->style("float:left;margin-left:5px;margin-top:5px;");
                     }
                     $dayDivs .= "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<div class=\"borderColor1\" style=\"height:35px;border-right-width:1px;border-right-style:dotted;float:left;width:40px;padding-top:5px;padding-right:5px;font-weight:bold;text-align:right;color:grey;\">" . ($i < 10 ? "0" : "") . "{$i}:00</div>\n\t\t\t\t\t\t{$BN}</div>";
                 }
                 $eventsDiv = "";
                 for ($i = 0; $i < 24; $i++) {
                     if (count($events) > 0) {
                         foreach ($events as $time => $ev) {
                             if (substr($time, 0, 2) * 1 != $i) {
                                 continue;
                             }
                             foreach ($ev as $KE) {
                                 $eventsDiv .= $KE->getDayViewHTML($D->time());
                             }
                         }
                     }
                 }
                 $entry = "\n\t\t\t\t\t\t<div class=\"cellHeight\" style=\"overflow:auto;width:961px;\" id=\"tagDiv\">\n\t\t\t\t\t\t\t<div style=\"height:961px;\">\n\t\t\t\t\t\t\t{$dayDivs}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"margin-top:-961px;\">\n\t\t\t\t\t\t\t\t{$eventsDiv}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>";
             } elseif ($ansicht == "woche") {
                 $dayDivs = "";
                 for ($k = 0; $k < $hasMultiDay; $k++) {
                     $dayDivs .= "<div style=\"height:22px;z-index:10;\" class=\"borderColor0\"></div>";
                 }
                 for ($k = 0; $k < 24; $k++) {
                     $bgColor = "";
                     if ($k < 7 or $k > 19) {
                         $bgColor = "background-color:rgba(255, 255, 255, 0.3)";
                     }
                     $border = "border-top:1px dotted white;";
                     if ($k == 23) {
                         $border .= "border-bottom:1px dotted white;";
                     }
                     if ($k == 12) {
                         $border = "border-top:1px solid white;";
                     }
                     $dayDivs .= "\n\t\t\t\t\t\t<div style=\"height:" . ($k < 6 ? "10" : "21") . "px;z-index:10;{$border}{$bgColor}\" class=\"borderColor0\">\n\t\t\t\t\t\t\t";
                     if ($k > 5 and $k < 21 and $k % 2 == 0 and $j % 2 == 1) {
                         $dayDivs .= "\n\t\t\t\t\t\t\t\t<div class=\"borderColor1\" style=\"color:#777;padding-left:3px;\">" . ($k < 10 ? "0" : "") . "{$k}</div>";
                     }
                     $dayDivs .= "\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</div>";
                 }
                 $eventsDiv = "";
                 for ($i = 0; $i < 24; $i++) {
                     if (count($events) > 0) {
                         foreach ($events as $time => $ev) {
                             if (substr($time, 0, 2) * 1 != $i) {
                                 continue;
                             }
                             foreach ($ev as $KE) {
                                 $eventsDiv .= $KE->getWeekViewHTML($D->time(), $hasMultiDay);
                             }
                         }
                     }
                 }
                 $entry = "\n\t\t\t\t\t\t<div style=\"overflow:auto;height:" . (11 * 6 + 22 * 18 + 1 + $hasMultiDay * 22) . "px;width:100%;\">\n\t\t\t\t\t\t\t<div style=\"height:" . (11 * 6 + 22 * 18 + 1) . "px;\">\n\t\t\t\t\t\t\t\t{$dayDivs}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"margin-top:-" . (11 * 6 + 22 * 18 + 1) . "px;\">\n\t\t\t\t\t\t\t\t{$eventsDiv}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>";
             } else {
                 if ($events != null) {
                     foreach ($events as $time => $ev) {
                         foreach ($ev as $v) {
                             $entry .= $v->getMinimal($D->time());
                         }
                     }
                 }
                 if ($holidays != null) {
                     foreach ($holidays as $ev) {
                         foreach ($ev as $v) {
                             $entry .= $v->getMinimal($D->time());
                         }
                     }
                 }
             }
             $BD = new Button("Tagesansicht", "./ubiquitous/Kalender/showDetails.png");
             $BD->type("icon");
             $BD->rmePCR("mKalender", "-1", "setView", array("'tag'", "'" . $D->time() . "'"), "contentManager.loadFrame('contentScreen','mKalender');");
             $BD->style("float:left;");
             $BN = "";
             if (Session::isPluginLoaded("mTodo")) {
                 $BN = new Button("Neuer Termin", "./ubiquitous/Kalender/addToDo.png");
                 $BN->type("icon");
                 $BN->popup("", "Neuer Termin", "mKalender", "-1", "newTodo", array("-1", $D->time(), "'Kalender'", "-1"), "", "Kalender.popupOptions");
                 $BN->style("float:left;margin-left:5px;");
             }
             #".((date("m.Y",$D->time()) != date("m.Y",$currentMonth->time())) ? "color:grey;" : "")."
             if ($j < $cols) {
                 $html .= "\n\t\t\t\t<td\n\t\t\t\t\tstyle=\"vertical-align:top;padding:0px;\"\n\t\t\t\t\tclass=\"" . ((date("d.m.Y", $D->time()) == date("d.m.Y") and $ansicht != "tag") ? "backgroundColor1" : "") . " Day borderColor1\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle=\"" . ($ansicht == "tag" ? "display:none;" : "") . "height:21px;padding-top:2px;padding-left:5px;text-align:right;padding-right:5px;\"\n\t\t\t\t\t\tclass=\"innerCellTitle\">\n\t\t\t\t\t\t" . ($ansicht != "tag" ? "<span class=\"dayOptions\">{$BD}{$BN}</span>" : "") . "\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tstyle=\"color:grey;\">\n\t\t\t\t\t\t\t" . ($ansicht != "tag" ? date("d", $D->time()) : "&nbsp;") . "\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style=\"overflow:auto;" . ($ansicht == "monat" ? "margin-top:0px;width:100%;" : "") . "\" class=\"" . ($ansicht == "monat" ? "innerCellHeight" : "") . "\">{$entry}</div>\n\t\t\t\t</td>";
             }
             $D->addDay();
         }
         for ($j = 0; $j < 7 - $cols; $j++) {
             $D->addDay();
         }
         $html .= "\n\t\t\t</tr>";
     }
     $html .= "\n\t\t</table>";
     return $html;
 }
 public function getWindow()
 {
     $F = new File(Util::getRootPath() . "system/Backup");
     if (!$F->A("FileIsWritable")) {
         $B = new Button("Achtung", "restrictions");
         $B->type("icon");
         $B->style("float:left;margin-right:10px;");
         $T = new HTMLTable(1);
         $T->addRow($B . "Es können keine Backups von Ihrer Datenbank angelegt werden, da das Verzeichnis /system/Backup nicht durch den Webserver beschreibbar ist.");
         $T->addRow("Machen Sie das Verzeichnis mit einem FTP-Programm beschreibbar. Klicken Sie dazu mit der rechten Maustaste auf das Verzeichnis auf dem Server, wählen Sie \"Eigenschaften\", und geben Sie den Modus 777 an, damit es durch den Besitzer, die Gruppe und alle Anderen les- und schreibbar ist.");
         $BRefresh = new Button("Aktualisieren", "refresh");
         $BRefresh->rmePCR("BackupManager", "", "getWindow", "", "Popup.displayNamed('BackupManagerGUI','Backup-Manager',transport);");
         $BRefresh->style("float:right;");
         $T->addRow($BRefresh);
         $T->addRow("");
         $T->addRowClass("backgroundColor0");
         $T->addRow($this->noBackupButton());
         die($T);
     }
     $html = "";
     if (!BackupManagerGUI::checkForTodaysBackup()) {
         $T = new HTMLTable(1);
         $BOK = $this->makeBackupOfToday();
         $F = new File(BackupManagerGUI::getNewBackupName());
         $F->loadMe();
         if ($BOK === basename(BackupManagerGUI::getNewBackupName()) and $F->A("FileSize") > 100) {
             $B = new Button("Backup abgeschlossen", "okCatch");
             $B->type("icon");
             $B->style("float:left;margin-right:10px;");
             $T->addRow($B . "Das Backup wurde erfolgreich abgeschlossen!<br />Die Größe des Backups beträgt " . Util::formatByte($F->A("FileSize"), 2));
             try {
                 $ftpUpload = $this->FTPUpload(Util::getRootPath() . "system/Backup/{$BOK}");
                 if ($ftpUpload === true) {
                     $B = new Button("FTP-Upload erfolgreich", "okCatch");
                     $B->type("icon");
                     $B->style("float:left;margin-right:10px;");
                     $T->addRow(array($B . "Das Backup wurde erfolgreich auf den FTP-Server hochgeladen"));
                 }
             } catch (Exception $e) {
                 $T->addRow(array($B . $e->getMessage()));
             }
             $html .= $T;
         } else {
             $B = new Button("Es ist ein Fehler aufgetreten", "stop");
             $B->type("icon");
             $B->style("float:left;margin-right:10px;");
             $T->addRow($B . "Beim Erstellen des Backups ist ein Fehler aufgetreten: {$BOK}");
             $html .= $T;
         }
         $html .= "<script type=\"text/javascript\">contentManager.reloadFrame('contentLeft');</script>";
     }
     $gesamt = 0;
     $data = $this->getBackupsList();
     $i = 0;
     $maxD = 5;
     if (count($data) < $maxD) {
         $maxD = count($data);
     }
     $TF = new HTMLTable(2, "Backups ({$maxD}/" . count($data) . ")");
     $TF->addColStyle(2, "text-align:right;");
     $TF->setColWidth(2, "80px");
     foreach ($data as $name => $size) {
         if ($i < 5) {
             if ($name == basename(BackupManagerGUI::getNewBackupName())) {
                 $name = "<span style=\"color:green;\">{$name}</span>";
             }
             $TF->addRow(array($name, Util::formatByte($size, 2)));
         }
         $i++;
         $gesamt += $size;
     }
     $TF->addRow("");
     $TF->addRowClass("backgroundColor0");
     $TF->addRow(array("<b>Gesamt:</b>", "<b>" . Util::formatByte($gesamt, 2) . "</b>"));
     $TF->addCellStyle(1, "text-align:right");
     $TF->addRow(array("Diese Backups können als Admin-Benutzer im Installation-Plugin heruntergeladen und wiederhergestellt werden."));
     $TF->addRowColspan(1, 2);
     $TF->addRow("");
     $TF->addRowClass("backgroundColor0");
     $TF->addRow(array($this->noBackupButton()));
     $TF->addRowColspan(1, 2);
     echo $html . $TF;
 }
Exemplo n.º 16
0
 public function getDesktopLinkButton()
 {
     try {
         if (!PMReflector::implementsInterface(get_class($this->object), "iDesktopLink")) {
             return "";
         }
     } catch (ReflectionException $e) {
         return "";
     }
     $B = new Button("Desktop-Link anlegen", "./images/i2/link.png");
     $B->type("icon");
     $B->style("float:right;margin-right:10px;");
     $B->onclick("DesktopLink.createNew('" . $this->object->getClearClass() . "','" . $this->object->getID() . "','contentLeft','" . $_SESSION["applications"]->getActiveApplication() . "');");
     return $B;
 }
Exemplo n.º 17
0
 function getDayViewHTML()
 {
     $B = "";
     if ($this->icon != null) {
         $B = new Button("", $this->icon);
         $B->type("icon");
     }
     $this->onClick = str_replace(array("%%CLASSNAME%%", "%%CLASSID%%", "%%DAY%%"), array($this->className, $this->classID, ""), $this->onClick);
     return "\n\t\t\t<div onclick=\"{$this->onClick}\" class=\"backgroundColor1\" onmouseover=\"this.className = ' backgroundColor2';\" onmouseout=\"this.className = 'backgroundColor1';\" style=\"position:relative;float:left;padding:5px;cursor:pointer;min-height:30px;margin-right:10px;width:150px;\">\n\t\t\t\t<span style=\"float:left;margin-right:3px;\">\n\t\t\t\t\t{$B}\n\t\t\t\t</span>\n\t\t\t\t<!--<span style=\"display:none;\" id=\"time_{$this->className}{$this->classID}{$this->time}\">{$this->time}<br /></span>--><b>" . $this->formatTime($this->time) . "</b><br />{$this->title}\n\t\t\t</div>";
 }
Exemplo n.º 18
0
 function getMinimal($time)
 {
     if ($this->exception !== false and $this->exception[1] == "1") {
         return "";
     }
     $B = "";
     if ($this->icon != null) {
         $B = new Button("", $this->icon);
         $B->type("icon");
     }
     $onClick = str_replace(array("%%CLASSNAME%%", "%%CLASSID%%", "%%TIME%%"), array($this->className, $this->classID, $time), $this->onClick);
     $startTime = Kalender::parseDay($this->day) - 60 + Kalender::parseTime($this->time);
     $grey = false;
     if ($this->owner != null and $this->owner != -1 and $this->owner != Session::currentUser()->getID()) {
         $grey = true;
     }
     #$('time_$this->className$this->classID$this->time').style.display = '';
     $zeit = "<b>" . $this->formatTime($this->time) . "</b>";
     if ($startTime < $time and $this->repeat == "0") {
         $zeit = "";
     }
     if ($this->allDay) {
         $zeit = "";
     }
     return "\n\t\t\t<div title=\"" . strip_tags($this->title) . "\" onclick=\"{$onClick}\" style=\"" . ($this->status == 2 ? "color:grey;" : "") . "white-space:nowrap;overflow:hidden;height:13px;/*width:60px;*/clear:left;padding:2px;padding-left:4px;cursor:pointer;" . ($grey ? "color:grey;" : "") . "\">\n\t\t\t\t<small>" . (($grey and isset(mKalenderGUI::$colors[$this->owner])) ? "<div style=\"display:inline-block;margin-right:3px;width:5px;background-color:" . mKalenderGUI::$colors[$this->owner] . ";\">&nbsp;</div>" : "") . "{$zeit} {$this->title}</small>\n\t\t\t</div>";
 }
Exemplo n.º 19
0
 function getMinimal($time)
 {
     $B = "";
     if ($this->icon != null) {
         $B = new Button("", $this->icon);
         $B->type("icon");
     }
     if (self::$count == count(KalenderEntry::$bgColors)) {
         self::$count = 0;
     }
     if (!isset(self::$colored[$this->group])) {
         self::$colored[$this->group] = KalenderEntry::$bgColors[self::$count++];
     }
     $this->color(self::$colored[$this->group], "FFF");
     $this->onClick = str_replace(array("%%CLASSNAME%%", "%%CLASSID%%"), array($this->className, $this->classID), $this->onClick);
     if (!isset(self::$stacking[date("dmY", $time)])) {
         self::$stacking[date("dmY", $time)] = 0;
     }
     $countBefore = self::$stacking[date("dmY", $time)];
     $monat = date("m", $time);
     #echo "<pre style=\"font-size:8px;\">";
     #print_r(self::$stacking[date("dmY", $time)]);
     #print_r(self::$pos);
     #echo "</pre>";
     if (self::$pos[$monat][$this->group] + 1 > self::$stacking[date("dmY", $time)]) {
         self::$stacking[date("dmY", $time)] = self::$pos[$monat][$this->group] + 1;
     }
     #$('time_$this->className$this->classID$this->time').style.display = '';
     return "\n\t\t\t<div onclick=\"{$this->onClick}\" style=\"white-space:nowrap;position:absolute;margin-top:" . 17 * self::$pos[$monat][$this->group] . "px;padding:2px;cursor:pointer;overflow:hidden;height:13px;width:60px;" . ($this->colorBG != null ? "color:{$this->colorText};background-color:{$this->colorBG}" : "") . "\"><small>{$this->title}</small></div>";
 }
 public function getHelp($loadInstallation = "false")
 {
     $DBFilePath = Util::getRootPath() . "system/DBData/Installation.pfdb.php";
     $File = new File($DBFilePath);
     $File->loadMe();
     $BH = new Button("Hilfe", "hilfe");
     $BH->style("float: left; margin-right: 10px;");
     $BH->type("icon");
     $BReload = new Button("Ansicht\naktualisieren", "refresh");
     $BReload->onclick("contentManager.emptyFrame('contentLeft'); contentManager.loadFrame('contentRight', 'mInstallation', -1, 0, 'mInstallationGUI;-');Popup.closeNonPersistent();");
     echo "<p style=\"padding:5px;\">\n\t\t{$BH}\n\t\t<b>" . $_SESSION["applications"]->getActiveApplication() . " ist auf diesem Server noch nicht installiert.</b>\n\t\t</p>\n\t\t" . (!$File->A("FileIsWritable") ? "<p style=\"padding:5px;\">\n\t\tBitte machen Sie zunächst die Datei Installation.pfdb.php beschreibbar, wie rechts oben angegeben.<br /><br />{$BReload}\n\t\t</p>" : "\n\t\t<p style=\"padding:5px;\">\n\t\tTragen Sie links die Datenbank-Zugangsdaten ein, die Sie von Ihrem Webspace-Provider erhalten und anschließend auf 'Installation speichern'.\n\t\t</p>\n\t\t<p style=\"padding:5px;\">\n\t\tWenn die Zugangsdaten richtig sind, erscheinen weitere Zeilen auf der rechten Seite. Klicken Sie für jedes Plugin auf 'Tabelle anlegen'.\n\t\t</p>\n\t\t<p style=\"padding:5px;\">\n\t\tWenn Sie alle Tabellen angelegt haben, legen Sie im Benutzer-Reiter noch einen </b>Benutzer ohne Admin-Rechte</b> an und ändern Sie das Passwort des Admin-Benutzers.\n\t\t</p>\n\t\t" . ($loadInstallation == "true" ? "<script type=\"text/javascript\">\n\t\t\tcontentManager.loadFrame('contentLeft','Installation','1');\n\t\t</script>" : "")) . "";
 }
Exemplo n.º 21
0
 function settings($plugin, $identifier = "")
 {
     $this->settings = $B = new Button("Einstellungen", "./images/i2/settings.png");
     $B->type("icon");
     if (strpos($this->style, "float:right;") !== false) {
         $B->style("float:right;margin-right:-22px;");
     } else {
         $B->style("margin-left:4px;margin-bottom:15px;");
     }
     $B->contextMenu($plugin, $identifier, "Einstellungen:");
     return $B;
 }
Exemplo n.º 22
0
			<text id="timeM12"  x="120" y="120" style="display:none;font-size:10px;fill:#6868C9;" transform="rotate(358, 120, 120) translate(0, -112)">0</text>
			
			<line id="minutenZeiger2" x1="120px" y1="120px" x2="120px" y2="30px" style="stroke:#6868C9;stroke-width:2"/>
		</svg>
	</div>
	<div style="margin-top:15px;width:240px;">
		<?php 
$B = new Button("Vormittag/Nachmittag", "../images/navi/daytime.png");
$B->type("icon");
$B->onclick("swapDaytime();");
$B->style("margin-left:20px;float:left;");
$B2 = new Button("Stunde bearbeiten", "../images/navi/up.png");
$B2->type("icon");
$B2->onclick("switchMode(1);");
$B3 = new Button("Minuten bearbeiten", "../images/navi/up.png");
$B3->type("icon");
$B3->onclick("switchMode(2);");
echo $B;
?>
		<div style="text-align:right;width:40px;margin-left:20px;float:left;">
			<?php 
echo $B2;
?>
<br />
			<span id="stunden" style="font-size:18px;font-weight:bold;">00</span>
		</div>
		
		<div style="text-align:center;width:13px;float:left;">
			<span style="display:block;font-size:18px;font-weight:bold;margin-top:36px;">:</span>
		</div>
			
Exemplo n.º 23
0
 /**
  * Creates HTML for several global context menus
  */
 public function getContextMenuHTML($identifier)
 {
     $s = explode(":", $identifier);
     switch ($s[0]) {
         case "operations":
             $onDeleteEvent = "";
             $onDeleteQuestion = "";
             if (PMReflector::implementsInterface($s[1], "iDeletable2")) {
                 $c = $s[1];
                 $c = new $c(-1);
                 $onDeleteEvent = $c->getOnDeleteEvent();
                 $onDeleteQuestion = $c->getOnDeleteQuestion();
             }
             $texts = $this->languageClass->getEditTexts();
             #$BRepeatable = "";
             $T = new HTMLTable(1);
             $Buttons = "";
             if ($s[3][0] == "1") {
                 $B = new Button($texts["Neu mit Werten"], "new", "icon");
                 $B->onclick(OnEvent::reload("Left", "HTMLGUI;insertAsNew:true"));
                 $B->style("margin-right:10px;");
                 $Buttons .= $B;
             }
             if ($s[3][1] == "1") {
                 $B = new Button($texts["Kopieren"], "seiten", "icon");
                 $B->rmePCR(str_replace("GUI", "", $s[1]), $s[2], 'cloneMe', "", "function(transport){ lastLoadedLeft = (transport.responseText == '' ? -1 : transport.responseText); contentManager.reloadFrameLeft(); contentManager.reloadFrameRight(); }");
                 #$B->onclick("rme('$s[1]','$s[2]','cloneMe','', 'lastLoadedLeft = (transport.responseText == \'\' ? -1 : transport.responseText); contentManager.reloadFrameLeft(); contentManager.reloadFrameRight();');");
                 $B->style("margin-right:10px;");
                 $Buttons .= $B;
             }
             if ($s[3][2] == "1") {
                 $B = new Button($texts["Löschen"], "trash", "icon");
                 $B->onclick("deleteClass('" . str_replace("GUI", "", $s[1]) . "','{$s['2']}'," . ($onDeleteEvent == "" ? "function() {  contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '{$s['2']}') \$('contentLeft').update(''); }" : $onDeleteEvent) . ",'" . ($onDeleteQuestion == "" ? $texts["Wirklich löschen?"] : $onDeleteQuestion) . "');");
                 $B->style("margin-right:10px;");
                 $Buttons .= $B;
             }
             if ($s[3][3] == "1") {
                 $BRepeatable = new Button($texts["Repeatable erstellen"], "redo");
                 $BRepeatable->type("icon");
                 $BRepeatable->onclick("contentManager.newClassButton('Repeatable','','contentLeft','RepeatableGUI;RepeatablePlugin:{$s['1']};RepeatablePluginElementID:{$s['2']}');");
                 $Buttons .= $BRepeatable;
             }
             if ($s[3][4] == "1") {
                 $B = new Button($texts["XML Export"], "export", "icon");
                 $B->onclick("windowWithRme('{$s['1']}', '{$s['2']}', 'getXML', '');phynxContextMenu.stop();");
                 $B->style("margin-right:10px;");
                 $Buttons .= $B;
             }
             $T->addRow(array($Buttons));
             $T->addRowClass("backgroundColor0");
             echo $T . "<p><small style=\"color:grey;\">Interne ID des Eintrags: {$s['2']}</small></p>";
             /*echo "
             		<table style=\"text-align:center;border:0px;\">
             			<tr>
             				".($s[3]{0} == "1" ? "<td><img class=\"mouseoverFade\" src=\"./images/navi/new.png\" title=\"".$texts["Neu mit Werten"]."\" onclick=\"contentManager.reloadFrameLeft('HTMLGUI;insertAsNew:true');\" /></td>" : "")."
             				".($s[3]{1} == "1" ? "<td><img class=\"mouseoverFade\" src=\"./images/navi/seiten.png\" title=\"".$texts["Kopieren"]."\" onclick=\"rme('$s[1]','$s[2]','cloneMe','', 'lastLoadedLeft = (transport.responseText == \'\' ? -1 : transport.responseText); contentManager.reloadFrameLeft(); contentManager.reloadFrameRight();');\" /></td>" : "")."
             				".($s[3]{2} == "1" ? "<td><img class=\"mouseoverFade\" src=\"./images/navi/trash.png\" title=\"".$texts["Löschen"]."\" onclick=\"deleteClass('$s[1]','$s[2]',".($onDeleteEvent == "" ? "function() {  contentManager.reloadFrameRight(); if(typeof lastLoadedLeft != 'undefined' && lastLoadedLeft == '$s[2]') $('contentLeft').update(''); }" : $onDeleteEvent).",'".($onDeleteQuestion == "" ? $texts["Wirklich löschen?"] : $onDeleteQuestion)."');\" /></td>" : "")."
             				".($s[3]{4} == "1" ? "<td><img class=\"mouseoverFade\" src=\"./images/navi/export.png\" title=\"".$texts["XML Export"]."\" onclick=\"windowWithRme('$s[1]', '$s[2]', 'getXML', '');phynxContextMenu.stop();\" /></td>" : "")."
             				$BRepeatable
             			</tr>
             		</table>";*/
             break;
         case "multiPageSettings":
             $texts = $this->languageClass->getBrowserTexts();
             $mU = new mUserdata();
             $entriesPerPage = $mU->getUDValue("entriesPerPage{$s['1']}");
             if ($entriesPerPage == null) {
                 $entriesPerPage = 20;
             }
             echo "\n\t\t\t\t<table style=\"border:0px;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"backgroundColor3\">" . $texts["Anzahl Einträge pro Seite"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\ttype=\"image\" \n\t\t\t\t\t\t\t\tsrc=\"./images/i2/save.gif\"\n\t\t\t\t\t\t\t\tstyle=\"border: 0px none ; width: 18px;float:right;\" \n\t\t\t\t\t\t\t\tonclick=\"contentManager.rmePCR('HTML','', 'saveContextMenu', Array('multiPageSettings', '{$s['1']}:'+\$('entriesPerPageCM').value), 'phynxContextMenu.stop(); contentManager.reloadFrame(\\'" . (!isset($s[2]) ? "contentRight" : $s[2]) . "\\');');\" />\n\t\t\t\t\t\t<input style=\"width:130px;text-align:right;\" id=\"entriesPerPageCM\" type=\"text\" value=\"{$entriesPerPage}\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td class=\"backgroundColor3\">\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             $selectForOrderByField = "";
             $n = $s[1] . "GUI";
             if (PMReflector::implementsInterface($n, "iOrderByField")) {
                 $mU = new mUserdata();
                 $HKs = $mU->getUDValue("OrderByFieldInHTMLGUI{$s['1']}");
                 $selectForOrderByField = "<select onchange=\"rme('HTML','','saveContextMenu',Array('setOrderByField','{$s['1']};:;'+this.value),'if(checkResponse(transport)) { phynxContextMenu.stop(); contentManager.reloadFrameRight(); }');\"><option " . (($HKs == null or $HKs == "default") ? "selected=\"selected\"" : "") . " value=\"default\">Standard-Sortierung</option><optgroup label=\"aufsteigend\">";
                 $cFOBy = new $n();
                 $cFOBy = $cFOBy->getOrderByFields();
                 foreach ($cFOBy as $k => $v) {
                     $selectForOrderByField .= "<option " . ($HKs == "{$k};ASC" ? "selected=\"selected\"" : "") . " value=\"{$k};ASC\">" . $v . "</option>";
                 }
                 $selectForOrderByField .= "</optgroup><optgroup label=\"absteigend\">";
                 foreach ($cFOBy as $k => $v) {
                     $selectForOrderByField .= "<option " . ($HKs == "{$k};DESC" ? "selected=\"selected\"" : "") . " value=\"{$k};DESC\">" . $v . "</option>";
                 }
                 $selectForOrderByField .= "</optgroup></select>";
                 echo "<div style=\"height:10px;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t\t\t<table style=\"border:0px;\">\n\t\t\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"backgroundColor3\">" . $texts["nach Spalte sortieren"] . ":</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>{$selectForOrderByField}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>";
             }
             try {
                 $n = $s[1] . "GUI";
                 $c = new $n();
                 if (PMReflector::implementsInterface($n, "iCategoryFilter")) {
                     $Ks = $c->getAvailableCategories();
                     if ($Ks == null) {
                         return;
                     }
                     $mU = new mUserdata();
                     $HKs = $mU->getUDValue("filteredCategoriesInHTMLGUI{$s['1']}");
                     $HKs = explode(";", $HKs);
                     $checks = "";
                     foreach ($Ks as $key => $value) {
                         $checks .= "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><input type=\"checkbox\" id=\"hide{$key}\" value=\"{$key}\" name=\"{$key}\" " . (in_array("{$key}", $HKs) ? "checked=\"checked\"" : "") . " /></td>\n\t\t\t\t\t\t\t\t<td onclick=\"\$('hide{$key}').checked = !\$('hide{$key}').checked;\" style=\"cursor:pointer;\">{$value}</td>\n\t\t\t\t\t\t\t</tr>";
                     }
                     echo "<div style=\"height:10px;\" class=\"backgroundColor1\"></div>\n\t\t\t\t\t\t<form id=\"filterCatsOf{$s['1']}\">\n\t\t\t\t\t\t\t<table style=\"border:0px;\">\n\t\t\t\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t\t\t\t<col class=\"backgroundColor2\" style=\"width:20px;\" />\n\t\t\t\t\t\t\t\t\t<col />\n\t\t\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"2\" class=\"backgroundColor3\">" . $texts["nach Kategorien filtern"] . ":</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t{$checks}\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td colspan=\"2\" class=\"backgroundColor3\">\n\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\ttype=\"button\" \n\t\t\t\t\t\t\t\t\t\t\tvalue=\"" . $texts["speichern"] . "\" \n\t\t\t\t\t\t\t\t\t\t\tstyle=\"background-image:url(./images/i2/save.gif);\" \n\t\t\t\t\t\t\t\t\t\t\tonclick=\"contentManager.rmePCR('HTML','', 'saveContextMenu', Array('filterCategories', '{$s['1']}--'+joinFormFields('filterCatsOf{$s['1']}').replace(/\\&/g,';').replace(/=/g,':')), 'phynxContextMenu.stop(); contentManager.reloadFrame(\\'contentRight\\', \\'\\', 0);');\" />\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</form>";
                 }
             } catch (ClassNotFoundException $e) {
             }
             if (PMReflector::implementsInterface($n, "iCustomSettings")) {
                 $cFOBy = new $n();
                 echo "<div style=\"height:10px;\" class=\"backgroundColor1\"></div>";
                 echo $cFOBy->getCustomSettings();
             }
             break;
             /*case "upload":
             			$texts = $this->languageClass->getBrowserTexts();
             			echo "
             				<form 
             					action=\"./interface/set.php\" 
             					method=\"post\" 
             					enctype=\"multipart/form-data\" 
             					id=\"formImage\" 
             					onsubmit=\"return AIM.submit($('formImage'), {'onComplete' : function(){
             						$('uploadImage').src = $('uploadImage').src+'&r2=".rand()."'
             						$('uploadImage').style.display = '';
             						phynxContextMenu.stop();
             					}});\"
             				><p>
             					<input type=\"file\" name=\"datei\" size=\"4\" /><br /><br />
             					<input type=\"submit\" value=\"".$texts["hochladen"]."\" />
             					<input type=\"hidden\" name=\"id\" value=\"$s[1]\" />
             					<input type=\"hidden\" name=\"class\" value=\"$s[2]\" />
             					<input type=\"hidden\" name=\"saveToAttribute\" value=\"$s[3]\" /></p>
             					<p>".$texts["<=100KB"]."</p>
             				</form>";
             		break;*/
     }
 }
Exemplo n.º 24
0
 public function buildFilteredWarningLine()
 {
     $dB = new Button("Filter löschen", "./images/i2/delete.gif");
     $dB->style("float:right;");
     $dB->type("icon");
     $dB->rme("HTML", "", "saveContextMenu", array("'deleteFilters'", "'{$this->collectionName}'"), "if(checkResponse(transport)) contentManager.reloadFrame(\\'contentRight\\');");
     $BW = new Button("", "./images/i2/note.png");
     $BW->type("icon");
     $wholeLine2 = array($BW, $dB . "<span style=\"color:grey;\">Die Anzeige wurde gefiltert</span>");
     $this->table->addRow($wholeLine2);
     $this->table->addRowColspan(2, count($this->referenceLine) - 1);
     $this->table->addRowClass("backgroundColor0");
 }
Exemplo n.º 25
0
 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;
     }
 }
Exemplo n.º 26
0
 public function addSaveDefaultButton($fieldName)
 {
     $B = new Button("als Standard-Wert speichern", "./images/i2/save.gif");
     $B->rme("mUserdata", "", "setUserdata", array("'DefaultValue{$this->id}{$fieldName}'", "\$('{$this->id}').{$fieldName}.value"), "checkResponse(transport);");
     $B->type("icon");
     $B->style("float:right;");
     if (!isset($this->values[$fieldName])) {
         $U = new mUserdata();
         $this->values[$fieldName] = $U->getUDValue("DefaultValue{$this->id}{$fieldName}", "");
     }
     $this->buttons[$fieldName] = $B;
 }
Exemplo n.º 27
0
 function getHTML($id)
 {
     $type = "none";
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     $bps = $this->getMyBPSData();
     if ($bps != -1 and isset($bps["type"])) {
         $type = $bps["type"];
     }
     $this->loadMeOrEmpty();
     if ($id == -1) {
         if ($type != "none" and $type != "undefined") {
             $this->A->SeiteID = $type;
         }
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Content");
     $gui->setType("contentType", "select");
     $gui->setOptions("contentType", array("text", "preset", "downloads", "php"), array("Text", "HTML-Vorlage", "Downloads", "PHP"));
     $FB = new FileBrowser();
     $FB->addDir("../specifics/");
     if ($_SESSION["S"]->checkForPlugin("mShop")) {
         $FB->addDir("../multiCMS/Shop/");
     }
     $a = $FB->getAsLabeledArray("iCustomContent", ".class.php");
     $gui->setLabel("customContent", "Inhalt");
     $gui->setType("customContent", "select");
     $gui->setOptions("customContent", array_values($a), array_keys($a));
     $Tab = new HTMLTable(1);
     if ($this->singular) {
         $gui->setType("sort", "hidden");
     } else {
         $B = new Button("zurück", "back");
         $B->onclick("contentManager.loadFrame('contentLeft','Seite', " . $this->A("SeiteID") . ");");
         $Tab->addRow($B);
     }
     $gui->setLabel("contentType", "Typ");
     $gui->setLabel("ContentImage", "Bild");
     $gui->setLabel("SeiteID", "Seite");
     $gui->setLabel("TemplateID", "Vorlage");
     $gui->setLabel("sort", "Sortierung");
     $gui->setFieldDescription("ContentImage", "Wird an Stelle des Parameters %%%IMAGE%%% eingesetzt.");
     #$gui->setType("header","hidden");
     $gui->insertSpaceAbove("contentType");
     #$gui->insertSpaceAbove("TemplateID","sonstiges", true);
     $gui->setInputJSEvent("contentType", "onchange", "Content.selectType(this);");
     $gui->setType("text", "HTMLEditor");
     if (Session::isPluginLoaded("mFile")) {
         $B = new Button("Bild auswählen", "./images/i2/add.png");
         $B->type("icon");
         $B->customSelect("contentRight", $this->ID, "mFile", "Content.selectImage");
         $gui->activateFeature("addCustomButton", $this, "ContentImage", $B);
     } else {
         $gui->setType("ContentImage", "hidden");
     }
     $gui->setShowAttributes(array("text", "ContentSpracheID", "ContentImage", "TemplateID", "header", "sort", "contentType", "presetTemplateID", "formHandlerID", "customContent"));
     $gui->setFormID("ContentForm");
     $S = new anyC();
     $S->setCollectionOf("Seite");
     $gui->selectWithCollection("SeiteID", $S, "name");
     $gui->setType("name", "hidden");
     $gui->setType("SeiteID", "hidden");
     $gui->setLabel("presetTemplateID", "Vorlage");
     $gui->setLabel("formHandlerID", "Handler");
     $gui->setLabel("ContentSpracheID", "Sprache");
     if (Session::isPluginLoaded("mSprache")) {
         $Sprachen = new anyC();
         $Sprachen->setCollectionOf("Sprache");
         $gui->selectWithCollection("ContentSpracheID", $Sprachen, "SpracheIdentifier", "alle");
     } else {
         $gui->setType("ContentSpracheID", "hidden");
     }
     $aC = new anyC();
     $aC->setCollectionOf("Template");
     $aC->addAssocV3("templateType", "=", "presetTemplate");
     $gui->selectWithCollection("presetTemplateID", $aC, "name");
     if ($_SESSION["S"]->checkForPlugin("mHandler")) {
         $handlerAC = new anyC();
         $handlerAC->setCollectionOf("Handler");
         $handlerAC->addAssocV3("HandlerDomainID", "=", $U);
         $gui->selectWithCollection("formHandlerID", $handlerAC, "HandlerName", "keiner");
     } else {
         $gui->setParser("formHandlerID", "ContentGUI::noHandlerParser");
     }
     if ($this->A->contentType != "preset") {
         $gui->setLineStyle("presetTemplateID", "display:none;");
         $gui->setLineStyle("formHandlerID", "display:none;");
     }
     if ($this->A->contentType != "php") {
         $gui->setLineStyle("customContent", "display:none;");
     }
     $T = new TemplatesGUI();
     $T->addAssocV3("templateType", "=", "contentTemplate");
     $T->addAssocV3("templateType", "=", "listTemplate", "OR");
     $T->addAssocV3("templateType", "=", "tableTemplate", "OR");
     $T->addAssocV3("templateType", "=", "dlTemplate", "OR");
     $T->addOrderV3("templateType");
     $TG = new TemplatesGUI();
     $cats = $TG->getAvailableCategories();
     $options = array();
     while ($o = $T->getNextEntry()) {
         $options[$o->getID()] = $cats[$o->getA()->templateType];
     }
     $T->resetPointer();
     $gui->selectWithCollection("TemplateID", $T, "name");
     $gui->selectOptgroup("TemplateID", $options);
     $gui->setJSEvent("onSave", "function() { contentManager.loadFrame('contentLeft','Seite', " . $this->A("SeiteID") . "); }");
     $gui->setStandardSaveButton($this);
     $gui->customize($this->customizer);
     return $Tab . $gui->getEditHTML();
 }