Ejemplo n.º 1
0
 function showInfo($name, $language)
 {
     $Ad = new thetvdbcomAdapter();
     $info = $Ad->getInfo($name, $language);
     if ($info === null) {
         die("<p>Sorry, there is no information available for '{$name}({$language})'</p>");
     }
     BPS::setProperty("NewSeriesGUI", "loadBanner", str_replace("http://", "", $info->Banner));
     $B = new Button("save\nseries", "./trinityDB/Serien/Serien.png");
     $B->rmePCR("Serie", "-1", "newSeriesFromID", array("'{$info->Name}'", "'{$language}'", "'{$info->SeriesID}'"), "contentManager.loadFrame('contentLeft', 'Serie', transport.responseText);");
     #$B->style("float:right;");
     echo "\n\t\t\t<div style=\"margin-left:10px;width:765px;border-right-width:1px;border-right-style:solid;\" class=\"borderColor1\">\n\t\t\t\t{$B}\n\t\t\t\t<div style=\"height:20px;\"></div>\n\t\t\t\t<img src=\"" . DBImageGUI::imageLink("NewSeriesGUI", "loadBanner" . $info->SeriesID, "Banner") . "\" style=\"width:758px;height:140px;\" /><br />\n\t\t\t\t<p style=\"-moz-column-count: 3;-moz-column-gap: 1em;-moz-column-rule: 1px solid black;-webkit-column-count: 3;-webkit-column-gap: 1em;-webkit-column-rule: 1px solid black;\">" . $info->Overview . "</p>\n\t\t\t</div>";
 }
Ejemplo n.º 2
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();
 }
Ejemplo n.º 3
0
 public function sidePanelAttachments($filesDir)
 {
     $I = new HTMLInput("TBAttachments", "file");
     $I->onchange(OnEvent::rme($this, "processAttachmentUpload", array("'{$filesDir}'", "fileName"), " " . OnEvent::reloadSidePanel("tinyMCE")));
     echo "<div style=\"padding:5px;height:50px;\">" . $I . "</div></div>";
     if (!file_exists(FileStorage::getFilesDir() . "{$filesDir}")) {
         mkdir(FileStorage::getFilesDir() . "{$filesDir}");
     }
     $T = new HTMLTable(2, "Bilder");
     $dir = new DirectoryIterator(FileStorage::getFilesDir() . "{$filesDir}");
     foreach ($dir as $file) {
         if ($file->isDot()) {
             continue;
         }
         if ($file->isDir()) {
             continue;
         }
         $BI = new Button("Datei löschen", "./images/i2/insert.png", "icon");
         $BD = new Button("Datei löschen", "./images/i2/delete.gif", "icon");
         $BD->style("float:right;margin-left:5px;");
         $BD->rmePCR("tinyMCE", "", "deleteAttachment", array("'{$filesDir}'", "'" . $file->getFilename() . "'"), OnEvent::reloadSidePanel("tinyMCE"));
         $T->addRow(array($BI, "{$BD}<small style=\"color:grey;float:right;margin-top:4px;\">" . Util::formatByte($file->getSize()) . " </small>" . (strlen($file->getFilename()) > 15 ? substr($file->getFilename(), 0, 15) . "..." : $file->getFilename())));
         $T->addRowStyle("cursor:pointer;");
         $T->addRowEvent("click", "contentManager.tinyMCEAddImage('" . DBImageGUI::imageLink("tinyMCEGUI", $filesDir, $file->getFilename(), true) . "');");
     }
     echo $T;
 }