1:1게시판+특정회원지정조회 게시판을 합치는 중 (2) 정보
1:1게시판+특정회원지정조회 게시판을 합치는 중 (2)첨부파일
본문
앞의 질문에 이어서 추가질문 드립니다.
이제 아이디 등록하는 것만 수정하면 되는데 도솔천님의 write_id.php에서
name, nick, id를 한번에 검색하게 만들었습니다... 아이디를 선택하면
윈도가 닫혀야 하는데 안닫히네요. -..-a
이거만 고치면 스킨이 끝인데... 끙... 지금까지 수정한거 올리니까 테스트
부탁 드립니다.
<?
$g4_path = "../../..";
include_once("$g4_path/common.php");
$g4_path = "../../..";
include_once("$g4_path/common.php");
if ($sname) {
$sql = " select * from $g4[member_table] where mb_nick like '%$sname%' or mb_name like '%$sname%' or mb_id like '%$sname%' order by mb_id ";
$result = sql_query($sql);
$search_count = mysql_num_rows($result);
if ($search_count > 0) {
for ($i=0; $row=mysql_fetch_array($result); $i++) {
$list[$i]->id = "$row[mb_id]";
$list[$i]->name = $row[mb_name];
$list[$i]->nick = $row[mb_nick];
}
} else {
alert("찾으시는 ID가 없습니다.");
}
mysql_free_result($result);
}
$sql = " select * from $g4[member_table] where mb_nick like '%$sname%' or mb_name like '%$sname%' or mb_id like '%$sname%' order by mb_id ";
$result = sql_query($sql);
$search_count = mysql_num_rows($result);
if ($search_count > 0) {
for ($i=0; $row=mysql_fetch_array($result); $i++) {
$list[$i]->id = "$row[mb_id]";
$list[$i]->name = $row[mb_name];
$list[$i]->nick = $row[mb_nick];
}
} else {
alert("찾으시는 ID가 없습니다.");
}
mysql_free_result($result);
}
$g4[title] = "사용자ID 검색";
include_once("$g4[path]/head.sub.php");
?>
include_once("$g4[path]/head.sub.php");
?>
<table width=100% border=0 cellspacing=0 cellpadding=0>
<form name=frmid method=get autocomplete=off>
<input type=hidden name=frm_name value='<?=$frm_name?>'>
<input type=hidden name=ss_id value='<?=$ss_id?>'>
<tr>
<td colspan=3>
<table width=100% height=50 border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center valign=middle bgcolor=#EBEBEB>
<table width=98% height=40 border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=5% align=center bgcolor=#FFFFFF><img src=<?=$g4[bbs_img_path]?>/icon_01.gif width=5 height=5></td>
<td width=35% align=left bgcolor=#FFFFFF><font color=#666666><b><?=$g4[title]?></b></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td width=10></td><td height=30 colspan=2 valign=bottom>찾는 이름을 입력하세요. (두글자 이상)</td>
</tr>
<tr>
<td height=20 colspan=3></td>
</tr>
<tr>
<td></td>
<td width=70>회원이름 : </td>
<td><input type=text name=sname value='<?=$sname?>' required minlength=2 itemname='회원이름' size=15> <input type=image src='<?=$g4[bbs_img_path]?>/btn_post_search.gif' border=0 align=absmiddle></td>
</tr>
<tr>
<td height=20 colspan=3></td>
</tr>
</table>
<form name=frmid method=get autocomplete=off>
<input type=hidden name=frm_name value='<?=$frm_name?>'>
<input type=hidden name=ss_id value='<?=$ss_id?>'>
<tr>
<td colspan=3>
<table width=100% height=50 border=0 cellpadding=0 cellspacing=0>
<tr>
<td align=center valign=middle bgcolor=#EBEBEB>
<table width=98% height=40 border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=5% align=center bgcolor=#FFFFFF><img src=<?=$g4[bbs_img_path]?>/icon_01.gif width=5 height=5></td>
<td width=35% align=left bgcolor=#FFFFFF><font color=#666666><b><?=$g4[title]?></b></font></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td width=10></td><td height=30 colspan=2 valign=bottom>찾는 이름을 입력하세요. (두글자 이상)</td>
</tr>
<tr>
<td height=20 colspan=3></td>
</tr>
<tr>
<td></td>
<td width=70>회원이름 : </td>
<td><input type=text name=sname value='<?=$sname?>' required minlength=2 itemname='회원이름' size=15> <input type=image src='<?=$g4[bbs_img_path]?>/btn_post_search.gif' border=0 align=absmiddle></td>
</tr>
<tr>
<td height=20 colspan=3></td>
</tr>
</table>
<!-- 검색결과 여기서부터 -->
<script type="text/javascript">
document.frmid.sname.focus();
</script>
<script type="text/javascript">
document.frmid.sname.focus();
</script>
<? if ($search_count > 0) { ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" colspan="2" background="<?=$g4[bbs_img_path]?>/post_dot_bg.gif"></td>
</tr>
<tr>
<td width="10%"></td>
<td width="90%">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td height=23 valign=top>총 <?=$search_count?>건 가나다순</td>
</tr>
<?
for ($i=0; $i<count($list); $i++)
{
echo "<tr><td height=19>
<a href=javascript:setid('{$list[$i]->name}','{$list[$i]->id}')>{$list[$i]->nick}({$list[$i]->name}) - {$list[$i]->id}</a></td></tr>\n";
}
?>
<tr>
<td height=23>[끝]</td>
</tr>
</table>
</tr></form>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" colspan="2" background="<?=$g4[bbs_img_path]?>/post_dot_bg.gif"></td>
</tr>
<tr>
<td width="10%"></td>
<td width="90%">
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td height=23 valign=top>총 <?=$search_count?>건 가나다순</td>
</tr>
<?
for ($i=0; $i<count($list); $i++)
{
echo "<tr><td height=19>
<a href=javascript:setid('{$list[$i]->name}','{$list[$i]->id}')>{$list[$i]->nick}({$list[$i]->name}) - {$list[$i]->id}</a></td></tr>\n";
}
?>
<tr>
<td height=23>[끝]</td>
</tr>
</table>
</tr></form>
</table>
<script type="text/javascript">
function setid(sname, sid)
{
var ov = top.opener.document.<?=$frm_name?>.<?=$ss_id?>.value;
var of = top.opener.document.<?=$frm_name?>.<?=$ss_id?>;
function setid(sname, sid)
{
var ov = top.opener.document.<?=$frm_name?>.<?=$ss_id?>.value;
var of = top.opener.document.<?=$frm_name?>.<?=$ss_id?>;
if(ov.length>0) {
of.value = (sid);
}else{
of.value = sid;
}
of.value = (sid);
}else{
of.value = sid;
}
top.opener.focus();
top.close();
return false;
}
</script>
<? } ?>
top.close();
return false;
}
</script>
<? } ?>
<?
include_once("$g4[path]/tail.sub.php");
?>
include_once("$g4[path]/tail.sub.php");
?>
댓글 전체
휴 대박 소스내~
불당님 존경스럽습니다.... 소스 ㄳㄳ 하게 잘쓸게요...ㅋㅋ 얼룽 고쳐서 써먹어야징
불당님 존경스럽습니다.... 소스 ㄳㄳ 하게 잘쓸게요...ㅋㅋ 얼룽 고쳐서 써먹어야징
지금 스킨이 정상동작은 하는데 popup이 안닫히고 값이 연결안되요. -..-
헉...헉... 문제 고쳐주샴. -..-a 포인트 10,000 걸어뜸돠...
헉...헉... 문제 고쳐주샴. -..-a 포인트 10,000 걸어뜸돠...
뮤죤님. 스킨은 일단 올렸습니다. 그런데 위의 문제는 모르겠네요. 해결해주샴~ㅋㅋ
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=33938
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=33938

