Hi Score header
[Standard leaderboard] [Include GML scores] [Return to game]
[All scores][All+GML scores] // // leaderboard.php // // Greg Conway, GML Networking Technologies 15/12/9 // // Last modified - 23/12/10 // // parameters - NONE // include "../common/library.inc"; //include "../common/gmagent_library.inc"; include "../common/set_vars.2011.inc"; open_db($db,$user,$pw); // init vars $all=$_GET["all"]; $includegml=$_GET["includegml"]; $noscores=$_GET["noscores"]; $date=$_GET["date"]; $low=$_GET["low"]; if (!$noscores) { $noscores=30; } // display the high-score table // set SQL string $SelectLeaderBoardSQL="SELECT HSID, HSDateTime, HSName, HSScore, HSIPAddress FROM HighScoresChristmas2011 WHERE HSID<>1 "; if (!$includegml) { $SelectLeaderBoardSQL.=" AND HSIPAddress<>'84.45.184.202' AND HSIPAddress<>'84.45.197.66' AND HSIPAddress<>'87.127.94.154' AND HSIPAddress<>'84.45.196.42' AND HSIPAddress<>'109.224.253.238' AND HSIPAddress<>'78.32.4.10' AND HSIPAddress<>'78.33.85.138' AND HSIPAddress<>'78.32.39.113' AND HSIPAddress<>'78.33.77.218' AND HSIPAddress<>'78.33.156.138' AND HSIPAddress<>'212.69.49.170' AND HSIPAddress<>'188.221.245.215' AND HSIPAddress<>'78.33.156.137'"; } // Filter out RHF $SelectLeaderBoardSQL.=" AND HSIPAddress<>'82.45.194.47' AND HSIPAddress<>'82.35.10.155' AND HSIPAddress<>'80.87.19.30'"; // Add ordering (hiscore, date) //$SelectLeaderBoardSQL.=" ORDER BY HSScore DESC, HSDateTime"; // Add ordering (hiscore, date) if (!$date) { $SelectLeaderBoardSQL.=" ORDER BY HSScore"; if (!$low) { $SelectLeaderBoardSQL.=" DESC"; } $SelectLeaderBoardSQL.=", HSDateTime"; } else { $SelectLeaderBoardSQL.=" ORDER BY HSDateTime DESC"; } // check for ALL parameter passed //if (!$all) { $SelectLeaderBoardSQL.=" LIMIT $noscores"; //} // perform initial query $result=mysql_query($SelectLeaderBoardSQL); // test for results returned if ($myrow = mysql_fetch_array($result)) { // loop through results do { // open new row, then display HSName, HSScore and HSDateTime in columns echo ""; // display extra field if ALL was passed if ($all) { echo ""; } echo ""; // fetch next row } while ($myrow=mysql_fetch_array($result)); } ?>
NAME SCORE DATE / TIME
     
",$myrow["HSName"],"",$myrow["HSScore"],"",$myrow["HSDateTime"],"",$myrow["HSIPAddress"],"


TEL: 01255 851 999 | FAX: 01255 679 909 | WWW.GMLNT.COM | INFO@GMLNT.COM
Mumford Buildings 27-29 Thorpe Road Kirby Cross Frinton on Sea Essex CO13 0LT