本文整理汇总了PHP中XDateTime::valueOfNow方法的典型用法代码示例。如果您正苦于以下问题:PHP XDateTime::valueOfNow方法的具体用法?PHP XDateTime::valueOfNow怎么用?PHP XDateTime::valueOfNow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XDateTime
的用法示例。
在下文中一共展示了XDateTime::valueOfNow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
<div class="center_r_bar">
<div class="r_bar_tit"><a href="http://www.<?=URL_PREFIX?>haodf.com/tingzhen.htm" target="_blank" class="blue2">更多>></a></div>
<div class="r_bar_con" id="announcelist" style="height: 82px; overflow: hidden;">
<ul class="r_bar_list">
<?php foreach ($hospitalAnnounceList as $hospitalAnnounce) {?>
<li><span class="f_rt"><?=$hospitalAnnounce->utime->toStringByFormat('d日H时更新')?></span>
<a class="blue" href="http://www.<?=URL_PREFIX?>haodf.com/hospital/<?=Codec::getInstance()->encodeId($hospitalAnnounce->hospital->id)?>/announce.htm" target="_blank">
<?=$hospitalAnnounce->hospital->commonName?></a></li>
<?php } ?>
</ul>
</div>
</div>
<!--出停诊信息-->
<?php
//2012国庆门诊安排
if(XDateTime::valueOfNow()->before(XDateTime::valueOf('2012-10-08 00:00:00')))
{
?>
<div class="mb10 tc" style="height: 35px; width: 300px; background: url(http://i1.hdfimg.com/zhuanti/ztimg/2012_guoqing.jpg?2012092001); line-height: 35px;">
<a href="http://www.<?=URL_PREFIX?>haodf.com/zhuanti/2012nianzhongqiuguoqingqijianquanguogedayiyuanmenz.htm" target="_blank" class="red fb">2012年中秋国庆期间全国各大医院门诊安排</a>
</div>
<?php
}
?>
<div class="center_r_bar">
<a href="http://www.<?=URL_PREFIX?>haodf.com/thesis/showtaglist?searchType=tagId&searchParam=4" target="_blank" style="cursor:hand"><div class="r_bar_tit2"></div></a>
<!--首页右侧广告2-->
<?php echo Place::getPlaceContent('ads', 'disease_ads_one', 'ad_index_four'); ?>
<!--首页右侧广告2-->
<!--新热点-->
<?=CmsTplClient::getInstance()->get_tpl_html('120781506')?>
示例2: if
<script type="text/javascript">
var urlprefix = '<?=URL_PREFIX?>';
</script>
<script type="text/javascript" src="http://i1.hdfimg.com/js/jquery-1.4.2.min.js?20101126"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/homepage/js/ks-core-min.js?20101126"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/bigpipe/www/js/function.js?201409171900"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/my/js/jquery.framework.min.js?20140807"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/js/login_bar.e5470742.js"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/js/jquery-ui-1.8/js/jquery-ui-1.8.custom.min.js"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/js/jquery-ui-1.8/development-bundle/ui/jquery.ui.dialog.js"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/js/fancybox/fancybox.js?1358357449"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/space/present/present.js?2012072501"></script>
<script type="text/javascript" src="http://i1.hdfimg.com/searchfront/js/autocomplete.js?20140619"></script>
<?php if (XDateTime::valueOfNow()->before(XDateTime::valueOf('2013-02-25 00:00:00')))
{
?>
<!-- start happy new year -->
<style>
body{ background: url(http://i1.hdfimg.com/www/images/hny01.jpg) repeat-x left 30px;}
#hny{ background: url(http://i1.hdfimg.com/www/images/hny02.jpg) no-repeat center top;}
#index_page{ width:960px; overflow: hidden;}
.page_jj{ padding:0px;}
</style>
<script>
$("#index_page").wrap('<div id="hny"></div>');
</script>
<!-- end happy new year -->
<?php
}