summaryrefslogtreecommitdiff
path: root/tpl/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 /tpl/blog/drafts.php
parentcd76af42463bd80539db8c9671a427a9f0fe5d69 (diff)
downloadBits-24547ccec6526fcef3cccb34bc35fb81f31236b3.tar.gz
Bits-24547ccec6526fcef3cccb34bc35fb81f31236b3.zip
A lot of changes : blogging system essentially.
Diffstat (limited to 'tpl/blog/drafts.php')
-rw-r--r--tpl/blog/drafts.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/tpl/blog/drafts.php b/tpl/blog/drafts.php
new file mode 100644
index 0000000..5440cbc
--- /dev/null
+++ b/tpl/blog/drafts.php
@@ -0,0 +1,41 @@
+<?php
+
+require("tpl/general/top.php");
+
+echo '<div class="small_right">';
+echo '<a href="post-blog">post a message</a></div>';
+
+echo '<h2>My drafts</h2>';
+
+if (count($drafts) > 0) {
+ foreach ($drafts as $post) {
+ echo '<div class="blog_post">';
+ echo '<div class="small_right">';
+ echo '<a href="edit-blog-' . $post['id'] . '">edit</a>';
+ echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a>';
+ echo ' | <a href="publish-blog-' . $post['id'] . '">publish</a>';
+ echo '</div>';
+ echo '<h2>' . $post['title'] . '</h2>';
+ echo $post['text_html'];
+ echo '</div>';
+ }
+} else {
+ echo '<p>No drafts</p>';
+}
+
+echo '<h2>My published posts</h2>';
+
+if (count($pub) > 0) {
+ echo '<table><tr><th>Title</th><th>Actions</th></tr>';
+ foreach ($pub as $post) {
+ echo '<tr><td>' . $post['title'] . '</td>';
+ echo '<td><a href="edit-blog-' . $post['id'] . '">edit</a>';
+ echo ' | <a href="delete-blog-' . $post['id'] . '">delete</a></td></tr>';
+ }
+ echo '</table>';
+} else {
+ echo '<p>No published posts</p>';
+}
+
+
+require("tpl/general/bottom.php");