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(); }
function getHTML($id) { $this->loadMeOrEmpty(); $gui = new HTMLGUI2(); $gui->setObject($this); $gui->setName("RSSFilter"); $gui->setShowAttributes(array("RSSFilterName", "RSSFilterFeed", "RSSFilterAdapter", "RSSFilterJDID", "RSSFilterAutoDL", "RSSFilterProviderRapidshare", "RSSFilterProviderNetload", "RSSFilterProviderUploaded")); $gui->setLabel("RSSFilterName", "Name"); $gui->setLabel("RSSFilterFeed", "Feed URL"); $gui->setLabel("RSSFilterAdapter", "Adapter"); $gui->setLabel("RSSFilterJDID", "DL with"); $gui->setLabel("RSSFilterProviderRapidshare", "Rapidshare.com"); $gui->setLabel("RSSFilterProviderNetload", "Netload"); $gui->setLabel("RSSFilterProviderUploaded", "Uploaded"); $gui->setLabel("RSSFilterAutoDL", "Auto-DL?"); $gui->setType("RSSFilterProviderRapidshare", "checkbox"); $gui->setType("RSSFilterProviderNetload", "checkbox"); $gui->setType("RSSFilterAutoDL", "checkbox"); $gui->setType("RSSFilterProviderUploaded", "checkbox"); $gui->insertSpaceAbove("RSSFilterJDID"); $gui->setFieldDescription("RSSFilterAutoDL", "Currently only works when using JDownloader RC, Qnap and pyLoad. Will have no effect otherwise."); $gui->selectWithCollection("RSSFilterJDID", new mJDGUI(), "JDName", "nicht herunterladen"); $gui->setStandardSaveButton($this); $Tab = new HTMLSideTable("right"); $B = new Button("show filtered\nfeed", "./trinityDB/RSSFilter/Filtered.png"); $B->onclick("window.open('./trinityDB/RSSFilter/FilteredFeed.php?RSSFilterID=" . $this->getID() . "', 'Filtered feed');"); $Tab->addRow($B); $FB = new FileBrowser(); $FB->addDir(Util::getRootPath() . "trinityDB/RSSFilter"); $Adapters = $FB->getAsLabeledArray("iFeedFilter", ".class.php", true); $gui->setType("RSSFilterAdapter", "select"); $gui->setOptions("RSSFilterAdapter", array_values($Adapters), array_keys($Adapters)); return $Tab . $gui->getEditHTML(); }
public function getHTML($id, $page) { $this->addOrderV3("name"); $this->filterCategories(); $this->loadMultiPageMode($id, $page, 0); $gui = new HTMLGUIX($this); $gui->version("mSerie"); $gui->options(true, true, true, true); $gui->name("Serie"); $gui->attributes(array("name", "sprache")); $gui->parser("name", "mSerieGUI::nameParser"); $Tab = new HTMLSideTable("left"); $B = new Button("check for\nupdates", "./trinityDB/Serien/Updates.png"); $B->rmePCR("mSerie", "", "checkUpdates", "", "Popup.display('Updates', transport);"); $Tab->addRow($B); try { return ($id == -1 ? $Tab : "") . $gui->getBrowserHTML($id); } catch (Exception $e) { } }
public function getHTML($id, $page) { $bps = $this->getMyBPSData(); $this->loadMultiPageMode($id, $page, 0); $gui = new HTMLGUIX($this); $gui->version("mIncoming"); #$gui->options(true, true, true, true); $gui->name("Incoming"); $gui->attributes(array("IncomingDir")); try { if ($bps != -1 and isset($bps["edit"])) { return $gui->getBrowserHTML($id); } } catch (Exception $e) { } $T = new HTMLTable(3, "new episodes"); $found = $this->findNewEpisodes(); foreach ($found as $S) { foreach ($S as $E) { $T->addRow(array($E["name"], $E["season"], $E["episode"])); } } $Tab = new HTMLSideTable("left"); $B = new Button("Change\ndirectories", "./trinityDB/Incoming/SetFolder.png"); $B->onclick("contentManager.loadFrame('contentRight', 'mIncoming', -1, 0, 'mIncomingGUI;edit:true');"); $Tab->addRow($B); $B = $Tab->addButton("Rename\ndownloaded", "redo"); $B->popup("", "Rename downloaded", "mIncoming", "-1", "renameDownloaded", array("'1'")); $B = $Tab->addButton("Create move-\nscript", "redo"); $B->windowRme("mIncoming", "-1", "createMoveScript", array("'0'")); $B = $Tab->addButton("Run move-\nscript", "redo"); $B->windowRme("mIncoming", "-1", "createMoveScript", array("'1'")); $B = $Tab->addButton("Prettifyer", "./trinityDB/Incoming/prettify.png"); $B->loadFrame("contentLeft", "mIncomingPrettify"); return ($id == -1 ? $Tab : "") . $T; }
private function sideButtons($bps = null) { T::D($this->className); $ST = ""; if (count($this->sideButtons) > 0 and ($bps == null or !isset($bps["selectionMode"]))) { $position = "left"; if ($this->object instanceof PersistentObject) { $position = "right"; } if ($this->displayMode == "BrowserLeft") { $position = "right"; } $ST = new HTMLSideTable($position); $ST->setTableID("SideTable" . get_class($this->object)); foreach ($this->sideButtons as $B) { $ST->addRow($B . ""); } } T::D(""); return $ST; }
function getHTML($id) { $forReload = ""; $displayMode = null; $AuftragID = -1; $bps = $this->getMyBPSData(); if ($bps != -1 and isset($bps["AuftragID"])) { $AuftragID = $bps["AuftragID"]; } if ($bps != -1 and isset($bps["displayMode"])) { $displayMode = $bps["displayMode"]; } $_SESSION["BPS"]->unsetACProperty("AuftragID"); $_SESSION["BPS"]->unsetACProperty("displayMode"); #if($this->A == null AND $id != -1) $this->loadMe(); $this->loadMeOrEmpty(); if ($id * 1 == -1) { $this->A = $this->newAttributes(); $this->A->AuftragID = $AuftragID; if ($displayMode != null) { $this->A->type = $displayMode; } //Has to stay or lieferAdresse will also overwrite a normal Auftrags-Adresse if (Session::isPluginLoaded("mAdressBuch")) { $AB = BPS::getProperty("AdressenGUI", "AdressBuch", null); if ($AB) { $this->A->type = "AB{$AB}"; } } $id = $this->newMe(true, false); $this->forceReload(); try { $K = new Kunden(); if ($displayMode == null and $this->A("type") == "default") { //Or else a lieferAdresse will get a Kundennummer $K->createKundeToAdresse($id, false); } } catch (ClassNotFoundException $e) { } $forReload = "<script type=\"text/javascript\">lastLoadedLeft = {$id}; lastLoadedLeftPlugin = 'Adresse';</script>"; } $OptTab = new HTMLSideTable("right"); if (Session::isPluginLoaded("Kunden") and $this->A->AuftragID == -1) { $B = new Button("Kundendaten", "kunden"); $B->loadFrame("contentLeft", "Kunde", "-1", "0", "KundeGUI;AdresseID:{$this->getID()};action:Kappendix"); $OptTab->addRow($B); } if ($_SESSION["applications"]->getActiveApplication() == "open3A") { if ($displayMode != null) { $OptTab->setTableStyle("width:160px;margin:0px;margin-left:-170px;float:left;"); } if (($id == -1 or $forReload != "") and Session::isPluginLoaded("mImport")) { $OTBV = new Button("Schnell-\nImport", "import"); #$OTBV->rmePCR("importAdresse", "", "getFastImportWindow", "", "Popup.display('Adresse importieren:',transport);"); $OTBV->onclick("Import.openSchnellImportAdresse('Adresse importieren:');"); $OTBV->id("ButtonAdresseSchnellImport"); $OptTab->addRow($OTBV); } if ($id != -1 and Session::isPluginLoaded("Kundenpreise") and $this->A->AuftragID == -1 and $this->A->type == "default") { $ButtonKundenpreise = new Button("Kundenpreise", "package"); $ButtonKundenpreise->onclick("contentManager.loadFrame('contentLeft','Kunde', -1, 0, 'KundeGUI;AdresseID:{$this->ID};action:Kundenpreise');"); $OptTab->addRow($ButtonKundenpreise); } if ($this->A->AuftragID == -1 and (Session::isPluginLoaded("mAnsprechpartner") or Session::isPluginLoaded("mOSM"))) { $OptTab->addRow(""); $OptTab->addCellStyle(1, "height:30px;"); } if ($id != -1 and Session::isPluginLoaded("mAnsprechpartner") and $this->A->AuftragID == -1) { $OptTab->addRow(Ansprechpartner::getButton("Adresse", $this->getID())); } if ($id != -1 and Session::isPluginLoaded("mOSM") and $this->A("AuftragID") == -1) { $OptTab->addRow(OpenLayers::getButton("Adresse", $this->getID())); } } if (Session::isPluginLoaded("mklickTel") and $this->A->AuftragID == -1) { $OptTab->addRow(klickTel::getButton($this->getID())); } $this->loadMeOrEmpty(); $gui = $this->gui; $gui->insertSpaceAbove("tel", "Kontakt"); $gui->insertSpaceAbove("strasse", "Adresse"); $gui->insertSpaceAbove("homepage", "Sonstiges"); $gui->setFormID("AdresseForm"); $fields = array("firma", "position", "anrede", "vorname", "nachname", "AdresseSpracheID", "strasse", "bezirk", "zusatz1", "ort", "land", "tel", "fax", "mobil", "email", "homepage", "gebRem", "gebRemMail", "AuftragID", "KategorieID", "type", "geb", "bemerkung"); if (Session::isPluginLoaded("mLDAP")) { $fields[] = "exportToLDAP"; } $gui->setShowAttributes($fields); $gui->setLabel("bemerkung", "Notizen"); if (Session::isPluginLoaded("mSprache")) { $gui->setLabel("AdresseSpracheID", "Sprache"); $gui->setLabelDescription("AdresseSpracheID", "und Währung"); #$ACS = anyC::get("Sprache"); #$S = array(); #while($SLW = $ACS->getNextEntry()) # $S[$SLW->getID()] = $SLW->A("SpracheSprache")." "." ".$SLW->A("SpracheWaehrung"); $gui->selectWithCollection("AdresseSpracheID", new mSprache(), "SpracheName"); #$gui->setType("AdresseSpracheID", "select"); #$gui->setOptions("AdresseSpracheID", array_keys($S), array_values($S)); #$gui->insertSpaceAbove("firma"); } else { $gui->setType("AdresseSpracheID", "hidden"); } #$gui->setAttributes($this->A); $gui->setObject($this); $gui->setName("Adresse"); $gui->setOptions("anrede", array_keys(self::getAnreden()), array_values(self::getAnreden())); $gui->setType("anrede", "select"); $gui->setType("geb", "hidden"); $gui->setType("gebRemMail", "hidden"); $gui->setType("gebRem", "hidden"); $gui->setType("exportToLDAP", "checkbox"); $gui->insertSpaceAbove("exportToLDAP"); $gui->setFieldDescription("exportToLDAP", "Soll die Adresse auf einen LDAP-Server exportiert werden?"); $gui->setType("AuftragID", "hidden"); $gui->setType("type", "hidden"); #$gui->setLabel("geb","Jahrestag"); $gui->setLabel("ort", "PLZ/Ort"); $gui->setLabel("strasse", "Straße/Hausnr."); $gui->setLabel("tel", "Telefon"); $gui->setLabel("email", "E-Mail"); $gui->setLabel("exportToLDAP", "LDAP-Export?"); $gui->setParser("strasse", "AdresseGUI::parserStrasse", array($this->A("nr"))); $gui->setParser("ort", "AdresseGUI::parserOrt", array($this->A("plz"))); #$gui->useAutoCompletion("plz", (Session::isPluginLoaded("Postleitzahlen") ? "Postleitzahlen" : "Adressen")); if (Session::isPluginLoaded("mStammdaten") or Applications::activeApplication() == "MMDB") { /*if($this->A("land") == ""){ $S = Stammdaten::getActiveStammdaten(); if($S->A("land") == "D") $S->changeA("land","DE"); $this->changeA("land", ISO3166::getCountryToCode($S->A("land"))); }*/ $gui->setType("land", "select"); $countries = ISO3166::getCountries(); $labels = array_merge(array("" => "keine Angabe"), $countries); $values = array_merge(array("" => ""), $countries); $gui->setOptions("land", array_values($values), array_values($labels)); if ($this->A("land") != ISO3166::getCountryToCode("GB") and $this->A("land") != ISO3166::getCountryToCode("US") and $this->A("land") != ISO3166::getCountryToCode("CH")) { $gui->setLineStyle("zusatz1", "display:none;"); $gui->setLineStyle("position", "display:none;"); } if ($this->A("land") != ISO3166::getCountryToCode("DK") and $this->A("land") != ISO3166::getCountryToCode("ES")) { $gui->setLineStyle("bezirk", "display:none;"); } $gui->setLabel("zusatz1", "Zusatz 1"); $gui->setInputJSEvent("land", "onchange", "contentManager.toggleFormFields((this.value == '" . ISO3166::getCountryToCode("GB") . "' || this.value == '" . ISO3166::getCountryToCode("US") . "' || this.value == '" . ISO3166::getCountryToCode("CH") . "') ? 'show' : 'hide', ['zusatz1', 'position']); contentManager.toggleFormFields((this.value == '" . ISO3166::getCountryToCode("DK") . "' || this.value == '" . ISO3166::getCountryToCode("ES") . "') ? 'show' : 'hide', ['bezirk']);"); } if (Session::isPluginLoaded("mGemeinschaft")) { $gui->activateFeature("addCustomButton", $this, "tel", Gemeinschaft::getCallButton($this->A("tel"))); $gui->activateFeature("addCustomButton", $this, "mobil", Gemeinschaft::getCallButton($this->A("mobil"), "mobile")); } $kat = new Kategorien(); $kat->addAssocV3("type", "=", $displayMode != "" ? $displayMode : "1"); $keys = $kat->getArrayWithKeys(); $keys[] = "0"; $values = $kat->getArrayWithValues(); $values[] = "bitte auswählen"; $gui->setOptions("KategorieID", $keys, $values); $gui->setType("bemerkung", "textarea"); $gui->setLabel("KategorieID", "Kategorie"); if ($AuftragID == -1) { $gui->setType("KategorieID", "select"); } else { $gui->setType("KategorieID", "hidden"); $gui->setType("bemerkung", "hidden"); $gui->setType("tel", "hidden"); $gui->setType("fax", "hidden"); $gui->insertSpaceAbove("email"); $gui->setType("homepage", "hidden"); $gui->setType("exportToLDAP", "hidden"); $gui->setType("mobil", "hidden"); } switch ($displayMode) { case "auftragsAdresse": $gui->setJSEvent("onSave", "function() {\n\t\t\t\t\tcontentManager.loadFrame('contentLeft','Auftrag',{$this->A->AuftragID});\n\t\t\t\t\tcontentManager.loadFrame('contentRight','Auftraege');\n\t\t\t\t}"); break; case "lieferAdresse": $this->A->type = "lieferAdresse"; $gui->setJSEvent("onSave", "function() {\n\t\t\t\t\tcontentManager.loadFrame('contentRight','Auftraege');\n\t\t\t\t\tcontentManager.loadFrame('subframe','GRLBM',{$this->A->AuftragID});\n\t\t\t\t}"); break; } Aspect::joinPoint("buttons", $this, __METHOD__, $OptTab); $gui->setStandardSaveButton($this, "Adressen"); $gui->customize($this->customizer); return $forReload . $OptTab . $gui->getEditHTML(); }