$b["views"]) ? -1 : 1; } function reorder_thumbup($a, $b) { if ($a["voteup"] == $b["voteup"]) { return 0; } return ($a["voteup"] > $b["voteup"]) ? -1 : 1; } function reorder_thumbpig($a, $b) { if ($a["votepig"] == $b["votepig"]) { return 0; } return ($a["votepig"] > $b["votepig"]) ? -1 : 1; } function reorder_thumbdown($a, $b) { if ($a["votedown"] == $b["votedown"]) { return 0; } return ($a["votedown"] > $b["votedown"]) ? -1 : 1; } function reorder_avg($a, $b) { if ($a["voteavg"] == $b["voteavg"]) { return 0; } return ($a["voteavg"] > $b["voteavg"]) ? -1 : 1; } if (!$when) { $query="SELECT party_year,invitation,invitationyear FROM prods WHERE party=".$which." or invitation=".$which." ORDER BY RAND() LIMIT 1"; $result=mysql_query($query); $o=mysql_fetch_object($result); $when = max($o->party_year,$o->invitation ? $o->invitationyear : 0); } /* extend to 4 years */ $when = intval($when); if ($when < 50) { $when = $when + 2000; } elseif ($when < 100) { $when = $when + 1900; } /* results filenames still use 2-digit names */ $when2d = substr($when,-2); $query = sprintf("SELECT * from partiesaka WHERE party1=%d OR party2=%d",$which,$which); //var_dump($query); $result=mysql_query($query); while($tmp=mysql_fetch_assoc($result)) { $partyaka[]=$tmp["party1"]; $partyaka[]=$tmp["party2"]; } if ($partyaka) { $partyaka = array_unique($partyaka); } if (count($partyaka)) { $s = implode(",",$partyaka); $query = sprintf("SELECT * from partiesaka WHERE party1 IN (%s) OR party2 IN (%s)",$s,$s); //var_dump($query); $result=mysql_query($query); while($tmp=mysql_fetch_assoc($result)) { $partyaka[]=$tmp["party1"]; $partyaka[]=$tmp["party2"]; } $partyaka = array_unique($partyaka); } $query="SELECT parties.name,parties.web,partylinks.download,partylinks.csdb,partylinks.zxdemo,partylinks.slengpung,partylinks.artcity FROM parties LEFT JOIN partylinks ON (partylinks.party=parties.id AND partylinks.year=".$when.") WHERE parties.id=".$which; $query.=" LIMIT 1"; $result=mysql_query($query); while($tmp=mysql_fetch_array($result)) { $party[]=$tmp; } $query="SELECT prods.views,prods.id,prods.name,prods.type,prods.party_place,prods.partycompo,prods.voteavg,prods.voteup,prods.votepig,prods.votedown,prods.group1,prods.group2,prods.group3,prods.invitation,prods.invitationyear FROM prods WHERE (prods.party=".$which." AND prods.party_year=".$when.") OR (prods.invitation=".$which." AND (prods.invitationyear=".$when." OR prods.invitationyear=".$when2d."))"; switch($order) { //case "pos": $query.=" ORDER BY prods.party_place"; break; case "type": $query.=" ORDER BY prods.type"; break; case "compo": $query.=" ORDER BY prods.partycompo"; break; case "name": $query.=" ORDER BY prods.name"; break; //case "platform": $query.=" ORDER BY prods.platform"; break; case "views": $query.=" ORDER BY prods.views DESC,prods.party_place"; break; case "thumbup": $query.=" ORDER BY prods.voteup DESC,prods.voteavg DESC"; break; case "thumbpig": $query.=" ORDER BY prods.votepig DESC,prods.voteavg DESC"; break; case "thumbdown": $query.=" ORDER BY prods.votedown DESC,prods.voteavg DESC"; break; case "avg": $query.=" ORDER BY prods.voteavg DESC,prods.voteup DESC"; break; default: $query.=" ORDER BY prods.partycompo"; $order="compo"; break; } $query.=",prods.party_place"; $result=mysql_query($query); while($tmp=mysql_fetch_array($result)) { $prods[]=$tmp; } $csdbflag=0; $zxdemoflag=0; //$pushinvitflag=0; for($i=0;$i27): if (strlen($prods[$i]["groupn1"])>10 && $prods[$i]["groupacron1"]) $prods[$i]["groupn1"]=$prods[$i]["groupacron1"]; if (strlen($prods[$i]["groupn2"])>10 && $prods[$i]["groupacron2"]) $prods[$i]["groupn2"]=$prods[$i]["groupacron2"]; if (strlen($prods[$i]["groupn3"])>10 && $prods[$i]["groupacron3"]) $prods[$i]["groupn3"]=$prods[$i]["groupacron3"]; endif; //get platforms $query="select platforms.name from prods_platforms, platforms where prods_platforms.prod='".$prods[$i]["id"]."' and platforms.id=prods_platforms.platform"; $result=mysql_query($query); $check=0; $prods[$i]["platform"]=""; while($tmp = mysql_fetch_array($result)) { if ($check>0) $prods[$i]["platform"].=","; $check++; $prods[$i]["platform"].=$tmp["name"]; } if ($prods[$i]["platform"]=="Commodore 64") $csdbflag=1; if ($prods[$i]["platform"]=="ZX Spectrum") $zxdemoflag=1; // print("passing ->".$prods[$i]["id"]."-".$prods[$i]["invitation"]."-".$prods[$i]["invitationyear"]."<-
"); if ($prods[$i]["invitation"]==$which && $prods[$i]["invitationyear"]==$when) { // print("entered ->".$prods[$i]["id"]."<-
"); $prods[$i]["partycompo"]="invit"; $prods[$i]["party_place"]="98"; //$pushinvitflag=1; } $result=mysql_query("SELECT * from sceneorgrecommended where prodid=".$prods[$i]["id"]." ORDER BY type"); while($tmp=mysql_fetch_array($result)) { $sceneorgrecommends[]=$tmp; } } //get list of years this party occured on and sort them $query="SELECT distinct party_year as py, party FROM prods where prods.party=".$which; if ($partyaka) { foreach($partyaka as $v) { $query.=" OR party=".$v; } } $result=mysql_query($query); while($tmp=mysql_fetch_array($result)) { if ($tmp["py"]) { $partyyears[$tmp["py"]]=$tmp; //$partyyears[$tmp["py"]]["party"] = $which; } } $query="SELECT distinct invitationyear as py, invitation as party, prods.id FROM prods where invitationyear > 0 and (prods.invitation=".$which; if ($partyaka) { foreach($partyaka as $v) { $query.=" OR invitation=".$v; } } $query.=")"; $result=mysql_query($query); while($tmp=mysql_fetch_array($result)) { // var_dump($tmp); if (!$partyyears[$tmp["py"]]) { $partyyears[$tmp["py"]]=$tmp; } } usort($partyyears, "cmpyears"); if ($order=="compo") usort($prods, "pushinvit"); //get prodotherparty $extracount=0; $query="SELECT prods.views,prods.id,prods.name,prods.type,prodotherparty.party_place,prodotherparty.partycompo,prods.voteavg,prods.voteup,prods.votepig,prods.votedown,prods.group1,prods.group2,prods.group3,prods.invitation FROM prods LEFT JOIN prodotherparty ON prodotherparty.prod=prods.id WHERE (prodotherparty.party=".$which." AND prodotherparty.party_year=".$when.")"; $result=mysql_query($query); while($tmp=mysql_fetch_array($result)) { if ($tmp["group1"]): $gquery="select name,acronym from groups where id='".$tmp["group1"]."'"; $gresult=mysql_query($gquery); while($gtmp = mysql_fetch_array($gresult)) { $tmp["groupn1"]=$gtmp["name"]; $tmp["groupacron1"]=$gtmp["acronym"]; } endif; if ($tmp["group2"]): $gquery="select name,acronym from groups where id='".$tmp["group2"]."'"; $gresult=mysql_query($gquery); while($gtmp = mysql_fetch_array($gresult)) { $tmp["groupn2"]=$gtmp["name"]; $tmp["groupacron2"]=$gtmp["acronym"]; } endif; if ($tmp["group3"]): $gquery="select name,acronym from groups where id='".$tmp["group3"]."'"; $gresult=mysql_query($gquery); while($gtmp = mysql_fetch_array($gresult)) { $tmp["groupn3"]=$gtmp["name"]; $tmp["groupacron3"]=$gtmp["acronym"]; } endif; if (strlen($tmp["groupn1"].$tmp["groupn2"].$tmp["groupn3"])>27): if (strlen($tmp["groupn1"])>10 && $tmp["groupacron1"]) $tmp["groupn1"]=$tmp["groupacron1"]; if (strlen($tmp["groupn2"])>10 && $tmp["groupacron2"]) $tmp["groupn2"]=$tmp["groupacron2"]; if (strlen($tmp["groupn3"])>10 && $tmp["groupacron3"]) $tmp["groupn3"]=$tmp["groupacron3"]; endif; $tquery="select platforms.name from prods_platforms, platforms where prods_platforms.prod='".$tmp["id"]."' and platforms.id=prods_platforms.platform"; $tresult=mysql_query($tquery); $check=0; $tmp["platform"]=""; while($ttmp = mysql_fetch_array($tresult)) { if ($check>0) $tmp["platform"].=","; $check++; $tmp["platform"].=$ttmp["name"]; } // print($tquery."<-".$tmp["platform"]); $prods[]=$tmp; $extracount++; } if ($order=="platform") usort($prods, "reorder_platform"); //sort it on the prods[] list properly if ($extracount) { switch($order) { case "type": usort($prods, "reorder_type"); break; case "compo": usort($prods, "reorder_partycompo"); usort($prods, "pushinvit"); break; case "name": usort($prods, "reorder_name"); break; //case "platform": usort($prods, "reorder_platform"); break; case "views": usort($prods, "reorder_views"); break; case "thumbup": usort($prods, "reorder_thumbup"); break; case "thumbpig": usort($prods, "reorder_thumbpig"); break; case "thumbdown": usort($prods, "reorder_thumbdown"); break; case "avg": usort($prods, "reorder_avg"); break; default: usort($prods, "reorder_partycompo"); usort($prods, "pushinvit"); $order="compo"; break; } } //get max views (for pop count) $result=mysql_query("SELECT MAX(views) FROM prods"); $max_views=mysql_result($result,0); //get desc of all prods.type $result = mysql_query("DESC prods type"); $row = mysql_fetch_row($result); $tmptypes = explode("'",$row[1]); for($i=1;$i
0)&&($which!=1024)): ?>
".$party[0]["name"]." ".$when.""); ?>
[editparty] [editpartylinks] [">web] [+web] [results] [+results] [">download] [+download] [">slengpung] [+slengpung] [">csdb] 0)&&($_SESSION["SCENEID_ID"])): ?> [+csdb] [">zxdemo] 0)&&($_SESSION["SCENEID_ID"])): ?> [+zxdemo] [">artcity] [+artcity]
" . $value["py"] . ""); } ?>

