NewTorrent = $NewTorrent; $this->Torrent = $Torrent; $this->Error = $Error; $this->UploadForm = $UploadForm; $this->Categories = $Categories; $this->TorrentID = $TorrentID; # Platforms # See classes/config.php $this->SeqPlatforms = $SeqPlatforms; $this->GraphPlatforms = $GraphPlatforms; $this->ImgPlatforms = $ImgPlatforms; $this->DocPlatforms = $DocPlatforms; $this->RawPlatforms = $RawPlatforms; #$this->Media = $Media; #$this->MediaManga = $MediaManga; # Formats # See classes/config.php $this->SeqFormats = $SeqFormats; $this->ProtFormats = $ProtFormats; $this->GraphXmlFormats = $GraphXmlFormats; $this->GraphTxtFormats = $GraphTxtFormats; $this->ImgFormats = $ImgFormats; $this->MapVectorFormats = $MapVectorFormats; $this->MapRasterFormats = $MapRasterFormats; $this->BinDocFormats = $BinDocFormats; $this->CpuGenFormats = $CpuGenFormats; $this->PlainFormats = $PlainFormats; #$this->Containers = $Containers; #$this->ContainersGames = $ContainersGames; #$this->ContainersProt = $ContainersProt; #$this->ContainersExtra = $ContainersExtra; # Misc $this->Codecs = $Codecs; $this->Archives = $Archives; $this->Resolutions = $Resolutions; # Deprecated #$this->ArchivesManga = $ArchivesManga; #$this->Formats = $Formats; #$this->AudioFormats = $AudioFormats; #$this->Bitrates = $Bitrates; #$this->Platform = $Platform; # Quick constructor test if ($this->Torrent && $this->Torrent['GroupID']) { $this->Disabled = ' readonly="readonly"'; $this->DisabledFlag = true; } } /** * ======================== * = New functional class = * ======================== * * Contains functions that output discreet torrent form fields. * Useful for = echoing in skeleton tables in the sections. */ /** * Upload notice * * Broken into multiple NewTorrent tests for sanity. * Each if statement should contain one discreet content block. */ public function uploadNotice() { if ($this->NewTorrent) { $HTML = <<
Please consult the Upload Rules and the Categories Wiki to help fill out the upload form correctly.
The site adds the Announce and Source automatically. Just download and seed the new torrent after uploading it.
HTML; } # fi NewTorrent return $HTML; } /** * Announce URLs * * Announce URLs displayed on the form. * They're added to torrents in torrentsdl.class.php. * Bio Gazelle supports tiered swarms, T1 private and T2 public. */ public function announceSource() { if ($this->NewTorrent) { $HTML = ''; } # fi NewTorrent return $HTML; } /** * Display torrent upload errors */ public function error() { if ($this->NewTorrent) { if ($this->Error) { echo <<$this->Error
HTML; } } # fi NewTorrent } /** * head * * Everything until the catalogue number field. * Server-side torrent scrubbing admonishment. */ public function head() { $ENV = ENV::go(); G::$DB->query( " SELECT COUNT(`ID`) FROM `torrents` WHERE `UserID` = ".G::$LoggedUser['ID'] ); list($Uploads) = G::$DB->next_record(); # Torrent form hidden values $AuthKey = G::$LoggedUser['AuthKey']; $HTML = << HTML; if (!$this->NewTorrent) { # Edit form hidden fields $TorrentID = display_str($this->TorrentID); $CategoryID = display_str($this->Torrent['CategoryID'] - 1); $HTML .= <<