close
<?php 
	$that_time = strtotime($bb2['created_date']);
	$this_time = mktime();
	$diff = ($that_time - $this_time)/ (60*60*24);  //計算日期差 / Calculate the date difference
	// $diff = ($that_time - $this_time);                 //計算秒數差 / Calculate the difference in seconds
	// $diff = ($that_time - $this_time)/ (60) ;         //計算分鐘差 / Calculate the minute difference
	// $diff = ($that_time - $this_time)/ (60*60);        //計算小時差 / Calculate the hour difference
	if ($diff>=-2){ //    當時間大於2天 / When the time is greater than 2 days
?>
    <span class="badge pull-right">New</span> 
<?php } ?>
arrow
arrow

    kkkelu1008 發表在 痞客邦 留言(0) 人氣()