/home/mjc1/public_html/html/m/introduce_ev.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
<? 
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);

//24.02.14 남상복 수정
//24.02.14 기준, 해당파일은 모바일문자 이벤트전용 소개이벤트 등록화면입니다, 수정시 홍재원 팀장님께 확인 후 작업하시기 바랍니다
//해당화면을 통해 이벤트 참여할 경우, 기존 소개이벤트와 구별하여 회사관리자에 데이터 등록이 됩니다(해당 이벤트 금액 50,000원/기존의 다른 이벤트금액 30,000원)

//24.02.22 남상복 수정 / 홍재원 팀장 요청
//기존 파일명 customer_recommend_ev.php 에서 recom_ev.php 로 변경
?>
<script src="http://mattstow.com/experiment/responsive-image-maps/jquery.rwdImageMaps.min.js"></script>
</div>

<style>
.office_title{/* height:136px; background: linear-gradient(0deg, #F8F8F8, #FFEFB5);*/background: #CCFFED;text-align: center;}

.wrap{margin-top: 27px;}
.wrap.mobile {/* margin: 0px 20px; */margin-top: 18px;}
.recom_layout{padding-top: 20px;margin: 0 20px;}
.company_tit{font-size: 20px;font-weight: 600;line-height: 20px;color: #222;margin-bottom: 20px;}
.company_icon{width: 20px;margin-right: 10px;}
.recom_tit{display:inline-block;margin-bottom:20px;line-height: 24px;}
.recom_tit h4{float:left;color:#0071e4;font-size:17px;font-weight:600;}
.recom_tit h4:before{content:'●';font-size:12px;position:relative;top:-2px;margin-right:5px;}
.recom_tit p{float:left;text-align:left;font-size:16px;}
.recom_layout em {font-weight:600;color:#0071e5;font-family:'gs',sans-serif;}
.recom_tit span{font-weight:600}
.recom_info {padding-bottom:35px;width:900px;margin:auto;}
.recom_info img{margin-left: 30px;}
.recom_info:after {clear:both;content:'';display:block;}

.event_ttl{color: #515151;font-size: 20px;font-weight: bold;line-height:20px;margin-bottom: 15px;text-align: center;}
.ico_dia{display: inline-block;width: 8px;height: 8px;background: #515151;transform: rotate(45deg);margin: 0px 10px;position: relative;top: -3px;}

.radio_p label { display: block;cursor: pointer; vertical-align: top;width: 42px;height: 42px;margin-right: 10px;}
.radio_p label .icon.radio { display: block; width: 42px;height: 42px;background: url('./images/customer_recommend/recomd_btn_m.png') no-repeat -42px 0; }
.radio_p.checked label .icon.radio { background-position: 0px 0px; }
.atte_spam .radio_p .radioText {vertical-align:middle;font-size:20px;font-weight: 600;font-family:'Nanum Gothic',sans-serif;line-height:32px;}

.label_s{font-size: 16px;color: #222;line-height: 16px;}
.recom_company_box_inner{display: flex;flex-wrap:wrap;justify-content: space-between;}
.recom_company_box_inner .input_box{width: 100%;}
.recom_company_box_inner .input_box input{width: 100%;height: 42px;border: 2px solid #BEBEBE;border-radius: 8px;background: #fff;box-sizing: border-box;padding: 0px 10px;}
.input_box .label_s{margin-bottom: 10px;display: block;margin-top: 20px;}
/* 연락처 */
.call_number .phone_number{display: flex;justify-content: space-between;width: 100%;line-height: 42px;font-size: 30px;color: #BEBEBE;}
.phone_number input{width: 30% !important;}
/* 소개제품 */
.recom_prod{width: 100%;margin-top: 20px;}
.recom_prod input{width: 100%;height: 42px;border: 2px solid #BEBEBE;border-radius: 8px;background: #F2F2F2;box-sizing: border-box;padding: 5px 50px 5px 10px;font-size: 14px;line-height: 26px;cursor: pointer;margin-top: 10px;}

/* 구매여부확인 */
.buy_way{margin-top: 20px;}
.buy_way::after{content: '';display: block;clear: both;}
.buy_way .label_tit{font-size: 16px;color: #222;line-height: 20px;margin-bottom: 10px;}
.buy_way .radio_p:nth-child(2){margin-right: 30px;}
.buy_way .radio_p label{float: left;}
.radioText{float: left;font-size: 16px;font-weight: 600;line-height: 42px;color: #222;}

/* 주의문구 */
.attention_box{margin-bottom: 50px;}
.attention_txt{font-size: 20px;line-height: 34px;color: #497CFF;}

/* 스팸방지 보안 */
.simple_captcha_class  span { font-size:20px !important; }
.atte_spam .radioText{float: none;}
.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) input{height: 42px;border: 2px solid #BEBEBE;border-radius: 8px;background: #fff;box-sizing: border-box;padding: 5px 50px 5px 20px;font-size: 16px;line-height: 26px;cursor: pointer;}

/* 취소,저장버튼 */
.btn_list{margin-top: 20px;margin-bottom: 50px;text-align: center;display: flex;justify-content: space-between;}
.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:'Nanum Gothic',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:'Nanum Gothic',sans-serif;line-height: initial;}

#freebies h1{border-top: 1px solid #4e4e4e !important;}
</style>

<div class="wrap mobile" onclick="closeNav()">
    <div class="office_title" style="position: relative;">
        <!-- <img src="./images/customer_recommend/m_recom_tit_ev5-9.png" style="width: 100%;"> -->
        <img src="./images/customer_recommend/m_recom_tit_ev5-10.png" style="width: 100%;">
    </div>
    <div class="recom_layout">
        <!-- <h3 class="event_ttl">
            <span class="ico_dia"></span>이벤트 참여<span class="ico_dia"></span>
        </h3> -->
        <div class="recom_table">
            <form name='recom_form' id='recom_form' method='post' action='../millennium/customer_recommend_process.php'>
                <input type="hidden" name="type" value="mobile">
                <input type="hidden" name="event_type" value="message_event"><!--이벤트 구별 -->
                <input type="hidden" name="flg" value="1">

                <div class="recom_company_box" style="padding: 30px 0;border-top: 1px solid #4e4e4e;">
                    <h3 class="company_tit">
                        <img class="company_icon" src="./images/customer_recommend/recom_icon_pc1-1.png" alt="company_icon_blue">소개 업체
                    </h3>
                    <div class="recom_company_box_inner">
                        <div class="input_box">
                            <label class="label_s" style="margin-top: 0px;">상호</label>
                            <input type="text" name='intro_company' value='' >
                        </div>
                        <div class="input_box">
                            <label class="label_s">성명</label>
                            <input type="text" name='intro_name' value='' >
                        </div>
                        <div class="input_box call_number">
                            <label class="label_s">연락처</label>
                            <div class="phone_number">
                                <input type="tel" name='intro_tel1' value='' maxlength=4 onKeyup="this.value=this.value.replace(/[^-0-9]/g,'');">
                                -
                                <input type="tel" name='intro_tel2' value='' maxlength=4 onKeyup="this.value=this.value.replace(/[^-0-9]/g,'');">
                                -
                                <input type="tel" name='intro_tel3' value='' maxlength=4 onKeyup="this.value=this.value.replace(/[^-0-9]/g,'');">
                            </div>
                        </div>
                        <!-- <div class="recom_prod">
                            <label class="label_s">소개제품</label>
                            <input readonly name="intro_prod" value="천년경영3cs" >
                        </div> -->
                    </div>
                </div>
                <div class="recom_company_box recommend" style="padding: 30px 0;border-top: 1px dashed #A6A6A6;">
                    <h3 class="company_tit">
                        <img class="company_icon" src="./images/customer_recommend/recom_icon_pc1-2.png" alt="company_icon_red">소개받은 업체
                    </h3>
                    <div class="recom_company_box_inner">
                        <div class="input_box">
                            <label class="label_s" style="margin-top: 0px;">상호</label>
                            <input type="text" name='recom_company' value='' >
                        </div>
                        <div class="input_box">
                            <label class="label_s">성명</label>
                            <input type="text" name='recom_name' value='' >
                        </div>
                        <div class="input_box call_number">
                            <label class="label_s">연락처</label>
                            <div class="phone_number">
                                <input type="tel" name='recom_tel1' value='' maxlength=4 onKeyup="this.value=this.value.replace(/[^-0-9]/g,'');">
                                -
                                <input type="tel" name='recom_tel2' value='' maxlength=4 onKeyup="this.value=this.value.replace(/[^-0-9]/g,'');">
                                -
                                <input type="tel" name='recom_tel3' value='' maxlength=4 onKeyup="this.value=this.value.replace(/[^-0-9]/g,'');">
                            </div>
                        </div>
                    </div>
                    <!-- 구매여부 확인 -->
<!--                     <div class="buy_way">
                        <p class="label_tit">구매여부를 선택하세요.</p>
                        <div class="radio_p" style="float: left;">
                            <label for="recomd01"><span class="icon radio"></span></label>
                            <span class="radioText">소개 전(비구매)</span>
                            <input id="recomd01" hidden type="radio" name="recom_result" value='비구매' data-val='1'>
                        </div>
                        <div class="radio_p" style="float: left;">
                            <label for="recomd02"><span class="icon radio"></span></label>
                            <span class="radioText">구매완료</span>
                            <input id="recomd02" hidden type="radio" name="recom_result" value='구매완료' data-val='2'>
                        </div>
                    </div> -->
                </div>
                <div class="atte_spam" style="padding: 20px 0px;border-top: 1px dashed #A6A6A6;border-bottom: 1px dashed #A6A6A6;">
                    <p class="radio_p">
                        <span class="radioText">스팸방지보안</span>
                    </p>
                    <div class="satis_msg04" style="margin-bottom:0;">

    <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;width: 35%;' 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: 100%;' 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><!--//satis_msg04-->
                </div><!--//atte_spam-->
            </form>

            <div class="btn_list">
                <div class="cancle_btn">취소</div>
                <div class="saf_btn">저장</div>
            </div>
        </div><!-- //recom_table -->
    </div><!-- //recom_layout -->
    
</div><!-- //wrap -->

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

<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(1).removeClass('checked');
          }
   
           // 선택 radio 체크시
           $(this).parent().addClass('checked');
   }); */
    

    $('[name="intro_tel1"]').on('keyup',function(){
        if($(this).val().length == 3){
            $('[name="intro_tel2"]').focus();
        };
    });

    $('[name="intro_tel2"]').on('keyup',function(){
        if($(this).val().length == 4){
            $('[name="intro_tel3"]').focus();
        };
    });

   
    $('[name="recom_tel1"]').on('keyup',function(){
        if($(this).val().length == 3){
            $('[name="recom_tel2"]').focus();
        };
    });

    $('[name="recom_tel2"]').on('keyup',function(){
        if($(this).val().length == 4){
            $('[name="recom_tel3"]').focus();
        };
    });



   // 저장버튼 클릭
    $(".saf_btn").click(function(){

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

        // 필수검사
        if($("input[name='intro_company']").val().trim() == "") {alert("소개업체의 상호명을 입력해주세요."); return;}
        if($("input[name='intro_name']").val().trim() == "") {alert("소개업체의 성명을 입력해주세요."); return;}
        if($("input[name='intro_tel1']").val().trim() == "" || $("input[name='intro_tel2']").val().trim() == "" || $("input[name='intro_tel3']").val().trim() == "") {alert("소개업체의 연락처를 입력해주세요."); return;}
        //if($("input[name='intro_prod']").val().trim() == "") {alert("소개해주신 제품을 선택해주세요."); return;}

        if($("input[name='recom_company']").val().trim() == "") {alert("소개업체의 상호명을 입력해주세요."); return;}
        if($("input[name='recom_name']").val().trim() == "") {alert("소개업체의 성명을 입력해주세요."); return;}
        if($("input[name='recom_tel1']").val().trim() == "" || $("input[name='recom_tel2']").val().trim() == "" || $("input[name='recom_tel3']").val().trim() == "") {alert("소개업체의 연락처를 입력해주세요."); return;}

    /*    if($flag=='0'){
            alert("구매여부를 선택해주세요."); return;
        } */

        if($("input[name='captcha_input']").val().trim() == "") {alert("스팸방지보안코드를 입력해주세요"); return;}

        $v = ck_captcha_ajax();
        if($v=='ok'){ 
            $("#recom_form").submit();
        } else {
            alert($v);
        }
    });

    // 취소버튼 클릭
    $(".cancle_btn").click(function(){
        location.href = "./intro.php";
    });
});

function ck_captcha_ajax(){
    var form_data = $("#recom_form").serialize();
    var ax = "";
    $.ajax({type:"post", url:"../millennium/ajax.simple_captcha.php",data:form_data, dataType : "html", async:false, contentType: 'application/x-www-form-urlencoded; charset=euc-kr', 
        success:function(xml){    
            ax = xml;
        },
        error:function(rtn,status,error){
            ax = false;
        }
    });

    return ax;
}
</script>