그누보드 [G4] 메일 입력시 아이디와 도메인을 나누어 입력하기
페이지 정보
본문
[ 회원가입신청폼 ]
skin/member/스킨명/register_form.skin.php 을 수정
<input type=hidden name='old_email' value='<?=$member[mb_email]?>' />
<tr bgcolor="#FFFFFF">
<td class=m_title><label for="mb_email1">E-mail</label></td>
<td class='m_padding lh'>
<input type='hidden' name='mb_email' />
<input class=m_text type=text name='mb_email1' id="mb_email1" size="10" maxlength="100" required itemname='E-mail 계정아이디'
onblur="document.fregisterform.mb_email.value = document.fregisterform.mb_email1.value+'@'+document.fregisterform.mb_email2.value">
@
<input class="m_text" type=text name='mb_email2' size=20 maxlength=100 required itemname='E-mail 도메인'
onblur="document.fregisterform.mb_email.value = document.fregisterform.mb_email1.value+'@'+document.fregisterform.mb_email2.value">
<select name='email_domain_select'
onchange="if (this.value) document.fregisterform.mb_email2.value = this.value;"
onblur="document.fregisterform.mb_email.value = document.fregisterform.mb_email1.value+'@'+document.fregisterform.mb_email2.value">
<option value=''>직접입력</option>
<option value="dreamwiz.com">dreamwiz.com</option>
<option value="empal.com">empal.com</option>
<option value="gmail.com">gamil.com</option>
<option value="hanmail.net">hanmail.net</option>
<option value="hanmir.com">hanmir.com</option>
<option value="hotmail.com">hotmail.com</option>
<option value="korea.com">korea.com</option>
<option value="lycos.co.kr">lycos.co.kr</option>
<option value="msn.com">msn.com</option>
<option value="nate.com">nate.com</option>
<option value="naver.com">naver.com</option>
<option value="paran.com">paran.com</option>
<option value="yahoo.co.kr">yahoo.co.kr</option>
</select>
<a href="javascript:mb_email_check();"><img width="70" height="20" src="<?=$member_skin_path?>/img/join_check_btn.gif" border="0" align="absmiddle" alt="메일체크" /></a>
<? if ($config[cf_use_email_certify]) { ?>
<? if ($w=='') { echo "<br>E-mail 로 발송된 내용을 확인한 후 인증하셔야 회원가입이 완료됩니다."; } ?>
<? if ($w=='u') { echo "<br>E-mail 주소를 변경하시면 다시 인증하셔야 합니다."; } ?>
<? } ?>
</td>
</tr>
[ 게시판 글쓰기 ]
(1) 스킨/write.skin.php 에서 코드 변경
<? if ($is_email) { ?>
<tr>
<td style='padding-left:20px; height:30px;'><label for="mb_email1">· 이메일</label></td>
<td>
<? if ($email == "" && $is_guest) { ?>
<input class="hp_skin_field" type="text" name='mb_email1' id="mb_email1" size="10" maxlength="100" itemname='E-mail 계정아이디' onblur="document.fwrite.mb_email.value=document.fwrite.mb_email1.value+'@'+document.fwrite.mb_email2.value" />
@
<select name='email_domain_select'
onchange="if (this.value) document.fwrite.mb_email2.value=this.value;"
onblur="document.fwrite.mb_email.value=document.fwrite.mb_email1.value+'@'+document.fwrite.mb_email2.value">
<option value=''>직접입력</option>
<option value="dreamwiz.com">dreamwiz.com</option>
<option value="empal.com">empal.com</option>
<option value="gmail.com">gamil.com</option>
<option value="hanmail.net">hanmail.net</option>
<option value="hanmir.com">hanmir.com</option>
<option value="hotmail.com">hotmail.com</option>
<option value="korea.com">korea.com</option>
<option value="lycos.co.kr">lycos.co.kr</option>
<option value="msn.com">msn.com</option>
<option value="nate.com">nate.com</option>
<option value="naver.com">naver.com</option>
<option value="paran.com">paran.com</option>
<option value="yahoo.co.kr">yahoo.co.kr</option>
</select>
<input class="hp_skin_field" type="text" name='mb_email2' size="20" maxlength="100" itemname='E-mail 도메인' onblur="document.fwrite.mb_email.value=document.fwrite.mb_email1.value+'@'+document.fwrite.mb_email2.value" />
<? } else { ?>
<input class='hp_skin_field' maxlength="100" size="50" name="wr_email" title="이메일" value="<?=$email?>" />
<? } ?>
</td></tr>
<tr><td colspan="2" height="1" bgcolor="#e7e7e7"></td></tr>
<? } ?>
(2) 스킨/write_update.skin.php 에 아래 코드 추가
if ($w == "" && $is_guest) {
$wr_email = $mb_email1 ."@". $mb_email2;
}
$sql_mail = " update $write_table set wr_email = '$wr_email' where wr_id = '$wr_id' ";
sql_query($sql_mail);
참고자료
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=16318
http://sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=141126
댓글목록
등록된 댓글이 없습니다.