summaryrefslogtreecommitdiff
path: root/lib/blog/drafts.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/blog/drafts.php')
-rw-r--r--lib/blog/drafts.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/blog/drafts.php b/lib/blog/drafts.php
new file mode 100644
index 0000000..735b039
--- /dev/null
+++ b/lib/blog/drafts.php
@@ -0,0 +1,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");