public function updateEvent($eventId, $token, $destination, $destAddr, $departTime, $returnTime, $departDate, $seats, $departAddr, $gas, $depart, $returnDate, $vehicle, $note) { $rs = array('destination' => 'No change', 'destAddr' => 'No change', 'departTime' => 'No change', 'returnTime' => 'No change', 'departDate' => 'No change', 'seats' => 'No change', 'departAddr' => 'No change', 'gas' => 'No change', 'depart' => 'No change', 'returnDate' => 'No change', 'vehicle' => 'No change', 'note' => 'No change'); $model = new Model_Event(); if ($destination != null) { $return = $model->updateDestination($eventId, $token, $destination); $rs['destination'] = $return; } if ($destAddr != null) { $return = $model->updateDestAddr($eventId, $token, $destAddr); $rs['destAddr'] = $return; } if ($departTime != null) { $return = $model->updateDepartTime($eventId, $token, $departTime); $rs['departTime'] = $return; } if ($returnTime !== null) { $return = $model->updateReturnTime($eventId, $token, $returnTime); $rs['returnTime'] = $return; } if ($departDate != null) { $return = $model->updateDepartDate($eventId, $token, $departDate); $rs['departDate'] = $return; } if ($seats != null) { $return = $model->updateSeats($eventId, $token, $seats); $rs['seats'] = $return; } if ($departAddr != null) { $return = $model->updateDepartAddr($eventId, $token, $departAddr); $rs['departAddr'] = $return; } if ($gas != null) { $return = $model->updateGas($eventId, $token, $gas); $rs['gas'] = $return; } if ($depart != null) { $return = $model->updateDepart($eventId, $token, $depart); $rs['depart'] = $return; } if ($returnDate !== null) { $return = $model->updateReturnDate($eventId, $token, $returnDate); $rs['returnDate'] = $return; } if ($vehicle != null) { $return = $model->updateVehicle($eventId, $token, $vehicle); $rs['vehicle'] = $return; } if ($note !== null) { $return = $model->updateNote($eventId, $token, $note); $rs['note'] = $return; } return $rs; }