From e5930a7fa293adb087e273a83ca373fe3688f801 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Thu, 7 Feb 2013 17:30:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8B=9C=EA=B0=84=EC=9D=84=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=EC=97=90=EC=84=9C=20=EC=83=81=EC=88=98=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/popular.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/popular.lib.php b/lib/popular.lib.php index 3ff0d9ad3..f2b176b95 100644 --- a/lib/popular.lib.php +++ b/lib/popular.lib.php @@ -11,8 +11,8 @@ function popular($skin_dir='basic', $pop_cnt=7, $date_cnt=3) if (!$skin_dir) $skin_dir = 'basic'; - $date_gap = date("Y-m-d", $g4['server_time'] - ($date_cnt * 86400)); - $sql = " select pp_word, count(*) as cnt from {$g4['popular_table']} where pp_date between '$date_gap' and '{$g4['time_ymd']}' group by pp_word order by cnt desc, pp_word limit 0, $pop_cnt "; + $date_gap = date("Y-m-d", G4_SERVER_TIME - ($date_cnt * 86400)); + $sql = " select pp_word, count(*) as cnt from {$g4['popular_table']} where pp_date between '$date_gap' and '".G4_TIME_YMD."' group by pp_word order by cnt desc, pp_word limit 0, $pop_cnt "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { $list[$i] = $row;