public function doaddAction() { list($name, $url, $descrip, $logo, $ifcheck, $contact) = $this->getInput(array('name', 'url', 'descrip', 'logo', 'ifcheck', 'contact'), 'post'); Wind::import('SRC:service.link.dm.PwLinkDm'); $linkDm = new PwLinkDm(); $linkDm->setName($name); $linkDm->setUrl($url); $linkDm->setDescrip($descrip); $linkDm->setLogo($logo); $linkDm->setIfcheck(0); $linkDm->setContact($contact); $logo && $linkDm->setIflogo(1); if (($result = $this->_getLinkDs()->addLink($linkDm)) instanceof PwError) { $this->showError($result->getError()); } $this->showMessage('operate.success'); }