public function getContextMenuHTML($identifier) { $kal = array(); if (!isset($_COOKIE["phynx_color"])) { $sk = "standard"; } else { $sk = $_COOKIE["phynx_color"]; } $fp = opendir("../styles/"); while (($file = readdir($fp)) !== false) { if ($file[0] == ".") { continue; } if (!is_dir("../styles/{$file}")) { continue; } $kal[$file] = ucfirst($file); } $gui = new HTMLGUI(); $message = "Achtung: Die Seite muss neu geladen werden, damit die Einstellungen wirksam werden. Jetzt neu laden?"; echo $gui->getContextMenu($kal, 'Colors', '1', $sk, "phynxContextMenu.stop(); if(confirm('{$message}')) document.location.reload();"); if (!isset($_COOKIE["phynx_layout"])) { $sk2 = "horizontal"; } else { $sk2 = $_COOKIE["phynx_layout"]; } echo '<div class="backgroundColor1" style="height: 10px;"></div>'; echo $gui->getContextMenu(array("horizontal" => "horizontal", "vertical" => "vertikal", "desktop" => "Desktop", "fixed" => "fixiert"), "Colors", "2", $sk2, 'phynxContextMenu.stop(); if(confirm(\'' . $message . '\')) document.location.reload();'); $ud = new mUserdata(); $al = $ud->getUDValue("noAutoLogout", "false"); echo '<div class="backgroundColor1" style="padding:5px;font-weight:bold;">Automatisch ausloggen:</div>'; echo $gui->getContextMenu(array("false" => "ja", "true" => "nein"), "Colors", "3", $al, 'phynxContextMenu.stop(); if(confirm(\'' . $message . '\')) document.location.reload();'); }
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; }
protected function getQuicksearchField() { if ($this->quickSearchPlugin != "") { $B = new Button("Suche als Filter anwenden", "./images/i2/searchFilter.png"); $B->type("icon"); $B->style("float:right;"); $B->rme("HTML", "", "saveContextMenu", array("'searchFilter'", "'{$this->quickSearchPlugin};:;'+\$('quickSearch{$this->quickSearchPlugin}').value"), "if(checkResponse(transport)) contentManager.reloadFrameRight();"); $showSF = PMReflector::implementsInterface($this->quickSearchPlugin . "GUI", "iSearchFilter"); if ($showSF) { $mU = new mUserdata(); $K = $mU->getUDValue("searchFilterInHTMLGUI" . $this->quickSearchPlugin); } else { $K = null; } $BSearchInfo = new Button("", "./images/i2/search.png"); $BSearchInfo->onclick("phynxContextMenu.start(this, '{$this->quickSearchPlugin}','searchHelp','" . $this->texts["Suche"] . ":','left');"); $BSearchInfo->style("cursor:help;"); $BSearchInfo->type("icon"); $quickSearchRow = "\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\t\t\tonfocus=\"focusMe(this); ACInputHasFocus=true; AC.start(this); if(this.value != '') AC.update('10', this, '{$this->quickSearchPlugin}', 'quickSearchLoadFrame');\"\n\t\t\t\t\t\t\t\tonblur=\"blurMe(this); ACInputHasFocus=false; AC.end(this);\"\n\t\t\t\t\t\t\t\tid=\"quickSearch{$this->quickSearchPlugin}\"\n\t\t\t\t\t\t\t\tonkeyup=\"AC.update(event.keyCode, this, '{$this->quickSearchPlugin}','quickSearchLoadFrame');\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tvalue=\"" . ($K != null ? $K : "") . "\"\n\t\t\t\t\t\t\t\t" . ($showSF ? "style=\"width:90%;\"" : "") . "\n\t\t\t\t\t\t\t/>"; return array($quickSearchRow, $BSearchInfo); } return array("", ""); }
public function getQuicksearchInput() { $I = new HTMLInput("quickSearch", "text", ""); #$I->hasFocusEvent(true); $I->id("quickSearch{$this->collectionName}"); $I->onkeyup("AC.update(event.keyCode, this, '{$this->collectionName}','quickSearchLoadFrame');"); $I->autocompleteBrowser(false); $I->onfocus("focusMe(this); ACInputHasFocus=true; AC.start(this); if(this.value != '') AC.update('10', this, '{$this->collectionName}', 'quickSearchLoadFrame');"); $I->onblur("blurMe(this); ACInputHasFocus=false; AC.end(this);"); $I->placeholder("Suche"); $B = ""; $showSF = PMReflector::implementsInterface($this->collectionName . "GUI", "iSearchFilter"); if ($showSF) { $B = new Button("Suche als Filter anwenden", "./images/i2/searchFilter.png", "icon"); $B->style("float:right;"); $B->rme("HTML", "", "saveContextMenu", array("'searchFilter'", "'{$this->collectionName};:;'+\$('quickSearch{$this->collectionName}').value"), "if(checkResponse(transport)) contentManager.reloadFrameRight();"); $mU = new mUserdata(); $K = $mU->getUDValue("searchFilterInHTMLGUI" . $this->collectionName); $I->setValue($K); $I->style("width:90%;"); } return $B . $I; }
/** * Filters table data by specified categories. * * @return Boolean True if filters are applied */ protected function filterCategories() { $fC = false; if (PMReflector::implementsInterface(get_class($this), "iCategoryFilter")) { $mU = new mUserdata(); $K = $mU->getUDValue("filteredCategoriesInHTMLGUI" . $this->getClearClass()); $F = $this->getCategoryFieldName(); if ($K != null and $K != "") { $Ks = explode(";", $K); foreach ($Ks as $k => $v) { $this->addAssocV3("{$F}", "=", $v, $k == "0" ? "AND" : "OR", "fCs"); } $fC = true; } } $this->isFiltered = $fC; if (!PMReflector::implementsInterface(get_class($this), "iSearchFilter")) { return $fC; } $mU = new mUserdata(); $K = $mU->getUDValue("searchFilterInHTMLGUI" . $this->getClearClass()); $F = $this->getSearchedFields(); if ($K == null or $K == "") { return $fC; } else { foreach ($F as $k => $v) { $this->addAssocV3("{$v}", "LIKE", '%' . $K . '%', $k == 0 ? "AND" : "OR", "sfs"); } } $this->isFiltered = true; return true; }
public static function getAppMenuOrder($cat) { $ud = new mUserdata(); $o1 = $ud->getUDValue(Applications::activeApplication() . $cat . "1", ""); $ud = new mUserdata(); $o2 = $ud->getUDValue(Applications::activeApplication() . $cat . "2", ""); $o = $o1 . $o2; #if($cat == "appMenuHidden" AND $o == "") $o = "emptyList"; return $o; }
public static function getUDValueS($name, $default = null) { $U = new mUserdata(); return $U->getUDValue($name, $default); }