From 8d9321225140a3db0b72796d4d0236d6cacfeb8a Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Sat, 17 Sep 2011 19:36:41 +0200 Subject: Started working on a study program. --- lib/deck/index.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/deck/index.php (limited to 'lib/deck/index.php') diff --git a/lib/deck/index.php b/lib/deck/index.php new file mode 100644 index 0000000..7a125e2 --- /dev/null +++ b/lib/deck/index.php @@ -0,0 +1,25 @@ + array ( + "nbUsers" => "popularity", + "name" => "name", + "owner" => "author", + ), + "way" => $ord_ways, +); +$fdefaults = array ( + "order" => "nbUsers", + "way" => "DESC", +); + +$decks = array(); +$n = sql( + "SELECT decks.id AS id, decks.name AS name, account.login AS owner, 0 AS nbUsers ". + "FROM decks LEFT JOIN account ON decks.owner = account.id ". + "ORDER BY " . get_filter("order") . " " . get_filter("way") + ); +while ($nn = mysql_fetch_assoc($n)) $decks[] = $nn; + +require("tpl/deck/index.php"); + -- cgit v1.2.3