function saving_data_into_lockout_table($lockout_type = '', $email = '')
 {
     global $today_date_time;
     lockout_table($today_date_time, $lockout_type, 'save data');
 }
function restaurant_reservation_content($options)
{
    global $geo_country;
    global $geo_city;
    global $latitude;
    global $longitude;
    global $message_array;
    global $email_confirmation_length;
    global $wpdb;
    $today = getdate();
    $today_date_time = $today['year'] . '-' . $today['mon'] . '-' . $today['mday'] . ' ' . $today['hours'] . ':' . $today['minutes'] . ':' . $today['seconds'];
    $out = '';
    /*=============================================================
    			1.	CHECK IF RESERVATION SYSTEM IS BEING LOCKOUT
    		=============================================================*/
    if (lockout_table($today_date_time, '', 'check is lockout')) {
        $out .= '<p><strong>' . $message_array['TOO MANY FAKE ACTIONS']['title'] . '</strong></p>';
        $out .= '<p>' . $message_array['TOO MANY FAKE ACTIONS']['message'] . '</p>';
    } else {
        /*=============================================================
        			2.	UPDATE BOOKING LIST STATUS ( WHERE TIME IS EXPIRED ) 
        		=============================================================*/
        $expired_post_date = date("Y-m-d H:i:s", strtotime($today_date_time) - $email_confirmation_length);
        $sql = "UPDATE " . $wpdb->prefix . "posts SET post_status='trash'" . " WHERE post_type='olr_restaurant' AND post_status='pending' AND `post_date` < '" . $expired_post_date . "'";
        $update = $wpdb->query($sql);
        /*=============================================================
        			3.	RESERVATION FORM
        		=============================================================*/
        $out .= '<div class="olr_restaurant_wrapper">';
        $out .= '
			<form id="olr_restaurant_form" action="' . $_SERVER['PHP_SELF'] . '" method="post">' . wp_nonce_field("restaurant_form_verify", "restaurant_nonce_id") . '<h2>' . __('Booking Table', PLUGIN_NAME) . '</h2>
			<hr/>';
        $out .= '
			<input type="hidden" name="country" id="country" disabled="disabled" value="' . $geo_country . '" />
			<input type="hidden" name="city" id="city" disabled="disabled" value="' . $geo_city . '" />
			<input type="hidden" name="latitude" id="latitude" disabled="disabled" value="' . $latitude . '" />
			<input type="hidden" name="longitude" id="longitude" disabled="disabled" value="' . $longitude . '" />
			
			<p>
				<span class="olr_label"><label for="">' . __('Persons', PLUGIN_NAME) . '</label></span> 
				<input type="text" name="olr_persons" id="olr_persons" value="" /> <span class="olr_required">*</span>
			</p>
			<div class="olr_date_section">
				<span class="olr_label"><label for="">' . __('Date', PLUGIN_NAME) . '</label></span> 
				<div class="olr_date_wrap">
					<input name="olr_date" id="olr_date" type="text" value="" /> <span class="olr_required">*</span>
				</div>	       
			</div>
			<div class="olr_time_section">
				<span class="olr_label"><label for="">' . __('Time', PLUGIN_NAME) . '</label></span>
				<div class="olr_time_wrap">
					<select name="olr_time" id="olr_time">
						<option value="" selected="selected"></option>';
        //$out .= olr_output_time_list ( $options );
        $out .= '</select> <span class="olr_required">*</span><span class="time_response"></span>
				</div>	
			</div><br/>';
        $out .= '
			<p>
				<input type="submit" value="Find Table" id="olr_find_table_button" name="olr_find_table_button">
			</p>
			<div class="olr_find_table_response">
				<p class="olr_response_result"></p>
				<p class="olr_response_recommend"></p>
			</div>
			<p>
				<input type="button" value="Send an Enquiry" id="olr_send_enquiry_button" name="olr_send_enquiry_button">
			</p>
			<div class="personal_information_wrapper"></div>
			<p>
				<span class="olr_requireds">*</span><span>  ' . __('Required fields', PLUGIN_NAME) . '</span> 
			</p>
			
			<p>
				<input type="submit" value="Booking" id="olr_restaurant_booking_button" name="olr_restaurant_booking_button">
			</p>
			
			</form>';
        $out .= '<div id="olr_restaurant_response" ></div>';
        $out .= '<div style="clear:both"></div>';
        if ($options['help_promote_plugin']) {
            $out .= '<div style="clear:both">Powered By <a href="http://www.solweder.com">solweder.com</a></div>';
        }
        $out .= '</div>';
        $out .= '<div class="personal_information_container">
				<h2>' . __('Personal Information', PLUGIN_NAME) . '</h2>
				<hr/>
				<p>
					<span class="olr_label"><label for="">' . __('Name', PLUGIN_NAME) . '</label></span> 
					<input type="text" name="olr_name" id="olr_name" value="" /> <span class="olr_required">*</span>
				</p>
				<p>
					<span class="olr_label"><label for="">' . __('Email Address', PLUGIN_NAME) . '</label></span> 
					<input type="text" name="olr_email" id="olr_email" value="" /> <span class="olr_required">*</span>
				</p>
				<p>
					<span class="olr_label"><label for="">' . __('Phone', PLUGIN_NAME) . '</label></span> 
					<input type="text" name="olr_phone" id="olr_phone" value="" /> <span class="olr_required">*</span>
				</p>
				<p>
					<span class="olr_label"><label for="">' . __('Message', PLUGIN_NAME) . '</label></span>
					<textarea rows="10" cols="30" name="olr_message" id="olr_message"></textarea>
				</p>
				<p class="olr_type_table_wrap">
					<span class="olr_label"><label for="">' . __('Type of Table', PLUGIN_NAME) . '</label></span>
					<input type="text" name="olr_type_table" id="olr_type_table" class="olr_type_table" disabled="disabled" value="" />
				</p>
				<br/>';
        if ($options['enable_captcha']) {
            if ($options['public_key'] != '') {
                $out .= '<script type="text/javascript">
									var RecaptchaOptions = {
										theme : "' . $options['captcha_theme'] . '"
									};
								</script>
								<script type="text/javascript"
									src="http://www.google.com/recaptcha/api/challenge?k=' . $options['public_key'] . '">
								</script>
								<p class="olr_captcha_response_error"></p>
								';
            }
        }
        $out .= '</div>';
    }
    // if( lockout_table('','','check is lockout') ){
    return $out;
}