댓글 27개
판올림.
-----------------------
lib/common.lib.php 의
$list['datetime2'] = $list['wr_datetime'];
if ($list['datetime'] == $g4['time_ymd'])
$list['datetime2'] = substr($list['datetime2'],11,5);
else
$list['datetime2'] = substr($list['datetime2'],5,5);
를
$timestamp = strtotime($list['wr_datetime']); // 글쓴날짜시간 Unix timestamp 형식
$current = $g4['server_time']; // 현재날짜시간 Unix timestamp 형식
// 열라 긴 세월 20년
if ($timestamp <= $current - 86400 * 7300) {
$str = (int)(($current - $timestamp) / (86400 * 7300)) . "열라오래됨";
}
// 호랭이 담배피던 시절 10년
else if ($timestamp <= $current - 86400 * 3650) {
$str = (int)(($current - $timestamp) / (86400 * 3650)) . "호랭이 담배피던 시절";
}
else if ($timestamp <= $current - 86400 * 365) {
$str = (int)(($current - $timestamp) / (86400 * 365)) . "년전";
}
else if ($timestamp <= $current - 86400 * 31) {
$str = (int)(($current - $timestamp) / (86400 * 31)) . "개월전";
}
else if ($timestamp <= $current - 86400 * 1) {
$str = (int)(($current - $timestamp) / 86400) . "일전";
}
else if ($timestamp <= $current - 3600 * 1) {
$str = (int)(($current - $timestamp) / 3600) . "시간전";
}
else if ($timestamp <= $current - 60 * 1) {
$str = (int)(($current - $timestamp) / 60) . "분전";
}
else {
$str = (int)($current - $timestamp) . "초전";
}
$list['datetime2'] = $str;
-----------------------
lib/common.lib.php 의
$list['datetime2'] = $list['wr_datetime'];
if ($list['datetime'] == $g4['time_ymd'])
$list['datetime2'] = substr($list['datetime2'],11,5);
else
$list['datetime2'] = substr($list['datetime2'],5,5);
를
$timestamp = strtotime($list['wr_datetime']); // 글쓴날짜시간 Unix timestamp 형식
$current = $g4['server_time']; // 현재날짜시간 Unix timestamp 형식
// 열라 긴 세월 20년
if ($timestamp <= $current - 86400 * 7300) {
$str = (int)(($current - $timestamp) / (86400 * 7300)) . "열라오래됨";
}
// 호랭이 담배피던 시절 10년
else if ($timestamp <= $current - 86400 * 3650) {
$str = (int)(($current - $timestamp) / (86400 * 3650)) . "호랭이 담배피던 시절";
}
else if ($timestamp <= $current - 86400 * 365) {
$str = (int)(($current - $timestamp) / (86400 * 365)) . "년전";
}
else if ($timestamp <= $current - 86400 * 31) {
$str = (int)(($current - $timestamp) / (86400 * 31)) . "개월전";
}
else if ($timestamp <= $current - 86400 * 1) {
$str = (int)(($current - $timestamp) / 86400) . "일전";
}
else if ($timestamp <= $current - 3600 * 1) {
$str = (int)(($current - $timestamp) / 3600) . "시간전";
}
else if ($timestamp <= $current - 60 * 1) {
$str = (int)(($current - $timestamp) / 60) . "분전";
}
else {
$str = (int)($current - $timestamp) . "초전";
}
$list['datetime2'] = $str;
게시글 목록
| 번호 | 제목 |
|---|---|
| 1717629 | |
| 1717626 | |
| 1717625 | |
| 1717621 | |
| 1717619 | |
| 1717611 | |
| 1717610 | |
| 1717609 | |
| 1717607 | |
| 1717601 | |
| 1717598 | |
| 1717591 | |
| 1717590 | |
| 1717583 | |
| 1717575 | |
| 1717572 | |
| 1717568 | |
| 1717566 | |
| 1717549 | |
| 1717545 | |
| 1717533 | |
| 1717512 | |
| 1717511 | |
| 1717508 | |
| 1717495 | |
| 1717479 | |
| 1717473 | |
| 1717470 | |
| 1717463 | |
| 1717452 |

댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기