From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- demos/blog/protected/Pages/Admin/UserMan.php | 148 +++++++++++++-------------- 1 file changed, 74 insertions(+), 74 deletions(-) (limited to 'demos/blog/protected/Pages/Admin/UserMan.php') diff --git a/demos/blog/protected/Pages/Admin/UserMan.php b/demos/blog/protected/Pages/Admin/UserMan.php index 5901c334..231f6c84 100644 --- a/demos/blog/protected/Pages/Admin/UserMan.php +++ b/demos/blog/protected/Pages/Admin/UserMan.php @@ -1,75 +1,75 @@ - - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2006 PradoSoft - * @license http://www.pradosoft.com/license/ - * @version $Id$ - */ - -/** - * UserMan class - * - * @author Qiang Xue - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2006 PradoSoft - * @license http://www.pradosoft.com/license/ - */ -class UserMan extends BlogPage -{ - protected function bindData() - { - $author=$this->User->ID; - $offset=$this->UserGrid->CurrentPageIndex*$this->UserGrid->PageSize; - $limit=$this->UserGrid->PageSize; - $this->UserGrid->DataSource=$this->DataAccess->queryUsers('','ORDER BY status DESC, name ASC',"LIMIT $offset,$limit"); - $this->UserGrid->VirtualItemCount=$this->DataAccess->queryUserCount(''); - $this->UserGrid->dataBind(); - } - - public function onLoad($param) - { - parent::onLoad($param); - if(!$this->IsPostBack) - $this->bindData(); - } - - public function changePage($sender,$param) - { - $this->UserGrid->CurrentPageIndex=$param->NewPageIndex; - $this->bindData(); - } - - public function pagerCreated($sender,$param) - { - $param->Pager->Controls->insertAt(0,'Page: '); - } - - public function editItem($sender,$param) - { - $this->UserGrid->EditItemIndex=$param->Item->ItemIndex; - $this->bindData(); - } - - public function saveItem($sender,$param) - { - $item=$param->Item; - $userID=$this->UserGrid->DataKeys[$item->ItemIndex]; - $userRecord=$this->DataAccess->queryUserByID($userID); - $userRecord->Role=TPropertyValue::ensureInteger($item->Cells[1]->UserRole->SelectedValue); - $userRecord->Status=TPropertyValue::ensureInteger($item->Cells[2]->UserStatus->SelectedValue); - $this->DataAccess->updateUser($userRecord); - $this->UserGrid->EditItemIndex=-1; - $this->bindData(); - } - - public function cancelItem($sender,$param) - { - $this->UserGrid->EditItemIndex=-1; - $this->bindData(); - } -} - + + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + * @version $Id$ + */ + +/** + * UserMan class + * + * @author Qiang Xue + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2006 PradoSoft + * @license http://www.pradosoft.com/license/ + */ +class UserMan extends BlogPage +{ + protected function bindData() + { + $author=$this->User->ID; + $offset=$this->UserGrid->CurrentPageIndex*$this->UserGrid->PageSize; + $limit=$this->UserGrid->PageSize; + $this->UserGrid->DataSource=$this->DataAccess->queryUsers('','ORDER BY status DESC, name ASC',"LIMIT $offset,$limit"); + $this->UserGrid->VirtualItemCount=$this->DataAccess->queryUserCount(''); + $this->UserGrid->dataBind(); + } + + public function onLoad($param) + { + parent::onLoad($param); + if(!$this->IsPostBack) + $this->bindData(); + } + + public function changePage($sender,$param) + { + $this->UserGrid->CurrentPageIndex=$param->NewPageIndex; + $this->bindData(); + } + + public function pagerCreated($sender,$param) + { + $param->Pager->Controls->insertAt(0,'Page: '); + } + + public function editItem($sender,$param) + { + $this->UserGrid->EditItemIndex=$param->Item->ItemIndex; + $this->bindData(); + } + + public function saveItem($sender,$param) + { + $item=$param->Item; + $userID=$this->UserGrid->DataKeys[$item->ItemIndex]; + $userRecord=$this->DataAccess->queryUserByID($userID); + $userRecord->Role=TPropertyValue::ensureInteger($item->Cells[1]->UserRole->SelectedValue); + $userRecord->Status=TPropertyValue::ensureInteger($item->Cells[2]->UserStatus->SelectedValue); + $this->DataAccess->updateUser($userRecord); + $this->UserGrid->EditItemIndex=-1; + $this->bindData(); + } + + public function cancelItem($sender,$param) + { + $this->UserGrid->EditItemIndex=-1; + $this->bindData(); + } +} + ?> \ No newline at end of file -- cgit v1.2.3