\n";
require('include/auth.php');
$dbl = mysql_connect($db['host'], $db['user'], $db['password']);
if(!$dbl) {
die('\n\tSQL error\n\n');
}
mysql_select_db($db['database'],$dbl);
$query ="SELECT * FROM prods WHERE id=".(int)$_GET["id"];
$result = mysql_query($query);
$prod = mysql_fetch_array($result);
$query="SELECT nickname,avatar FROM users WHERE id=".$prod["added"];
$result=mysql_query($query);
$tmp=mysql_fetch_array($result);
$prod["nickname"]=$tmp["nickname"];
$prod["avatar"]=$tmp["avatar"];
if($prod["party"])
{
$query="SELECT name FROM parties WHERE id=".$prod["party"];
$result=mysql_query($query);
$prod["partyname"]=mysql_result($result,0);
}
if($prod["invitation"])
{
/*
$typess = explode(",", $prod["type"]);
for($i=0;$i\n".
"\t".stripslashes($prod["name"])."\n".
($prod["group1"]?"\t".$prod["groupname1"]."\n":"").
($prod["group2"]?"\t".$prod["groupname2"]."\n":"").
($prod["group3"]?"\t".$prod["groupname3"]."\n":"").
($prod["csdb"]?"\t\n":"").
($prod["zxdemo"]?"\t\n":"").
($prod["sceneorg"]?"\t\n":"");
// if(file_exists("nfo/".$prod["id"].".nfo"))
// not including file info at least now since it takes lots of space
// ...
// same for screenshots: print($shotpath); print($mysize[3]);
//$platforms = explode(",", $prod["platform"]);
for($i=0;$i".$platforms[$i]["name"]."\n";
}
$types = explode(",", $prod["type"]);
for($i=0;$i".$types[$i]."\n";
}
// do we want invitation extra info? perhaps later on...
// if($prod["invitation"]!=0):
// print($prod["invitationpartyname"]);
echo "\t".$prod["date"]."\n".
"\t".$prod["partyname"]."\n".
"\t".$prod["partycompo"]."\n".
"\t".$prod["party_place"]."\n".
// other parties?
// for($i=0;$i".str_replace("&", "&", $prod["download"])."\n":"");
// ($prod["download2"]?"\t".str_replace("&", "&", $prod["download2"])."\n":"").
// ($prod["download3"]?"\t".str_replace("&", "&", $prod["download3"])."\n":"").
// ($prod["download4"]?"\t".str_replace("&", "&", $prod["download4"])."\n":"").
// ($prod["download5"]?"\t".str_replace("&", "&", $prod["download5"])."\n":"").
// ($prod["video"]?"\t\n":"").
// ($prod["source"]?"\t\n":"");
$query="SELECT downloadlinks.id,downloadlinks.link,downloadlinks.type FROM downloadlinks WHERE downloadlinks.prod=".$prod["id"]." ORDER BY downloadlinks.type";
$result = mysql_query($query);
while($tmp=mysql_fetch_array($result)) {
$dl[]=$tmp;
}
for ($i=0;$i".str_replace("&", "&", $dl[$i]["link"])."".$dl[$i]["type"].">\n";
endfor;
echo "\n";
?>