"); } else { print(""); } ?> \n".$prods[$i]["voteup"]."\n"); } else {print("\n"); } if ($prods[$i]["votepig"]) { print("\n"); } else {print("\n"); } if ($prods[$i]["votedown"]) { print("\n"); } else {print("\n"); } printf("",$prods[$i]["voteavg"]); ?>
.gif" width="13" height="12" border="0">
compo
<? print($typess[$k]); ?>
 
.gif" width="13" height="12" border="0">
type
.gif" width="13" height="12" border="0">
prodname
.gif" width="13" height="12" border="0">
platform
rulez piggie sucks
.gif" width="13" height="12" border="0">
?
.gif" width="13" height="12" border="0">
popularity
"); endif; if($prods[$i]["cdc"]): print(""); endif; //if($prods[$i]["cdc"]) print("\"cdc\"".$prods[$i]["cdc"]); ?>
">"); else: $typess = explode(",", $prods[$i]["type"]); print(""); for($k=0;$k"); } print("

".strtolower(stripslashes($prods[$i]["name"]))."
"); endif; ?>

"> "> ">
"); for($k=0;$k"); } print("
"); cdcstack($prods[$i]["cdc"]); //for($ii=0;$ii<$prods[$i]["cdc"];$ii++): print("\"cdc\""); //endfor; print("
\n0\n".$prods[$i]["votepig"]."\n0\n".$prods[$i]["votedown"]."\n0%.2f

login
You need to be logged in to submit missing party info :: register here


you sure it took place that year?

*clack* (\/) O ? (\/) *clack*"); ?>

*clack clack clack* (\/) o O (\/) *clack clack clack*"); ?>