Changeset 312
- Timestamp:
- 09/11/07 14:43:23 (6 years ago)
- Files:
-
- 1 modified
-
components/bananas.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
components/bananas.php
r311 r312 1 1 <?php 2 3 /* as far as bananas are concerned, year ends after the beach party */ 4 $yearstart = date("Y")."-06-30"; 2 5 3 6 /* Banana viewing component. Looking a little obsolete since most of this is now in the members component */ … … 18 21 19 22 if ($mode == "detail") { 20 $smarty->assign("awards",$DB->GetAll("SELECT *, date_trunc('second', whn) FROM awards WHERE username=? AND archive=0 ORDER BY whn DESC", array($who)));23 $smarty->assign("awards",$DB->GetAll("SELECT *, date_trunc('second', whn) FROM awards WHERE username=? AND whn > ? ORDER BY whn DESC", array($who, $yearstart))); 21 24 if ($session->loggedin) { 22 25 include("../lib/banana-admin.php"); … … 24 27 } 25 28 26 $users = $DB->GetAll("SELECT username, sum(score) AS sum FROM awards WHERE archive=0 GROUP BY username ORDER BY sum(score) DESC, username");29 $users = $DB->GetAll("SELECT username, sum(score) AS sum FROM awards WHERE whn > ? GROUP BY username ORDER BY sum(score) DESC, username", array($yearstart)); 27 30 28 31 $smarty->assign('mode', "$mode");
