중복으로 노출되는 문제 해결 방법좀 부탁드립니다.. 정보
중복으로 노출되는 문제 해결 방법좀 부탁드립니다..본문
안녕하세요.
다름이 아니오라 양갱님에 광고스킨을 이용하고 있습니다.
그런데 문제는 노출수가 계속 올라가더군요..
이것을 아이피 또는 쿠키로 해서 중복방지를 할수 있을까 해서 문의 드립니다.
그럼 좋은 하루 되세요~~~
밑에는 소스 입니다.
<?
function skin($row,$skin,$tmp_table)
{
global $g4;
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";
{
$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>
<?}
<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>";
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>
<?}
/*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;
{
$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 ";
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]' ");
}
?>
sql_query(" update {$g4[write_prefix]}{$tmp_table} set wr_2 = wr_2 + 1 where wr_id = '$row[wr_id]' ");
}
?>
댓글 전체