summaryrefslogblamecommitdiff
path: root/lib/blog/drafts.php
blob: 701666002af81fa6344dd4a7d9feafbd3c15fe8d (plain) (tree)
1
2

     















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