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;
 }
Beispiel #2
0
 public function getContextMenuHTML($identifier)
 {
     $deTexts = array();
     $deTexts["pluginSupport"] = "Bitte beachten Sie, dass ein Plugin diese Einstellungen unterstützen muss, selbst wenn es hier angezeigt wird!";
     $deTexts["selectPlugin"] = "Bitte Plugin wählen";
     $deTexts["add"] = "hinzufügen";
     $deTexts["selectPluginButton"] = "Plugin auswählen";
     $deTexts["save"] = "speichern";
     $deTexts["select"] = "auswählen";
     $deTexts["noPsOptions"] = "keine plugin-spezifischen Optionen vorhanden";
     $deTexts["newFieldName"] = "Neuer Feldname";
     $deTexts["maybeHidden"] = "Bitte beachten Sie, dass hier interne Namen angezeigt werden, die von der Feldbeschriftung abweichen können!<br />Manche internen Felder werden möglichweise gar nicht angezeigt.";
     $ac = new anyC();
     $singularLanguageClass = $ac->loadLanguageClass("Userdata");
     $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : $deTexts;
     $opts = "";
     $ps = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins());
     $ms = $_SESSION["CurrentAppPlugins"]->getAllMenuEntries();
     #print_r($ms);
     foreach ($ps as $key => $value) {
         if ($key == "mUserdata") {
             continue;
         }
         if ($identifier == "4" and !PMReflector::implementsInterface($key, "iPluginSpecificRestrictions")) {
             continue;
         }
         if ($identifier == "4") {
             $c = new $key();
             if (!$c->getPluginSpecificRestrictions()) {
                 continue;
             }
         }
         if ($identifier == "5" and !in_array($key, $ms)) {
             continue;
         }
         if ($value == "Kunde") {
             continue;
         }
         if (!$_SESSION["CurrentAppPlugins"]->getIsAdminOnly($key) and $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) != "") {
             $opts .= "<option value=\"{$key}:" . $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) . "\">{$value}</option>";
         }
     }
     $s = explode(":", $identifier);
     if (isset($s[1])) {
         $identifier = $s[0];
     }
     switch ($identifier) {
         case "1":
             $c = isset($text["kann nicht erstellen"]) ? $text["kann nicht erstellen"] : "kann nicht\nerstellen";
             $b = isset($text["kann nicht bearbeiten"]) ? $text["kann nicht bearbeiten"] : "kann nicht\nbearbeiten";
             $l = isset($text["kann nicht löschen"]) ? $text["kann nicht löschen"] : "kann nicht\nlöschen";
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $c . "\" style=\"background-image:url(./images/navi/new.png);\" onclick=\"phynxContextMenu.update('mUserdata','Create','" . str_replace(array("\n", "'"), array(" ", "\\'"), $c) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $b . "\" style=\"background-image:url(./images/navi/editb.png);\" onclick=\"phynxContextMenu.update('mUserdata','Edit','" . str_replace(array("\n", "'"), array(" ", "\\'"), $b) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $l . "\" style=\"background-image:url(./images/navi/trash.png);\" onclick=\"phynxContextMenu.update('mUserdata','Delete','" . str_replace(array("\n", "'"), array(" ", "\\'"), $l) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["pluginSupport"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "Edit":
         case "Delete":
         case "Create":
             echo "\n\t\t\t\t<input type=\"hidden\" id=\"uRestAction\" value=\"{$identifier}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"cant{$identifier}\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["add"] . "\" onclick=\"addUserRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "3":
         case "2":
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["select"] . "\" onclick=\"phynxContextMenu.update('mUserdata','" . ($identifier == "2" ? "relabel" : "hide") . ":'+\$('relabelPlugin').value.split(':')[1], \$('relabelPlugin').value.split(':')[1]);\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["maybeHidden"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "5":
         case "4":
             if ($opts == "") {
                 die("<p>" . $text["noPsOptions"] . "</p>");
             }
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == 4 ? "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"phynxContextMenu.update('mUserdata','pS:'+\$('relabelPlugin').value.split(':')[0], \$('relabelPlugin').value.split(':')[0]);\" /></td>\n\t\t\t\t\t</tr>" : "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"addHidePlugin();\" /></td>\n\t\t\t\t\t</tr>") . "\n\t\t\t\t</table>";
             break;
         case "pS":
             $c = new $s[1]();
             $pSs = $c->getPluginSpecificRestrictions();
             $pSopts = "";
             foreach ($pSs as $key => $value) {
                 $pSopts .= "<option value=\"{$key}:{$s['1']}\">{$value}</option>";
             }
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"pSSelect\">{$pSopts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"savePluginSpecificRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "hide":
         case "relabel":
             try {
                 $c = new $s[1](-1);
                 $c = $c->newAttributes();
                 echo "\n\t\t\t\t<input type=\"hidden\" id=\"" . $identifier . "Plugin\" value=\"{$s['1']}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"" . $identifier . "Field\"><option>" . implode("</option><option>", PMReflector::getAttributesArray($c)) . "</option></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == "relabel" ? "<tr>\n\t\t\t\t\t\t<td>" . $text["newFieldName"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input id=\"relabelTo\" type=\"text\" /></td>\n\t\t\t\t\t</tr>" : "") . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"" . ($identifier == "relabel" ? "saveFieldRelabeling();" : "saveFieldHiding();") . "\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             } catch (ClassNotFoundException $e) {
                 echo "<p>Diese Option steht bei diesem Plugin leider nicht zur Verfügung</p>";
             }
             break;
         case "copyFromUser":
             $T = new HTMLTable(2);
             $T->useForSelection();
             $T->setColWidth(1, 20);
             $T->maxHeight(200);
             $G = new Users();
             $G->addAssocV3("isAdmin", "=", "0");
             $G->setLimitV3("10");
             $G->lCV3();
             while ($t = $G->getNextEntry()) {
                 $T->addRow(array(new Button("", "./images/i2/copy.png", "icon"), $t->A("username")));
                 $T->addRowEvent("click", "copyFromOtherUser('" . $t->getID() . "');");
             }
             echo $T;
             break;
         case "login":
             $T = new HTMLTable(2);
             $T->useForSelection();
             $T->setColWidth(1, 20);
             $T->maxHeight(200);
             $apps = Applications::getList();
             foreach ($apps as $app) {
                 #rme("mUserdata","-1","setUserdata",new Array("hidePlugin"+$('relabelPlugin').value.split(":")[0],$('relabelPlugin').value.split(":")[0], "pHide", lastLoadedLeft),"contentManager.reloadFrameLeft()");
                 $T->addRow(array(new Button("", "./plugins/Userdata/login18.png", "icon"), "Kann sich nicht an '{$app}' anmelden"));
                 $T->addRowEvent("click", OnEvent::rme(new mUserdata(-1), "setUserdata", array("'loginTo{$app}'", "'0'", "'loginTo'", "lastLoadedLeft"), OnEvent::closeContext() . OnEvent::reload("Left")));
                 #$T->addRowEvent("click", "copyFromOtherUser('".$t->getID()."');");
             }
             echo $T;
             break;
     }
 }
