@$notes_tree[0]);
for($id = $note['id']; $id != 0; $id = $notes_parents[$id]) {
$notest[$id] = @$notes_tree[$id];
}
echo '
';
echo '
' . $note['ownername'] . '
';
echo '
';
function n_tree_branch($id) {
global $notest, $note, $can_new;
if (!isset($notest[$id])) return;
foreach($notest[$id] as $branch) {
if ($branch['id'] == $note['id'])
echo '
' . $branch['title'] . '
';
else
echo '
' . $branch['title'] . '
';
if (isset($notest[$branch['id']])) {
echo '
';
n_tree_branch($branch['id']);
echo '
';
} else if ($can_new && $branch['id'] == $note['id']) {
echo '
';
}
}
if ($can_new) echo '
+ nouvelle note
';
}
echo '
';
n_tree_branch(0);
echo '
';