summaryrefslogblamecommitdiff
path: root/lib/notes/source.php
blob: 091ab8c6d407cd92b4e40f23101c8afb3bcfb920 (plain) (tree)
1
2
3
4
5
6




                                         
                                                                                            







                                                                              
                                                                             

       
                                                         

       
     
      
<?php

assert_redir(count($args) == 3, 'notes');
$noteid = intval($args[2]);

$note = sql("SELECT id, title, text, public, owner FROM notes WHERE id = $noteid")->fetch();
assert_error($note && ($note['public'] != 0 || $note['owner'] == $user['id']),
	"This note does not exist, or you are not allowed to see it.");

//header("Content-Type: text/plain: charset=utf-8");
?>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<pre><?php echo htmlspecialchars($note['text']); ?></pre>
</body>
</html>
<?php
die();