set_base_dir( $events->get_dir( $Message['Event-Id'] ) ); } $id = strtolower( $Message['Voting-Id'] ); $voting = $votingModel->get_data( $id ); if ( ! $voting ){ http_error( '404 Not Found', 'Voting does not exist' ); } if ( $voting['status'] != 'open' ){ http_error( '500 Internal Server Error', 'Voting has not been started' ); } $SaveReceiptAs = $votingModel->get_dir( $id, TRUE ) . '/voting-end-declaration'; // end of file handlers/voting-end-declaration.php