/home/mjc1/public_html/mjmall/include/member/findidpw.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php
include_once("../../_common.php");
?>
<link rel="stylesheet" type="text/css" href="../../css/import.css"/>

<? 
    
if(!isset($_REQUEST['menu'])) $menu "";
    if(!isset(
$_REQUEST['div'])) $div "";
?>

<script language="JavaScript">

function goIdPw(div) {
    if(div == "id") {
        document.frm_findpw.div.value = "id";
        document.getElementById("dv_id").style.display = "none";
        document.getElementById("dv_pw").style.display = "";
        document.frm_findpw.rd_idpw[0].click();
    } else if(div == "pw"){
        document.frm_findpw.div.value = "pw";
        document.getElementById("dv_id").style.display = "";
        document.getElementById("dv_pw").style.display = "none";
        document.frm_findpw.rd_idpw[1].click();
    }
    init();
}

function checkIdpw() {

    if(document.frm_findpw.txt_name.value.trim() == ""){
        alert("¼º¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
        document.frm_findpw.txt_name.focus();
        return;
    }


    if(document.frm_findpw.txt_email.value.trim() == ""){
        alert("°¡ÀÔ´ç½Ã ÀÔ·ÂÇÑ À̸ÞÀÏÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
        document.frm_findpw.txt_email.focus();
        return;
    }


    if(document.frm_findpw.div.value == "pw") {
        if(document.frm_findpw.txt_id.value.trim() == "") {
            alert("¾ÆÀ̵𸦠ÀÔ·ÂÇØÁÖ¼¼¿ä.");
            document.frm_findpw.txt_id.focus();
            return;
        }

        if(!confirm("±âÁ¸ ºñ¹Ð¹øÈ£¸¦ »èÁ¦Çϰí Àӽúñ¹Ð¹øÈ£¸¦ ¹ß¼ÛÇÕ´Ï´Ù\nµ¿ÀÇÇϽʴϱî?")) {
            return;
        }
    }


    if(document.frm_findpw.div.value == "dv_id") {
        if(document.frm_findpw.tel1.value.trim() == "") {
            alert("* ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
            document.frm_findpw.tel1.focus();
            return false;
        }
        
        if(document.frm_findpw.tel2.value.trim() == "") {
            alert("* ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
            document.frm_findpw.tel2.focus();
            return false;
        }
        
        if(document.frm_findpw.tel3.value.trim() == "") {
            alert("* ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
            document.frm_findpw.tel3.focus();
            return false;
        }
    }

    

    frm_findpw.submit();
}

String.prototype.trim = function() {
    return this.replace(/(^\s*)|(\s*$)/g, "");
}
</script>



<style>
.findContainer{ position:relative; width:395px; height:255px;  text-align:center; border:5px solid #777; background:url('../../images/member/login_popup.png') no-repeat; }

.findSection{ width:295px; margin:0 auto; }
.findSection dt{ margin:30px 45px; height:16px; color:#231f20; font-size:13px; line-height:16px; font-weight:600; text-align:center; }
.findSection dt input[type=radio]{ vertical-align:middle; }
.findSection dt label{ cursor:pointer; }
.findSection dt label.first{ margin-right:10px; }
.findSection dd{ display:block; width:295px; margin-bottom:5px; overflow:hidden; }
.findSection dd label{ display:block; float:left; width:60px; height:24px; color:#231f20; line-height:32px; font-size:13px; text-align:center; font-weight:600; overflow:hidden; }
.findSection dd input{ float:left; width:233px; height:24px; padding:3px; font-size:14px; border:1px solid #d3d0cf; }
.findSection dd input#tel{ width:70px; }
.findSection dd span{ display:block; float:left; width:11px; line-height:24px; text-align:center; overflow:hidden; }

.findBtnSection{ position:absolute; left:20px; bottom:30px; width:350px; height:30px; }
.findBtnSection a{ float:left; display:block; width:170px; height:30px;  text-align:center; overflow:hidden; }
.findBtnSection a.findBtn{ margin-right:10px; background:#ff8400; }
.findBtnSection a.closeBtn{ margin-right:0; background: #231f20; }
.findBtnSection a span{ color:#fff; font-size:14px;line-height:30px; font-weight:600; }
</style>

<div class="findContainer">
<form name="frm_findpw" action="findidpw_ok.php" onsubmit="return checkIdpw();">
<input type="hidden" name="div" value="id">

    <dl class="findSection">
        <dt>
            <input type="radio" name="rd_idpw" id="rd_idpw_id" onclick="goIdPw('id')" value="0" checked>
            <label for="rd_idpw_id" class="first">¾ÆÀ̵ð Ã£±â</label>
            <input type="radio" name="rd_idpw" id="rd_idpw_pw" value="1" onclick="goIdPw('pw')">
            <label for="rd_idpw_pw">ºñ¹Ð¹øÈ£ Ã£±â</label>
        </dt>
        <dd id="dv_id" style="display:none">
            <label>¾ÆÀ̵ð</label>
            <input type="text" name="txt_id" size="10">
        </dd>
        <dd>
            <label for="name">¼º¸í</label>
            <input type="text" id="name" name="txt_name" size="10">
        </dd>
        <dd>
            <label for="email">À̸ÞÀÏ</label>
            <input type="text" id="email" name="txt_email" maxlength="30">
        </dd>
        <dd id="dv_pw">
            <label for="tel">¿¬¶ôó</label>
            <input id="tel" name="tel1" type="text" size="3" maxlength="3"><span>-</span>
            <input id="tel" name="tel2" type="text" size="4" maxlength="4"><span>-</span>
            <input id="tel" name="tel3" type="text" size="4" maxlength="4">
        </dd>
    </dl><!-- //findSection -->

    <div class="findBtnSection">
        <input type="hidden" name="frm_findpw" id="frm_findpw" value="<?=$menu?>">
        <a onclick="checkIdpw();" class="findBtn"><span>ã±â</span></a>
        <a onclick="self.close();" class="closeBtn"><span>´Ý±â</span></a>
    </div><!-- //findBtnSection -->

</form>
</div><!-- //findContainer -->

<script language="JavaScript">
function init() {
    document.frm_findpw.txt_id.value = "";
    document.frm_findpw.txt_name.value = "";
    document.frm_findpw.tel1.value = "";
    document.frm_findpw.tel2.value = "";
    document.frm_findpw.tel3.value = "";
}
document.frm_findpw.div.value = "id";
init();
</script>
<script>goIdPw('<?=$div?>');</script>