Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (28 sloc) 756 Bytes
<?
if (!defined("POUET_API")) exit();
$prod = $_GET["id"] ? PouetProd::Spawn((int)$_GET["id"]) : null;
if($prod)
{
$a = array(&$prod);
PouetCollectPlatforms( $a );
PouetCollectAwards( $a );
$prod->downloadLinks = SQLLib::selectRows(sprintf_esc("select type, link from downloadlinks where prod = %d order by type",$prod->id));
$s = new BM_Query("credits");
$s->AddField("credits.role");
$s->AddWhere(sprintf("credits.prodID = %d",$prod->id));
$s->Attach(array("credits"=>"userID"),array("users as user"=>"id"));
$s->AddOrder("credits.role");
$prod->credits = $s->perform();
}
$result = new stdClass();
if ($prod)
{
$result->success = true;
$result->prod = $prod->ToAPI();
}
else
{
$result->error = true;
}
output($result);
?>
You can’t perform that action at this time.