게시글 순서별 배경이 달라지게 하는 방법... 정보
게시글 순서별 배경이 달라지게 하는 방법...첨부파일
본문
최신글로 게시글을 불러오고 있습니다.
현재는
1 A폼
2 A폼
3 A폼
.
.
.
.
이렇게 한가지의 폼으로 적용하였으나,
1 A폼
2 B폼
3 A폼
4 B폼
.
.
.
이렇게 적용하고 싶습니다.
<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $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'];
$wr_2 = $list[$i]['wr_2'];
$wr_3 = $list[$i]['wr_3'];
$wr_4 = $list[$i]['wr_4'];
$wr_5 = $list[$i]['wr_5'];
// 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";
echo $list[$i][icon_reply] . " ";
echo "<div id='namecard1'>";
echo "<div id='card_center'>";
echo "<table width='720' height='322' border='0' align='left' cellpadding='0' cellspacing='0' background='/homeskin/list_bg01.jpg'><tr valign='top'><td>";
echo "<div id='photo'><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='175' height='245' border=0' style='border:0 solid #B2BAEE'></a></div></td>";
echo "<td><div id='right'>";
echo "<td><div id='hadeline'><strong>{$wr_2}</strong></div>";
echo "<div id='speka'>{$wr_3}</div>";
echo "<div class='info_txt'><img src='homeskin/namecard_14.png'></div>";
echo "<div id='phon_no'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id' onFocus=\'this.blur();\' title=\'{$list[$i][subject]}'>
<img src='homeskin/cardno{$wr_4}.png'></div>";
echo "<div id='button'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id' onFocus=\'this.blur();\'>
<img src='060/img/tel_01.png' name='state_{$wr_4}' border='0' id='state_{$wr_4}'></a>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id' onFocus=\'this.blur();\'><img src='homeskin/btn_nreview.png' border='0'></a></div>";
echo "</div></td></tr></table></div></div>";
?>
</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>"; } ?>
이 부분 인것 같은데....
제 실력으로는 한계네요
어디를 수정하면 이렇게 될까요?
고수님들의 신의한수가 절실합니다~
현재는
1 A폼
2 A폼
3 A폼
.
.
.
.
이렇게 한가지의 폼으로 적용하였으나,
1 A폼
2 B폼
3 A폼
4 B폼
.
.
.
이렇게 적용하고 싶습니다.
<?
$image = $list[$i][file][0][file]; //원본
$img=$data_path. "/".$image; //썸네일이 없을경우 원본출력
$thumb = $thumb_path. "/". $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'];
$wr_2 = $list[$i]['wr_2'];
$wr_3 = $list[$i]['wr_3'];
$wr_4 = $list[$i]['wr_4'];
$wr_5 = $list[$i]['wr_5'];
// 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";
echo $list[$i][icon_reply] . " ";
echo "<div id='namecard1'>";
echo "<div id='card_center'>";
echo "<table width='720' height='322' border='0' align='left' cellpadding='0' cellspacing='0' background='/homeskin/list_bg01.jpg'><tr valign='top'><td>";
echo "<div id='photo'><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='175' height='245' border=0' style='border:0 solid #B2BAEE'></a></div></td>";
echo "<td><div id='right'>";
echo "<td><div id='hadeline'><strong>{$wr_2}</strong></div>";
echo "<div id='speka'>{$wr_3}</div>";
echo "<div class='info_txt'><img src='homeskin/namecard_14.png'></div>";
echo "<div id='phon_no'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id' onFocus=\'this.blur();\' title=\'{$list[$i][subject]}'>
<img src='homeskin/cardno{$wr_4}.png'></div>";
echo "<div id='button'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id' onFocus=\'this.blur();\'>
<img src='060/img/tel_01.png' name='state_{$wr_4}' border='0' id='state_{$wr_4}'></a>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id=$wr_id' onFocus=\'this.blur();\'><img src='homeskin/btn_nreview.png' border='0'></a></div>";
echo "</div></td></tr></table></div></div>";
?>
</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>"; } ?>
이 부분 인것 같은데....
제 실력으로는 한계네요
어디를 수정하면 이렇게 될까요?
고수님들의 신의한수가 절실합니다~
( select a.* , ( select sum(co_count) as co_count from g4_qa_choose where mb_id=a.mb_id and bo_table = 'g4_qa' ) as q_co_count from `g4_write_g4_qa` a where wr_parent = '262522' and wr_8 != '' and wr_is_comment = 1 and CONVERT(wr_7, UNSIGNED) >= 5 group by wr_content having max(wr_7) order by CONVERT(wr_7, UNSIGNED) desc limit 3 )
1055 : Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sir.a.wr_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
error file : /15sir/bbs/board.php
