<?php
/*Servo Recipe*/
/*Recipe Name: Accept contact request for B&B*/
/*Recipe Description: This recipe will accept the input from the simple contact form recipe and save any form submissions to disk.*/
/*Servo Recipe*/


/*s3rvo_functiondef_UOSZCYUKEG*/

/*Title: POST Request as a readable, formatted string*/

/*Object: escapers_post_request_as_readable_string.json*/

/*Description: Returns the contents of a POST request as readable text which could be written to a file*/

/*Tint: #55a5FF*/

function aer_post_request_as_readable_string() {

	$output = "";

	foreach ($_POST as $key=>$val) {

		$output .= "'".$key."' : '".$val."'\r\n";

	}

	return $output;

}

/*s3rvo_functiondef_UOSZCYUKEG*/

/*s3rvo_functioncall_MGRTBNAEBG*/

/*Title: POST Request as a readable, formatted string*/

/*Object: escapers_post_request_as_readable_string.json*/

/*Description: Returns the contents of a POST request as readable text which could be written to a file*/

/*Tint: #55a5FF*/

/*s3rvo_return_value*/$request = /*s3rvo_return_value*/servo_post_request_as_readable_string();

/*s3rvo_functioncall_MGRTBNAEBG*/









/*s3rvo_functiondef_BFGKOSQZLV*/

/*Title: Write data to unique file in folder*/

/*Object: escapers_write_data_to_unique_file_in_folder.json*/

/*Description: Writes data to a file in the given folder. Will create a unique file, and not overwrite anything else*/

/*Tint: #FF8C72*/

function aer_write_data_to_unique_file_in_folder($path,$data) {



	$tmpfname = tempnam($path, "");

	$handle = fopen($tmpfname, "w");

	fwrite($handle, $data);

	fclose($handle);

	return $tmpfname;

}

/*s3rvo_functiondef_BFGKOSQZLV*/









/*s3rvo_functioncall_XQVYOYXSPM*/

/*Title: Write data to unique file in folder*/

/*Object: escapers_write_data_to_unique_file_in_folder.json*/

/*Description: Writes data to a file in the given folder. Will create a unique file, and not overwrite anything else*/

/*Tint: #FF8C72*/

/*s3rvo_return_value*/$result = /*s3rvo_return_value*/servo_write_data_to_unique_file_in_folder(

/*s3rvo_param_$path*/"C:\Users\gt\Desktop\BedAndBreakfast"/*s3rvo_param_$path*/,

/*s3rvo_param_$data*/$request/*s3rvo_param_$data*/

);

/*s3rvo_functioncall_XQVYOYXSPM*/







?>