• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP friendly_date函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中friendly_date函数的典型用法代码示例。如果您正苦于以下问题:PHP friendly_date函数的具体用法?PHP friendly_date怎么用?PHP friendly_date使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: setData

 public function setData(&$user)
 {
     $user['friendlydate'] = friendly_date($user['ctime']);
     $user['DOACTION'] = '<a href="' . U('User/Admin/editUser', array('id' => $user['uid'], 'tabHash' => 'editUser')) . '">' . L('ADMIN_EDIT') . '</a>';
     $user['DOACTION'] .= '|<a href="javascript:void(0);" onclick="user.del(' . $user['uid'] . ')">' . L('ADMIN_DEL') . '</a>';
     $user['DOACTION'] .= '|<a href="' . U('User/Admin/userPrivilege', array('uid' => $user['uid'], 'tabHash' => 'userPrivilege')) . '">' . L('ADMIN_USER_PRIVILEGE') . '</a>';
 }
开发者ID:BellyWong,项目名称:ebtAdmin,代码行数:7,代码来源:UserModel.class.php


示例2: get_meal

 function get_meal($id)
 {
     $this->db->where('id', $id);
     $query = $this->db->get('meals');
     $meal = $query->row();
     $meal->friendly_date = friendly_date($meal->start, $meal->end);
     return $meal;
 }
开发者ID:nolastan,项目名称:NoMealPoints,代码行数:8,代码来源:meals_model.php


示例3: getFriendlySigninAtAttribute

 /**
  * Access control: Friendly signin_at
  * @return string
  */
 public function getFriendlySigninAtAttribute()
 {
     if (is_null($this->signin_at)) {
         return '新账号尚未登录';
     } else {
         return friendly_date($this->signin_at);
     }
 }
开发者ID:rimshavbase,项目名称:timefragment,代码行数:12,代码来源:User.php


示例4: getUserGroupList

 public function getUserGroupList($limit = 20, $map = array())
 {
     $listData = $this->where($map)->findPage($limit);
     foreach ($listData['data'] as $k => $v) {
         $listData['data'][$k]['friendlydate'] = friendly_date($v['ctime']);
         $listData['data'][$k]['DOACTION'] = '<a href="' . U('User/Admin/editUserGroup', array('id' => $v['gid'], 'tabHash' => 'editUserGroup')) . '">' . L('ADMIN_EDIT') . '</a>';
         $listData['data'][$k]['DOACTION'] .= '|<a href="javascript:void(0);" onclick="user.delGroup(' . $v['gid'] . ');" >' . L('ADMIN_DEL') . '</a>';
         $listData['data'][$k]['DOACTION'] .= '|<a href="' . U('User/Admin/groupPrivilege', array('gid' => $v['gid'], 'tabHash' => 'groupPrivilege')) . '">' . L('ADMIN_USER_GROUP_PRIVILEGE') . '</a>';
     }
     return $listData;
 }
开发者ID:BellyWong,项目名称:ebtAdmin,代码行数:11,代码来源:UserGroupModel.class.php


示例5: setData

 public function setData(&$app)
 {
     $app['friendlydate'] = friendly_date($app['ctime']);
     // TODO set the uninstall operation
     if ($app['app_type'] == 'sys') {
         $app['DOACTION'] = '<a href="' . U('Admin/Admin/unInstallSystemApp', array('name' => $app['app_name'])) . '">' . L('uninstall') . '</a>';
     } else {
         $app['DOACTION'] = '<a href="' . U('Admin/Admin/unInstallApp', array('name' => $app['app_name'])) . '">' . L('uninstall') . '</a>';
     }
     $app['DOACTION'] = $app['DOACTION'] . '|<a href="' . U('Admin/Admin/editAppInfo', array('id' => $app['app_id'])) . '">' . L('ADMIN_EDIT') . '</a>';
 }
开发者ID:BellyWong,项目名称:ebtAdmin,代码行数:11,代码来源:AppModel.class.php


示例6: meal_to_english

