示例#1
0
 public function sendMessage($name, $email, $phone, $person_message = null)
 {
     $property_id = (int) $_POST['property_id'];
     $property = new Property($property_id);
     $property->fetch();
     $message_format = estetico_get_setting('agent_message_format');
     $message = str_replace('%person_name%', $name, $message_format);
     $message = str_replace('%person_email%', $email, $message);
     $message = str_replace('%person_phone%', $phone, $message);
     $message = str_replace('%person_message%', $person_message, $message);
     $message = str_replace('%agent_name%', $this->getName(), $message);
     $message = str_replace('%property_name%', $property->getTitle(), $message);
     $message = str_replace('%property_link%', '<a href="' . $property->getLink() . '">' . $property->getLink() . '</a>', $message);
     $message = nl2br($message);
     $headers = "Content-Type:text/html;charset=utf-8\r\n";
     $headers .= "From: " . $name . ' <' . $email . '>' . "\r\n";
     $success = false;
     $recipient = $this->getEmail();
     if (mail($recipient, __('Contact message about a property', THEME_NAME), $message, $headers)) {
         $success = true;
     }
     return $success;
 }
示例#2
0
			<script>
			var property_details_gallery_delay = 0;
			try {
				property_details_gallery_delay = <?php 
echo abs((int) estetico_get_setting('property_details_gallery_delay'));
?>
			} catch(e) {}
			</script>
		</div>

		<div class="social-buttons clearfix">

				<div class="button">
					 <a href="http://www.pinterest.com/pin/create/button/
				        ?url=<?php 
echo $property->getLink();
?>
				        &media=<?php 
echo $property->getImage(array(147, 147));
?>
				        &description="
				        data-pin-do="buttonPin"
				        data-pin-config="above">
				        <img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" />
				    </a>

				    <script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>
				    <script type="text/javascript">
				(function(d){
				    var f = d.getElementsByTagName('SCRIPT')[0], p = d.createElement('SCRIPT');
				    p.type = 'text/javascript';