summaryrefslogtreecommitdiff
path: root/lib/notes/source.php
blob: 4ff40d7158680d1fa812f4732f9bcd6259d8f63f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

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

$note = mysql_fetch_assoc(sql("SELECT id, title, text, public, owner FROM notes WHERE id = $noteid"));
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" value="text/html; charset=utf-8" />
</head>
<body>
<pre><? echo $note['text']; ?></pre>
</body>
</html>
<?
die();