Esempio n. 1
0
 /**
  * The default action - show the home page
  */
 public function indexAction()
 {
     if ($this->getRequest()->isPost()) {
         $this->userService->NewUser($this->_getParam('name'), $this->_getParam('email'));
     }
     $rowset = $this->userService->GetAllUsers();
     $this->view->users = $rowset->toArray();
 }
Esempio n. 2
0
 public function updateAction()
 {
     if ($this->getRequest()->isPost()) {
         $this->userService->SaveUser($this->_getParam('id'), $this->_getParam('name'), $this->_getParam('email'), $this->_getParam('contactType'));
         $this->_redirect('index');
     } else {
         $this->view->user = $this->userService->GetUser($this->_getParam('id'))->current();
     }
     $this->view->users = $this->userService->GetAllUsers()->toArray();
 }
Esempio n. 3
0
    public function adminAction()
    {
    	//partea de administrare
    	if($this->getRequest()->isPost())
		{
			$this->userService->CreateUser($this->_getParam('nume'),$this->_getParam('email'));
		}
		
		$rowset = $this->userService->GetAllUsers();
		$this->view->users = $rowset->toArray();

    }