public function createtypesAction()
 {
     if (!$this->request->isPost()) {
         return $this->forward("producttypes/index");
     }
     $Types = new Types();
     $Types->fid = $this->request->getPost("fid", "int");
     $Types->name = $this->request->getPost("name");
     $Types->name = strip_tags($Types->name);
     $Types->limit = $this->request->getPost("limit", "int");
     $Types->remark = $this->request->getPost("remark", "striptags");
     if (!$Types->save()) {
         foreach ($Types->getMessages() as $message) {
             $this->flash->error((string) $message);
         }
         return $this->forward("producttypes/new");
     } else {
         $this->response->redirect("producttypes/search");
     }
 }