From 24547ccec6526fcef3cccb34bc35fb81f31236b3 Mon Sep 17 00:00:00 2001 From: Nicolas BERNSTEIN Date: Sun, 12 Feb 2012 19:50:55 +0100 Subject: A lot of changes : blogging system essentially. --- lib/blog/post.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 lib/blog/post.php (limited to 'lib/blog/post.php') diff --git a/lib/blog/post.php b/lib/blog/post.php new file mode 100644 index 0000000..1f1525a --- /dev/null +++ b/lib/blog/post.php @@ -0,0 +1,44 @@ += 1) { + $v = array(); + foreach ($tags as $tag) { + $v[] = "($id, '" . escs($tag) . "')"; + } + sql("INSERT INTO blog_tags(post, tag) VALUES " . implode(',', $v)); + } + header("Location: drafts-blog"); + die(); + } +} + +$title = "Post to blog"; +$fields = array( + array("label" => "Title : ", "name" => "title", "value" => $post_title), + array("label" => "Tags ", "name" => "tags", "type" => "text", "value" => $post_tags), + array("label" => "Text : ", "name" => "text", "type" => "textarea", "value" => $post_text), + ); +$validate = "Post entry"; + +require("tpl/general/form.php"); -- cgit v1.2.3