summaryrefslogtreecommitdiff
path: root/lib/deck/view.php
diff options
context:
space:
mode:
authorroot <root@adnab.me>2014-01-31 16:42:40 +0100
committerroot <root@adnab.me>2014-01-31 16:42:40 +0100
commitb0c23ea84327d48e3a4383fac3e795c2dc0a1215 (patch)
tree625a8f0882815d9442a4ff2ec15a49e669a15ed3 /lib/deck/view.php
parentcee55b766230837c21453f85e76a921cb5b8b89e (diff)
downloadBits-b0c23ea84327d48e3a4383fac3e795c2dc0a1215.tar.gz
Bits-b0c23ea84327d48e3a4383fac3e795c2dc0a1215.zip
Remove all studying apps code.
Diffstat (limited to 'lib/deck/view.php')
-rw-r--r--lib/deck/view.php42
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/deck/view.php b/lib/deck/view.php
deleted file mode 100644
index e9a83e6..0000000
--- a/lib/deck/view.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-
-assert_redir(count($args) == 3, 'deck');
-$deckid = intval($args[2]);
-
-$deck = mysql_fetch_assoc(sql(
- "SELECT decks.id AS id, decks.name AS name, decks.comment_html AS comment, account.login AS owner, account.id AS owner_id ".
- "FROM decks LEFT JOIN account ON account.id = decks.owner ".
- "WHERE decks.id = $deckid"));
-assert_error($deck, "This deck does not exist.");
-
-$can_edit = false;
-if ($deck["owner_id"] == $user['id']) $can_edit = true;
-
-$filters = array (
- "order" => array (
- "name" => "card name",
- "number" => "card number",
- ),
- "way" => $ord_ways,
-);
-$fdefaults = array (
- "order" => "number",
- "way" => ($can_edit ? "DESC" : "ASC"),
-);
-
-$cards = array();
-$n = sql(
- "SELECT id, number, name, text_html AS text FROM cards WHERE deck = $deckid ".
- "ORDER BY " . get_filter("order") . " " . get_filter("way")
- );
-while ($nn = mysql_fetch_assoc($n)) $cards[] = $nn;
-
-$can_start_study = false;
-if ($user['id'] != 0) {
- if (!mysql_fetch_assoc(sql("SELECT id FROM deck_study WHERE deck = $deckid AND user = " . $user['id'])))
- $can_start_study = true;
-} else {
- $message = "You should create an account in order to study this deck.";
-}
-
-require("tpl/deck/view.php");