本文整理汇总了PHP中Model_Ad::current方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Ad::current方法的具体用法?PHP Model_Ad::current怎么用?PHP Model_Ad::current使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_Ad
的用法示例。
在下文中一共展示了Model_Ad::current方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: current
/**
* returns the current location
* @return Model_Location
*/
public static function current()
{
//we don't have so let's retrieve
if (self::$_current === NULL) {
self::$_current = new self();
if (Model_Ad::current() != NULL and Model_Ad::current()->loaded() and Model_Ad::current()->location->loaded()) {
self::$_current = Model_Ad::current()->location;
} elseif (Request::current()->param('location') != NULL || Request::current()->param('location') != URL::title(__('all'))) {
self::$_current = self::$_current->where('seoname', '=', Request::current()->param('location'))->limit(1)->cached()->find();
}
}
return self::$_current;
}
示例2:
?>
"/>
<meta property="logbee:addr" content="<?php
echo Model_Ad::current()->address;
?>
"/>
<meta property="logbee:email" content="<?php
echo Model_Ad::current()->user->email;
?>
"/>
<meta property="logbee:phone" content="<?php
echo Model_Ad::current()->phone;
?>
"/>
<meta property="logbee:price" content="<?php
echo i18n::money_format(Model_Ad::current()->price);
?>
"/>
<meta property="logbee:imgurl" content="<?php
echo Controller::$image;
?>
"/>
<?php
}
?>
<link rel="shortcut icon" href="<?php
echo Theme::get('favicon_url') != '' ? Theme::get('favicon_url') : core::config('general.base_url') . 'images/favicon.ico';
?>
">
示例3:
if (!strcmp(trim($value), 'print')) {
?>
<span class='st_print_large' displayText='Print'></span><?php
}
?>
<?php
}
}
?>
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="//ws.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "12d591ee-d8ab-456d-807f-f11fb504d15b", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>
<?php
if (core::config('advertisement.logbee') == 1 and class_exists('Model_Ad') and Model_Ad::current() !== NULL and Model_Ad::current()->loaded()) {
?>
<script type="text/javascript">function logbee_wopen(url){ var win = window.open(url, 'logbee', 'width=1200, height=1000, location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizeable=yes'); win.resizeTo(w, h); win.focus(); }</script>
<div class="logbee">
<a href="" class="log-it-button" onclick="javascript:logbee_wopen('http://www.logbee.com/add?url=<?php
echo URL::current();
?>
');return false;"><img src="//www.logbee.com/img/affiliation/logbee_portal_button_logit_60x25.png" border="0" title="log it"></a>
<div class="clear"></div>
</div>
<?php
}
?>