/home/mjc1/public_html/html/millennium/ajax.file_download_check.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
<?php include_once("./_common2.php"); ?>
<?php
include("../../manage/category/common.php");

@
extract($_POST);

$mode_ok "Y";

if(
$mode_ok == "Y" && $loginyn == "y") {

    
$user_id $USERID;

    
$sql "SELECT Mcode, Mpassword2 From member WHERE Mid = '{$user_id}'";
    
$res mysql_query($sql);
    
$loginRow mysql_fetch_array($res);

    
$mcode "";

    if(
mysql_num_rows($res) > 0) {
        
$mode_ok "Y";
        
$mcode $loginRow['Mcode'];

    } else {
        
$mode_ok "N";
        
$msg "아이디를 다시 확인해주시기 바랍니다.";
    }

} else if(
$mode_ok == "Y") {

    
$user_id iconv("utf-8","euckr",$user_id);
    
$user_pw iconv("utf-8","euckr",$user_pw);

    
$sql "SELECT Mcode, Mpassword2 From member WHERE Mid = '{$user_id}'";
    
$res mysql_query($sql);
    
$loginRow mysql_fetch_array($res);
    
$checkPass sha1(md5($user_pw));

    
$mcode "";

    if(
mysql_num_rows($res) > 0) {
        if(
$loginRow['Mpassword2'] == $checkPass){
            
$mode_ok "Y";
            
$mcode $loginRow['Mcode'];
        } else {
            
$mode_ok "N";
            
$msg "비밀번호를 다시 확인해주시기 바랍니다.";
        }
    } else {
        
$mode_ok "N";
        
$msg "아이디를 다시 확인해주시기 바랍니다.";
    }
}


echo 
"<?php xml version='1.0' encoding='utf-8'?><output>";
echo 
"<mode>".$mode."</mode>";
echo 
"<mode_ok>".$mode_ok."</mode_ok>";
echo 
"<mcode>".$mcode."</mcode>";
echo 
"<msg>".$msg."</msg>";
echo 
"</output>";
?>