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 --- tpl/study/lib_sidebar.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tpl/study/lib_sidebar.php') diff --git a/tpl/study/lib_sidebar.php b/tpl/study/lib_sidebar.php index 820d0bd..c82d0a4 100644 --- a/tpl/study/lib_sidebar.php +++ b/tpl/study/lib_sidebar.php @@ -11,6 +11,16 @@ if ($user['id'] != 0) { $d = sql("SELECT id, name FROM decks WHERE owner = " . $user['id']); while ($dd = mysql_fetch_assoc($d)) $my_decks[] = $dd; + $studying_lists = array(); + $d = sql("SELECT list_study.id AS id, lists.name AS name, account.login AS username FROM list_study ". + "LEFT JOIN lists ON lists.id = list_study.list LEFT JOIN account ON account.id = lists.owner ". + "WHERE list_study.user = " . $user['id']); + while($dd = mysql_fetch_assoc($d)) $studying_lists[] = $dd; + + $my_lists = array(); + $d = sql("SELECT id, name FROM lists WHERE owner = " . $user['id']); + while ($dd = mysql_fetch_assoc($d)) $my_lists[] = $dd; + echo '
'; echo '

Studying decks

'; + + + echo '

Studying lists

'; + + echo '

My lists

'; + } -- cgit v1.2.3