Beispiel #3
0
 public function operationsButton()
 {
     $pluginName = str_replace("GUI", "", get_class($this->object));
     $id = $this->object->getID();
     $userCanDelete = mUserdata::isDisallowedTo("cantDelete" . $pluginName);
     $userCanCreate = mUserdata::isDisallowedTo("cantCreate" . $pluginName);
     /*if($this->texts == null) {
     			$c = $this->loadLanguageClass("HTML");
     			$this->texts = $c->getEditTexts();
     		}*/
     $html = "";
     if (PMReflector::implementsInterface($pluginName, "iNewWithValues") and $userCanCreate) {
         $os = "1";
     } else {
         $os = "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iCloneable") and $userCanCreate) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if ((PMReflector::implementsInterface($pluginName, "iDeletable") or PMReflector::implementsInterface($pluginName, "iDeletable2")) and $userCanDelete) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iRepeatable") and Session::isPluginLoaded("mRepeatable")) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if (PMReflector::implementsInterface($pluginName, "iXMLExport")) {
         $os .= "1";
     } else {
         $os .= "0";
     }
     if ($id != -1 and $os != "00000") {
         $B = new Button("Operationen", "wrench", "iconic");
         $B->style("float:right;margin-top:-3px;");
         $B->contextMenu("HTML", "operations:{$pluginName}:{$id}:{$os}", "Operationen");
         $html = $B;
     }
     #$html .= "<img title=\"Operationen\" id=\"".$pluginName."Operations\" src=\"./images/i2/settings.png\" onclick=\"phynxContextMenu.start(this, 'HTML','operations:$pluginName:$id:$os','".$this->texts["Operationen"].":');\" style=\"float:right;\" />";
     return $html;
 }
 public function isCloneable()
 {
     return PMReflector::implementsInterface(get_class($this), "iCloneable");
 }
 public function saveBis($element_id)
 {
     $bps = $this->getMyBPSData();
     $s = split("_", $element_id);
     if (strpos($s[0], "GUI") === false) {
         $s[0] .= "GUI";
     }
     if (!PMReflector::implementsInterface($s[0], "iCategorizer")) {
         Red::errorD($this->E030);
     }
     if ($bps != -1 and isset($bps["VonClass"]) and $bps["VonClass"] != $s[0]) {
         Red::errorD($this->E031);
     }
     if ($bps != -1 and isset($bps["VonID"]) and $bps["VonID"] > $s[1]) {
         Red::errorD($this->E032);
     }
     $_SESSION["BPS"]->setACProperty("BisClass", $s[0]);
     $_SESSION["BPS"]->setACProperty("BisID", $s[1]);
     $this->getWindowHTML();
 }
