/home/mjc1/public_html/html/m/customer_satisfaction.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
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
<? 
include("./include/header.php"); 

$ipaddr getenv("REMOTE_ADDR");  
$h date("H",time());
set_session("nomem_hash".$h$_SERVER['REMOTE_ADDR']);
set_session("nomem_hash_h"$h);

?>
<script src="http://dmaps.daum.net/map_js_init/postcode.v2.js"></script>
<script src="http://mattstow.com/experiment/responsive-image-maps/jquery.rwdImageMaps.min.js"></script>
</div>
<style>
.office_title{background:url('./images/order/customer_satis_tit_m.png') center no-repeat;background-size:100%;text-align:center;padding:40px 0;}
.office_ft{height:310px;}
.office_ft{background:url('./img/customer/board_title/customer_edc_ft.png') center  no-repeat;}

.wrap {font-family:'gs',sans-serif;margin-top:25px;}
.saf_layout{text-align:center;padding:20px 0;}
.saf_table table{margin-bottom:20px;}
.saf_tit{display:inline-block;margin-bottom:20px;line-height: 24px;}
.saf_tit h4{float:left;color:#0071e4;font-size:17px;font-weight:600;}
.saf_tit h4:before{content:'●';font-size:12px;position:relative;top:-2px;margin-right:5px;}
.saf_tit p{float:left;text-align:left;font-size:16px;}
.saf_layout em {font-weight:600;color:#0071e5;font-family:'gs',sans-serif;}
.saf_tit span{font-weight:600}
.saf_table{width:100%;margin:0 auto;}
.saf_table table { border-top:1px solid #ccc;border-bottom:1px solid #ccc;}
.saf_table .saf_table_tit{background:#dae9ff;font-weight:600;font-size:16px;text-align:center;padding-left:0;}
.saf_table table tbody tr th{color:#3d3d3d;text-align:left;vertical-align:top;height:45px;padding-left:20px;font-size:24px;font-weight:600;font-family:'gs',sans-serif;}
.saf_table table tbody tr th div {vertical-align:middle;}
.saf_table table tbody tr th div p {font-family:'gs',sans-serif;margin-top:6px;display:inline-block;}
.saf_table table tbody tr td{text-align:left;vertical-align:middle;height:45px;padding-left:20px;padding-right: 20px;font-size:14px;font-weight:600;}
.saf_table table th, .saf_table table td{height:45px;padding:20px 0;}
.saf_table table tbody tr td input{font-size:16px;border:2px solid #ccc;background-color:#f2f2f2;padding:10px;border-radius:5px;width:78%;box-sizing:border-box;}
.saf_table .saf_tel td input{width:63px;margin-right:0;font-size:14px;}
.saf_table .saf_tel td span{margin:0 10px;font-size:12px;}
.saf_table .saf_date td input{width:1em;margin-right:0;}
.saf_table .saf_date td span{margin:0 10px;}
.saf_table .zip_search {height:32px;width:82px;line-height:32px;margin-right:10px;background:#0071e5;color:#fff;border:none;border-radius:5px;font-weight:600;cursor:pointer;}

.saf_table textarea {width:-webkit-fill-available;resize:none;font-size:16px;border:2px solid #ccc;background-color:#f2f2f2;height:40px;min-height:40px;border-radius:5px;padding:10px;vertical-align:top;font-family:'gs',sans-serif;}
.radio_p {clear: both; overflow: hidden; padding: 0;margin-top:20px;margin-bottom:10px;}
.radio_p:first-child {margin-top:0;}
.radio_p.last { margin-bottom: 0; }
.radio_p img {width:2em;}
.radio_p label { display: block; float: left; cursor: pointer; vertical-align: top; width: 26px; height: 26px;}
.radio_p label .icon.radio { display: block; width: 26px; height:26px; background: url('./images/order/check_btn.png') no-repeat -26px 0; }
.radio_p.checked label .icon.radio { background-position: 0px 0px; }
.radio_p .radioText { float: left; margin: 2px 26px 0 4px; vertical-align:middle; position:top; font-size:1.2em;font-family:'gs',sans-serif;line-height:1.5;}
.label_s {display:inline-block;width:20%;padding:0 15px;box-sizing:border-box;text-align:center;}

.tieupAgree{width:1100px;margin:0 auto;border-top:0;position:relative;display:inline-block;}
.tieupAgree h2{text-align:left;font-size:16px;color:#000;}
.tieupAgree h2 span{font-size:12px;font-weight:400;}
.tieupAgree p{float:right;text-align: right;}
.tieupAgree textarea {width:1075px;margin:0 auto;margin-top:10px;}
.privacy_link{position:absolute;top:0;right:0;}
.privacy_link a{font-size: 13px;padding: 7px 10px;}
.saf_tit h4:before{content:'●';font-size:12px;position:relative;top:-2px;margin-right:5px;}
.office_ft_txt{background:#424242;}
.office_ft_txt ul{width:1100px;margin:0 auto;display:block;height:40px;line-height:40px;color:#fff;font-size:16px;}
.office_ft_txt ul li{width:50%;text-align:center;float:left;}
.office_ft_txt ul li:before{content:'●';font-size:11px;position:relative;top:-2px;margin-right:5px;}
.saf_btn{padding:15px 0px;width:150px;background:#0071e5;color:#fff;display:inline-block;font-size:17px;font-weight:600;border-radius:5px;cursor:pointer;font-family:'gs',sans-serif;line-height: initial;}
.cancle_btn{padding:15px 0px;width:150px;background:#4a4c4e;color:#fff;display:inline-block;font-size:17px;font-weight:600;border-radius:5px;cursor:pointer;margin-right:8px;font-family:'gs',sans-serif;line-height: initial;}
.price_cs_btn{padding:15px 0;width:150px;margin-left:10px;background:#4a4c4e;color:#fff;display:inline-block;font-size:15px;font-weight:600;border-radius:5px;cursor:pointer;}
.price_cs_btn a{color:#fff;font-weight:600;}
.show_program_customer2{padding:15px 0;width:150px;margin-left:10px;background:#4a4c4e;color:#fff;display:inline-block;font-size:15px;font-weight:600;border-radius:5px;cursor:pointer;}
.ta_div { float:left;margin-bottom:20px;width:100%;}
.user_box {padding:20px 0; border-top:1px dotted #ccc;border-bottom:1px dotted #ccc;text-align:left;}

/* 23.11.07 남상복 수정, 평가점수 */
input[name="satis_score"]{width: 12px !important;height: 12px;vertical-align: middle;line-height: 16px;margin-right: 6px;margin-bottom: 4px;cursor: pointer;}
input[name="satis_score"] + label{margin-right: 15px;font-size: 16px;line-height: 16px;font-weight: bold;}
</style>
    <div class="wrap" onclick="closeNav()">
        <div class="office_title">
            <img src="./images/order/satis_tit_m.png" style="width:80%;max-width:643px;">
        </div>
        <div class="saf_layout">
            <div style="padding:0 20px 20px 20px;">
                <img src="./images/order/coupon_m_01.png" style="margin-bottom:16px;">
                <p style="font-size:0.8em;line-height:1.75;font-weight:600;font-family:'gs',sans-serif;">
                    당사 제품 사용과 관련하여 고객만족도를 등록해 주세요.<br>
                    등록하신 자료는 <em>고객관리(품질개선)을 위한<br>긴요한 자료로 활용</em>됩니다.<br>
                    본 자료는 당사 <em>관리자 외 열람되지 않습니다.</em>
                </p>
            </div>
            <div class="saf_table">
<form name='satis_form' id='satis_form' method='post' action='../millennium/customer_satisfaction_process.php'>
                    <input type="hidden" name="clicktime" id="clicktime" value="0">
                    <input type='hidden' name='contact_time' value='1'>
                    <input type='hidden' name='smtitle' value='satis-mobile'>
                    <input type='hidden' name='ismode' value='satis'>
                    <input type='hidden' name='smoption' value=''>
                    <input type='hidden' name='come_from' value='<?php echo $_GET['come_from'];?>'>
                    <table style="width:100%;">
                        <tbody>
                            <tr>
                                <!--<th width="200px">
                                    <div><img src="./img/customer/satis_icon.png" style="margin-right:12px;opacity:0.5;"><p>고객만족도</p></div>
                                </th>-->
                                <td>
                                    <div class="height:radio_box">
                                        <div class="clearfix" >
                                            <p class="radio_p">
                                                <span class="radioText">당사 제품을 선택하게 된 동기는 무엇입니까?</span>
                                            </p>
                                            <div class="satis_msg01 ta_div">
                                                <textarea placeholder="내용을 적어주세요." name='f_motive'></textarea>
                                            </div>
                                        </div>
                                        <div class="clearfix" >
                                            <p class="radio_p">
                                                <img src="./images/order/smile.png" style="margin-right:14px;float:left;">
                                                <label for="satis01"><span class="icon radio"></span></label>
                                                <span class="radioText">만족</span>
                                                <input id="satis01" hidden type="radio" name="satis_type" value='만족' data-val='1'>
                                            </p>
                                            <div class="satis_msg01 ta_div">
                                                <textarea placeholder="만족 내용을 적어주세요." name='smdetail1' disabled id='sd1'></textarea>
                                            </div>
                                        </div>
                                        <div class="clearfix" >
                                            <p class="radio_p">
                                                <img src="./images/order/frown.png" style="margin-right:14px;float:left;">
                                                <label for="satis02"><span class="icon radio"></span></label>
                                                <span class="radioText">불만족</span>
                                                <input id="satis02" hidden type="radio" name="satis_type" value='불만족' data-val='2'>
                                            </p>
                                            <div class="satis_msg02 ta_div">
                                                <textarea placeholder="불만족 내용을 적어주세요." name='smdetail2' disabled id='sd2'></textarea>
                                            </div>
                                        </div>

                                        <!-- 평가점수 기재, 23.11.07 추가 / 남상복 -->
                                        <div class="clearfix" >
                                            <p class="radio_p">
                                                <img src="./images/order/satis_score.png" style="margin-right:14px;float:left;">
                                                <span class="radioText">만족도 점수(만점 5점, 필수 선택)</span>
                                            </p>
                                            <div style="margin: 20px 0px 30px;">
                                                <input type="radio" name="satis_score" value="5" id="satis_score5" data-val='5'><label for="satis_score5">5점</label>
                                                <input type="radio" name="satis_score" value="4" id="satis_score4" data-val='4'><label for="satis_score4">4점</label>
                                                <input type="radio" name="satis_score" value="3" id="satis_score3" data-val='3'><label for="satis_score3">3점</label>
                                                <input type="radio" name="satis_score" value="2" id="satis_score2" data-val='2'><label for="satis_score2">2점</label>
                                                <input type="radio" name="satis_score" value="1" id="satis_score1" data-val='1'><label for="satis_score1">1점</label>
                                            </div>
                                        </div>

                                        <div class="clearfix" >
                                            <p class="radio_p">
                                                <img src="./images/order/thumbs.png" style="margin-right:14px;float:left;">
                                                <label for="satis03"><span class="icon radio"></span></label>
                                                <span class="radioText">칭찬직원 / 개선점</span>
                                                <input id="satis03" hidden type="radio" name="satis_type2" value='칭찬직원' data-val='3'>
                                            </p>
                                            <div class="satis_msg03 ta_div">
                                                <textarea placeholder="칭찬하고 싶은 직원이나 개선점이 있으면 적어주세요." name='smdetail3' disabled id='sd3'></textarea>
                                            </div>
                                        </div>
                                        <div class="clearfix user_box">
                                            <p class="radio_p">
                                                <img src="./images/order/user.png" style="margin-right:14px;float:left;">
                                                <span class="radioText">등록자(사은품 수령시 필수정보)</span>
                                            </p>
                                            <div class="satis_msg04" style="margin-bottom:0;">
                                                <ul>
                                                    <li style="margin-bottom:10px;">
                                                        <label class="label_s">상호</label>
                                                        <input type="text" name='smcompany' value=''>
                                                    </li>
                                                    <li style="margin-bottom:10px;">
                                                        <label class="label_s">업종</label>
                                                        <input type="text" name='industry_type' value=''>
                                                    </li>
                                                    <li style="margin-bottom:10px;">
                                                        <label class="label_s">성명</label>
                                                        <input type="text" name='smname' value=''>
                                                    </li>
                                                    <li>
                                                        <label class="label_s">핸드폰</label>
                                                        <input type="text" name='smphone' value=''>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                        <div class="clearfix" style='margin-top:15px;'>
                                            <p class="radio_p">
                                                <span class="radioText">스팸방지 보안</span>
                                            </p>
                                            <div class="satis_msg03 ta_div">
<style>
.simple_captcha_class  span { font-size:20px !important; }
.s_btn {background: #012D6A;font-size:14px;color:#fff;border-radius:5px;padding:10px 43px;cursor:pointer;}
.scaptcha_ul_class li { line-height:47px; }
.scaptcha_ul_class li:nth-child(3) span {display:block;text-align:center;margin-top: -40px;}
.scaptcha_ul_class li:nth-child(3) input {width:-webkit-fill-available !important;}
</style>
<?php

    
function captcha_str_ch($v){ // 세선파일 디렉토리 설정시 캇차 이미지 처리 안되어서 그냥 텍스트로 하되 해킹프로그램 긁기로 최대한 처리안되게 해주는 역활
        
$c_array = array('gray','red','blue','green','pink','purple');
        
$v_cnt strlen($v);
        
$rtn "";
        for(
$i=0;$i<$v_cnt;$i++){
            
$rtn .= "<span style='color:{$c_array[$i]}'>{$v[$i]}&nbsp;</span>";
        }
        return 
$rtn;
    }

    include(
$_SERVER['DOCUMENT_ROOT']."/inc_pack/scaptcha/simple-php-captcha.php");
    
$captcha simple_php_captcha();
    
$_SESSION['captcha'] = $captcha;
    
$_SESSION['captcha_code'] = $captcha['code'];
    
$c_code captcha_str_ch($_SESSION['captcha']['code']);
    
$_SESSION['captcha']['code_ck'] = "";
    echo 
"<ul class='scaptcha_ul_class'><li style='float:left;' class='txt21 simple_captcha_class'>{$c_code}</li><li style='float:left;'><span style='padding:10px 20px;margin:0 12px;cursor:pointer;' class='pointer simple_captcha_change s_btn'>새로고침</span></li>";
    echo 
"<li style=''>&nbsp;<input type='text' name='captcha_input' class='' style='margin-bottom:5px;width:150px;' placeholder=''>&nbsp;<span style='font-size:0.9em;'>대소문자 구분해서 입력하시기 바랍니다.</span></li></ul>";
?>
<script>
    $(function(){
        $(".simple_captcha_change").click(function(){ // 스팸방지 리로드
            $.get("../millennium/ajax.captcha_reload.php",function(rtn){
                $(".simple_captcha_class").html(rtn);
            })    ;
        });
    });
</script>    
                                            </div>
                                        </div>
                                    </div>

                                </td>
                            </tr>
                        </tbody>
                    </table>
</form>
                    <div class="cancle_btn">취소</div>
                    <div class="saf_btn">저장</div>
                </div>
        </div><!-- //contents -->
        
        <? include ("./freebies_inc.php"); ?>

    </div><!-- //wrap -->

<script>
/* radio 버튼 체크*/
$(function() {
   var raioEle = $('.radio_p label');
   raioEle.on('click', function() {
       $idx = raioEle.index(this);
       if($idx==1){
          $(".radio_p").removeClass('checked');
       } else {
            $(".radio_p").eq(2).removeClass('checked');
       }

    // 선택 radio 체크시
    $(this).parent().addClass('checked');

    $v0 = $('.radio_p').eq(1).hasClass('checked');
    $v1 = $('.radio_p').eq(2).hasClass('checked');
    $v2 = $('.radio_p').eq(3).hasClass('checked');

    // alert($v0+" "+$v1+" "+$v2);

    if($v1==false){
        $("#sd2").attr("disabled",true);
        $("textarea[name='smdetail2']").val("");
    }
    if($v1==true){
        $("#sd1").attr("disabled",true);
        $("#sd2").attr("disabled",false);
        $("#sd3").attr("disabled",true);
        $("textarea[name='smdetail1'], textarea[name='smdetail3']").val("");
        $("#satis03").prop("checked", false);
    }
    if($v0==true){
        $("#sd1").attr("disabled",false);
    }
    if($v2==true){
        $("#sd3").attr("disabled",false);
    }
   });
});

function postSearch3(zip1,zip2,addr1){
    new daum.Postcode({
        oncomplete: function(data) {
        // 팝업에서 검색결과 항목을 클릭했을때 실행할 코드를 작성하는 부분입니다.
        // 예제를 참고하여 다양한 활용법을 확인해 보세요.
            zoncode1 = data.zonecode.substring(0,3);
            zoncode2 = data.zonecode.substring(3,5);

            if(1==1){ // 5자리 우편번호 사용  이전꺼 사용시엔 1==2로 세팅
                $("#"+zip1).val(data.zonecode);
                /*$("#"+zip1).val(zoncode1);    $("#"+zip2).val(zoncode2);*/
            } else {
                $("#"+zip1).val(data.postcode1);
                $("#"+zip2).val(data.postcode2);
            }

              // 각 주소의 노출 규칙에 따라 주소를 조합한다.
            // 내려오는 변수가 값이 없는 경우엔 공백('')값을 가지므로, 이를 참고하여 분기 한다.
            var fullAddr = ''; // 최종 주소 변수
            var extraAddr = ''; // 조합형 주소 변수

            // 사용자가 선택한 주소 타입에 따라 해당 주소 값을 가져온다.
            if (data.userSelectedType === 'R') { // 사용자가 도로명 주소를 선택했을 경우
                fullAddr = data.roadAddress;

            } else { // 사용자가 지번 주소를 선택했을 경우(J)
                fullAddr = data.jibunAddress;
            }

            // 사용자가 선택한 주소가 도로명 타입일때 조합한다.
            if(data.userSelectedType === 'R'){
                //법정동명이 있을 경우 추가한다.
                if(data.bname !== ''){
                    extraAddr += data.bname;
                }
                // 건물명이 있을 경우 추가한다.
                if(data.buildingName !== ''){
                    extraAddr += (extraAddr !== '' ? ', ' + data.buildingName : data.buildingName);
                }
                // 조합형주소의 유무에 따라 양쪽에 괄호를 추가하여 최종 주소를 만든다.
                extraAddr = (extraAddr !== '' ? ' ('+ extraAddr +')' : '');
            }

            $("#"+addr1).val(fullAddr+" "+extraAddr+" ");
            $("#addr_d").focus();
        }
    }).open();
}

$(function(){

    $("input[name='satis_type']").click(function(){
        /*$val = $(this).data("val");
        //$(".ta_div").hide();
        $(".ta_div textarea").attr("disabled",true);
        $("textarea[name='smdetail"+$val+"']").attr("disabled",false);
        if($val=='1'){ $("textarea[name='smdetail2'], textarea[name='smdetail3']").val("");    }
        if($val=='2'){ $("textarea[name='smdetail1'], textarea[name='smdetail3']").val("");    }
        if($val=='3'){ $("textarea[name='smdetail1'], textarea[name='smdetail2']").val("");    }*/
    });

    $(".saf_btn").click(function(){
        if($("textarea[name='f_motive']").val()==''){
            alert("당사제품 선택 동기를 입력하세요."); return;
        } else {
            $("input[name='smoption']").val($("textarea[name='f_motive']").val());
        }

        $flag = "0"; $detail_idx = 0; $type_val = "";
        $("input[name='satis_type']").each(function(idx,val){
            if($(this).is(":checked")==true){ 
                $flag = "1"; 
                $detail_idx = idx+1;
                $type_val = val.value;
            }
        });

        if($flag=='0'){
            alert("만족도 유형을 선택하시기 바랍니다."); return;
        }
        if($("#satis_form").find("textarea[name='smdetail"+$detail_idx+"']").val().trim()==''){
            alert($type_val+" 내용을 입력하시기 바랍니다."); return;
        }

        /* 23.11.07 남상복 수정 */
        if($('input[name="satis_score"]').is(":checked") == false){
            alert("평가점수를 체크하시기 바랍니다.");
            $('input[name="satis_score"]').eq(1).focus();
            return;
        }

        if($("input[name='smcompany']").val()==''){
            alert("상호명을 입력하시기 바랍니다."); return;
        }
        if($("input[name='industry_type']").val()==''){
            alert("업종을 입력하시기 바랍니다."); return;
        }
        if($("input[name='smname']").val()==''){
            alert("성명을 입력하시기 바랍니다."); return;
        }
        if($("input[name='smphone']").val()==''){
            alert("핸드폰번호를 입력하시기 바랍니다."); return;
        }

        if($("textarea[name='f_motive']").val().length < 10){
            alert("제품선택동기를 10자 이상 작성해 주시기 바랍니다."); return;
        }
        if($("#satis01").is(":checked") == true){
            if($("textarea[name='smdetail1']").val().length < 10){
                alert("만족도를 10자 이상 작성해 주시기 바랍니다."); return;
            }
        }
        if($("#satis02").is(":checked") == true){
            if($("textarea[name='smdetail2']").val().length < 10){
                alert("불만족도를 10자 이상 작성해 주시기 바랍니다."); return;
            }
        }
        if($("#satis03").is(":checked") == true){
            if($("textarea[name='smdetail3']").val().length < 10){
                alert("칭찬직원/개선점을 10자 이상 작성해 주시기 바랍니다."); return;
            }
        }

        if($("#satis_form").find("input[name='captcha_input']").val()==''){
            alert("스팸방지보안 문구를 입력하시기 바랍니다."); return;
        }
        if(confirm('해당내용으로 만족도를 제출하시겠습니까?')){
            $("#satis_form").submit();
        }
    });
    $(".cancle_btn").click(function(){
        location.href='/html/m';
    });
});

</script>
<?include("./include/footer.php");?>