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

if(!(
strpos($_SERVER['HTTP_REFERER'],'mjsoft.co/html/millennium/customer_recommend.php')>0)){ // 레퍼러 체크
    //exit;
}

/*print_r($_SESSION); 
print_r($_POST); 
exit;*/

    
header('Content-Type: text/html; charset=euc-kr');

        if(
$_SESSION['captcha']['code']!=$_POST['captcha_input']){ 
?>
            <script>
                alert('스팸방지보안이 입력이 틀렸습니다.<?php echo $_SESSION['captcha']['code_ck'];?>'); window.history.go(-1);
            </script>
<?php
            
exit;
        }


    if(
$_COOKIE['USERID']=='' && 1==2){
?>
        <script>
            alert('로그인하셔야 이용 가능합니다.');
            document.location.href='logingo.php?url=customer_recommend.php';
        </script>
<?
        
exit;
    }

    
//print_r($_POST);

    
extract($_POST);

    if(
$_COOKIE['USERID']!=''){
        
$sql "select * from member where Mid = '{$_COOKIE['USERID']}' ";
        
$res mysql_query($sql);
        
$cinfo mysql_fetch_array($res);
    }

    if(
$intro_company==''){ $intro_company $cinfo['Mcompany']; }
    if(
$intro_name==''){ $intro_name $cinfo['Mname']; }

    
$reg_date    date('Y-m-d H:i:s',Time());

    
$intro_tel $intro_tel1."-".$intro_tel2."-".$intro_tel3;
    
$recom_tel $recom_tel1."-".$recom_tel2."-".$recom_tel3;

    
$plus "";

    if(
$type == 'mobile'){
        
$intro_company iconv('UTF-8''EUC-KR'$intro_company);
        
$intro_name iconv('UTF-8''EUC-KR'$intro_name);
        
$intro_prod iconv('UTF-8''EUC-KR'$intro_prod);
        
$recom_company iconv('UTF-8''EUC-KR'$recom_company);
        
$recom_name iconv('UTF-8''EUC-KR'$recom_name);
        
$recom_result iconv('UTF-8''EUC-KR'$recom_result);
    }
    if(
$event_type != "") {
        
$plus ", type = '{$event_type}'";
    }

    
$text iconv('UTF-8''EUC-KR'"이벤트 신청이 완료되었습니다.");

    
$insertQry  =  "INSERT INTO mBoard_cus_recommend set 
                            intro_company = '
{$intro_company}',intro_name = '{$intro_name}', intro_tel = '{$intro_tel}', intro_prod = '{$intro_prod}',
                            recom_company = '
{$recom_company}', recom_name = '{$recom_name}', recom_tel = '{$recom_tel}', recom_result = '{$recom_result}',
                            reg_date = '
{$reg_date}', id = '{$_COOKIE['USERID']}', flg = {$flg} {$plus}
                        "
;

    
mysql_query($insertQry);    
    
    
//echo $insertQry; exit;
?>
<script>
    var text = "<?php echo $text?>";
    alert(text);
    parent.location.href = "http://<?php echo $_SERVER['SERVER_NAME'];?>/html/millennium/intro.php";
</script>