노이미지 출력방법

· 2011-03-31 (목) 23:00:35 · 1694
오늘 가입해서 포인트가 10점밖에 없네요 ^^; 죄송합니다
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=11475&sca=&sfl=wr_subject&stx=%ED%9A%8C%EC%9B%90%EC%82%AC%EC%A7%84&sop=and&spt=-334&page=1

위 팁을 이용해서 회원정보에서 사진을 넣을 수 있게 만들었습니다.

일반페이지에서 회원들의 목록을 노출시킬려고 합니다. 사진과 함께요 여기까진 성공했는데

이미지를 첨부안한 회원의 경우 noimage.jpg로 대체하고 싶은데 코드를 잘 모르겠습니다

출력은 46줄쯤입니다. ㅠㅠ 짜집기의 한계가 나오는듯;;

고수님들의 조언 부탁드립니다 __~

아래는 소스
[code]
<?
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 접근가능한 그룹수
$sql2 = " select count(*) as cnt from $g4[group_member_table] where mb_id = '$row[mb_id]' ";
$row2 = sql_fetch($sql2);
$group = "";
if ($row2[cnt])
$group = "<a href='./boardgroupmember_form.php?mb_id=$row[mb_id]'>$row2[cnt]</a>";

if ($is_admin == 'group')
{
$s_mod = "";
$s_del = "";
}
else
{
$s_mod = "<a href=\"sub_03_01_view.php?$qstr&w=u&mb_id=$row[mb_id]\"><img src='http://cdn2.iconfinder.com/data/icons/oxygen/16x16/mimetypes/application-vnd.ms-word.png' border=0 title='수정'></a>";
$s_kink = "<a href=\"sub_03_01_view.php?$qstr&w=u&mb_id=$row[mb_id]\">";

$s_del = "<a href=\"javascript:post_delete('member_delete.php', '$row[mb_id]');\"><img src='img/icon_delete.gif' border=0 title='삭제'></a>";
}
$s_grp = "<a href='./boardgroupmember_form.php?mb_id=$row[mb_id]'><img src='img/icon_group.gif' border=0 title='그룹'></a>";




$icon_file2 = "$g4[path]/memberimg/$row[mb_id].jpg";



$leave_date = $row[mb_leave_date] ? $row[mb_leave_date] : date("Ymd", $g4[server_time]);
$intercept_date = $row[mb_intercept_date] ? $row[mb_intercept_date] : date("Ymd", $g4[server_time]);

$mb_nick = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);

$mb_id = $row[mb_id];
if ($row[mb_leave_date])
$mb_id = "<font color=crimson>$mb_id</font>";
else if ($row[mb_intercept_date])
$mb_id = "<font color=orange>$mb_id</font>";

$list = $i%2;
echo "
<input type=hidden name=mb_id[$i] value='$row[mb_id]'>
<tr>
<td valign=top><img src='$icon_file2' width=130 height=140>!!!요기에 이미지가 없으면 노이미지를 ㅠㅠ 넣고 싶어요</td>
<td>


<table width=100% border=0 cellspacing=0 cellpadding=0 class=board_list>
<col width='100' />
<col width='200' />
<col width='100' />
<col width='200' />
<tr>
<td class=in>이름</td>
<td class=ou>$s_kink $row[mb_name] </a> </td>
<td class=in>구직여부</td>
<td class=ou>$s_kink $row[mb_2] </a> </td>
</tr>
<tr>
<td class=in>거주지</td>
<td class=ou>$s_kink $row[mb_addr1] </a> </td>
<td class=in>희망거주지</td>
<td class=ou>$s_kink $row[mb_37] </a> </td>
</tr>
<tr>
<td class=in>희망연봉</td>
<td class=ou>$s_kink $row[mb_38]만원 </a> </td>
<td class=in>사고경력</td>
<td class=ou>$s_kink $row[mb_34] </a> </td>
</tr>
<tr>
<td class=in>경력</td>
<td class=ou>$s_kink $row[mb_33]년</a> </td>
<td class=in>결혼유무</td>
<td class=ou>$s_kink $row[mb_22] </a> </td>
</tr>
</table>

<br>
<br>
<br>

</td>
</tr>";
}

if ($i == 0)
echo "<tr><td colspan='$colspan' align=center height=100 class=contentbg>자료가 없습니다.</td></tr>";

echo "</table>";

$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
echo "<table width=100% cellpadding=3 cellspacing=1>";
echo "<tr><td width=50%>";
echo "</td>";
echo "<td width=50% align=right>$pagelist</td></tr></table>\n";

if ($stx)
echo "<script type='text/javascript'>document.fsearch.sfl.value = '$sfl';</script>\n";
?>
[/code]
|
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
11-04-01 조회 1,716
11-04-01 조회 1,640
11-04-01 조회 1,696
11-04-01 조회 4,072
11-04-01 조회 1,629
11-04-01 조회 1,640
11-04-01 조회 1,698
11-04-01 조회 2,115
11-04-01 조회 1,642
11-04-01 조회 1,737
11-03-31 조회 1,635
11-03-31 조회 1,695
11-03-31 조회 1,667
11-03-31 조회 1,657
11-03-31 조회 1,699
11-03-31 조회 1,869
11-03-31 조회 1,946
11-03-31 조회 1,530
11-03-31 조회 1,640
11-03-31 조회 1,666