From d45c7f14891d951f8a6987cc6492073b97e05b5b Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Sun, 20 Nov 2011 13:39:47 +0100 Subject: Added the bit list study system --- lib/list/index.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/list/index.php (limited to 'lib/list/index.php') diff --git a/lib/list/index.php b/lib/list/index.php new file mode 100644 index 0000000..cbcad67 --- /dev/null +++ b/lib/list/index.php @@ -0,0 +1,25 @@ + array ( + "nbUsers" => "popularity", + "name" => "name", + "owner" => "author", + ), + "way" => $ord_ways, +); +$fdefaults = array ( + "order" => "nbUsers", + "way" => "DESC", +); + +$lists = array(); +$n = sql( + "SELECT lists.id AS id, lists.name AS name, account.login AS owner, COUNT(list_study.id) AS nbUsers ". + "FROM lists LEFT JOIN account ON lists.owner = account.id LEFT JOIN list_study ON list_study.list = lists.id ". + "GROUP BY lists.id ORDER BY " . get_filter("order") . " " . get_filter("way") + ); +while ($nn = mysql_fetch_assoc($n)) $lists[] = $nn; + +require("tpl/list/index.php"); + -- cgit v1.2.3