Beispiel #6
0
 private function searchFolder($dir)
 {
     $fp = opendir($dir);
     if (!$fp) {
         return;
     }
     while (($file = readdir($fp)) !== false) {
         if (is_dir("{$dir}/{$file}") and !$this->isRecursive) {
             continue;
         } elseif ($this->isRecursive and is_dir("{$dir}/{$file}") and $file[0] != ".") {
             $this->searchFolder("{$dir}/{$file}");
         }
         $c = false;
         for ($i = 0; $i < count($this->excludeExtensions); $i++) {
             if (strtolower(substr($file, strlen($this->excludeExtensions[$i]) * -1)) == $this->excludeExtensions[$i]) {
                 $c = true;
             }
         }
         if ($c) {
             continue;
         }
         $c = false;
         for ($i = 0; $i < count($this->onlyExtensions); $i++) {
             if (strtolower(substr($file, strlen($this->onlyExtensions[$i]) * -1)) != $this->onlyExtensions[$i]) {
                 $c = true;
             }
         }
         if ($c) {
             continue;
         }
         $c = false;
         for ($i = 0; $i < count($this->implementedInterfaces); $i++) {
             if (!PMReflector::implementsInterface(str_replace($this->onlyExtensions, "", $file), $this->implementedInterfaces[$i])) {
                 $c = true;
             }
         }
         if ($c) {
             continue;
         }
         $this->foundFiles[] = $file;
     }
 }
Beispiel #7
0
 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;
 }
