최근 검색어 순위 기간 조정?

최근 검색어 순위 기간 조정?

QA

최근 검색어 순위 기간 조정?

본문

검색페이지에 최근 건색어 순위 스킨을 넣어서 사용중인데요.

약7일정도 지나면 검색어가 없어집니다. 즉 기간이 짧게 설정된것 같은데, 이걸 어디서 좀

출력되는 기간을 조정할수 없는지요...

 

아래는  관련 소스입니다.

if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$date_gap_old = date("Y-m-d", strtotime($date_gap) - ($date_cnt * 86400));

$old = array();
$sql2 = " select pp_word, count(*) as cnt from $g4[popular_table]
   where pp_date between '$date_gap_old' and '$date_gap'
   group by pp_word
   order by cnt desc, pp_word
   limit 0, 100 ";
$qry2 = sql_query($sql2);
$count = mysql_num_rows($qry2);
for ($j=0; $row2=sql_fetch_array($qry2); $j++) {
    $old[$j] = $row2;
}

for ($i=0; $i<$pop_cnt; $i++)
{
    for ($j=0; $j<$count; $j++) {
 if ($old[$j][pp_word] == $list[$i][pp_word]) {
     break;
 }
    }

    $list[$i][pp_word] = urldecode($list[$i][pp_word]);
    $list[$i][pp_rank] = $i + 1;
    if ($count == $j) {
 $list[$i][old_pp_rank] = 0;
 $list[$i][rank_gap] = 0;
    } else {
 $list[$i][old_pp_rank] = $j + 1;
 $list[$i][rank_gap] = $list[$i][old_pp_rank] - $list[$i][pp_rank];
    }
    if ($list[$i][rank_gap] > 0)
 $list[$i][icon] = "up";
    else if ($list[$i][rank_gap] < 0)
 $list[$i][icon] = "down";
    else if ($list[$i][old_pp_rank] == 0)
 $list[$i][icon] = "new";
    else if ($list[$i][rank_gap] == 0)
 $list[$i][icon] = "nogap";
}

?>
<style type="text/css">
.mw-popular { border:1px solid #b9c695; text-align:center; }
.mw-popular td { font-size:13px; line-height:16px; }
.mw-popular a:link { color:#666; text-decoration:none; }
.mw-popular a:active { color:#666; text-decoration:none;  }
.mw-popular a:visited { color:#666; text-decoration:none;  }
.mw-popular a:hover { color:#ea6f0b; text-decoration:underline; }
.mw-popular .subject { background:url(<?=$popular_skin_path?>/img/t_bg.jpg) repeat-x bottom; height:23px; margin-bottom:6px; padding:0;}
.mw-popular .subject { font-size:13px; color:#000; font-weight:bold; text-decoration:none; text-align:left; }
.mw-popular .subject div { margin:0 0 0 10px;padding:5px 0;}
.mw-popular table { margin:0 0 0 5px;}
.mw-popular .word { height:16px; overflow:hidden; margin:2px 0 0 5px;}
.mw-popular .gap { letter-spacing:-1px; font-size:11px; }
</style>

<div class="mw-popular">
<div class="subject"><div>최근 검색어 순위</div></div>
<table border=0 cellpadding=0 cellspacing=0>
<? for ($i=0; $i<$pop_cnt; $i++) { ?>
<? if (!is_array($list[$i])) continue; ?>
<tr>
<td width="14" height="20"><img src="<?=$popular_skin_path?>/img/<?=sprintf("%02d", $i+1)?>.gif"></td>
<td width="135" align="left">
    <div class="word"><a href="<?=$g4[bbs_path]?>/search.php?sfl=&sfl=wr_subject%7C%7Cwr_content&sop=and&stx=<?=urlencode($list[$i][pp_word])?>"><?=$list[$i][pp_word]?></a>
</div>
</td>
<td width="24">
    <img src="<?=$popular_skin_path?>/img/<?=$list[$i][icon]?>.gif" align=absmiddle>
    <span class="gap"><? if ($list[$i][icon] != "new" && $list[$i][icon] != "nogap") { echo abs($list[$i][rank_gap]); }?></span>
</td>
</tr>
<? } ?>
</table>
</div>​

 

이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
전체 124,118 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT