양갱님에 배너관련 문의 드립니다. 정보
양갱님에 배너관련 문의 드립니다.본문
안녕하세요.
염치불구하고 문의드립니다.
다름이아니고
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=29309&sca=&sfl=wr_name%2C1&stx=%BE%E7%B0%BB&sop=and
위에 배너스킨을 적용하고 메인에 배너를 보여주고 있는데요.
인쿠르드로 보여주는건데 요것을 리스트스킨화할순 없을까 해서요.
아래는 인쿠르드파일내용입니다.
<?
function skin4($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],30,"")."</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>";
if ($file[0][file]) { ?>
<img src='<?=$g4[path]?>/data/file/<?=$tmp_table?>/<?=$file[0][file]?>' ALT='<?=$row[wr_subject]?>' width=217 height=100 onerror=this.src='<?=$g4[path]?>/skin_img/noimg.gif'></a><br>
<?}
else if($file[1][file])
{ echo"<script>doc_write(flash_movie('$g4[path]/data/file/$tmp_table/{$file[1][file]}', 'flash', '217', '100', ALT='{$row[wr_subject]}', 'transparent'));</script>";}
else if($row[wr_link2])
echo "<IMG SRC='$row[wr_link2]' ALT='$row[wr_subject]' width=217 height=100 onerror=this.src='$g4[path]/skin_img/noimg.gif'></a>";
else if($skin==2 && $row[wr_content])
echo conv_subject($row[wr_content],50,"..")."</a>"; //내용 글자수 조정
else if(!$skin)
{
echo "<b><font color='$row[wr_1]'><span id='line_ad4'>".conv_subject($row[wr_subject],40,"")."</span></font></b></a>";
echo "
<script language='JavaScript'>
function Blink(visible)
{
if (visible == 1)
{
document.getElementById('line_ad4').style.textDecoration = 'underline';
setTimeout('Blink(0)', 2000);
}
else
{
document.getElementById('line_ad4').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 ad4($skin)
{
$tmp_table = "게시판명";//광고게시판의 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 != '최고관리자' and wr_4='')
or (mb_id = '관리자' 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=skin4($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]' ");
}
?>
위에 보시면
function ad4($skin)
{
$tmp_table = "게시판명";//광고게시판의 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 != '최고관리자' and wr_4='')
or (mb_id = '관리자' 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=skin4($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]' ");
}
이부분을 어떻게 하면 될듯도 한데요..아닌가요?
아 너무 어렵네요.
그럼 좋은 하루되세요.
댓글 전체
위에 스킨화를 도움 요청하다 걍 이리저리 활용해서 해결 했습니다.
이젠 포인트도 없고 질문도 못하겠네요..해봐야 답변도 업구요...
걍 눈팅만 할렵니다....
수고하세요..