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


PHP Y::dateFromTime方法代码示例

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


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

示例1: array

        echo $data->ID;
        ?>
');" title="Показывать этот дефект всем"></div>
				<?php 
    }
    ?>
				<div class="del"><a title="Удалить дефект" href="#" onclick="ShowDelForm(this, '<?php 
    echo $data->ID;
    ?>
'); return false;"><img src="/images/st1234/icondel.gif"></a></div>
			<?php 
}
?>
			<div class="properties">
				<p class="date"><?php 
echo CHtml::encode(Y::dateFromTime($data->DATE_CREATED));
if ($data->comments_cnt) {
    echo CHtml::link('<span class="commentsHot">' . $data->comments_cnt . '</span>', array('view', 'id' => $data->ID, '#' => 'comments'), array('title' => 'Комментарии'));
}
?>
</p>
				<div class="service"><?php 
echo CHtml::encode($data->ADDRESS);
?>
<i></i></div>
				<div class="social">
					<img src="/images/st1234/<?php 
echo CHtml::encode($data->type->alias);
?>
.png" title="<?php 
echo CHtml::encode($data->type->name);
开发者ID:ASDAFF,项目名称:RosYama.2,代码行数:31,代码来源:_view.php

示例2: foreach

    echo Yii::t('CommentsModule.msg', 'Last comments');
    ?>