Beispiel #9
0
    $userHiddenPlugins = mUserdata::getHiddenPlugins();
}
if (isset($userHiddenPlugins[$_GET["p"]])) {
    Red::errorD("Sie haben keine Berechtigung, diese Seite zu betrachten!");
}
if (isset($_GET["bps"])) {
    $_SESSION["BPS"]->setByString($_GET["bps"]);
}
$_GET["p"] = str_replace("GUI", "", $_GET["p"]);
$n = $_GET["p"] . "GUI";
try {
    $b = new $n(isset($_GET["id"]) ? $_GET["id"] : "-1");
} catch (ClassNotFoundException $e) {
    Red::errorClass($n);
}
if (!PMReflector::implementsInterface($n, "iGUIHTMLMP2") and !PMReflector::implementsInterface($n, "iGUIHTML2")) {
    Red::errorD("Class {$_GET['p']}GUI needs to implement the interface iGUIHTML2 or iGUIHTMLMP2!");
}
try {
    echo $b->getHTML(isset($_GET["id"]) ? $_GET["id"] : "-1", isset($_GET["page"]) ? $_GET["page"] : 0);
} catch (TableDoesNotExistException $e) {
    Red::errorD("Die Datenbank-Tabelle (" . $e->getTable() . ") dieses Plugins wurde noch nicht angelegt. Bitte verwenden Sie das Installations-Plugin im Administrationsbereich.");
} catch (DatabaseNotSelectedException $e) {
    Red::errorD("Keine Datenbank ausgewählt. Bitte verwenden Sie das Installations-Plugin im Administrationsbereich.");
} catch (NoDBUserDataException $e) {
    Red::errorD("Die Datenbank-Zugangsdaten sind falsch. Bitte verwenden Sie das Installations-Plugin im Administrationsbereich.");
} catch (FieldDoesNotExistException $e) {
    Red::errorUpdate();
} catch (DatabaseNotFoundException $e) {
    Red::errorD("Keine Datenbank ausgewählt. Bitte verwenden Sie das Installations-Plugin im Administrationsbereich.");
}
Beispiel #10
0
 public function getContextMenuHTML($identifier)
 {
     $deTexts = array();
     $deTexts["pluginSupport"] = "Bitte beachten Sie, dass ein Plugin diese Einstellungen unterstützen muss, selbst wenn es hier angezeigt wird!";
     $deTexts["selectPlugin"] = "Bitte Plugin wählen";
     $deTexts["add"] = "hinzufügen";
     $deTexts["selectPluginButton"] = "Plugin auswählen";
     $deTexts["save"] = "speichern";
     $deTexts["select"] = "auswählen";
     $deTexts["noPsOptions"] = "keine plugin-spezifischen Optionen vorhanden";
     $deTexts["newFieldName"] = "Neuer Feldname";
     $deTexts["maybeHidden"] = "Bitte beachten Sie, dass hier interne Namen angezeigt werden, die von der Feldbeschriftung abweichen können!<br />Manche internen Felder werden möglichweise gar nicht angezeigt.";
     $ac = new anyC();
     $singularLanguageClass = $ac->loadLanguageClass("Userdata");
     $text = $singularLanguageClass != null ? $singularLanguageClass->getText() : $deTexts;
     $opts = "";
     $ps = array_flip($_SESSION["CurrentAppPlugins"]->getAllPlugins());
     $ms = $_SESSION["CurrentAppPlugins"]->getAllMenuEntries();
     #print_r($ms);
     foreach ($ps as $key => $value) {
         if ($key == "mUserdata") {
             continue;
         }
         if ($identifier == "4" and !PMReflector::implementsInterface($key, "iPluginSpecificRestrictions")) {
             continue;
         }
         if ($identifier == "5" and !in_array($key, $ms)) {
             continue;
         }
         if (!$_SESSION["CurrentAppPlugins"]->getIsAdminOnly($key) and $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) != "") {
             $opts .= "<option value=\"{$key}:" . $_SESSION["CurrentAppPlugins"]->isCollectionOfFlip($key) . "\">{$value}</option>";
         }
     }
     $s = explode(":", $identifier);
     if (isset($s[1])) {
         $identifier = $s[0];
     }
     switch ($identifier) {
         case "1":
             $c = isset($text["kann nicht erstellen"]) ? $text["kann nicht erstellen"] : "kann nicht\nerstellen";
             $b = isset($text["kann nicht bearbeiten"]) ? $text["kann nicht bearbeiten"] : "kann nicht\nbearbeiten";
             $l = isset($text["kann nicht löschen"]) ? $text["kann nicht löschen"] : "kann nicht\nlöschen";
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $c . "\" style=\"background-image:url(./images/navi/new.png);\" onclick=\"phynxContextMenu.update('mUserdata','Create','" . str_replace(array("\n", "'"), array(" ", "\\'"), $c) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $b . "\" style=\"background-image:url(./images/navi/editb.png);\" onclick=\"phynxContextMenu.update('mUserdata','Edit','" . str_replace(array("\n", "'"), array(" ", "\\'"), $b) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" class=\"bigButton backgroundColor2\" value=\"" . $l . "\" style=\"background-image:url(./images/navi/trash.png);\" onclick=\"phynxContextMenu.update('mUserdata','Delete','" . str_replace(array("\n", "'"), array(" ", "\\'"), $l) . ":');\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["pluginSupport"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "Edit":
         case "Delete":
         case "Create":
             echo "\n\t\t\t\t<input type=\"hidden\" id=\"uRestAction\" value=\"{$identifier}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"cant{$identifier}\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["add"] . "\" onclick=\"addUserRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "3":
         case "2":
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["select"] . "\" onclick=\"phynxContextMenu.update('mUserdata','" . ($identifier == "2" ? "relabel" : "hide") . ":'+\$('relabelPlugin').value.split(':')[1], \$('relabelPlugin').value.split(':')[1]);\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><img src=\"./images/navi/warning.png\" style=\"float:left;margin-right:4px;\" />" . $text["maybeHidden"] . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "5":
         case "4":
             if ($opts == "") {
                 die("<p>" . $text["noPsOptions"] . "</p>");
             }
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $text["selectPlugin"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"relabelPlugin\">{$opts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == 4 ? "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"phynxContextMenu.update('mUserdata','pS:'+\$('relabelPlugin').value.split(':')[0], \$('relabelPlugin').value.split(':')[0]);\" /></td>\n\t\t\t\t\t</tr>" : "<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["selectPluginButton"] . "\" onclick=\"addHidePlugin();\" /></td>\n\t\t\t\t\t</tr>") . "\n\t\t\t\t</table>";
             break;
         case "pS":
             $c = new $s[1]();
             $pSs = $c->getPluginSpecificRestrictions();
             $pSopts = "";
             foreach ($pSs as $key => $value) {
                 $pSopts .= "<option value=\"{$key}:{$s['1']}\">{$value}</option>";
             }
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"pSSelect\">{$pSopts}</select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"savePluginSpecificRestriction();\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             break;
         case "hide":
         case "relabel":
             try {
                 $c = new $s[1](-1);
                 $c = $c->newAttributes();
                 echo "\n\t\t\t\t<input type=\"hidden\" id=\"" . $identifier . "Plugin\" value=\"{$s['1']}\" />\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><select id=\"" . $identifier . "Field\"><option>" . implode("</option><option>", PMReflector::getAttributesArray($c)) . "</option></select></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t" . ($identifier == "relabel" ? "<tr>\n\t\t\t\t\t\t<td>" . $text["newFieldName"] . ":</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input id=\"relabelTo\" type=\"text\" /></td>\n\t\t\t\t\t</tr>" : "") . "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><input type=\"button\" value=\"" . $text["save"] . "\" onclick=\"" . ($identifier == "relabel" ? "saveFieldRelabeling();" : "saveFieldHiding();") . "\" /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
             } catch (ClassNotFoundException $e) {
                 echo "<p>Diese Option steht bei diesem Plugin leider nicht zur Verfügung</p>";
             }
             break;
         case "copyFromUser":
             echo "\n\t\t\t\t<table>\n\t\t\t\t\t<colgroup>\n\t\t\t\t\t\t<col style=\"width:20px;\" />\n\t\t\t\t\t\t<col class=\"backgroundColor2\" />\n\t\t\t\t\t</colgroup>";
             $G = new Users();
             $G->addAssocV3("isAdmin", "=", "0");
             #$G->addAssocV3("UserID","!=",$this->ID);
             #$G->addJoinV3("Auftrag","AuftragID","=","AuftragID");
             #$G->setAssocV3("is$identifier","=","1");
             #if($bps != -1) $G->addAssocV3("GRLBMID","!=",$bps["loadGRLBMID"]);
             #$G->addOrderV3("nummer","DESC");
             $G->setLimitV3("10");
             $G->lCV3();
             while ($t = $G->getNextEntry()) {
                 echo "\n\t\t\t\t\t<tr onclick=\"copyFromOtherUser('" . $t->getID() . "');\" class=\"\" onmouseout=\"this.className='';\" style=\"cursor:pointer;\" onmouseover=\"this.className = 'backgroundColor0';\">\n\t\t\t\t\t\t<td><img src=\"./images/i2/copy.png\" class=\"mouseoverFade\" /></td>\n\t\t\t\t\t\t<td>" . $t->getA()->username . "</td>\n\t\t\t\t\t</tr>";
             }
             echo "\n\t\t\t\t</table>";
             break;
     }
 }
