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


$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");