최근갤러리 list페이지에서 subject가 안나오는문제
본문
최근갤러리 latest 소스인데요
subject가 나오게끔 하고싶은데 안나와요
어떻게해아할까요?
=================================================================================
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if(!$options) $options=3;
$cols = $options; // 이미지 가로갯수 // 이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$image_h = 24; // 이미지 상하 간격
$image_h = 24; // 이미지 상하 간격
$col_width = (int)(99 / $cols);
$data_path = $g4[path]."/data/file/";
$thumb_path = $data_path;
?>
$thumb_path = $data_path;
?>
<link rel="stylesheet" href="<?=$latest_skin_path?>/style.css" type="text/css" />
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td>
<!-- 이미지보이는 부분 시작 -->
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<td>
<!-- 이미지보이는 부분 시작 -->
<table align="center" cellpadding="0" cellspacing="0" width="100%" border="0">
<tr><td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td height='2'></td></tr>
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<tr><td height='2'></td></tr>
<tr>
<td align='center'>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<? for ($i=0; $i<count($list); $i++) {
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
$bo_table=$board_list[$i][bo_table];
?>
if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
$bo_table=$board_list[$i][bo_table];
?>
<td width="<?=$col_width?>%" align="center" valign='top'>
<?
$image = urlencode($list[$i][file][0][file]); //원본
$img=$data_path."/".$bo_table."/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path."/".$bo_table."/thumb".$list[$i][wr_id];
$image = urlencode($list[$i][file][0][file]); //원본
$img=$data_path."/".$bo_table."/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path."/".$bo_table."/thumb".$list[$i][wr_id];
if ( file_exists($thumb) )
$img = $thumb;
$style = "style='font-family:돋움; font-size:9pt; color:#686695;' ";
if ($list[$i][icon_new]) {
$style = "style='font-family:돋움; font-size:9pt; color:#134980;' "; }
$subject = "<span $style>".$list[$i][subject]."</span>"; //제목 글자수 자르기
$wr_hit = $list[$i]['wr_hit'];
$wr_id = $list[$i]['wr_id'];
//20111113 새로추가됨 - 품절/로고/새상품로고를 보여줌
if($list[$i][wr_2]=='1') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='2') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc02.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='3') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc03.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='4') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc04.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='5') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc05.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='6') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc06.gif' border=0 align=absmiddle>";
else $btimg_dc="";
// if ($list[$i]['comment_cnt']) //코
// $cmt = "({$list[$i]['comment_cnt']})";
$img = $thumb;
$style = "style='font-family:돋움; font-size:9pt; color:#686695;' ";
if ($list[$i][icon_new]) {
$style = "style='font-family:돋움; font-size:9pt; color:#134980;' "; }
$subject = "<span $style>".$list[$i][subject]."</span>"; //제목 글자수 자르기
$wr_hit = $list[$i]['wr_hit'];
$wr_id = $list[$i]['wr_id'];
//20111113 새로추가됨 - 품절/로고/새상품로고를 보여줌
if($list[$i][wr_2]=='1') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='2') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc02.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='3') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc03.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='4') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc04.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='5') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc05.gif' border=0 align=absmiddle>";
elseif($list[$i][wr_2]=='6') $btimg_dc="<img src='{$board_skin_path}/skin/board/DK_guide/img/dc06.gif' border=0 align=absmiddle>";
else $btimg_dc="";
// if ($list[$i]['comment_cnt']) //코
// $cmt = "({$list[$i]['comment_cnt']})";
$bg = ""; //새글?
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";
if ($list[$i][icon_new])
$bg="la_top_2.gif";
else
$bg="la_top_1.gif";
echo $list[$i][icon_reply] . " ";
echo "<table cellpadding='0' cellspacing='0' border='0'>";
echo " <tr><td background='{$latest_skin_path}/img/la_bg.gif' valign='top' align='center'>
<a href=\"$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\">
<img src='{$img}' width='164' height='126' border=0' style='border:0 solid #B2BAEE'>
</a></td></tr>";
echo "</table>";
?>
</td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%> </td>";
}
?>
<? if ($i+1 < count($list)) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; } ?>
<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table>
<!-- 이미지보이는 부분 끝 -->
</td>
</tr>
</table>
echo " <tr><td background='{$latest_skin_path}/img/la_bg.gif' valign='top' align='center'>
<a href=\"$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id\" onFocus=\"this.blur();\" title=\"{$list[$i][subject]}\">
<img src='{$img}' width='164' height='126' border=0' style='border:0 solid #B2BAEE'>
</a></td></tr>";
echo "</table>";
?>
</td>
<? } ?>
<?
$cnt = ($i%$cols);
for ($k=$cnt; $k<$cols && $cnt; $k++) {
echo "<td width=$col_width%> </td>";
}
?>
<? if ($i+1 < count($list)) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; } ?>
<? if (count($list) == 0) { echo "<td height=80 align=center>게시물이 없습니다.</td>"; } ?>
</tr>
</table>
</td>
</tr>
</table>
</td></tr>
</table>
<!-- 이미지보이는 부분 끝 -->
</td>
</tr>
</table>
답변 3
$subject = "<span $style>".$list[$i][wr_subject]."</span>"; //제목 글자수 자르기
안나오는게 당연한거 같습니다.
출력하는 코드가 없네요.
출력하고자하는곳에
echo $subject;
넣어보세요.
많은 도움이 되었습니다. 감사합니다.
답변을 작성하시기 전에 로그인 해주세요.