本文整理汇总了PHP中Button::type方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::type方法的具体用法?PHP Button::type怎么用?PHP Button::type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Button
的用法示例。
在下文中一共展示了Button::type方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getNav
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' && 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") == "" ? "<kein Name>" : $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;
}
示例2: getHTML
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>";
}
}
示例3: textParser
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);
}
示例4: nameParser
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;
}
示例5: getHTML
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();
}
示例6: getHTML
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();
}
示例7: getHTML
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;
}
示例8: buildTabBar
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;
}
示例9: setPath
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;
}
示例10: getBrowserHTML
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();
//.........这里部分代码省略.........
示例11: getPopupManager
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;
}
示例12: folgeParser
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;
}
示例13: getHTML
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) {
//.........这里部分代码省略.........
示例14: getTable
//.........这里部分代码省略.........
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()) : " ") . "\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;
}
示例15: getWindow
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;
}