public function doUpdateAction() { $address = $this->input('address'); $contact = $this->input('contact'); $website = $this->input('website'); if ($address == '' || empty($contact)) { $this->flash(0, '必填项没有填写完整'); } if ($website !== '' && !Zyon_Util::isUrl($website)) { $this->flash(0, '网站地址格式错误'); } $map = array('h_phone' => $contact, 'h_address' => $address, 'h_website' => $website, 'h_province' => $this->input('province'), 'h_city' => $this->input('city'), 'h_title' => $this->input('title'), 'h_note' => $this->input('note')); if ($this->model('hotel')->modHotel($this->_hostel['h_id'], $map)) { $this->flash(1); } else { $this->flash(0); } }