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
|
<?php include_once("../../_common.php"); ?> <link rel="stylesheet" type="text/css" href="../../css/import.css"/>
<style> .findContainer{ position:relative; width:395px; height:255px; text-align:center; border:5px solid #777; background:url('../../images/member/login_popup.png') no-repeat; }
.idResult{ margin-top:60px; width:100%; font-size:14px; text-align:center; } .idResult p{ height:19px; line-height:19px; } .idBtn{ position:absolute; left:20px; bottom:70px; width:350px; height:30px; } .idBtn a, .pwBtn a{ float:left; display:block; margin-right:10px; width:110px; height:30px; color:#fff; font-size:13px; text-align:center; line-height:30px; font-weight:600; overflow:hidden; } .idBtn a.backBtn{ background: #231f20; } .idBtn a.findpwBtn{ background:#ff8400; } .idBtn a.closeBtn, .pwBtn a.closeBtn{ margin-right:0; background:#999; } .pwBtn{ position:absolute; left:140px; bottom:50px; width:110px; height:30px; } </style>
<div class="findContainer">
<? include("../common.php");
if (!isset($change_pass)) $change_pass = ""; if (!isset($html)) $html = ""; if (!isset($header)) $header = "";
$tel_text = $tel1."-".$tel2."-".$tel3;
if($div == "id" || $div == "pw"){ if($div == "pw") if($txt_id == "") return; if($txt_name == "") return; if ($div == "id") { if($tel1 == "") return; if($tel2 == "") return; if($tel3 == "") return; } } else { return; }
if($div == "id") { $strSql = " SELECT Mid FROM member WHERE Mname = '$txt_name' AND Memail = '$txt_email' AND Mtel1 = '$tel_text'"; $strSql_email = " SELECT Memail FROM member WHERE Mname = '$txt_name' AND Memail = '$txt_email' AND Mtel1 = '$tel_text'";
} else if($div == "pw") { //ºñ¹Ð¹øÈ£ ¼±ÅýÃ
$strSql = " SELECT Mid FROM member WHERE Mid = '$txt_id' AND Mname = '$txt_name' AND Memail = '$txt_email'"; $strSql_email = " SELECT Memail FROM member WHERE Mid = '$txt_id' AND Mname = '$txt_name' AND Memail ='$txt_email'"; }
$isSendMail = true; // ¸ÞÀÏ º¸³¾°ÍÀÎÁö ¿©ºÎ
$result = mysql_query($strSql); if(@mysql_num_rows($result) == "") { echo " <script>alert('ÀÏÄ¡ÇÏ´Â Á¤º¸°¡ ¾ø½À´Ï´Ù.'); location.href=\"findidpw.php?div=$div\";</script>"; return; } else { if($div == "pw") { $pass_array = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'k','m', 'n', 'p', 'x', 'y', 'z', '2', '3', '4', '5', '6', '7', '8', '9');
for($i = 0; $i < 11; $i++){ $rand_num = array_rand($pass_array); $change_pass .= $pass_array[$rand_num]; } $secret_pass = sha1(md5($change_pass)); $changeDate = DATE("Ymd"); //¿À´Ã³¯Â¥
$strupd_Sql = " UPDATE member SET Mpassword = '$change_pass' , Mpassword2 = '$secret_pass' , MpassDate = '$changeDate' WHERE Mid = '$txt_id' AND Mname = '$txt_name' AND Memail = '$txt_email'";
mysql_query($strupd_Sql); } else { $result_sql = mysql_query($strSql_email); if(@mysql_num_rows($result_mail) != 1) { $mail_address = @mysql_result($result_sql,0,0); if($mail_address != "") $isSendMail = true; } } }
$val = @mysql_result($result,0,0); // ¾ÆÀ̵ð
if($div == "id"){ echo " <div class='idResult'>ȸ¿ø´ÔÀÇ ¾ÆÀ̵ð´Â <b>[ $val ]</b> ÀÔ´Ï´Ù.</div>
<div class='idBtn'> <a onclick='location.href=\"findidpw.php?div=$div\"' class='backBtn'>ÀÌÀüÀ¸·Î</a> <a onclick='location.href=\"findidpw.php?div=pw\"' class='findpwBtn'>ºñ¹Ð¹øÈ£ ã±â</a> <a onclick='self.close();' class='closeBtn'>´Ý±â</a> </div>";
} else if($div == "pw") {
$headers = "Return-Path: mj@mijinsoft.co.kr\n"; $headers .= "From: ¿¥Á¦À̼ÒÇÁÆ® <mjc1@mijinsoft.co.kr>\n"; $headers .= "Reply-to: mjc1@mijinsoft.co.kr\n"; if($html) $headers .= "Content-Type: text/html;"; else $header .= "Content-Type: text/plain;"; if($html) $memo=nl2br("ȸ¿ø´ÔÀÇ Àӽúñ¹Ð¹øÈ£´Â '$change_pass' ÀÔ´Ï´Ù. ·Î±×ÀÎ ÈÄ »õ ºñ¹Ð¹øÈ£·Î ¼öÁ¤ÇØ ÁÖ¼¼¿ä. - °¨»çÇÕ´Ï´Ù.-"); $memo = "ȸ¿ø´ÔÀÇ Àӽúñ¹Ð¹øÈ£´Â [ '$change_pass' ] ÀÔ´Ï´Ù. ·Î±×ÀÎ ÈÄ »õ ºñ¹Ð¹øÈ£·Î ¼öÁ¤ÇØ ÁÖ¼¼¿ä. - °¨»çÇÕ´Ï´Ù.-";
mail($txt_email,"[¿¥Á¦À̸ô] ºñ¹Ð¹øÈ£Ã£±â °á°úÀÔ´Ï´Ù.",$memo,$headers);
?>
<div class="idResult"> <p>ȸ¿ø´ÔÀÌ °¡ÀÔ´ç½Ã ÀÔ·ÂÇϽÅ</p> <p><b>[ <?=$txt_email;?> ]</b></p> <p>¸ÞÀÏ·Î Àӽà ºñ¹Ð¹øÈ£¸¦ º¸³»µå·È½À´Ï´Ù.</p> <p>·Î±×ÀÎ ÈÄ ¹Ýµå½Ã »õ ºñ¹Ð¹øÈ£·Î º¯°æÇØ ÁÖ¼¼¿ä.</p> </div><!-- //idResult -->
<div class="pwBtn"> <a onclick="self.close();" class="closeBtn">´Ý±â</a> </div>
<? } ?>
</div><!-- //findContainer -->
|