/home/mjc1/public_html/html/findidpw_ok_오후수정.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
<link href="..//css/style.css" rel="stylesheet" type="text/css">
<div class="txt03" align="center" style="margin-top:50px">
<?
    
include("../manage/category/common.php");

//    $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.'trim' == "") return;
        if(
$txt_name.'trim' == "") return;
        
//if($txt_jumin1.trim == "") return;
        //if($txt_jumin2.trim == "") return;
        
if($tel1.'trim' == "") return;
        if(
$tel2.'trim' == "") return;
        if(
$tel3.'trim' == "") 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' AND Mtel1 = '$tel_text' ";    
        
$strSql_email " SELECT Memail FROM member WHERE Mid = '$txt_id' AND Mname = '$txt_name' AND Memail = '$txt_email' AND Mtel1 = '$tel_text'";
    }

    
$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' AND Mtel1 = '$tel_text' ";

            
//echo $strupd_Sql;
             
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).trim// ¸ÞÀÏÁÖ¼Ò
                
if($mail_address != ""$isSendMail true;
            }
        }
    }

    
$val = @mysql_result($result,0,0); // ¾ÆÀ̵ð

    
if($div == "id")
    {
        echo 
"ȸ¿ø´ÔÀÇ ¾ÆÀ̵ð´Â [ $val ] ÀÔ´Ï´Ù.
            <br><br>
            <img src='./millennium/img/login/return_bt.jpg' onclick='location.href=\"findidpw.php?div=
$div\"' style='cursor:pointer;' border='0' align='absmiddle'> &nbsp; <img src='./millennium/img/login/find_pw_bt.jpg' onclick='location.href=\"findidpw.php?div=pw\"' style='cursor:pointer;' border='0' align='absmiddle'> &nbsp; <img src='./millennium/img/login/close_bt.jpg' onclick='self.close();' style='cursor:pointer;' border='0' align='absmiddle'>";

    }
    else if(
$div == "pw")
    {
      
     
//$result_pw =mysql_query("SELECT Memail FROM member WHERE Mid = '$txt_id' AND Mname = '$txt_name' AND Mjumin = '$txt_jumin' AND Mtel1 = '$tel_text'");
     //$row  =  mysql_fetch_array($result_pw); 


        /*
       $headers    =   "From: mjc1@mijinsoft.co.kr\r\n";
       $headers   .=   "MIME-Version: 1.0\r\n";
       $boundary   =   uniqid("HTMLDEMO");
       $headers    .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";
       $body = "--$boundary\r\n" .
             "Content-Type: text/html; charset=ISO-8859-1\r\n" .
             "Content-Transfer-Encoding: base64\r\n\r\n";
       $body .= chunk_split(base64_encode("ȸ¿ø´ÔÀÇ <b>ºñ¹Ð¹øÈ£</b>´Â '$val' ÀÔ´Ï´Ù.  - °¨»çÇÕ´Ï´Ù.-"));

        mail( $row[0] , "[¹ÌÁø¼ÒÇÁÆ®] ºñ¹Ð¹øÈ£Ã£±â °á°úÀÔ´Ï´Ù", $body, $headers); 
        //if( $isSendMail ) @mail($mail_address, "[¹ÌÁø¼ÒÇÁÆ®] ºñ¹Ð¹øÈ£Ã£±â °á°úÀÔ´Ï´Ù.", $body );
        */

  
$headers "Return-Path: mjc1@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($row[0],"[¹ÌÁø¼ÒÇÁÆ®] ºñ¹Ð¹øÈ£Ã£±â °á°úÀÔ´Ï´Ù",$memo,$headers);
  
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;?> ]&nbsp;¸ÞÀÏ·Î
        <br>ºñ¹Ð¹øÈ£ Á¤º¸¸¦ º¸³»µå·È½À´Ï´Ù.
<?
    
}
?>
        </td>
    </tr>
    <tr>
        <td align="center" style="padding-top:10px;">
            <img src="./millennium/img/login/close_bt.jpg" onclick="self.close();" style="cursor:pointer;" border="0" align="absmiddle">
        </td>
    </tr>
</table>

<?    
    
}
?>
</div>