本文整理汇总了PHP中Property::googleMapUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Property::googleMapUrl方法的具体用法?PHP Property::googleMapUrl怎么用?PHP Property::googleMapUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property::googleMapUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
public function view()
{
if (empty($this->id)) {
\Layout::add('<h1>Sorry</h1><p>This property is not in our system. Please return to the <a href="./">property listing page</a> to try again.</p>');
return;
}
$tpl = $this->getBaseTpl();
$refund = '<span style="font-size : 90%">(Refundable)</span>';
\PHPWS_Core::initModClass('properties', 'Contact.php');
$max_width = PANEL_WIDTH;
$max_height = PANEL_HEIGHT;
\Layout::addStyle('properties', 'view.css');
$tpl['NAME'] = $this->viewLink($this->name);
$photos = $this->getPhotos();
if ($photos) {
javascriptMod('properties', 'galleryview', array('panel_width' => $max_width, 'panel_height' => $max_height));
foreach ($photos as $p) {
if (is_file($p['path'])) {
$dim = getimagesize($p['path']);
$width =& $dim[0];
$height =& $dim[1];
$diff = \PHPWS_File::getDiff($width, $max_width, $height, $max_height);
$new_width = round($width * $diff);
$new_height = round($height * $diff);
if ($new_width > $max_width || $new_height > $max_height) {
$diff = \PHPWS_File::getDiff($new_width, $max_width, $new_height, $max_height);
$new_width = round($width * $diff);
$new_height = round($height * $diff);
}
} else {
$p['path'] = PHPWS_SOURCE_HTTP . 'mod/properties/img/no_photo.gif';
$p['title'] = 'Photo not found';
$new_width = '150px';
$new_height = '113px';
}
$all[] = sprintf('<li><img src="%s" title="%s" />
<div class="panel-content lightbox">
<a class="lightbox" href="%s"><img src="%s" width="%s" height="%s" /></a>
</div></li>', Photo::thumbnailPath($p['path']), $p['title'], $p['path'], $p['path'], $new_width, $new_height);
}
$tpl['PHOTOS'] = implode("\n", $all);
} else {
$tpl['NO_PHOTO'] = '<img src="' . PHPWS_SOURCE_HTTP . 'mod/properties/img/no_photo.gif" alt="No photo" title="No photos available" />';
}
$contact = new Contact($this->contact_id);
if (!empty($contact->company_address)) {
$tpl['COMPANY_ADDRESS'] = $contact->getCompanyAddress();
$tpl['GOOGLE_COMPANY'] = sprintf('<a target="_blank" href="http://maps.google.com/maps?q=%s">
<img class="google-map" src="%smod/properties/img/google-pin-red.gif" title="Google maps" target="_blank" /></a>', Property::googleMapUrl($contact->company_address), PHPWS_SOURCE_HTTP);
}
$tpl['COMPANY_NAME'] = $contact->getCompanyUrl();
$tpl['EMAIL'] = $contact->getEmailAddress(true);
$tpl['PHONE'] = $contact->getPhone();
$tpl['TIMES_AVAILABLE'] = $contact->getTimesAvailable();
$tpl['ADDRESS'] = $this->getAddress();
$tpl['GOOGLE_MAP'] = sprintf('<a target="_blank" href="http://maps.google.com/maps?q=%s">
<img src="%smod/properties/img/google-pin-red.gif" title="Google maps" target="_blank" /></a>', Property::googleMapUrl($this->address), PHPWS_SOURCE_HTTP);
$tpl['LEASE_TYPE'] = $this->getLeaseType();
if ($this->efficiency) {
$tpl['BEDROOMS'] = 'One room efficiency';
} else {
$tpl['BEDROOMS'] = $this->bedroom_no;
}
$tpl['BATHROOMS'] = $this->getBathroomNo();
if ($this->window_number) {
$tpl['WINDOWS'] = 'Yes';
} else {
$tpl['WINDOWS'] = 'No';
}
if (!empty($this->admin_fee_amt)) {
$tpl['ADMIN_FEE'] = '$' . $this->getAdminFeeAmt();
$tpl['ADMIN_FEE_REFUND'] = $this->admin_fee_refund ? $refund : null;
}
if (!empty($this->parking_fee)) {
$tpl['PARKING_FEE'] = '$' . $this->getParkingFee();
}
if (!empty($this->security_amt)) {
$tpl['SECURITY_AMT'] = '$' . $this->getSecurityAmt();
$tpl['SECURITY_REFUND'] = $this->security_refund ? $refund : null;
}
if (!empty($this->other_fees)) {
$tpl['OTHER_FEES'] = $this->getOtherFees();
}
if (!empty($this->clean_fee_amt)) {
$tpl['CLEAN_FEE_AMT'] = '$' . $this->getCleanFeeAmt();
$tpl['CLEAN_FEE_REFUND'] = $this->clean_fee_refund ? $refund : null;
}
$tpl['PARKING_PER_UNIT'] = $this->getParkingPerUnit();
if ($this->pets_allowed) {
$tpl['PETS_ALLOWED'] = 'Yes';
$tpl['PET_TYPES'] = $this->getPetType();
if ($this->pet_deposit) {
$tpl['PET_DEPOSIT'] = '$' . $this->getPetDeposit() . ' <span style="font-size : 90%">(refundable)</span>';
} else {
$tpl['PET_DEPOSIT'] = 'None';
}
if ($this->pet_fee) {
$tpl['PET_FEE'] = '$' . $this->getPetFee() . ' <span style="font-size : 90%">(nonrefundable)</span>';
} else {
$tpl['PET_FEE'] = 'None';
//.........这里部分代码省略.........