Emlog彩色标签-折腾ing

获取彩色

//获取彩色
function color(){
	$col = ’#’;
	$col_str = ’0123456789ABCDEF’;
	for($i = 0; $i < 6; $i++){
		$col .= $col_str[rand(0,15)];
	}
	return $col;
}
<?php
//widget:标签
function widget_tag($title){
	global $tag_cache; ?>
	<div class="lister"><span><?php echo $title; ?></span></div>
	<ul id="blogtags">
	<li>
	<?php shuffle($tag_cache);foreach($tag_cache as $value): $color = color(); ?>
		<a href="<?php echo BLOG_URL; ?>?tag=<?php echo $value[’tagurl’]; ?>" rel="tag" title="<?php echo $value[’usenum’]; ?> 篇日志" ><?php echo $value[’tagname’]; ?></a>
	<?php endforeach; ?>
	</li>
	</ul>
<?php }?>

您可以选择一种方式赞助本站

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: