diff options
author | Nicolas BERNSTEIN <alexis211@gmail.com> | 2011-09-17 19:36:41 +0200 |
---|---|---|
committer | Nicolas BERNSTEIN <alexis211@gmail.com> | 2011-09-17 19:36:41 +0200 |
commit | 8d9321225140a3db0b72796d4d0236d6cacfeb8a (patch) | |
tree | 766e25ed98b86ed4cbf6d0517d9daaecc5ce3c18 /tpl/study | |
parent | b6b341d949437c913fcce3d1a7c302945f67b22b (diff) | |
download | Bits-8d9321225140a3db0b72796d4d0236d6cacfeb8a.tar.gz Bits-8d9321225140a3db0b72796d4d0236d6cacfeb8a.zip |
Started working on a study program.
Diffstat (limited to 'tpl/study')
-rw-r--r-- | tpl/study/index.php | 16 | ||||
-rw-r--r-- | tpl/study/lib_sidebar.php | 18 |
2 files changed, 34 insertions, 0 deletions
diff --git a/tpl/study/index.php b/tpl/study/index.php new file mode 100644 index 0000000..26ecd6d --- /dev/null +++ b/tpl/study/index.php @@ -0,0 +1,16 @@ +<?php + +$title = "My studies"; +require("tpl/general/top.php"); + +?> + +<p>Welcome to the <em>My studies section</em>. This is a simple study program based on +decks of cards, keeping track of your progress and everything.</p> + +<p>Please take a look in the <a href="deck">List of decks</a> and look at whatever you want to learn.</p> + +<?php + +require ("lib_sidebar.php"); +require("tpl/general/bottom.php"); diff --git a/tpl/study/lib_sidebar.php b/tpl/study/lib_sidebar.php new file mode 100644 index 0000000..61bb11a --- /dev/null +++ b/tpl/study/lib_sidebar.php @@ -0,0 +1,18 @@ +<?php + +if ($user['id'] != 0) { + $my_decks = array(); + $d = sql("SELECT id, name FROM decks WHERE owner = " . $user['id']); + while ($dd = mysql_fetch_assoc($d)) $my_decks[] = $dd; + + echo '</div><div class="contents-left">'; + echo '<h1>Studying decks</h1><ul>'; + //LIST + echo '<li><a class="tool_link" href="deck">[+] Show all decks</a></li></ul>'; + + echo '<h1>My decks</h1><ul>'; + foreach($my_decks as $deck) { + echo '<li><a href="view-deck-' . $deck['id'] . '">' . $deck['name'] . '</a></li>'; + } + echo '<li><a class="tool_link" href="new-deck">[+] Create deck</a></li></ul>'; +} |