현재 본 스킨은 특별하게 공지를 사용할 필요가 없을듯하며 아래 뮤죤님이 말씀하신대로
마이페이지의 1:1 상담 게시판으로 적합합니다....^^
아직 전체적인 테스트를 못해서....ㅠ.ㅠ
마이페이지의 1:1 상담 게시판으로 적합합니다....^^
아직 전체적인 테스트를 못해서....ㅠ.ㅠ

여분필드 wr_5에 회원 아이디가 들어간다는 가정하에
글쓰기 파일에서 아래의 코드로 교체하면 전부 해결이 됩니다.
<!-- 사용자 지정글 -->
<? if ($is_admin) { ?>
<a href=javascript:popup_id('fwrite','wr_5',200,500);>
<span class=w_title>아이디지정</span>
</a>
<INPUT type=text name=wr_5 maxLength=50 size=10 value='<?=$write[wr_5]?>'>
<? } ?>
<!-- 사용자 지정글 -->
글쓰기 파일에서 아래의 코드로 교체하면 전부 해결이 됩니다.
<!-- 사용자 지정글 -->
<? if ($is_admin) { ?>
<a href=javascript:popup_id('fwrite','wr_5',200,500);>
<span class=w_title>아이디지정</span>
</a>
<INPUT type=text name=wr_5 maxLength=50 size=10 value='<?=$write[wr_5]?>'>
<? } ?>
<!-- 사용자 지정글 -->
감사합니다. 원인은 모르겠지만 잘 되네요 ^^

원리는 잘 생각해 보십시요.
오픈된 페이지에 넘겨줄 form name 와 필드명이 누락이되어 에러 상태였기 때문에 안된 겁니다.
<!-- 사용자 지정글 -->
<? if ($is_admin) { ?>
<a href=javascript:popup_id('오픈된 페이지에 넘겨줄 form 이름','넘겨줄필드명',200,500);>
<span class=w_title>아이디지정</span>
</a>
<INPUT type=text name=필드명 maxLength=50 size=10 value='수정시 가져올 데이타'>
<? } ?>
<!-- 사용자 지정글 -->
오픈된 페이지에 넘겨줄 form name 와 필드명이 누락이되어 에러 상태였기 때문에 안된 겁니다.
<!-- 사용자 지정글 -->
<? if ($is_admin) { ?>
<a href=javascript:popup_id('오픈된 페이지에 넘겨줄 form 이름','넘겨줄필드명',200,500);>
<span class=w_title>아이디지정</span>
</a>
<INPUT type=text name=필드명 maxLength=50 size=10 value='수정시 가져올 데이타'>
<? } ?>
<!-- 사용자 지정글 -->
감사합니다. 제가 php를 잘 몰라서 그냥 아무생각없이 편집했는데... 다시 보니까
write.skin.php 앞줄에 ss_id = wr_5 라고 되어 있더라구요. 그것을 ss_id = 'wr_5'
라고 수정하니까 잘 되네요 ^^
php... 참 어렵습니다. -..-
write.skin.php 앞줄에 ss_id = wr_5 라고 되어 있더라구요. 그것을 ss_id = 'wr_5'
라고 수정하니까 잘 되네요 ^^
php... 참 어렵습니다. -..-