코멘트 유무로 대기 완료 list.skin.php 에 표시하는 소스중에..
일단 php 코딩을 전혀 모르는 사람입니다 ㅠ
아래 소스는
코멘트가 없으면 대기 이미지가 뜨고
코멘트가 있으면 완료 이미지가 뜹니다.
추가하고 싶은건 코멘트가 1개이상, 즉 코멘트 2개부터는
완료2 가 표시되게 하고싶은데
else if 를 써봐도 안되네요 ㅠ
도움을 요청합니다!
<?
$parent = $list[$i][wr_parent];
$sql = " select count(*) as cn from $write_table where wr_is_comment = '1' and wr_parent = '$parent' and mb_id = 'admin'";
//echo $sql;
$row = sql_fetch($sql);
$total_count = $row[cn];
if ($total_count == 0) {
echo "<img src='$board_skin_path/img/icon_standby.gif' width='50' height='18' alt='입금대기' />";
} else {
echo "<img src='$board_skin_path/img/icon_select.gif' width='50' height='18' alt='예약완료' />";
}
?>
아래 소스는
코멘트가 없으면 대기 이미지가 뜨고
코멘트가 있으면 완료 이미지가 뜹니다.
추가하고 싶은건 코멘트가 1개이상, 즉 코멘트 2개부터는
완료2 가 표시되게 하고싶은데
else if 를 써봐도 안되네요 ㅠ
도움을 요청합니다!
<?
$parent = $list[$i][wr_parent];
$sql = " select count(*) as cn from $write_table where wr_is_comment = '1' and wr_parent = '$parent' and mb_id = 'admin'";
//echo $sql;
$row = sql_fetch($sql);
$total_count = $row[cn];
if ($total_count == 0) {
echo "<img src='$board_skin_path/img/icon_standby.gif' width='50' height='18' alt='입금대기' />";
} else {
echo "<img src='$board_skin_path/img/icon_select.gif' width='50' height='18' alt='예약완료' />";
}
?>
댓글 1개
13년 전
if ($total_count == 0) {
echo "<img src='$board_skin_path/img/icon_standby.gif' width='50' height='18' alt='입금대기' />";
} else if ($total_count == 1) {
echo "<img src='$board_skin_path/img/icon_select.gif' width='50' height='18' alt='예약완료' />";
} else
{
echo "<img src='$board_skin_path/img/icon_select2.gif' width='50' height='18' alt='예약완료2' />";
}
이렇게 하면 댈꺼같습니다
echo "<img src='$board_skin_path/img/icon_standby.gif' width='50' height='18' alt='입금대기' />";
} else if ($total_count == 1) {
echo "<img src='$board_skin_path/img/icon_select.gif' width='50' height='18' alt='예약완료' />";
} else
{
echo "<img src='$board_skin_path/img/icon_select2.gif' width='50' height='18' alt='예약완료2' />";
}
이렇게 하면 댈꺼같습니다
게시판 목록
그누4 질문답변
그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.
기존 게시물은 열람만 가능합니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 66554 | 11년 전 | 17733 | ||
| 66553 | 11년 전 | 12554 | ||
| 66552 |
alexseo
|
11년 전 | 10188 | |
| 66551 | 11년 전 | 10925 | ||
| 66550 | 11년 전 | 10496 | ||
| 66549 | 11년 전 | 11846 | ||
| 66548 | 11년 전 | 15029 | ||
| 66547 |
스타크루즈
|
11년 전 | 11493 | |
| 66546 |
kimch
|
11년 전 | 11599 | |
| 66545 | 11년 전 | 11423 | ||
| 66544 | 11년 전 | 12271 | ||
| 66543 |
별을기다리며
|
11년 전 | 14432 | |
| 66542 |
별을기다리며
|
11년 전 | 11924 | |
| 66541 | 11년 전 | 9692 | ||
| 66540 | 11년 전 | 10566 | ||
| 66539 | 11년 전 | 16399 | ||
| 66538 | 11년 전 | 10451 | ||
| 66537 | 11년 전 | 9134 | ||
| 66536 | 11년 전 | 10574 | ||
| 66535 |
alexseo
|
11년 전 | 5590 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기