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/study/list.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/study/list.php (limited to 'lib/study/list.php') diff --git a/lib/study/list.php b/lib/study/list.php new file mode 100644 index 0000000..2f0031f --- /dev/null +++ b/lib/study/list.php @@ -0,0 +1,37 @@ + array( + "name" => "name", + "lr_score" => "last score" + ), + "way" => $ord_ways, +); +$fdefaults = array( + "order" => "name", + "way" => "ASC", +); + +$batches = array(); +$n = sql( + "SELECT batches.id AS id, batches.name AS name, ". + "batch_study.id AS bs_id, batch_review.date AS lr_date, batch_review.score AS lr_score ". + "FROM batches ". + "LEFT JOIN batch_study ON batch_study.batch = batches.id AND batch_study.user = " . $user['id'] . " " . + "LEFT JOIN batch_review ON batch_review.id = batch_study.last_review ". + "WHERE batches.list = " . $study['listid'] . " " . + "ORDER BY " . get_filter("order") . " " . get_filter("way") + ); +while ($b = mysql_fetch_assoc($n)) $batches[] = $b; + +require("tpl/study/list.php"); -- cgit v1.2.3