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


PHP C::dateShow方法代码示例

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


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

示例1: wrapBlog

 protected function wrapBlog($arr)
 {
     global $config;
     $back = '';
     $date = C::dateShow($arr['time'], time());
     $types = explode(',', $arr['types']);
     $back .= "\n\t\t\t<div class='one-blog' blog_id='{$arr['id']}'>\n\t\t\t\t<div class='one-blog-wrap'>\n\t\t\t\t\t<div class='title'>{$arr['title']}</div>\n\t\t\t\t\t<div class='info'>\n\t\t\t\t\t\t<span class='stamp time' title='Pub Time'>\n\t\t\t\t\t\t\t<span class='stamp-name'></span>\n\t\t\t\t\t\t\t<span class='stamp-one'>{$date}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='stamp biaoqian' title='Stamp'>\n\t\t\t\t\t\t\t<span class='stamp-name'></span>\n\t\t\t";
     foreach ($arr['biaoqian'] as $biaoqian) {
         $back .= "\n\t\t\t\t\t\t\t\t<span class='stamp-one biaoqian-one'>{$biaoqian}</span>\n\t\t\t\t\t\t\t";
     }
     $back .= "\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='stamp view' title='Views'>\n\t\t\t\t\t\t\t<span class='stamp-name'></span>\n\t\t\t\t\t\t\t<span class='stamp-one'>{$arr['views']}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='blog-nav select' index='0'>\n\t\t\t\t\t\t\t文章\n\t\t\t\t\t\t\t<span class='huakuai'>\n\t\t\t\t\t\t\t\t<span class='huakuai-wrap'></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='blog-nav blog-nav-comment' index='1'>\n\t\t\t\t\t\t\t评论\n\t\t\t\t\t\t\t<span class='huakuai'>\n\t\t\t\t\t\t\t\t<span class='huakuai-wrap'></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='content-wrap'>\n\t\t\t\t\t\t<div class='content content-block-one' style='display:block;'>\n\t\t\t\t\t\t\t<div class='content-wrap'>\n\t\t\t\t\t\t\t\t<div class='content-desc'>{$arr['desc']}</div>\n\t\t\t\t\t\t\t\t<a href='javascript:void(0);' aj-file='{$arr['blog_file']}' class='show-more-btn show-more c-tran'>Show Detail</a>\n\t\t\t\t\t\t\t\t<div class='content-detail c-wordwrap'></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='content content-block-one content-block-one-commentswrap'></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='bottom'>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li class='li nice c-hover'>Nice</li>\n\t\t\t\t\t\t\t<li class='li comment c-hover'>Comment</li>\n\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t\t<li class='li danmu c-hover'>Danmu</li>\n\t\t\t\t\t\t\t-->\n\t\t\t\t\t\t\t<div class='c-clear'></div>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<div class='blog-types'>\n\t\t\t";
     if ($types[0] !== '') {
         foreach ($types as $type) {
             $back .= "\n\t\t\t\t\t\t\t<span class='type-one'><a href='{$this->url}index.php?r=blogtype&types={$type}'>{$config['blog']['types'][$type]['name']}</a></span>\n\t\t\t\t\t\t";
         }
     }
     $back .= "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='c-clear'></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='bottom-zujian'>\n\t\t\t\t\t\t<div class='zujian-one'>\n\t\t\t\t\t\t\t<form class='comment-form'>\n\t\t\t\t\t\t\t\t<div class='div'>\n\t\t\t\t\t\t\t\t\t<input class='nickname c-textarea' type='text' name='nickname' placeholder='Enter Your Nickname'/>\n\t\t\t\t\t\t\t\t\t<span class='submit-comment-btn c-button'>Submit</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='div'><textarea class='comment-val c-textarea' name='comment' placeholder='Say something...'></textarea></div>\n\t\t\t\t\t\t\t\t<div class='query-info'></div>\n\t\t\t\t\t\t\t\t<input type='hidden' name='id' value='{$arr['id']}' />\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<form class='form'>\n\t\t\t\t\t\t<input type='hidden' name='is-detail-show' value='0' />\n\t\t\t\t\t\t<input type='hidden' name='blog-id' value='{$arr['id']}' />\n\t\t\t\t\t\t<input type='hidden' name='file' value='{$arr['blog_file']}' />\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t";
     return $back;
 }
开发者ID:AJLoveChina,项目名称:MyBlog,代码行数:19,代码来源:page.php

示例2: wrapXueshu

 public function wrapXueshu($rows)
 {
     $back = '';
     $user = new User($this->arr);
     $user_arr = $user->getInfoByUserId($rows['user_id']);
     $name = $user_arr['user_nick'] === '' ? $user_arr['user_schid'] : $user_arr['user_nick'];
     $time = C::dateShow($rows['time'], time());
     $content = $rows['content'];
     $huida_id = isset($rows['huida_id']) ? (int) $rows['huida_id'] : 0;
     if ($rows['filename'] !== '0') {
         $file_dir = $this->arr['xml']->xueshu['dir'];
         $content = file_get_contents(dirname(dirname(__FILE__)) . '/' . $file_dir . $rows['filename']);
     }
     $i_answer_url = $this->arr['index_url'] . "?kind1=ab&xueshu_id=" . $rows['xueshu_id'];
     $back .= "\n\t\t\t<div style='width:100%;'>\n\t\t\t\t<div class='aj-xueshu' aj-id='{$rows['xueshu_id']}' huida_id='{$rows['huida_id']}'>\n\t\t\t\t\t<div class='aj-title'><a href='{$i_answer_url}'>{$rows['title']}</a></div>\n\t\t\t\t\t<div class='aj-line'>\n\t\t\t\t\t\t<span class='aj-name aj-span'><a href='{$this->arr['index_url']}?r=1&kind1=a9&user_center_id={$rows['user_id']}'>{$name}</a></span>\n\t\t\t\t\t\t<span class=' aj-span'>发布于</span>\n\t\t\t\t\t\t<span class='aj-time aj-span'>{$time}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='aj-desc'>\n\t\t\t\t\t{$content}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='aj-line'>\n\t\t";
     if ($huida_id === 0) {
         $back .= "\n\t\t\t\t\t\t<span class='aj-span'>\n\t\t\t\t\t\t\t<span>{$rows['huida']}</span>\n\t\t\t\t\t\t\t<span>条回答</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='aj-anwser aj-span'><a href='{$i_answer_url}'>我来回答</a></span>\n\t\t\t";
     }
     $back .= "\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t";
     return $back;
 }
开发者ID:AJLoveChina,项目名称:meAjax,代码行数:21,代码来源:page.php


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