summaryrefslogtreecommitdiff
path: root/lib/blog/drafts.php
blob: 735b039f899fd3e6f81f5c81d1f6197abebf7e12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

$title = "My posts";

$drafts = array();
$pub = array();

$r = sql(
	"SELECT id, title, text_html, draft FROM blog_posts WHERE owner = " . $user['id'] . " ORDER BY date DESC"
	);
while ($pp = mysql_fetch_assoc($r)) {
	if ($pp['draft']) {
		$drafts[] = $pp;
	} else {
		$pub[] = $pp;
	}
}

require("tpl/blog/drafts.php");