0, 'error' => 'Kein Server ausgewählt' ] ) ); } if ( empty( $idLong ) ){ die( json_encode( [ 'status' => 0, 'error' => 'Keine Identität ausgewählt' ] ) ); } if ( empty( $_REQUEST['eventId'] ) || empty( $_REQUEST['votingId'] ) ){ die( json_encode( [ 'status' => 0, 'error' => 'Daten unvollständig: ' . var_export( $_REQUEST, TRUE ) ] ) ); } $msg = new ParTCP_Outgoing_Message( $serverLong, $idLong, 'voting-update-request' ); $msg->set( 'Event-Id', $_REQUEST['eventId'] ); $msg->set( 'Voting-Id', $_REQUEST['votingId'] ); unset( $_REQUEST['eventId'], $_REQUEST['votingId'] ); $msg->set( 'Voting-Data', $_REQUEST ); $response = pas_check_response( $msg->send() ); if ( is_string( $response ) ){ die( json_encode( [ 'status' => 0, 'error' => $response ] ) ); } echo json_encode( [ 'status' => 1, 'error' => '' ] ); // end of file ajax/update_voting.php