전화번호 뒷자리를 게시판 비밀번호로 넣는 방법

전화번호 뒷자리를 게시판 비밀번호로 넣는 방법

QA

전화번호 뒷자리를 게시판 비밀번호로 넣는 방법

답변 1

본문



<?
$g4_path = "/"; // 그누보드가 있는 상대경로를 적어줌
?>
<script>
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 
</script>
<style>
span.customStyleSelectBox{
 font-size:11px;
 background-color:#ffffff;
 color:#5F5F5F;
 border:1px solid #e8e8e8; height:24px;
 background:url('images/selectbox.gif') no-repeat center right;
 text-align:left;
}
span.customStyleSelectBox.changed{
 background-color: #ffffff;
}
.customStyleSelectBoxInner{
 font-size:11px;
 letter-spacing:-1px;
 white-space:nowrap;
}
.customStyleSelectBorderStrong{
 border-color:#000000;
}
</style>
<script>
(function($){
 $.fn.extend({
  customStyle : function(options) {
   if(!$.browser.msie || ($.browser.msie&&$.browser.version>6)){
   return this.each(function() {
   var currentSelected = $(this).find(':selected');
    $(this).after('<span class="customStyleSelectBox"><span class="customStyleSelectBoxInner">'+currentSelected.text()+'</span></span>').css({position:'absolute', opacity:0,fontSize:$(this).next().css('font-size')});
   var selectBoxSpan = $(this).next();
   var selectBoxWidth = parseInt($(this).width()) - parseInt(selectBoxSpan.css('padding-left')) -parseInt(selectBoxSpan.css('padding-right'));   
   var selectBoxSpanInner = selectBoxSpan.find(':first-child');
    selectBoxSpan.css({display:'inline-block'});
    selectBoxSpanInner.css({width:selectBoxWidth, display:'inline-block'});
   var selectBoxHeight = parseInt(selectBoxSpan.height()) + parseInt(selectBoxSpan.css('padding-top')) + parseInt(selectBoxSpan.css('padding-bottom'));
    $(this).height(selectBoxHeight).change(function(){
    selectBoxSpanInner.text($(this).find(':selected').text()).parent().addClass('changed');
   });
   });
   }
 }
 });
})(jQuery);
$(function(){
 $('select').customStyle();
});
</script>

<link rel="stylesheet" type="text/css" href="css/mobile.css">
    <form name=frm method=post onsubmit="return submitChk(this)">
   <input type=hidden name=w        value="">
   <input type=hidden name=bo_table value="online">
   <input type=hidden name=wr_id    value="">
   <input type=hidden name=sca      value="">
   <input type=hidden name=sfl      value="">
   <input type=hidden name=stx      value="">
   <input type=hidden name=spt      value="">
   <input type=hidden name=sst      value="">
   <input type=hidden name=sod      value="">   
   <input type=hidden name=secret value='secret'>
   <input type=hidden name=s    value="s">
   <input type=hidden name=wr_subject  value="모바일 상담을 신청 하셨습니다.">
   <input type=hidden name=wr_key    value="<?=$norobot_key?>"> 
   <input type=hidden name=page     value="<?=$page?>">
    <div id="quck_list">
    <ul>
        <li><p class="m_quick_dep"></p><span>이름</span>
          <input class='ed' name=wr_name itemname="이름" required value="<?=$name?>" style=" border:solid 1px; border-color:#e8e8e8; width:140px; height:24px; line-height:27px; margin-left:24px; " />
        </li>
        <li><p class="m_quick_dep"></p><span>전화번호</span>
        <select  name="wr_1" itemname='연락처' required="required" style="width:50px; height:10px;" value="<?=$write[wr_1]?>">
        <option value='010' <? if($write[wr_1] =="010") echo "selected"; ?>>010</option>
        <option value='011' <? if($write[wr_1] =="011") echo "selected"; ?>>011</option>
        <option value='016' <? if($write[wr_1] =="016") echo "selected"; ?>>016</option>
        <option value='017' <? if($write[wr_1] =="017") echo "selected"; ?>>017</option>
        <option value='018' <? if($write[wr_1] =="018") echo "selected"; ?>>018</option>
        <option value='019' <? if($write[wr_1] =="019") echo "selected"; ?>>019</option>
        </select>-<input size="4" name='wr_2' required="required" value="<?=$write[wr_2]?>" type="text" style="border:solid 1px; border-color:#e8e8e8; width:40px;height:24px;" maxlength="4" />-<input name='wr_3' required="required" value="<?=$write[wr_3]?>" type="text" style="border:solid 1px; border-color:#e8e8e8; width:40px; height:24px;" maxlength="4" />
        
   </li>
        </ul>
    </div>
    
    <div id="quck_bt">
    <input type="image" src="images/m_quick_bg.gif" alt="빠른상담" />
    </div>
    
    <div class="quick_text_from">
    <textarea  id="txtuserid"  type="text" class="main_quick_fom" name='wr_content' style=" border:solid 1px; border-color:#e8e8e8; background-color:#fff; width:312px; height:69px; padding-left:6px; padding-top:6px;"  placeholder="이부분을 터치 하여 상담내용을 적어주시면 전문 상담원이 전화 상담을 해드립니다."value="<?=$content?>"></textarea>
    </div>
    </form>
    
    
    
<script language="javascript">
function submitChk(frm)
{
    if(!frm.wr_1.value)
          {
                 alert("핸드폰 앞자리를 선택하세요.");
                 return false;
          }
    if(!frm.wr_2.value)
          {
                 alert("핸드폰 중간자리를 입력하세요.");
                 return false;
          }
          if(!frm.wr_3.value)
          {
                 alert("핸드폰 마지막자리를 입력하세요.");
                 return false;
          }
          frm.action = "/bbs/write_update_quick.php";
          frm.method = "post";
//          frm.submit();
}
</script>
    




소스가 좀 길어서 저도 질문드리기가 좀 민망하지만, 궁금증 여쭙니다..

위 소스는 온라인상담 게시판과 연결해서 사용하는 실시간상담 폼 입니다. left menu 밑에나 footer에

고정으로 폼을 넣고 모든 페이지에서 빠른상담을 유도하는 것인데요.


이곳에 상담을 남기면, 온라인상담 게시판에 입력이 되게 됩니다.

하지만 문제가,, 비회원 글을 쓰면 비밀번호를 넣는 곳이 없어서 본인 글을 확인 할 수 가 없다는 것입니다.


<input name='wr_3' required="required" value="<?=$write[wr_3]?>" type="text" style="border:solid 1px; border-color:#e8e8e8; width:40px; height:24px;" maxlength="4" />


그래서 혹시,, 위 소스가 전화번호 뒷4자리를 입력하는 부분인데요.

wr_3 에 입력된 숫자 4자리가 비밀번호로 설정 되도록 할 수 있을까요?


온라인상담 게시판 스킨도 좀 만져보고 위 소스도 좀 만져 봤는데. 제 실력으로는 어려워서

질문 남깁니다~ 한수 부탁드립니다~


좋은 하루되세요~






이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 125,873
© SIRSOFT
현재 페이지 제일 처음으로