Exemple #1
0
</form>
<div id="flash_result"></div>
</div>

<div id="main">
<div id='heading'>Howls</div>
<div id='content'>
<?php 
foreach ($person as $row) {
    $time = $row->age;
    echo "<div class='tweet_box'>";
    echo "<div class='tweet_user'><img class='user_img' src='assets/includes/wolf.png'></div>";
    echo "<div class='tweet_body'>";
    ?>
<div class='tweet_time'><?php 
    time_stamp($time);
    ?>
</div>
<?php 
    echo "<div><b><a href='https://twitter.com/JMRMM76'>JMM</a></b> <span class='uname'>@JMRMM76</span></div>";
    echo "<div class='tweet_text'>" . utf8_decode($row->name) . "</div>";
    echo "</div></div>";
}
?>
</div>
</div>

</div>
	</div>
</body>
                    }
                } else {
                    if ($weeks <= 4) {
                        if ($weeks == 1) {
                            echo "one week ago";
                        } else {
                            echo "{$weeks} weeks ago";
                        }
                    } else {
                        if ($months <= 12) {
                            if ($months == 1) {
                                echo "one month ago";
                            } else {
                                echo "{$months} months ago";
                            }
                        } else {
                            if ($years == 1) {
                                echo "one year ago";
                            } else {
                                echo "{$years} years ago";
                            }
                        }
                    }
                }
            }
        }
    }
}
$session_time = time();
echo time_stamp($session_time);
?>
/media/resizer/57x57/r/<?php 
echo remove_http(catch_that_image());
?>
" title="<?php 
the_title();
?>
">
				</div>
				<h1 itemprop="name"><?php 
the_title();
?>
</h1>
				<div class="info">
					<span class="post_date"><?php 
echo time_stamp(get_post_time('U', true));
?>
</span>
				</div>
				<div class="stats">
					<span class="post_view"><?php 
if (function_exists('the_views')) {
    the_views();
}
?>
</span>
					<span class="post_comment"><?php 
comments_number('0', '1', '%');
?>
</span>
				</div>
Exemple #4
0
        if ($months == 1) {
            echo "a month ago";
        } else {
            echo "{$months} months ago";
        }
    } else {
        if ($years == 1) {
            echo "one year ago";
        } else {
            echo "{$years} years ago";
        }
    }
}
$time = "2012-01-05 15:47:01";
$time_ago = strtotime($time);
echo time_stamp($time_ago);
echo '...........................<br>';
function time_ago($tm, $rcs = 0)
{
    $cur_tm = time();
    $dif = $cur_tm - $tm;
    $pds = array('second', 'minute', 'hour', 'day', 'week', 'month', 'year', 'decade');
    $lngh = array(1, 60, 3600, 86400, 604800, 2630880, 31570560, 315705600);
    for ($v = sizeof($lngh) - 1; $v >= 0 && ($no = $dif / $lngh[$v]) <= 1; $v--) {
    }
    if ($v < 0) {
        $v = 0;
    }
    $_tm = $cur_tm - $dif % $lngh[$v];
    $no = floor($no);
    if ($no != 1) {