Beispiel #11
0
 protected function getQuicksearchField()
 {
     if ($this->quickSearchPlugin != "") {
         $B = "";
         $K = "";
         $showSF = PMReflector::implementsInterface($this->quickSearchPlugin . "GUI", "iSearchFilter");
         if ($showSF) {
             $B = new Button("Suche als Filter anwenden", "./images/i2/searchFilter.png", "icon");
             $B->style("float:right;");
             $B->rmePCR("HTML", "", "saveContextMenu", array("'searchFilter'", "'{$this->quickSearchPlugin};:;'+\$('quickSearch{$this->quickSearchPlugin}').value"), "if(checkResponse(transport)) contentManager.reloadFrame('contentRight', '', 0);");
             $mU = new mUserdata();
             $K = $mU->getUDValue("searchFilterInHTMLGUI" . $this->quickSearchPlugin);
         }
         $BSearchInfo = new Button("", "info", "iconic");
         $BSearchInfo->onclick("phynxContextMenu.start(this, '{$this->quickSearchPlugin}','searchHelp','" . $this->texts["Suche"] . ":','left');");
         $BSearchInfo->style("cursor:help;");
         #$BSearchInfo->type("icon");
         $quickSearchRow = "{$B}\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\tplaceholder=\"Suche\"\n\t\t\t\t\t\t\t\tvalue=\"{$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 static function replaceFunctionCalls($html, $object)
 {
     preg_match_all("/\\[\\[([a-zA-Z0-9:]*)\\]\\]/", $html, $treffer);
     if (count($treffer) > 0) {
         $treffer = array_unique($treffer[1]);
         foreach ($treffer as $k => $v) {
             $s = explode("::", $v);
             try {
                 $c = $s[0];
                 $c = new $c();
                 if (PMReflector::implementsInterface($s[0], "iCustomContent") and method_exists($c, $s[1])) {
                     $method = new ReflectionMethod($s[0], $s[1]);
                     $html = str_replace("[[{$v}]]", $method->invoke(null, $object), $html);
                 } else {
                     str_replace("[[{$v}]]", "[[{$s} does not implement iCustomContent]]", $html);
                 }
             } catch (ClassNotFoundException $e) {
             }
         }
     }
     return $html;
 }