summaryrefslogtreecommitdiff
path: root/lib/blog/drafts.php
diff options
context:
space:
mode:
authorNicolas BERNSTEIN <alexis211@gmail.com>2012-02-12 19:50:55 +0100
committerNicolas BERNSTEIN <alexis211@gmail.com>2012-02-12 19:50:55 +0100
commit24547ccec6526fcef3cccb34bc35fb81f31236b3 (patch)
treefc908fb06a6b8b4d4131c7303c4fb3b7d348f9bf /lib/blog/drafts.php
parentcd76af42463bd80539db8c9671a427a9f0fe5d69 (diff)
downloadBits-24547ccec6526fcef3cccb34bc35fb81f31236b3.tar.gz
Bits-24547ccec6526fcef3cccb34bc35fb81f31236b3.zip
A lot of changes : blogging system essentially.
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");