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 - 21/12/10 // // parameters - NONE // include "../common/library.inc"; //include "../common/gmagent_library.inc"; include "../common/set_vars.frantic.inc"; open_db($db,$user,$pw); // init vars $all=$_GET["all"]; $includegml=$_GET["includegml"]; $noscores=$_GET["noscores"]; if (!$noscores) { $noscores=30; } // display the high-score table // set SQL string $SelectLeaderBoardSQL="SELECT HSID, HSDateTime, HSName, HSScore, HSIPAddress FROM FranticHighScores WHERE HSID<>1 "; if (!$includegml) { $SelectLeaderBoardSQL.=" AND HSIPAddress<>'84.45.184.202' AND HSIPAddress<>'87.127.94.154' AND HSIPAddress<>'84.45.196.42' AND HSIPAddress<>'78.33.156.138'"; } // Filter out RHF $SelectLeaderBoardSQL.=" AND HSIPAddress<>'82.45.194.47' AND HSIPAddress<>'82.35.10.155'"; // Add ordering (hiscore, date) $SelectLeaderBoardSQL.=" ORDER BY HSScore DESC, HSDateTime"; // 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"],"