중복으로 노출되는 문제 해결 방법좀 부탁드립니다..

· 18년 전 · 1527
안녕하세요.
다름이 아니오라 양갱님에 광고스킨을 이용하고 있습니다.
그런데 문제는 노출수가 계속 올라가더군요..
 
이것을 아이피 또는 쿠키로 해서 중복방지를 할수 있을까 해서 문의 드립니다.
 
그럼 좋은 하루 되세요~~~
 
밑에는 소스 입니다.
 
<?
function skin($row,$skin,$tmp_table)
{
 global $g4;
 if ($row[wr_id])
 {
  $href = "$g4[bbs_path]/link.php?bo_table={$tmp_table}&wr_id={$row[wr_id]}&no=1";
  if($skin){?>
   <style>      .b, a.b:link, a.b:visited, a.b:hover, a.b:active{font-weight:bold} /*Weight*/      .brn01  {color:#2D2C2D;font-size:12px;font-family:굴림}      a.brn01:link{color:#2D2C2D;text-decoration:none;font-family:굴림}       a.brn01:visited{color:#2D2C2D;text-decoration:none}      a.brn01:active{color:#0000FF;text-decoration:underline}      a.brn01:hover {color:#0000FF;text-decoration:underline}    </style>
   
   <table border=0 cellpadding=0 cellspacing=0 align=center><tr>   <td width=10>    <img src=<?=$g4[path]?>/img/ico_ad.gif>  </td>  <td width=3>  </td>   <td width=14>    <img src=<?=$g4[path]?>/img/ico_bracket_l.gif width=8 height=27>  </td>  <td height=34  class="brn01">    <table border=0 cellpadding=0 cellspacing=0 align=center>    <tr>      <td align=center valign=middle>
   <?
   echo "<a href='$href' target=";
   if($row[wr_6])
    echo "_self";
   else
    echo "_blank";
   
   echo " class=\"brn01 b\" style='font-size:13px;font-family:굴림;color:".$row[wr_1]."'>";
   
   if($skin==1)
    echo "{$row[wr_subject]}</a>";
   else if($skin==2)
    echo conv_subject($row[wr_subject],90,"")."</a>"; //제목 글자수 조정
   ?>
   </td>    </tr><tr>      <td height=5></td>    </tr>    <tr>      <td align=center>
 <?}
  echo "<a href='$href' target=";
  if($row[wr_6])
   echo "center>";
  else
   echo "_blank>";
  $file=get_file($tmp_table, $row[wr_id]);
  
  /*onerror=this.src='$g4[path]/skin_img/noimg.gif'
  이 부분에 이미지가 없으면 에러가 나므로 필요 없으면 삭제 하고
  아니면 제대로의 경로를 기재 바랍니다.
  */
  if($skin==1 && $row[wr_content])
   echo "{$row[wr_content]}</a>";
  else if($file[0][file])
   echo "<IMG SRC='$g4[path]/data/file/$tmp_table/{$file[0][file]}' ALT='$row[wr_subject]' width=88 height=31 onerror=this.src='$g4[path]/skin_img/noimg.gif'></a>";
  else if($row[wr_link2])
   echo "<IMG SRC='$row[wr_link2]' ALT='$row[wr_subject]' width=88 height=31 onerror=this.src='$g4[path]/skin_img/noimg.gif'></a>";
  else if($skin==2 && $row[wr_content])
   echo conv_subject($row[wr_content],70,"..")."</a>"; //내용 글자수 조정
  else if(!$skin)
  {
   echo "<b><font color='$row[wr_1]'><span id='line_ad'>".conv_subject($row[wr_subject],40,"")."</span></font></b></a>";
  
   echo "
   <script language='JavaScript'>
   function Blink(visible)
   {
    if (visible == 1)
    {
     document.getElementById('line_ad').style.textDecoration = 'underline';
     setTimeout('Blink(0)', 2000);
    }
    else
    {
     document.getElementById('line_ad').style.textDecoration = 'none';
     setTimeout('Blink(1)', 500);
    }
   }
   Blink(1);
   </script>";
  }
  
  if($skin){?>
    </td>    </tr>        </table>  </td>  <td width=14 align=right>    <img  src=<?=$g4[path]?>/img/ico_bracket_r.gif width=8 height=27>  </td></tr></table>
  <?}
  return true;
 }
}
function ad($skin)
{
 $tmp_table = "ad";//광고게시판의 bo_table 명을 입력하세요.
 global $g4;
 $sql = " select wr_id, wr_subject, wr_1,wr_6,wr_link2,wr_content from {$g4[write_prefix]}{$tmp_table}
     where wr_is_comment = 0
    and date_format(wr_3,'%Y%m%d%H%i') <= date_format(now(),'%Y%m%d%H%i')
    and  (((wr_5-wr_2)>0 and mb_id != 'admin' and wr_4='')
     or (mb_id = 'admin' and (wr_4='' or date_format(wr_4,'%Y%m%d%H%i') > date_format(now(),'%Y%m%d%H%i'))))
    order by rand() limit 1 ";
 $row = sql_fetch($sql);
 $result=skin($row,$skin,$tmp_table);
 if($result)// View
  sql_query(" update {$g4[write_prefix]}{$tmp_table} set wr_2 = wr_2 + 1 where wr_id = '$row[wr_id]' ");
}
?>
|
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
18년 전 조회 1,406
18년 전 조회 1,508
18년 전 조회 1,696
18년 전 조회 2,378
18년 전 조회 1.4만
18년 전 조회 3,659
18년 전 조회 1,411
18년 전 조회 1,527
18년 전 조회 1,737
18년 전 조회 1,528
18년 전 조회 1,518
18년 전 조회 1,657
18년 전 조회 2,108
18년 전 조회 2,069
18년 전 조회 1,501
18년 전 조회 2,043
18년 전 조회 1,585
18년 전 조회 1,522
18년 전 조회 1,530
18년 전 조회 1,519