public function index()
 {
     if (!IS_POST) {
         $this->display('login');
     } else {
         $content['username'] = I("username");
         $content['_logic'] = 'and';
         $content['password'] = I("password", "", "md5");
         $user = D("Common/user");
         // dump($admin->where($content)->find());
         $result = $user->where($content)->find();
         //             var_dump( $result);
         if ($result) {
             CommonController::updateSession($result['id']);
             $this->success('登陆成功', U('Index/index'));
         } else {
             $this->error($user->getError(), 'Login/index', 1);
         }
     }
 }