当前位置: 首页>>代码示例>>PHP>>正文


PHP XDateTime::printTime4Touch方法代码示例

本文整理汇总了PHP中XDateTime::printTime4Touch方法的典型用法代码示例。如果您正苦于以下问题:PHP XDateTime::printTime4Touch方法的具体用法?PHP XDateTime::printTime4Touch怎么用?PHP XDateTime::printTime4Touch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XDateTime的用法示例。


在下文中一共展示了XDateTime::printTime4Touch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: if

                            <div class="con"><a href="<?=$flow->getTouchUrl()?>"><?=$flow->diseaseName?></a>
                            </div>
                        </div>
                        <a href="<?=$flow->getTouchUrl()?>">
                            <div class="ask2">
                                <div class="name">病情描述:</div>
                                <div class="con"><?=$flow->title?><img src="http://i1.hdfimg.com/touch/images/t_img62.png" width="10" height="12" class="author_jt" />
                                </div>
                            </div>
                            <div class="ask2" style="margin-top:2px;">
                                <div class="name">患者来自:</div>
                                <div class="con"><?=$flow->patient->province?> <?=$flow->patient->city?></div>
                            </div>
                            <div class="ask2" style="margin-top:2px; padding-bottom:10px;">
                                <div class="name">更新时间:</div>
                                <div class="con"><?=XDateTime::printTime4Touch($flow->lastPostTime)?></div>
                            </div>
                        </a>
                    </li>
                <?php } ?>
                </ul>
            </div>
        </div>
        <p class="clear_b"></p>
<?php 
    } 
}
?>
<?php if($count == 0) { ?>
<span style="padding-left:10px">抱歉,没有找到与 <font color="red">"<?=$key?>"</font> 相关的信息。</span>
<?php } ?>
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:search.php

示例2: getArtcleList

    /**
        * @brief 获取文章列表
        * @author meihao
        * @exampleUrl http://dev.mobile-api.haodf.com/doctorapi/patientclub_getArtcleList?userId=1&pageSize=1&pageId=1&os=1&xdoc=1
        *
        * @Param $userId  用户id
        * @Param $pageSize  每页条数
        * @Param $pageId  页号
        * @Param $os 
        *
        * @Returns   array('articleId', 'doctorId', 'grade', 'title', 'ctime', 'categroy', 'readCount', intro', 'url');
     */
    public function getArtcleList($userId, $pageSize, $pageId, $os)
    {/*{{{*/
        $this->_initPageInfo($pageId, $pageSize);
        $space = DAL::get()->find_by_fld_SpaceUserId('space', $userId);
    	if ($space->isNull())
        {
            $predoctor = DAL::get()->find_by_userid('predoctor', $userId);
            if(!$predoctor->isNull())
            {
                    return 0;
            }
            $this->setErrorCode(144);
            return 0;
        }
        $categoryId = null;
        $options['orderby'] = 'topLevel desc, fld_ArticleCreateTime desc';
		$res = ArticleClient::getInstance()->getList($space->id, $categoryId, $pageId, $pageSize, $options);
        $articleList = $res['articleList'];
        $pageInfo = $res['pageInfo'];
        $this->pageInfo = $pageInfo;
        $infos = array();
        $topArticleList = array();
        $bottomArticleList = array();
        foreach($articleList as $article)
        {
            if ($article->topLevel)
            {
                $topArticleList[] = $article;
            }
            else
            {
                $bottomArticleList[] = $article;
            }
        }
        XString::sortArray($topArticleList, 'topLevel');
        XString::sortArray($bottomArticleList, 'ctime');
        $articleList = array_merge_recursive($topArticleList, $bottomArticleList); 
        foreach($articleList as $article)
        {
            if (trim(strip_tags($article->content)) == '')
            {
                continue;
            }
            $info = array();
            $info['articleId'] = $article->id;
            $info['doctorId'] = $space->host->id;
            $info['grade'] = ($article->topLevel)? 3 : 0;
            $info['title'] = $article->title;
            $info['ctime'] = XDateTime::printTime4Touch($article->ctime->getTime(), 'Y-m-d');
            $info['category'] = '['.$article->articleCategory->name.']';
            $info['readCount'] = $this->getHits($article);
            //$info['intro'] = trim(mb_substr(XString::getContentWithOutHtml($article->content), 0, 90, 'gbk'));
            $info['intro'] = mb_substr(trim(preg_replace(array("/(&#[0-9]+;)/", "/(&\w+;)/"), '', str_replace(array("\r", "\n"), '', strip_tags(htmlspecialchars_decode($article->content))))), 0, 90, 'GBK');
            $info['url'] = "http://www.".URL_PREFIX."haodf.com/index/mobilearticle?id=".$info['articleId']."&clkfrom=".$os;
            $infos[] = $info;
        }
        $this->content = $infos;
    }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:70,代码来源:patientclubdatabucket.php

示例3: getCommonArticleInfos

 private function getCommonArticleInfos($articleList)
 {/*{{{*/
     $infos = array();
     foreach($articleList as $article)
     {
         if (trim(strip_tags($article->content)) == '')
         {
             continue;
         }
         $info = array();
         $info['articleId'] = $article->id;
         $info['doctorId'] = '';
         $info['logoUrl'] = '';
         if(!empty($article->space) && $article->space->host instanceof Doctor)
         {
             $info['doctorId'] = $article->space->host->id;
             $doctor = $article->space->host;
             $info['logoUrl'] = $doctor->getHeadImageForMobile();
         }
         $info['title'] = $article->title;
         $info['ctime'] = XDateTime::printTime4Touch($article->ctime->getTime(), 'Y-m-d');
         $info['readCount'] = $this->getHits($article);
         $info['intro'] = trim(mb_substr(XString::getContentWithOutHtml($article->content), 0, 90, 'gbk'));
         $infos[] = $info;
     }
     return $infos;
 }/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:27,代码来源:articledatabucket.php


注:本文中的XDateTime::printTime4Touch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。