Exemple #1
0
 public function excute()
 {
     $post = RequestParam::Post();
     if ($post) {
         $username = $post['username'];
         $pwd = $post['pwd'];
         $result = Lib_User::Register($username, $pwd);
         if ($result) {
             System::AddNotice("注册成功");
             Utility::Redirect("/demo/list");
         }
     }
     $param = array('username' => $username);
     $this->show($param);
 }
Exemple #2
0
 public function excute()
 {
     $loginUser = Lib_User::GetLoginUser();
     if ($loginUser) {
         Utility::Redirect("/demo/list");
     }
     $post = RequestParam::Post();
     if ($post) {
         $username = $post['username'];
         $pwd = $post['pwd'];
         $loginUser = Lib_User::Login($username, $pwd);
         if ($loginUser) {
             System::AddNotice("登陆成功");
             Utility::Redirect("/demo/list");
         }
     }
     $param = array();
     $this->show($param);
 }