From 2ea02214b2fb6bedb58dbbd318ef171a9e146524 Mon Sep 17 00:00:00 2001 From: xue <> Date: Mon, 29 May 2006 03:08:07 +0000 Subject: Merge from 3.0 branch till 1099. --- demos/blog/sitemap.txt | 106 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 demos/blog/sitemap.txt (limited to 'demos/blog/sitemap.txt') diff --git a/demos/blog/sitemap.txt b/demos/blog/sitemap.txt new file mode 100644 index 00000000..8326855b --- /dev/null +++ b/demos/blog/sitemap.txt @@ -0,0 +1,106 @@ +Be careful about username case sensitivity!! + +Home : list of blogs filtered by a category or time range, with paging + +ViewBlog : read a single blog with all comments and a comment input form +NewBlog : create a new blog, with file attachment form and THtmlArea +EditBlog : edit an existing blog + +LoginUser : login page +NewUser : create a new user +EditUser : edit the current user + +Admin : whether allow multiple users, whether HTML is allowed (first user is always the admin) + +URL design: + +index.php?page=ListBlog×pan=123,456&limit=123,456 : list of latest blogs, equivalent to: +index.php?page=NewBlog +index.php?page=EditBlog&id=123 +index.php?page=ViewBlog&id=123 +index.php?page=NewUser +index.php?page=EditUser +index.php?page=ViewUser +index.php?page=Admin + + +Use Case 1: Add a post +1. Authorization check +2. display UI for adding post +3. input validation +4. add post to DB +5. display UI for post list + + +DB Logic needed: + +class Post extends DataObject +{ + public $xxx; +} + +class Comment extends DataObject +{ +} + +class UserProfile extends DataObject +{ + +} + +class DataObject extends TComponent +{ + protected static $mapping=array(); + + public function __construct($db) + { + } + + protected static function generateModifier($filter,$orderBy,$limit) + { + $modifier=''; + if($filter!=='') + $modifier=' WHERE '.$filter; + if($orderBy!=='') + $modifier.=' ORDER BY '.$orderBy; + if($limit!=='') + $modifier.=' LIMIT '.$limit; + return $modifier; + } + + public static function queryRow($filter='') + { + $modifier=self::generateModifier($filter,'',''); + } + + public static function query($filter='',$orderBy='',$limit='') + { + $modifier=self::generateModifier($filter,$orderBy,$limit); + } + + public function save() + { + } + + public function delete() + { + } +} + +public function queryUsers($filter='',$sortBy='',$limit='') +public function queryUser($id) +public function insertUser($user) +public function updateUser($user) +public function deleteUser($id) + +public function queryPosts($filter='',$sortBy='',$limit='') +public function queryPost($id) +public function insertPost($post) +public function updatePost($post) +public function deletePost($id) + +public function queryComments($filter='',$sortBy='',$limit='') +public function queryComment($id) +public function insertComment($comment) +public function updateComment($comment) +public function deleteComment($id) -- cgit v1.2.3