function meal_to_english($meal)
{
    $mealtoenglish = clone $meal;
    if ($mealtoenglish->title) {
        $mealtoenglish->location = " at " . $mealtoenglish->location;
    }
    if ($mealtoenglish->intended) {
        $mealtoenglish->intended = " (for " . $mealtoenglish->intended . ")";
    }
    $mealtoenglish->date = friendly_date($mealtoenglish->start, $mealtoenglish->end);
    return $mealtoenglish->title . $mealtoenglish->location . " " . $mealtoenglish->date . $mealtoenglish->intended;
}
开发者ID:nolastan,项目名称:NoMealPoints,代码行数:12,代码来源:meals_helper.php


示例7: activity_feed

 /**
  * 
  * 
  */
 public function activity_feed()
 {
     ajx_set_no_back(true);
     require_javascript("og/modules/dashboardComments.js");
     require_javascript("jquery/jquery.scrollTo-min.js");
     $filesPerPage = config_option('files_per_page');
     $start = array_var($_GET, 'start') ? (int) array_var($_GET, 'start') : 0;
     $limit = array_var($_GET, 'limit') ? array_var($_GET, 'limit') : $filesPerPage;
     $order = array_var($_GET, 'sort');
     $orderdir = array_var($_GET, 'dir');
     $page = (int) ($start / $limit) + 1;
     $extra_conditions = " AND jt.type IN ('content_object', 'comment')";
     $trashed = array_var($_GET, 'trashed', false);
     $archived = array_var($_GET, 'archived', false);
     $pagination = ContentDataObjects::listing(array("start" => $start, "limit" => $limit, "order" => $order, "order_dir" => $orderdir, "trashed" => $trashed, "archived" => $archived, "count_results" => false, "extra_conditions" => $extra_conditions, "join_params" => array("jt_field" => "id", "e_field" => "object_type_id", "table" => TABLE_PREFIX . "object_types")));
     $result = $pagination->objects;
     $total_items = $pagination->total;
     if (!$result) {
         $result = array();
     }
     $info = array();
     foreach ($result as $obj) {
         $info_elem = $obj->getArrayInfo($trashed, $archived);
         $instance = Objects::instance()->findObject($info_elem['object_id']);
         $info_elem['url'] = $instance->getViewUrl();
         if (method_exists($instance, "getText")) {
             $info_elem['content'] = $instance->getText();
         }
         $info_elem['picture'] = $instance->getCreatedBy()->getPictureUrl();
         $info_elem['friendly_date'] = friendly_date($instance->getCreatedOn());
         $info_elem['comment'] = $instance->getComments();
         if ($instance instanceof Contact) {
             if ($instance->isCompany()) {
                 $info_elem['icon'] = 'ico-company';
                 $info_elem['type'] = 'company';
             }
         }
         $info_elem['isRead'] = $instance->getIsRead(logged_user()->getId());
         $info_elem['manager'] = get_class($instance->manager());
         $info[] = $info_elem;
     }
     $listing = array("totalCount" => $total_items, "start" => $start, "objects" => $info);
     tpl_assign("feeds", $listing);
 }
开发者ID:abhinay100,项目名称:feng_app,代码行数:48,代码来源:DashboardController.class.php


示例8: getCommentList

 /**
  * 根据条件获取评论列表
  * @author jry <[email protected]>
  */
 public function getCommentList($map)
 {
     $map['status'] = 1;
     $comments = $this->where($map)->order('sort desc,id asc')->select();
     foreach ($comments as $key => $val) {
         $comments[$key]['ctime'] = friendly_date($val['ctime']);
         $comments[$key]['username'] = D('User')->getFieldById($val['uid'], 'username');
         $comments[$key]['avatar'] = D('User')->getFieldById($val['uid'], 'avatar');
         if ($comments[$key]['pictures']) {
             $comments[$key]['pictures'] = explode(',', $comments[$key]['pictures']);
             //解析图片列表
         }
         if ($comments[$key]['pid'] > 0) {
             $parent_comment = $this->find($comments[$key]['pid']);
             $comments[$key]['parent_comment_username'] = D('User')->getFieldById($parent_comment['uid'], 'username');
         }
     }
     return $comments;
 }