</h2></div>
            <div class="commentResults">

                <?php 
    foreach ($comments as $comment) {
        ?>
                    <div class="commentItem">
                        <div class="commentName"><?php 
        echo $comment->user->fullname;
        ?>
</div>
                        <div class="commentSpacer">-</div>
                        <div class="commentDate"><?php 
        echo CHtml::encode(Y::dateFromTime($comment->create_time));
        ?>
</div>
                        <div class="commentText">
                            <a href="<?php 
        echo Yii::app()->createUrl('holes/view', array('id' => $comment->owner_id, '#' => 'comment-' . $comment->id));
        ?>
"><?php 
        if (mb_strlen($comment->comment_text) > $textLength) {
            $str = mb_substr($comment->comment_text, 0, $textLength);
            echo nl2br(CHtml::encode(mb_substr($str, 0, mb_strrpos($str, ' ')))) . '...';
        } else {
            echo nl2br(CHtml::encode($comment->comment_text));
        }
        ?>
</a>
开发者ID:snipesn,项目名称:UkrYama-2,代码行数:31,代码来源:ECommentsLastListWidget.php

示例3: array

$this->breadcrumbs = array('News' => array('index'), $model->title);
$this->menu = array(array('label' => 'List News', 'url' => array('index')), array('label' => 'Create News', 'url' => array('create')), array('label' => 'Update News', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete News', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => 'Manage News', 'url' => array('admin')));
?>
<div class="lCol">
<?php 
$this->widget('application.widgets.social.socialWidget');
?>
</div>
<div class="rCol">
	<div class="news-detail">
				<h1><?php 
echo $model->title;
?>
</h1>
						 <p class="date"><?php 
echo CHtml::encode(Y::dateFromTime($model->date));
?>
</p>
			
	<?php 
echo $model->fulltext;
?>
	<div style="clear:both"></div>
		<br />
				</div>
	<p><?php 
echo CHtml::link('Возврат к списку', array('index'));
?>
</p>
	 
	</div>
开发者ID:snipesn,项目名称:UkrYama-2,代码行数:31,代码来源:view.php

示例4: foreach

<!-- NEWS -->
<div class="news-list-mainpage">
<?php 
foreach ($model as $news) {
    ?>
	
	<div class="news-item">		
					<p  class="date"><?php 
    echo Y::dateFromTime($news->date);
    ?>
</p>
					<h3><?php 
    echo CHtml::link($news->title, array('news/view', 'id' => $news->id));
    ?>
</h3>		
					<p><?php 
    echo $news->introtext;
    ?>
</p>
					<?php 
    echo CHtml::link('>>', array('news/view', 'id' => $news->id), array('class' => "show"));
    ?>
	</div>
<?php 
}
echo CHtml::link('Все новости', array('news/index'), array('class' => 'news-all'));
?>
<div style="clear:both"></div>
</div>
<!-- /NEWS -->
开发者ID:ASDAFF,项目名称:RosYama.2,代码行数:30,代码来源:default.php

示例5: array

<div class="view">

<p class="date"><?php 
echo CHtml::encode(Y::dateFromTime($data->date));
?>
</p>
<p class="preview_text"><?php 
echo CHtml::encode($data->introtext);
?>
 <?php 
echo CHtml::link('&rarr;', array('view', 'id' => $data->id), array('class' => 'arrow'));
?>
</p>
	<?php 
/*
	<b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
	<?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('date')); ?>:</b>
	<?php echo CHtml::encode($data->date); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('picture')); ?>:</b>
	<?php echo CHtml::encode($data->picture); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('title')); ?>:</b>
	<?php echo CHtml::encode($data->title); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('introtext')); ?>:</b>
	<?php echo CHtml::encode($data->introtext); ?>
	<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('fulltext')); ?>:</b>
开发者ID:snipesn,项目名称:UkrYama-2,代码行数:31,代码来源:_view.php

示例6: foreach

							<?php foreach ($hole->requests_gibdd as $request) : ?>
							<?php  if ($request->user) : ?>
								<li><?php echo date('d.m.Y',$request->date_sent);?> <?php echo $userlink=CHtml::link(CHtml::encode($request->user->getParam('showFullname') ? $request->user->Fullname : ($request->user->name ? $request->user->name : $request->user->username)), array('/profile/view', 'id'=>$request->user->id),array('class'=>""));?>  отправил запрос в ГИБДД
								<?php if ($hole->STATE == 'fixed' && $fix=$hole->getFixByUser($request->user->id)) : ?> 
								<br /><?php echo date('d.m.Y',$fix->date_fix);?> <?php echo $userlink; ?> отметил факт исправления дефекта
								<?php endif; ?>
								</li>
							<?php endif; ?>
							<?php endforeach; ?>
							<li>==========</li>
							</ul>							
							</div>
						<? endif; ?>	
					<? endif; ?>
					<? if($hole->STATE == 'fixed' && $hole->DATE_STATUS): ?>
						<?= CHtml::encode(Y::dateFromTime($hole->DATE_STATUS))?> отмечен факт исправления дефекта
					<? endif; ?>
				</span>
			</p>
			<div class="control">
			<div class="progress">
			<? if($hole->WAIT_DAYS): ?>
			<div class="lc">
				<div class="wait">
					<p>Ждать, когда отремонтируют</p>
					<p class="days"><?php echo Y::declOfNum($hole->WAIT_DAYS, array('день', 'дня', 'дней')); ?></p> 
				</div>
			</div>
			<? elseif($hole->PAST_DAYS): ?>
			<div class="lc">
				<div class="wait">
开发者ID:nikel303,项目名称:RosYama.2,代码行数:31,代码来源:view.php

示例7: foreach

							<ul>
							<?php foreach ($hole->requests as $request) : ?>
							<?php  if ($request->user) : ?>
								<li><?php echo date('d.m.Y',$request->date_sent);?> <?php echo $userlink=CHtml::link(CHtml::encode($request->user->getParam('showFullname') ? $request->user->Fullname : ($request->user->name ? $request->user->name : $request->user->username)), array('/profile/view', 'id'=>$request->user->id),array('class'=>""));?>  отправил запрос в <?php echo $request->typeString;?>
								<?php if ($hole->STATE == 'fixed' && $fix=$hole->getFixByUser($request->user->id)) : ?> 
								<br /><?php echo date('d.m.Y',$fix->date_fix);?> <?php echo $userlink; ?> отметил факт исправления дефекта
								<?php endif; ?>
								</li>
							<?php endif; ?>
							<?php endforeach; ?>
							<li>==========</li>
							</ul>							
							</div>
					<?php endif;?>
					<? if($hole->STATE == 'fixed' && ($hole->fixeds || $hole->DATE_STATUS)): ?>
						<br /><?= CHtml::encode(Y::dateFromTime($hole->fixeds ? $hole->fixeds[0]->date_fix : $hole->DATE_STATUS))?> отмечен факт исправления дефекта
					<? endif; ?>
				</span>
			</p>
			<div class="control">
			<div class="progress">
			<? if($hole->WAIT_DAYS): ?>
			<div class="lc">
				<div class="wait">
					<p>Ждать, когда отремонтируют</p>
					<p class="days"><?php echo Y::declOfNum($hole->WAIT_DAYS, array('день', 'дня', 'дней')); ?></p> 
				</div>
			</div>
			<? elseif($hole->PAST_DAYS): ?>
			<div class="lc">
				<div class="wait">
开发者ID:ASDAFF,项目名称:RosYama.2,代码行数:31,代码来源:view.php


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