public function Add() { if ($this->_POST) { $Data['ProjectName'] = trim($this->_POST['ProjectName']); $Data['OnlineTime'] = trim($this->_POST['OnlineTime']) . ' 00:00:00'; $Data['Remark'] = addslashes($this->_POST['Remark']); $Data['UpdateTime'] = date("Y-m-d H:i:s"); if ($Data['ProjectName'] == '') { $this->__Message('产品名称不能为空!'); } $ProjectModule = new ProjectModule(); if ($ProjectModule->InsertArray($Data)) { $this->__Message('添加产品成功!', UrlRewriteSimple('Project', 'Lists', true), '继续操作'); } else { $this->__Message('添加产品失败,请再一次尝试!'); } } }