summaryrefslogtreecommitdiff
path: root/lib/deck/index.php
diff options
context:
space:
mode:
authorNicolas BERNSTEIN <alexis211@gmail.com>2011-09-17 19:36:41 +0200
committerNicolas BERNSTEIN <alexis211@gmail.com>2011-09-17 19:36:41 +0200
commit8d9321225140a3db0b72796d4d0236d6cacfeb8a (patch)
tree766e25ed98b86ed4cbf6d0517d9daaecc5ce3c18 /lib/deck/index.php
parentb6b341d949437c913fcce3d1a7c302945f67b22b (diff)
downloadBits-8d9321225140a3db0b72796d4d0236d6cacfeb8a.tar.gz
Bits-8d9321225140a3db0b72796d4d0236d6cacfeb8a.zip
Started working on a study program.
Diffstat (limited to 'lib/deck/index.php')
-rw-r--r--lib/deck/index.php25
1 files changed, 25 insertions, 0 deletions
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 @@
+<?php
+
+$filters = array (
+ "order" => 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");
+