Beispiel #1
0
 function showSendReceiveUploadData()
 {
     $displayInterviewer = new DisplayInterviewer();
     $communication = new Communication();
     $data = $communication->exportTables(array('data', 'datarecords', 'states', 'times', 'remarks', 'contacts', 'households', 'respondents'), $this->user->getLastData(), 'primkey not like "999%"');
     //no test data
     if ($communication->sendToServer($data, $this->user->getUrid())) {
         //success sending data to server
         //update lastdate!
         $this->user->setLastData(date('Y-m-d H:i:s'));
         $this->user->saveChanges();
         $message = $displayInterviewer->displaySuccess(Language::labelDataUploaded());
     } else {
         $message = $displayInterviewer->displayError(Language::labelDataNotUploaded());
     }
     return $displayInterviewer->showSendReceive($message);
 }