public function _update() { $r= new JTContactus($_SESSION['login_user_id']); $r->select($_POST['id']); if( empty($r->data['reply']) && !empty($_POST['reply']) || ($r->data['reply']!=$_POST['reply']) ) $_POST['reply_date']=JDate::now(); $r->setFields($_POST); $r->update(); $this->addAlert(new JAlert('更新完成','告知訊息',"./?action=edit&id={$_POST['id']}")); $this->action('edit', $_POST['id']); }