. * * @copyright Copyright: 2009 Chunsheng Wang * @author Chunsheng Wang * @package release * @version $Id$ * @link http://www.zentao.cn */ ?> lang->release->errorErrorFormat)); extract($release); if(empty($name)) $errorMSG[] = $this->lang->release->errorEmptyName; if(empty($product)) $errorMSG[] = $this->lang->release->errorEmptyProduct; if(!empty($errorMSG)) die(js::alert(join($errorMSG, '\n'))); $sql = "INSERT INTO " . TABLE_RELEASE . " (`name`, `product`, `desc`, `planDate`) VALUES('$name', '$product', '$desc', '$planDate')"; return $this->dbh->query($sql); } function read($id) { } function update($id) { } function delete($id) { } function getList($product = 0) { $product = (int)$product; $where = $product > 0 ? " WHERE `product` = '$product'" : ''; $sql = "SELECT * FROM " . TABLE_RELEASE . $where; $stmt = $this->dbh->query($sql); return $stmt->fetchAll(); } }