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

if(!(
strpos($_SERVER['HTTP_REFERER'],'mjsoft.co/html/millennium/customer_satisfaction.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_satisfaction.php';
        </script>
<?
        
exit;
    }

    
//print_r($_POST);

    
if($_POST['smtitle']=='satis-mobile'){
        foreach(
$_POST as $key=>$val){
            
$_POST[$key] =  iconv("utf-8","euckr",$val);
        }
        
extract($_POST);
    }

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

    if(
$smcompany==''){ $smcompany $cinfo['Mcompany']."(".$smname $cinfo['Mname'].")"; }
    if(
$smname==''){ $smname $cinfo['Mname']; }
    
$smcompany $smcompany."(".$smname.")";

    
$reg_date    date('Y-m-d H:i:s',Time());        //»ó´ãÀÏÀÚ

    
$smdetail ""$satis_type_sum "";
    if(
$satis_type=='¸¸Á·'){
        
$smdetail $smdetail1;
        
$satis_type_sum $satis_type;
    } else if(
$satis_type=='ºÒ¸¸Á·'){
        
$smdetail $smdetail2;
        
$satis_type_sum $satis_type;
    } 
    if(
$satis_type2=='ĪÂùÁ÷¿ø'){
        
$smdetail .= chr(10).chr(10)."ĪÂùÁ÷¿ø / °³¼±Á¡ : ".$smdetail3;
        
$satis_type_sum .= " ".$satis_type2;
    }
    if(
$f_motive!=''){
        
$smdetail .= chr(10).chr(10)."Á¦Ç°¼±Åõ¿±â : ".$f_motive;
    }


    if(
$sati_mode=='happy'){
        
/*if($sati01=='ºÒ¸¸Á·½º·´´Ù.'){
            $smdetail = "¸¸Á·¿©ºÎ :  {$sati01}".chr(10).chr(10);
            $smdetail .= "ºÒ¸¸Á·³»¿ë :  {$sati02}".chr(10).chr(10);
            $smdetail .= "±âŸºÒ¸¸Á·»çÀ¯ :  {$smbadetc}";
        } else {
            $smdetail = "¸¸Á·¿©ºÎ :  {$sati01}".chr(10).chr(10);
            $smdetail .= "±âŸºÒ¸¸Á·»çÀ¯ :  {$smbadetc}";
        }*/
        
$smdetail "[{$satis_type}]".chr(10);
        if(
$satis_type=='¸¸Á·'){
            
$smdetail .= "{$smdetail1}".chr(10).chr(10);
        } else {
            
$smdetail .= "{$smdetail2}".chr(10).chr(10);
        }
        
$smdetail .= "[´ç»ç ¼­ºñ½º¿¡ ´ëÇÑ °³¼±Á¡]".chr(10)."{$smbadetc}".chr(10).chr(10);
        
$satis_type "¼­ºñ½º ¸¸Á·µµ";
        
$smcompany $_POST['smcompany'];
        
//$smname = "";
        
$smtel "¼­ºñ½º ¸¸Á·µµ";
    } else {
        
$smtel "°í°´ ¸¸Á·µµ";
    }
    if(
$_POST['smphone']!=''){
        
$smname $smname."<br>(".$_POST['smphone'].")";
    }

    if(
$smetc!=''){
        
$smdetail .= chr(10).chr(10)."[´ç»çÀÇ ¼­ºñ½º¿¡ ´ëÇØ °³¼±ÇÒ Á¡]".chr(10).$smetc;
    }

    if(
$smcompany == '()())') {  
    
?>
        <script>
            alert('´Ù½Ã ÀÛ¼ºÇØÁֽñ⠹ٶø´Ï´Ù.');
            window.history.go(-1);
        </script>
    <?php
        
exit;
    }

    
$insertQry  =  "INSERT INTO mBoard_cus_after set 
                            smcompany = '
{$smcompany}',smhp = '{$cinfo['Mhp']}',smmailaddr = '{$cinfo['Memail']}',
                            /*cus_date = '
{$cus_date}',*/ smname = '{$smname}', smtel = '{$smtel}', smemail = '{$satis_type_sum}', smoption = '{$_POST['smoption']}', smtitle = '{$smdetail}', star = '{$satis_score}', adventage = '{$smbadetc2}',
                            smdetail = '
{$smdetail}', industry_type = '{$industry_type}', reg_date = '{$reg_date}', ipadd = '{$_SERVER['REMOTE_ADDR']}', telname = '{$_COOKIE['USERID']}', state = '0'                            
                        "
;

    

                    
MYSQL_QUERY($insertQry);    
    
    
//echo $insertQry; exit;


if($_POST['smtitle']=='satis-mobile'){
?>
<script>
    alert("»ó´ã¸¸Á·µµµî·ÏÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù. \n\n°í°´´ÔÀÇ ¼ÒÁßÇÑÀǰߠÀû±Ø¹Ý¿µµÇµµ·Ï ³ë·ÂÇϰڽÀ´Ï´Ù.");
    parent.location.href = "http://<?php echo $_SERVER['SERVER_NAME'];?>/html/m";
</script>
<?php
} else {
?>
<script>
    alert("»ó´ã¸¸Á·µµµî·ÏÀÌ ¿Ï·áµÇ¾ú½À´Ï´Ù. \n\n°í°´´ÔÀÇ ¼ÒÁßÇÑÀǰߠÀû±Ø¹Ý¿µµÇµµ·Ï ³ë·ÂÇϰڽÀ´Ï´Ù.");
    parent.location.href = "http://<?php echo $_SERVER['SERVER_NAME'];?>/html/millennium/intro.php";
</script>
<?php
}
?>

<script>
</script>