开发者ID:sayi21cn,项目名称:corethink,代码行数:23,代码来源:UserCommentModel.class.php


示例9: get_url

            $url = get_url('person/workshops/' . $workshop->id);
            if ($flag) {
                $l_action = "<a href=\"{$url}/unsubscribe\" class=\"precaucion\">" . __('Dar de baja') . "</a>";
            } elseif ($workshops_limit <= $CFG->max_inscripcionTA) {
                $l_action = __('Dar de alta');
                $l_action = "<a href=\"{$url}/subscribe\" class=\"verde\">" . __('Dar de alta') . "</a>";
            } else {
                $l_action = '';
            }
        }
        if (Context == 'asistente') {
            // data
            $table_data[] = array($l_ponencia, $workshop->orientacion, $workshop->lugar, $time, $disp, $l_action);
        }
    }
    $human_date = friendly_date($last_date);
    ?>

<h2><?php 
    echo $human_date;
    ?>
</h2>
<h3><?php 
    echo $last_date_desc;
    ?>
</h2>

<?php 
    // do last table
    do_table($table_data, 'wide');
} else {
开发者ID:BackupTheBerlios,项目名称:yupana,代码行数:31,代码来源:workshop_list.php


示例10: lang

					</div>
					<script>
						var crumbHtml = <?php 
    echo $crumbJs;
    ?>
 ;
						$("#document-<?php 
    echo $document->getId();
    ?>
 .breadcrumb").html(crumbHtml);
					</script>
					<?php 
    if ($document->getUpdatedBy() instanceof Contact) {
        ?>
					<div class="desc date-container"><?php 
        echo lang('last updated by') . ' ' . lang('user date', $document->getUpdatedBy()->getCardUserUrl(), clean($document->getUpdatedByDisplayName()), lcfirst(friendly_date($document->getUpdatedOn())), clean($document->getUpdatedByDisplayName()));
        ?>
</div>
					<?php 
    }
    ?>
				</li>
			<?php 
}
?>
		</ul>	
		<?php 
if (count($documents) < $total) {
    ?>
		<div class="view-all-container">
			<a href="#" onclick="og.openLink(og.getUrl('files','init'), {caller:'documents-panel'})"><?php 
开发者ID:abhinay100,项目名称:feng_app,代码行数:31,代码来源:template.php


示例11: widget

    function widget($args, $instance)
    {
        $instance = array_merge(self::get_default_options(), $instance);
        echo $args['before_widget'];
        $comments = get_comments(array('status' => 'approve', 'number' => isset($instance['number']) ? (int) $instance['number'] : 6, 'type' => 'comment'));
        if (!empty($instance['title'])) {
            echo $args['before_title'];
            ?>
			<i class="fa fa-comments-o"></i> 
			<?php 
            echo $instance['title'];
            echo $args['after_title'];
        }
        if (!empty($comments)) {
            global $comment;
            $comment_bak = $comment;
            ?>
			<ul class="list-group">
				<?php 
            foreach ($comments as $comment) {
                /**
                 * cache
                 */
                static $caches = [];
                /** author_name */
                if (!isset($caches['author_name'][$comment->comment_author])) {
                    $caches['author_name'][$comment->comment_author] = esc_html(get_comment_author());
                }
                /** avatar placeholder */
                if (!isset($caches['avatar_placeholder'])) {
                    $caches['avatar_placeholder'] = theme_functions::$avatar_placeholder;
                }
                /** comment text */
                $comment_text = str_sub(strip_tags(preg_replace('/<img[^>]+>/i', '[' . ___('Image') . ']', get_comment_text($comment->comment_ID))), 35);
                ?>
<li class="list-group-item">
	<a class="media tooltip top" href="<?php 
                echo theme_cache::get_permalink($comment->comment_post_ID);
                ?>
#comment-<?php 
                echo $comment->comment_ID;
                ?>
" title="<?php 
                echo theme_cache::get_the_title($comment->comment_post_ID);
                ?>
">
		<div class="media-left">
			<img class="avatar media-object" data-src="<?php 
                echo esc_url(theme_cache::get_avatar_url($comment));
                ?>
" src="<?php 
                echo $caches['avatar_placeholder'];
                ?>
" alt="<?php 
                echo $caches['author_name'][$comment->comment_author];
                ?>
" width="<?php 
                echo self::$avatar_size;
                ?>
" height="<?php 
                echo self::$avatar_size;
                ?>
"/>
		</div>
		<div class="media-body">
			<h4 class="media-heading">
				<span class="author"><?php 
                echo $caches['author_name'][$comment->comment_author];
                ?>
</span>
				<time datetime="<?php 
                echo get_comment_time('c');
                ?>
">
					<small><?php 
                echo friendly_date(get_comment_time('U'));
                ?>
</small>
				</time>
			</h4>
			<div class="text"><?php 
                echo $comment_text;
                ?>
</div>
		</div>
	</a>
</li>
				<?php 
            }
            ?>
			</ul>
			<?php 
            $comment = $comment_bak;
        } else {
            ?>
			<div class="content">
				<div class="page-tip"><?php 
            echo status_tip('info', ___('No any comment yet.'));
            ?>
</div>
//.........这里部分代码省略.........
开发者ID:ClayMoreBoy,项目名称:mx,代码行数:101,代码来源:widget-comments.php


示例12: friendly_date

<div class="comment-unit">
	<a class="person" href="Javascript:;" onclick="og.openLink('<?php echo $comment->getCreatedBy()->getViewUrl(); ?>')"><?php echo $comment->getCreatedBy()->getObjectName();?></a> -
	<em class="feed-date"><?php echo friendly_date($comment->getCreatedOn());?></em> 
	<p><?php echo $comment->getText(); ?></p>
</div>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:5,代码来源:comment_unit.php


示例13: friendly_date

        ?>
...</a>中</h4>
	                                <?php 
        if ($v['ntype'] == 0) {
            ?>
回复了你 <?php 
        }
        ?>
									<?php 
        if ($v['ntype'] == 1) {
            ?>
提到了@你 <?php 
        }
        ?>
                                    <?php 
        echo friendly_date($v['ntime']);
        ?>
                                    </blockquote>
                                </div>
                            </li>
                            <?php 
    }
    ?>
                        </ul>
                        <?php 
    if (@$pagination) {
        ?>
<ul class="pagination"><!--<?php 
        echo $pagination;
        ?>
--></ul><?php 
开发者ID:stoneStyle,项目名称:startbbs,代码行数:31,代码来源:notifications.php


示例14: friendly_date

<div class="comment-unit">
	<a class="person" href="Javascript:;" onclick="og.openLink('<?php 
echo $comment->getCreatedBy()->getViewUrl();
?>
')"><?php 
echo $comment->getCreatedBy()->getObjectName();
?>
</a> -
	<em class="feed-date"><?php 
echo friendly_date($comment->getCreatedOn());
?>
</em> 
	<p><?php 
echo $comment->getText();
?>
</p>
</div>
开发者ID:abhinay100,项目名称:feng_app,代码行数:17,代码来源:comment_unit.php


示例15: do_submit_cancel

<div class="block"></div>
<?php 
                do_submit_cancel('', __('Continuar'), get_url('admin/schedule'));
            } else {
                $errmsg[] = __('Ocurrió un error al insertar los datos.');
                show_error($errmsg);
            }
            ?>

<div class="block"></div>

<?php 
        }
    } else {
        $values = array(__('Lugar') => $room->nombre_lug, __('Fecha') => friendly_date($date->fecha), __('Hora') => sprintf('%02d:00 hrs.', $hour));
        do_table_values($values, 'narrow');
        ?>

<h2 class="center"><?php 
        echo __('Ponencias disponibles');
        ?>
</h2>

<?php 
        include $CFG->comdir . 'prop_list.php';
        do_submit_cancel('', __('Regresar'), get_url('admin/schedule'));
    }
}
if (!empty($errmsg)) {
    do_submit_cancel('', __('Regresar'), get_url('admin/schedule'));
开发者ID:BackupTheBerlios,项目名称:yupana,代码行数:30,代码来源:schedule_add.php


示例16: archive_card_sm


//.........这里部分代码省略.........
            ?>
" 
							height="<?php 
            echo self::$thumbnail_size[2];
            ?>
" 
						>
					<?php 
        } else {
            ?>
						<img 
							class="thumbnail" 
							src="<?php 
            echo $thumbnail_real_src;
            ?>
" 
							alt="<?php 
            echo $post_title;
            ?>
" 
							width="<?php 
            echo self::$thumbnail_size[1];
            ?>
" 
							height="<?php 
            echo self::$thumbnail_size[2];
            ?>
" 
						>
					<?php 
        }
        ?>
				</a>
				
				<a 
					href="<?php 
        echo $permalink;
        ?>
