diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2011-12-07 03:02:05 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2011-12-07 03:02:05 -0800 |
commit | d2e8d7999913cae4c62b471133a90cc166e3f679 (patch) | |
tree | 0d3e16dfa82f5fd6f5ba5b0be9004317178461eb /includes/datas.php | |
parent | 2fcf71ee0f0feb98cdd1fb1a44b2711a567056fe (diff) | |
download | pathery-d2e8d7999913cae4c62b471133a90cc166e3f679.tar.xz |
Countdown timer, Radivel/Splax added, Time taken => Time.
Diffstat (limited to 'includes/datas.php')
-rw-r--r-- | includes/datas.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/datas.php b/includes/datas.php index 912eea8..2a47a4c 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -11,7 +11,8 @@ function topScores($mapid, $top = 5) { timediff(solutions.dateModified, TIMESTAMP(CURDATE())) as diff, users.displayName as display, solutions.moves as m, - users.ID as ID + users.ID as ID, + solutions.dateModified as cdate FROM `users` JOIN `solutions` @@ -28,19 +29,21 @@ function topScores($mapid, $top = 5) { $output .= "<th>Rank</th>"; $output .= "<th>Name</th>"; $output .= "<th>Moves</th>"; - $output .= "<th>Time taken</th>"; + $output .= "<th title='Time since map generated'>Time</th>"; $output .= "</tr>"; - while (list($diff, $display, $moves, $userID) = mysql_fetch_row($result)) { + while (list($diff, $display, $moves, $userID, $cdate) = mysql_fetch_row($result)) { $i++; if ($_SESSION['userID'] == $userID) $output .= "<tr style='background-color: #356;'>"; else $output .= "<tr>"; + $cdate = date("g:i A", strtotime($cdate)); + $output .= "<td>$i</td>"; $output .= "<td><span title='UserID: $userID'>$display</span></td>"; $output .= "<td>$moves</td>"; - $output .= "<td>$diff</td>"; + $output .= "<td title='Improved $cdate (EST)'>$diff</td>"; //$output .= "<b>$i. <span title='UserID: $userID'>$display</span> with $moves moves. In $diff<br /></b>"; $output .= "</tr>"; } |