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


PHP Func::isNew方法代码示例

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


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

示例1: getNoticePage


//.........这里部分代码省略.........
	$headers = array(array('title'=>_t('선택'),'class'=>'entrylist_select','width'=>'50px'),
					array('title'=>_t('날짜'),'class'=>'entrylist_date','width'=>'100px'),
					array('title'=>_t('제목'),'class'=>'entrylist_title','width'=>'790px'),
					array('title'=>_t('실행'),'class'=>'entrylist_execute','width'=>'auto'));
	
	$datas = array();

	if(count($posts)>0) {
		foreach($posts as $post) {		
			$data = array();

			$date = Func::dateToString($post['written']);
			$feedvisibility = Feed::get($post['feed'], 'visibility');

			$data['id'] = 'list_item_'.$post['id'];
			$data['class'] = ($post['visibility']=='n'?'list_item_hide':'').($post['id']==$read?' list_item_select':'');
			
			$data['datas'] = array();
			
			// 글 선택
			array_push($data['datas'], array('class'=>'noticelist_select','data'=> '<input type="checkbox" class="postid" value="'.$post['id'].'" />' ));
	
			// 글 등록날짜		
			ob_start();
?>
			<?php echo date('y.m.d H:i:s', $post['written']);?><br />
			<span class="date_text">(<?php echo $date;?>)</span>
<?php
			$content = ob_get_contents();
			ob_end_clean();
			array_push($data['datas'], array('class'=>'noticelist_date','data'=> $content ));
			
			// 글 제목
			ob_start();
?>

<?php
			$desc = UTF8::lessenAsEm(str_replace('&nbsp;','',func::stripHTML($post['description'])),82);
			if(empty($desc)) {
				$desc = '<span class="empty">'._t('내용이 비어있거나 HTML로만 작성되어 있습니다.').'</span>';
			}	
			$isNew = Func::isNew($post['written'],1);
?>

			<div class="title"><?php echo UTF8::lessenAsEm(stripcslashes(func::stripHTML($post['title'])), 60);?> <?php echo ($isNew?' <img	src="'.$service['path'].'/images/admin/icon_new.gif" alt="new" align="absmiddle" class="new" />':'');?></div>
			<?php echo $desc?>
<?php
			$content = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'noticelist_title','data'=> $content ));

			// 글 실행
			ob_start();
?>
			<a href="#" class="microbutton alertbutton" onclick="deleteItem(<?php echo $post['id'];?>); return false;"><span><?php echo _t('삭제');?></span></a>
<?php

			$content = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'noticelist_execute','data'=> $content ));
			
			array_push($datas, $data);
		}

	} else {
			array_push( $datas, array( 'class'=>"list_empty", 'datas'=>array(array('data'=>empty($keyword)?_t('공지사항이 없습니다.'):_t('검색된 공지사항이 없습니다.')) )) );
	}

	ob_start();
?>
		<div class="select">
			<a href="#" onclick="toggleCheckAll('postid'); return false;"><img src="<?php echo $service['path'];?>/images/admin/bt_arrow.gif" /></a>
		</div>
		<div class="action">
			<strong><a href="#" onclick="deleteAllItem('postid'); return false;"><?php echo _t('삭제');?></a></strong>
		</div>				
		<div class="clear"></div>
<?php
	$footers = ob_get_contents();
	ob_end_clean();

	echo makeTableBox('noticelist', $headers, $datas, $footers);	
?>
</div>

<div class="wrap">
	<br />
	<div class="paging">
		<?php echo func::printPaging($paging, $params);?>
	</div>
</div>
<?php
			$input .= ob_get_contents();
			ob_end_clean();
		}

		return $input;
	}
开发者ID:ncloud,项目名称:bloglounge,代码行数:101,代码来源:index.php

示例2: array

					array('title'=>_t('실행'),'class'=>'bloglist_execute','width'=>'auto'));
	$datas = array();

	$group_names = array();		
	$group_names[0] = '';
	foreach($groups as $group) {
		$group_names[$group['id']] = $group['name'];
	}

	if(count($feeds)>0) {
		foreach($feeds as $feed) {		
			$data = array();

			$stringDate = Func::dateToString($feed['lastUpdate']);
			$lastPost = Feed::getLatestPost($feed['id']);
			$isNew = Func::isNew($feed['created'],1);
			$noVerifier = Validator::getBool($config->useVerifier) && !Validator::getBool($feed['isVerified']) && ($feed['owner'] != 1);

			$data['id'] = 'list_item_'.$feed['id'];
			$data['class'] = ($feed['visibility']=='n'?'list_item_hide':'').($feed['id']==$read?' list_item_select':'').($noVerifier?' no_verifier':'');
			
			$data['datas'] = array();
			
			// 블로그 등록날짜
			array_push($data['datas'], array('class'=>'bloglist_date','data'=> $noVerifier ? _t('미인증') : date('y.m.d H:i:s', $feed['created']) ));
			array_push($data['datas'], array('class'=>'bloglist_group','data'=> empty($group_names[$feed['group']])?'<span class="empty">'._t('그룹없음').'</span>':UTF8::lessen($group_names[$feed['group']],10) ));

			// 블로그 제목
			ob_start();
?>
			
开发者ID:ncloud,项目名称:bloglounge,代码行数:30,代码来源:index.php

示例3: echo

					$thumbnailFile = Media::getMediaFile($post['thumbnail']);

					if(!empty($thumbnailFile)) {
?>
					<div class="thumbnail">
						<img src="<?php echo $thumbnailFile;?>"/>
					</div>
<?php
					}
				}
				
					$desc = UTF8::lessenAsEm(str_replace('&nbsp;','',func::stripHTML($post['description'])),42);
					if(empty($desc)) {
						$desc = '<span class="empty">'._t('내용이 비어있거나 HTML로만 작성되어 있습니다.').'</span>';
					}	
					$isNew = Func::isNew($post['written'],1);

?>
					<div class="data<?php echo !empty($thumbnailFile)?'':' no_thumbnail_data';?>">
						<div class="title"><a href="<?php echo $service['path'];?>/admin/blog/entrylist?read=<?php echo $post['id'];?>"><?php echo UTF8::lessenAsEm(stripcslashes(func::stripHTML($post['title'])), 36);?></a><?php echo ($isNew?'<img src="'.$service['path'].'/images/admin/icon_new.gif" alt="new" align="absmiddle" class="new" />':'');?></div>
						<a href="<?php echo $service['path'];?>/admin/blog/entrylist?read=<?php echo $post['id'];?>"><?php echo $desc?></a>
					</div>
					<div class="clear"></div>
<?php
			$content = ob_get_contents();
			ob_end_clean();

			array_push($data['datas'], array('class'=>'entrylist_title','data'=> $content ));

			// 글 블로그
			ob_start();
开发者ID:ncloud,项目名称:bloglounge,代码行数:31,代码来源:index.php


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