summaryrefslogtreecommitdiff
path: root/tpl/notes/user.php
diff options
context:
space:
mode:
authorNicolas BERNSTEIN <alexis211@gmail.com>2011-09-17 16:48:29 +0200
committerNicolas BERNSTEIN <alexis211@gmail.com>2011-09-17 16:48:29 +0200
commitd0060968b77c39bdf8abffb071c971c166b59edb (patch)
tree0be52e00a25bd298235a0cf916fb07496d3ab95f /tpl/notes/user.php
downloadBits-d0060968b77c39bdf8abffb071c971c166b59edb.tar.gz
Bits-d0060968b77c39bdf8abffb071c971c166b59edb.zip
First commit.
Diffstat (limited to 'tpl/notes/user.php')
-rw-r--r--tpl/notes/user.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/tpl/notes/user.php b/tpl/notes/user.php
new file mode 100644
index 0000000..4da34e9
--- /dev/null
+++ b/tpl/notes/user.php
@@ -0,0 +1,27 @@
+<?php
+$title = $note_owner['name'] . "'s notebook";
+require("tpl/general/top.php");
+
+function f($n) {
+ return '<a href="view-notes-' . $n['id'] . '">' . $n['title'] . '</a>';
+}
+
+require("tpl/general/inc_tree.php");
+tree($notes_tree, @f);
+if ($note_owner['id'] == $user['id']) {
+ echo '<a class="tool_link" href="new-notes-0">create new note</a>';
+}
+
+echo '</div><div class="contents-left">';
+echo '<h1>Other users</h1>';
+echo "<ul>";
+foreach($users as $u) {
+ if ($u['id'] == $userid) {
+ echo '<li>' . $u['name'] . ' (' . $u['nbNotes'] . ' notes)</li>';
+ } else {
+ echo '<li><a href="user-notes-' . $u['id'] . '">' . $u['name'] . '</a> (' . $u['nbNotes'] . ' notes)</li>';
+ }
+}
+echo "</ul>";
+
+require("tpl/general/bottom.php");