현재 시간을 상수로 적용 G4_SERVER_TIME

This commit is contained in:
gnuboard
2013-02-20 10:31:57 +09:00
parent b5953eb3c9
commit 6bf06270c0
14 changed files with 23 additions and 36 deletions

View File

@ -114,7 +114,7 @@ function set_cookie($cookie_name, $value, $expire)
{
global $g4;
setcookie(md5($cookie_name), base64_encode($value), $g4['server_time'] + $expire, '/', G4_COOKIE_DOMAIN);
setcookie(md5($cookie_name), base64_encode($value), G4_SERVER_TIME + $expire, '/', G4_COOKIE_DOMAIN);
}
@ -402,7 +402,7 @@ function get_list($write_row, $board, $skin_url, $subject_len=40)
$list['comment_href'] = $list['href'];
$list['icon_new'] = '';
if ($list['wr_datetime'] >= date("Y-m-d H:i:s", $g4['server_time'] - ($board['bo_new'] * 3600)))
if ($list['wr_datetime'] >= date("Y-m-d H:i:s", G4_SERVER_TIME - ($board['bo_new'] * 3600)))
$list['icon_new'] = '<img src="'.$skin_url.'/img/icon_new.gif" alt="새글">';
$list['icon_hot'] = '';

View File

@ -114,7 +114,7 @@ function verify_email($address, &$error)
// 220 메세지들은 건너뜀
// 3초가 지나도 응답이 없으면 포기
socket_set_blocking($fp, false);
$stoptime = $g4['server_time'] + $WAIT_SECOND;
$stoptime = G4_SERVER_TIME + $WAIT_SECOND;
$gotresponse = false;
while (true) {
@ -123,11 +123,11 @@ function verify_email($address, &$error)
if (substr($line, 0, 3) == '220') {
// 타이머를 초기화
$stoptime = $g4['server_time'] + $WAIT_SECOND;
$stoptime = G4_SERVER_TIME + $WAIT_SECOND;
$gotresponse = true;
} else if ($line == '' && $gotresponse)
break;
else if ($g4['server_time'] > $stoptime)
else if (G4_SERVER_TIME > $stoptime)
break;
}