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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
<?php include_once("./_common2.php"); ?> <html> <head> <link href="./css/style.css" rel="stylesheet" type="text/css"> </head>
<body style="background:#FFF;"> <div class="txt03" align="center" style="padding-top:60px;">
<? include("../../manage/category/common.php");
if (!isset($change_pass)) $change_pass = ""; if (!isset($html)) $html = ""; if (!isset($header)) $header = "";
// $div = $_POST["div"]; // $txt_id = $_POST["txt_id"]; // $txt_name = $_POST["txt_name"]; // $txt_jumin = $txt_jumin2;
$tel_text = $tel1."-".$tel2."-".$tel3;
if($div == "id" || $div == "pw") { if($div == "pw") if($txt_id == "") return; //if($txt_name.trim == "") return; if($txt_name == "") return; //if($txt_jumin1.trim == "") return; //if($txt_jumin2.trim == "") 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 Mjumin = '$txt_jumin' AND Mtel1 = '$tel_text'"; //$strSql_email = " SELECT Memail FROM member WHERE Mname = '$txt_name' AND Mjumin = '$txt_jumin' AND Mtel1 = '$tel_text'"; $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'"; // echo $strSql; } else if($div == "pw") //ºñ¹Ð¹øÈ£ ¼±Åýà { //$strSql = " SELECT Mid FROM member WHERE Mid = '$txt_id' AND Mname = '$txt_name' AND Mjumin = '$txt_jumin' AND Mtel1 = '$tel_text' "; //$strSql_email = " SELECT Memail FROM member WHERE Mid = '$txt_id' AND Mname = '$txt_name' AND Mjumin = '$txt_jumin' AND Mtel1 = '$tel_text'"; $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 Mjumin = '$txt_jumin' AND Mtel1 = '$tel_text' "; $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'";
//echo $strupd_Sql; mysql_query($strupd_Sql); } else { $result_sql = mysql_query($strSql_email); if(@mysql_num_rows($result_mail) != 1) { //$mail_address = trim(@mysql_result($result_sql,0,0)); // ¸ÞÀÏÁÖ¼Ò $mail_address = @mysql_result($result_sql,0,0); if($mail_address != "") $isSendMail = true; } } }
$val = @mysql_result($result,0,0); // ¾ÆÀ̵ð
if($div == "id") { echo "ȸ¿ø´ÔÀÇ ¾ÆÀ̵ð´Â <b>[ $val ]</b> ÀÔ´Ï´Ù. <div style='margin-top:50px;'><img src='./img/login/return_bt.jpg' onclick='location.href=\"findidpw.php?div=$div\"' style='cursor:pointer;' border='0' align='absmiddle'> <img src='./img/login/find_pw_bt.jpg' onclick='location.href=\"findidpw.php?div=pw\"' style='cursor:pointer;' border='0' align='absmiddle'> <img src='./img/login/close_bt.jpg' onclick='self.close();' style='cursor:pointer;' border='0' align='absmiddle'></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"; $headers .= "Content-Type: text/html;";
//2015-03-23 ±èÁØÇ¥ Àӽúñ¹Ð¹øÈ£¸¦ À̸ÞÀÏ·Î Àü¼ÛÇØÁÖ¸é¼ ÇØ´ç¾ÆÀ̵ð·Î ÀÚµ¿ ·Î±×ÀÎ ÈÄ ³» Á¤º¸ ¼öÁ¤Ã¢À¸·Î ¹Ù·Î °¥¼ö ÀÖµµ·Î °³¼± #3204 ±Çâ±Ô //¸ÞÀÏÇü½ÄÀ» ¹«Á¶°Ç Content-Type: text/html; ·Î ÇÔ $memo = " <html> <head> <meta charset='UTF-8'> <title>[¿¥Á¦À̼ÒÇÁÆ®] ºñ¹Ð¹øÈ£Ã£±â °á°úÀÔ´Ï´Ù</title> </head> <body> <form name='mloginFrm' method='post' target='login_ifm' action='http://mjsoft.co/html/millennium/loginProcess.php' onsubmit='inputSendit();'> <table> <tr> <td> <p>ȸ¿ø´ÔÀÇ Àӽúñ¹Ð¹øÈ£´Â [ '$change_pass' ] ÀÔ´Ï´Ù. - °¨»çÇÕ´Ï´Ù.- </p> </td> </tr> <tr> <td> </td> </tr> <tr> <td> <input type='hidden' name='menugo' id='menugo' value='2'> <input type='hidden' name='id' id='id' value='$txt_id'> <input type='hidden' name='passwd' id='passwd' value='$change_pass'> <input type = 'submit' style='color:red; width:100%; font-weight:bold; font-size:14pt;' value = 'ºñ¹Ð¹øÈ£ º¯°æ ¹Ù·Î°¡±â'> </td> </tr> </table> </form> </body> </html>";
mail($txt_email,"[¿¥Á¦À̼ÒÇÁÆ®] ºñ¹Ð¹øÈ£Ã£±â °á°úÀÔ´Ï´Ù",$memo,$headers); ?> <table width="350" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="60" class="txt03" align="center"> <? //if ($row[0]=="") { if ($txt_email=="") { ?> ȸ¿ø´ÔÀº °¡ÀÔ´ç½Ã ¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇÏÁö ¾ÊÀ¸¼Ì½À´Ï´Ù. <br>¿¥Á¦À̼ÒÇÁÆ® °í°´¼¾ÅÍ 1566-8680À¸·Î ¿¬¶ô Áֽñ⠹ٶø´Ï´Ù. <? } else { ?> ȸ¿ø´ÔÀÌ °¡ÀÔ´ç½Ã ÀÔ·ÂÇϽÅ<br>[ <?=$txt_email;?> ] ¸ÞÀÏ·Î <br>ºñ¹Ð¹øÈ£ Á¤º¸¸¦ º¸³»µå·È½À´Ï´Ù. <? } ?> </td> </tr> <tr> <td align="center" style="padding-top:10px;"> <img src="./img/login/close_bt.jpg" onclick="self.close();" style="cursor:pointer;" border="0" align="absmiddle"> </td> </tr> </table>
<? } ?>
</div> </body> </html>
|