" 
					title="<?php 
        echo $post_title;
        ?>
" 
					class="card-title" 
					target="<?php 
        echo $args['target'];
        ?>
" 
				>
					<h3><?php 
        echo $post_title;
        ?>
</h3>
				</a>
				<div class="card-meta">
					<a 
						href="<?php 
        echo theme_cache::get_author_posts_url($post->post_author);
        ?>
" 
						class="meta author" 
						title="<?php 
        echo $author_display_name;
        ?>
" 
						target="<?php 
        echo $args['target'];
        ?>
" 
					>
						<img width="32" height="32" src="<?php 
        echo theme_functions::$avatar_placeholder;
        ?>
" data-src="<?php 
        echo theme_cache::get_avatar_url($post->post_author);
        ?>
" alt="<?php 
        echo $author_display_name;
        ?>
" class="avatar"> <span class="tx"><?php 
        echo $author_display_name;
        ?>
</span>
					</a>
					<time class="meta time" datetime="<?php 
        echo get_the_time('Y-m-d H:i:s', $post->ID);
        ?>
" title="<?php 
        echo get_the_time(___('M j, Y'), $post->ID);
        ?>
">
						<?php 
        echo friendly_date(get_the_time('U', $post->ID));
        ?>
					</time>
				</div>
			</div>
		</article>
		<?php 
    }
