function LoadFromDB() { parent::LoadFromDB(); $prod = $this->prod; $a = array(); unset($this->fields["name"]); unset($this->fields["download"]); unset($this->fields["group1"]); unset($this->fields["group2"]); unset($this->fields["group3"]); if ($prod->releaseDate) unset($this->fields["releaseDate"]); unset($this->fields["platform"]); unset($this->fields["type"]); if ($prod->party) { unset($this->fields["partyID"]); unset($this->fields["partyYear"]); } if ($prod->party->id == NO_PARTY_ID || $prod->placings[0]->compo) unset($this->fields["partyCompo"]); if ($prod->party->id == NO_PARTY_ID || $prod->placings[0]->ranking) unset($this->fields["partyRank"]); //unset($this->fields["sceneOrgID"]); unset($this->fields["zxdemoID"]); unset($this->fields["csdbID"]); unset($this->fields["demozooID"]); unset($this->fields["invitationParty"]); unset($this->fields["invitationYear"]); if ( file_exists( get_local_nfo_path( $prod->id ) ) ) unset($this->fields["nfofile"]); if ( glob( get_local_screenshot_path( $prod->id, "*" ) ) ) unset($this->fields["screenshot"]); }
function LoadFromDB() { parent::LoadFromDB(); $prod = $this->prod; $a = array(); $this->fields["name"]["value"] = $prod->name; $this->fields["download"]["value"] = $prod->download; $n = 1; foreach($prod->groups as $g) $this->fields["group".$n++]["value"] = $g->id; $this->fields["releaseDate"]["value"] = $prod->releaseDate; $this->fields["platform"]["value"] = array_keys($prod->platforms); $this->fields["type"]["value"] = $prod->types; if (count($prod->placings) > 0) { $this->fields["partyID"]["value"] = $prod->placings[0]->party->id; $this->fields["partyYear"]["value"] = $prod->placings[0]->year; $this->fields["partyCompo"]["value"] = $prod->placings[0]->compo; $this->fields["partyRank"]["value"] = $prod->placings[0]->ranking; } //$this->fields["sceneOrgID"]["value"] = $prod->sceneorg; $this->fields["demozooID"]["value"] = $prod->demozoo; $this->fields["csdbID"]["value"] = $prod->csdb; $this->fields["boardID"]["value"] = $prod->boardID; $this->fields["invitationParty"]["value"] = $prod->invitation; $this->fields["invitationYear"]["value"] = $prod->invitationyear; }