From 6e0338629774fffe5fbe7136dfce34ce83844a5c Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 30 May 2006 03:26:33 +0000 Subject: Blog demo is completed. --- demos/blog/protected/Pages/Posts/MyPost.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'demos/blog/protected/Pages/Posts/MyPost.php') diff --git a/demos/blog/protected/Pages/Posts/MyPost.php b/demos/blog/protected/Pages/Posts/MyPost.php index be03ca63..dff98426 100644 --- a/demos/blog/protected/Pages/Posts/MyPost.php +++ b/demos/blog/protected/Pages/Posts/MyPost.php @@ -1,5 +1,22 @@ + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Revision: $ $Date: $ + */ +/** + * MyPost class + * + * @author Qiang Xue + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + */ class MyPost extends BlogPage { protected function bindData() @@ -7,8 +24,8 @@ class MyPost extends BlogPage $author=$this->User->ID; $offset=$this->PostGrid->CurrentPageIndex*$this->PostGrid->PageSize; $limit=$this->PostGrid->PageSize; - $this->PostGrid->DataSource=$this->DataAccess->queryPosts("author_id=$author",'','','ORDER BY a.status ASC, create_time DESC',"LIMIT $offset,$limit"); - $this->PostGrid->VirtualItemCount=$this->DataAccess->queryPostCount("author_id=$author",'',''); + $this->PostGrid->DataSource=$this->DataAccess->queryPosts("author_id=$author",'','ORDER BY a.status DESC, create_time DESC',"LIMIT $offset,$limit"); + $this->PostGrid->VirtualItemCount=$this->DataAccess->queryPostCount("author_id=$author",''); $this->PostGrid->dataBind(); } -- cgit v1.2.3