开发者ID:ClayMoreBoy,项目名称:mx,代码行数:101,代码来源:functions.php


示例17: url

                                        <span><a href="<?php 
        echo url('node_show', $v['node_id']);
        ?>
"><?php 
        echo $v['cname'];
        ?>
</a></span>&nbsp;•&nbsp;
                                        <span><a href="<?php 
        echo site_url('user/profile/' . $v['uid']);
        ?>
"><?php 
        echo $v['username'];
        ?>
</a></span>&nbsp;•&nbsp;
                                        <span><?php 
        echo friendly_date($v['updatetime']);
        ?>
</span>&nbsp;•&nbsp;
                                        <?php 
        if ($v['rname'] != NULL) {
            ?>
                                            <span>最后回复来自 <a href="<?php 
            echo site_url('user/profile/' . $v['ruid']);
            ?>
"><?php 
            echo $v['rname'];
            ?>
</a></span>
                                        <?php 
        } else {
            ?>
开发者ID:stoneStyle,项目名称:startbbs,代码行数:31,代码来源:home.php


示例18: site_url

								<td>
									<a href="<?php 
        echo site_url('page/index/' . $v['pid']);
        ?>
" title="<?php 
        echo $v['title'];
        ?>
">
										<?php 
        echo $v['title'];
        ?>
									</a>
								</td>
								<td>
									<?php 
        echo friendly_date($v['add_time']);
        ?>
								</td>
								<td>
					<small><?php 
        if ($v['is_hidden'] == 0) {
            ?>
显示<?php 
        } else {
            ?>
隐藏<?php 
        }
        ?>
</small>
								</td>
								<td>
开发者ID:stoneStyle,项目名称:startbbs,代码行数:31,代码来源:page.php


示例19: clean

    ?>
">
					<a href="<?php 
    echo $email->getViewUrl();
    ?>
">
						<div class="bold"><?php 
    echo clean($email->getSubject());
    ?>
: </div>
						<div class="breadcrumb"></div>
						<div style="float:left;"><?php 
    echo clean($email->getFrom());
    ?>
</div><div class="desc" style="float:right;"><?php 
    echo friendly_date($email->getSentDate());
    ?>
</div>
					</a>
					<div class="clear"></div>
					<script>
						var crumbHtml = <?php 
    echo $crumbJs;
    ?>
 ;
						$("#email-<?php 
    echo $email->getId();
    ?>
 .breadcrumb").html(crumbHtml);
					</script>
				</li>
开发者ID:abhinay100,项目名称:feng_app,代码行数:31,代码来源:template.php


示例20: theme_comment


//.........这里部分代码省略.........
		<?php 
                if ($comment->comment_parent == 0) {
                    ?>
			<div class="media-left">
				<?php 
                    if ($author_url) {
                        ?>
					<a href="<?php 
                        echo esc_url($author_url);
                        ?>
" class="avatar-link" target="_blank" <?php 
                        echo $author_nofollow;
                        ?>
 >
						<?php 
                        echo theme_cache::get_avatar($comment, 50);
                        ?>
					</a>
				<?php 
                    } else {
                        echo theme_cache::get_avatar($comment, 50);
                    }
                    ?>
			</div><!-- /.media-left -->
		<?php 
                }
                ?>
		
		<div class="media-body">

			<div class="comment-content">
				<?php 
                comment_text();
                ?>
				<?php 
                if ($comment->comment_approved == '0') {
                    ?>
					<div class="comment-awaiting-moderation"><?php 
                    echo status_tip('info', ___('Your comment is awaiting moderation.'));
                    ?>
</div>
				<?php 
                }
                ?>
			</div>

			<h4 class="media-heading">
				<span class="comment-meta-data author">
					<?php 
                if ($comment->comment_parent != 0) {
                    echo theme_cache::get_avatar($comment, 50), '&nbsp;';
                }
                comment_author_link();
                ?>
				</span>
				<time class="comment-meta-data time" datetime="<?php 
                echo get_comment_time('c');
                ?>
">
					<a href="<?php 
                echo esc_url(get_comment_link($comment->comment_ID));
                ?>
"><?php 
                echo friendly_date(get_comment_time('U'));
                ?>
</a>
				</time>
				<?php 
                if (!theme_cache::is_user_logged_in()) {
                    /**
                     * if needs register to comment
                     */
                    if (theme_cache::get_option('comment_registration')) {
                        static $reply_link;
                        if (!$reply_link) {
                            $reply_link = '<a rel="nofollow" class="comment-reply-login quick-login-btn" href="' . wp_login_url(theme_cache::get_permalink($comment->comment_post_ID)) . '">' . ___('Reply') . '</a>';
                        }
                    } else {
                        $reply_link = get_comment_reply_link(['add_below' => 'comment-body', 'depth' => $depth, 'max_depth' => $args['max_depth']], $comment, $post->ID);
                    }
                } else {
                    $reply_link = get_comment_reply_link(['add_below' => 'comment-body', 'depth' => $depth, 'max_depth' => $args['max_depth']], $comment, $post->ID);
                }
                $reply_link = preg_replace('/(href=)[^\\s]+/', '$1"javascript:;"', $reply_link);
                if (!empty($reply_link)) {
                    ?>
					<span class="comment-meta-data comment-reply reply">
						<?php 
                    echo $reply_link;
                    ?>
					</span><!-- .reply -->
				<?php 
                }
                ?>
			</h4>
		</div><!-- /.media-body -->
	</div><!-- /.comment-body -->
		<?php 
        }
    }
开发者ID:ClayMoreBoy,项目名称:wp-theme-inn2015v2,代码行数:101,代码来源:functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP friendly_time函数代码示例发布时间:2022-05-15
下一篇:
PHP friendlyDate函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap